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

Renaming fails if open document is project properties #4

Closed TobiasBreuer closed 7 years ago

TobiasBreuer commented 7 years ago

Installed Version: 3.3.1 (installed just now (2016/10/13)) VisualStudio 2015 Professional Update 3

After installing the extension and re-opening VS, I recognized that the title has not been renamed. I did not change any of the settings for the extension so everything is default. When enabling the debug option, the output window shows this:

RenameVSWindowTitle: UpdateWindowTitle exception: System.ArgumentException: Value does not fall within the expected range. at EnvDTE80.DTE2.get_ActiveDocument() at ErwinMayerLabs.RenameVSWindowTitle.RenameVSWindowTitle.GetNewTitle(Solution solution, String pattern, SettingsSet cfg) at ErwinMayerLabs.RenameVSWindowTitle.RenameVSWindowTitle.UpdateWindowTitle()

When switching from the project properties window to a normal cs file, it works. Switching back again leads to the shown issue. So I think one will only recognize this, if the project properties window was the last active document when opening a solution.

mayerwin commented 7 years ago

Hi, thanks for reporting this. It was caused by DTE.ActiveDocument weirdly raising an exception under such a circumstance. I have fixed this in version 3.3.2, which I already pushed to the Gallery!