You've already forked com.unity.ide.cursor
mirror of
https://github.com/boxqkrtm/com.unity.ide.cursor.git
synced 2026-05-14 14:20:09 +00:00
com.unity.ide.visualstudio@2.0.12
## [2.0.12] - 2021-10-20 Integration: - Do not block asset opening when only a VS instance without a loaded solution is found. - Only check package version once per Unity session. - Improved support for Visual Studio For Mac 2022.
This commit is contained in:
@@ -256,8 +256,10 @@ static win::ComPtr<EnvDTE::_DTE> FindRunningVisualStudioWithSolution(
|
||||
continue;
|
||||
|
||||
std::filesystem::path currentSolutionPath = std::wstring(solutionFullName);
|
||||
if (!currentSolutionPath.empty())
|
||||
std::wcout << "Visual Studio opened on " << currentSolutionPath.wstring() << std::endl;
|
||||
if (currentSolutionPath.empty())
|
||||
continue;
|
||||
|
||||
std::wcout << "Visual Studio opened on " << currentSolutionPath.wstring() << std::endl;
|
||||
|
||||
// If the name matches the solution we want to open and we have a Visual Studio installation path to use and this one matches that path, then use it.
|
||||
// If we don't have a Visual Studio installation path to use, just use this solution.
|
||||
|
||||
Binary file not shown.
@@ -74,6 +74,9 @@ namespace Microsoft.Unity.VisualStudio.Editor
|
||||
|
||||
if (!File.Exists(fvi))
|
||||
fvi = Path.Combine(editorPath, "Contents/MonoBundle/VisualStudio.exe");
|
||||
|
||||
if (!File.Exists(fvi))
|
||||
fvi = Path.Combine(editorPath, "Contents/MonoBundle/VisualStudio.dll");
|
||||
}
|
||||
|
||||
if (!File.Exists(fvi))
|
||||
|
||||
31
Editor/SessionSettings.cs
Normal file
31
Editor/SessionSettings.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
using System.Runtime.CompilerServices;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Microsoft.Unity.VisualStudio.Editor
|
||||
{
|
||||
internal static class SessionSettings
|
||||
{
|
||||
internal static string GetKey([CallerMemberName] string memberName = "")
|
||||
{
|
||||
return $"{typeof(SessionSettings).FullName}.{memberName}";
|
||||
}
|
||||
|
||||
public static bool PackageVersionChecked
|
||||
{
|
||||
get
|
||||
{
|
||||
return SessionState.GetBool(GetKey(), false);
|
||||
}
|
||||
set
|
||||
{
|
||||
SessionState.SetBool(GetKey(), value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Editor/SessionSettings.cs.meta
Normal file
11
Editor/SessionSettings.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4d1e1d921eed0044e9fe0cd3ab6444ba
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -41,7 +41,8 @@ namespace Microsoft.Unity.VisualStudio.Editor
|
||||
if (!VisualStudioEditor.IsEnabled)
|
||||
return;
|
||||
|
||||
_listRequest = UnityEditor.PackageManager.Client.List();
|
||||
if (!SessionSettings.PackageVersionChecked)
|
||||
_listRequest = UnityEditor.PackageManager.Client.List();
|
||||
|
||||
RunOnceOnUpdate(() =>
|
||||
{
|
||||
@@ -148,6 +149,8 @@ namespace Microsoft.Unity.VisualStudio.Editor
|
||||
{
|
||||
Debug.LogWarning($"Visual Studio Editor Package version {package.versions.latest} is available, we strongly encourage you to update from the Unity Package Manager for a better Visual Studio integration");
|
||||
}
|
||||
|
||||
SessionSettings.PackageVersionChecked = true;
|
||||
}
|
||||
|
||||
_listRequest = null;
|
||||
|
||||
Reference in New Issue
Block a user