diff --git a/Forms/Controls/ColorizedPlainTextBox.cs b/Forms/Controls/ColorizedPlainTextBox.cs
old mode 100644
new mode 100755
index 26dd7de..acdaa3f
--- a/Forms/Controls/ColorizedPlainTextBox.cs
+++ b/Forms/Controls/ColorizedPlainTextBox.cs
@@ -164,6 +164,10 @@ public bool IsMsftEditDllAvailable()
}
static MsftLoader m_MsftLoader = new MsftLoader();
+/*
+// We don't anymore build for framework 2.0 and on with versions the below code caused
+// a crash during startup: System.ComponentModel.Win32Exception 'Class already exists'
+
protected override CreateParams CreateParams
{
// This makes the framework 2.0 RichTextBox much faster. It handles well some other things too, for example
@@ -181,7 +185,7 @@ protected override CreateParams CreateParams
return create_params;
}
}
-
+*/
string m_PrevText;
int m_PrevSelStart;
int m_PrevSelLength;
diff --git a/VSMainWindow.cs b/VSMainWindow.cs
old mode 100644
new mode 100755
index 1f5957d..2ff093c
--- a/VSMainWindow.cs
+++ b/VSMainWindow.cs
@@ -193,19 +193,19 @@ protected override void WndProc(ref Message m)
void TryfindTitleTextBlock()
{
- DependencyObject root = HwndSource.FromHwnd(m_MainHWND).RootVisual as DependencyObject;
- if (root != null)
- {
- DependencyObject titlebar = FindInSubtreeByClassNamePostfix(root, ".MainWindowTitleBar") as DependencyObject;
- if (titlebar != null)
- {
- DependencyObject dock_panel = FindChildByClassNamePostfix(titlebar, ".DockPanel");
- if (dock_panel != null)
- {
- m_TitleTextBlock = FindChildByClassNamePostfix(dock_panel, ".TextBlock") as TextBlock;
- }
- }
- }
+ HwndSource hs = HwndSource.FromHwnd(m_MainHWND);
+ if (hs == null)
+ return;
+ DependencyObject root = hs.RootVisual as DependencyObject;
+ if (root == null)
+ return;
+ DependencyObject titlebar = FindInSubtreeByClassNamePostfix(root, ".MainWindowTitleBar") as DependencyObject;
+ if (titlebar == null)
+ return;
+ DependencyObject dock_panel = FindChildByClassNamePostfix(titlebar, ".DockPanel");
+ if (dock_panel == null)
+ return;
+ m_TitleTextBlock = FindChildByClassNamePostfix(dock_panel, ".TextBlock") as TextBlock;
}
DependencyObject FindChildByClassNamePostfix(DependencyObject parent, string postfix)
diff --git a/VSWindowTitleChangerPackage.cs b/VSWindowTitleChangerPackage.cs
index 1aed2d9..0845750 100755
--- a/VSWindowTitleChangerPackage.cs
+++ b/VSWindowTitleChangerPackage.cs
@@ -36,7 +36,7 @@ namespace VSWindowTitleChanger
[ProvideLoadKey("Standard", "2.0", "Visual Studio Window Title Changer", "WoofWoof", 1)]
// This attribute is used to register the informations needed to show the this package
// in the Help/About dialog of Visual Studio.
- [InstalledProductRegistration(false, "#110", "#112", "2.1.10", IconResourceID = 400)]
+ [InstalledProductRegistration(false, "#110", "#112", "2.1.11", IconResourceID = 400)]
[Guid(GuidList.guidVSWindowTitleChangerPkgString)]
[ProvideOptionPage(typeof(ToolOptions), "VS Window Title Changer", "Settings", 0, 0, true)]
[ProvideAutoLoad(Microsoft.VisualStudio.Shell.Interop.UIContextGuids80.DesignMode)]
diff --git a/VSWindowTitleChanger_2017.csproj b/VSWindowTitleChanger_2017.csproj
index 6ea27ba..525d1f1 100644
--- a/VSWindowTitleChanger_2017.csproj
+++ b/VSWindowTitleChanger_2017.csproj
@@ -95,12 +95,12 @@
+
-
-
+
diff --git a/source.extension.vsixmanifest b/source.extension.vsixmanifest
index 76eb059..cd8aec1 100755
--- a/source.extension.vsixmanifest
+++ b/source.extension.vsixmanifest
@@ -1,7 +1,7 @@
-
+
Visual Studio Window Title Changer
Changes the Visual Studio Window Title by evaluating a user defined expression. Extremely helpful when working with multiple branches of the same project.
http://visualstudiogallery.msdn.microsoft.com/2e8ebfe4-023f-4c4d-9b7a-d05bbc5cb239
@@ -11,10 +11,10 @@
VSWindowTitleChanger_Preview.png
-
-
-
-
+
+
+
+
@@ -23,6 +23,6 @@
-
+