[commit] r2608 - trunk/SDK/DotNet/CSharpComponentWizard
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Thu Oct 1 10:09:31 CDT 2015
Author: lattmann
Date: Thu Oct 1 10:09:31 2015
New Revision: 2608
Log:
GME-454 fixes CSharpComponentWizard Windows 10 issue if VS2010 or VS2012 is installed.
Modified:
trunk/SDK/DotNet/CSharpComponentWizard/MainWindow.xaml.cs
Modified: trunk/SDK/DotNet/CSharpComponentWizard/MainWindow.xaml.cs
==============================================================================
--- trunk/SDK/DotNet/CSharpComponentWizard/MainWindow.xaml.cs Wed Aug 19 15:13:31 2015 (r2607)
+++ trunk/SDK/DotNet/CSharpComponentWizard/MainWindow.xaml.cs Thu Oct 1 10:09:31 2015 (r2608)
@@ -19,6 +19,7 @@
public const string VS2010_REGISTRY_KEYPATH = @"SOFTWARE\Microsoft\VisualStudio\10.0";
public const string VS2012_REGISTRY_KEYPATH = @"SOFTWARE\Microsoft\VisualStudio\11.0";
public const string VS2013_REGISTRY_KEYPATH = @"SOFTWARE\Microsoft\VisualStudio\12.0";
+ //public const string VS2015_REGISTRY_KEYPATH = @"SOFTWARE\Microsoft\VisualStudio\14.0";
public const string VS_PROJECTFOLDER_REGISTRY_KEYNAME = "VisualStudioProjectsLocation";
public const string VS_USERPROJECTTEMPLATEPATH_REGISTRY_KEYNAME = "UserProjectTemplatesLocation";
public const string VS_INSTALLDIR_KEYNAME = "InstallDir";
@@ -41,37 +42,33 @@
public MainWindow()
{
System.Type type = null;
+ RegistryKey masterKey = null;
+ //if (type == null)
+ //{
+ // type = System.Type.GetTypeFromProgID("VisualStudio.DTE.14.0");
+ // masterKey = Registry.CurrentUser.OpenSubKey(MainWindow.VS2015_REGISTRY_KEYPATH);
+ //}
if (type == null)
{
type = System.Type.GetTypeFromProgID("VisualStudio.DTE.12.0");
+ masterKey = Registry.CurrentUser.OpenSubKey(MainWindow.VS2013_REGISTRY_KEYPATH);
}
if (type == null)
{
type = System.Type.GetTypeFromProgID("VisualStudio.DTE.11.0");
+ masterKey = Registry.CurrentUser.OpenSubKey(MainWindow.VS2012_REGISTRY_KEYPATH);
}
if (type == null)
{
type = System.Type.GetTypeFromProgID("VisualStudio.DTE.10.0");
+ masterKey = Registry.CurrentUser.OpenSubKey(MainWindow.VS2010_REGISTRY_KEYPATH);
}
if (type == null || Activator.CreateInstance(type, true) == null)
{
- MessageBox.Show(Assembly.GetExecutingAssembly().GetName().Name + " requires Visual Studio 2010, 2012, or 2013 Professional. It cannot work with Visual C# Express.", "", MessageBoxButton.OK, MessageBoxImage.Error);
+ MessageBox.Show(Assembly.GetExecutingAssembly().GetName().Name + " requires Visual Studio 2010, 2012 or 2013 Professional. It cannot work with Visual C# Express.", "", MessageBoxButton.OK, MessageBoxImage.Error);
System.Environment.Exit(11);
}
- RegistryKey masterKey = null;
- if (masterKey == null)
- {
- masterKey = Registry.CurrentUser.OpenSubKey(MainWindow.VS2013_REGISTRY_KEYPATH);
- }
- if (masterKey == null)
- {
- masterKey = Registry.CurrentUser.OpenSubKey(MainWindow.VS2012_REGISTRY_KEYPATH);
- }
- if (masterKey == null)
- {
- masterKey = Registry.CurrentUser.OpenSubKey(MainWindow.VS2010_REGISTRY_KEYPATH);
- }
if (masterKey != null)
{
@@ -754,7 +751,10 @@
string DevenvLocation = String.Empty;
RegistryKey masterKey = null;
-
+ //if (masterKey == null || masterKey.GetValue(MainWindow.VS_INSTALLDIR_KEYNAME) == null)
+ //{
+ // masterKey = Registry.LocalMachine.OpenSubKey(MainWindow.VS2015_REGISTRY_KEYPATH);
+ //}
if (masterKey == null || masterKey.GetValue(MainWindow.VS_INSTALLDIR_KEYNAME) == null)
{
masterKey = Registry.LocalMachine.OpenSubKey(MainWindow.VS2013_REGISTRY_KEYPATH);
More information about the gme-commit
mailing list