mayerwin / vs-customize-window-title

Customize Visual Studio Window Title - Visual Studio Extension
https://marketplace.visualstudio.com/items?itemName=mayerwin.RenameVisualStudioWindowTitle
MIT License
108 stars 30 forks source link

[startupProjectsNames] adds nothing to the title #28

Closed ugumba closed 6 years ago

ugumba commented 6 years ago

My solution has .NET Framework and ASP.NET Core projects. Regardless of which project is set as the startup project, nothing gets added to the title string. VS2017 15.7.6.

The debug output keeps dumping this:

CustomizeVSWindowTitle: ReplaceTag (startupProjectsNames) failed: System.ArgumentException: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)) at EnvDTE.SolutionClass.Item(Object index) at ErwinMayerLabs.RenameVSWindowTitle.Resolvers.StartupProjectNamesResolver.GetStartupProjectNames() in C:\Users\erwin\Dropbox\Projects\GitHub\vs-customize-window-title\CustomizeVSWindowTitle\Resolvers\SolutionResolver.cs:line 47 at ErwinMayerLabs.RenameVSWindowTitle.Resolvers.StartupProjectNamesResolver.Resolve(AvailableInfo info) in C:\Users\erwin\Dropbox\Projects\GitHub\vs-customize-window-title\CustomizeVSWindowTitle\Resolvers\SolutionResolver.cs:line 29 at ErwinMayerLabs.RenameVSWindowTitle.CustomizeVSWindowTitle.<>c__DisplayClass53_0.b__0(Match match) in C:\Users\erwin\Dropbox\Projects\GitHub\vs-customize-window-title\CustomizeVSWindowTitle\CustomizeVSWindowTitlePackage.cs:line 479

ugumba commented 6 years ago

It seems the tag only supports top-level projects. The exception occurs if the startup project is in a solution folder.

ugumba commented 6 years ago

I used the pattern "[startupProjectsNames] - [parentPath][solutionName] - [ideName]". To clarify my last message, the tag works if the startup project is top-level. It does not work if the startup project is in a solution folder.

mayerwin commented 6 years ago

Thanks, I have fixed this bug in 3.8.1 (6a6df88ae774e431d3160f822b57db23caf8a287) and pushed it to the marketplace.