static SyncVS() { EditorUserBuildSettings.activeBuildTargetChanged += new System.Action(SyncVS.SyncVisualStudioProjectIfItAlreadyExists); try { SyncVS.InstalledVisualStudios = SyncVS.GetInstalledVisualStudios() as Dictionary <VisualStudioVersion, string>; } catch (Exception ex) { Console.WriteLine("Error detecting Visual Studio installations: {0}{1}{2}", (object)ex.Message, (object)Environment.NewLine, (object)ex.StackTrace); SyncVS.InstalledVisualStudios = new Dictionary <VisualStudioVersion, string>(); } SyncVS.SetVisualStudioAsEditorIfNoEditorWasSet(); UnityVSSupport.Initialize(); }
static SyncVS() { SyncVS.Synchronizer = new SolutionSynchronizer(Directory.GetParent(Application.dataPath).FullName, new SyncVS.SolutionSynchronizationSettings()); try { SyncVS.InstalledVisualStudios = (SyncVS.GetInstalledVisualStudios() as Dictionary <VisualStudioVersion, VisualStudioPath[]>); } catch (Exception ex) { Console.WriteLine("Error detecting Visual Studio installations: {0}{1}{2}", ex.Message, Environment.NewLine, ex.StackTrace); SyncVS.InstalledVisualStudios = new Dictionary <VisualStudioVersion, VisualStudioPath[]>(); } SyncVS.SetVisualStudioAsEditorIfNoEditorWasSet(); UnityVSSupport.Initialize(); }
static SyncVS() { EditorUserBuildSettings.activeBuildTargetChanged = (Action)Delegate.Combine(EditorUserBuildSettings.activeBuildTargetChanged, new Action(SyncVS.SyncVisualStudioProjectIfItAlreadyExists)); try { InstalledVisualStudios = GetInstalledVisualStudios() as Dictionary <VisualStudioVersion, string>; } catch (Exception exception) { Console.WriteLine("Error detecting Visual Studio installations: {0}{1}{2}", exception.Message, Environment.NewLine, exception.StackTrace); InstalledVisualStudios = new Dictionary <VisualStudioVersion, string>(); } SetVisualStudioAsEditorIfNoEditorWasSet(); UnityVSSupport.Initialize(); }
static SyncVS() { SyncVS.Synchronizer = new SolutionSynchronizer(Directory.GetParent(Application.dataPath).FullName, new SyncVS.SolutionSynchronizationSettings()); EditorUserBuildSettings.activeBuildTargetChanged = (Action)Delegate.Combine(EditorUserBuildSettings.activeBuildTargetChanged, new Action(SyncVS.SyncVisualStudioProjectIfItAlreadyExists)); try { SyncVS.InstalledVisualStudios = (SyncVS.GetInstalledVisualStudios() as Dictionary <VisualStudioVersion, string>); } catch (Exception ex) { Console.WriteLine("Error detecting Visual Studio installations: {0}{1}{2}", ex.Message, Environment.NewLine, ex.StackTrace); SyncVS.InstalledVisualStudios = new Dictionary <VisualStudioVersion, string>(); } SyncVS.SetVisualStudioAsEditorIfNoEditorWasSet(); UnityVSSupport.Initialize(); }