You've already forked com.unity.ide.cursor
mirror of
https://github.com/boxqkrtm/com.unity.ide.cursor.git
synced 2026-05-21 18:40:07 +00:00
com.unity.ide.visualstudio@2.0.9
## [2.0.9] - 2021-05-04 Project generation: Added support for CLI. Integration: Improved performance when discovering Visual Studio installations. Warn when legacy assemblies are present in the project. Warn when the package version is not up-to-date.
This commit is contained in:
@@ -6,10 +6,10 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using System.Diagnostics;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Microsoft.Unity.VisualStudio.Editor
|
||||
{
|
||||
@@ -17,6 +17,14 @@ namespace Microsoft.Unity.VisualStudio.Editor
|
||||
{
|
||||
internal const string ManagedWorkload = "Microsoft.VisualStudio.Workload.ManagedGame";
|
||||
|
||||
internal static string _vsWherePath;
|
||||
|
||||
public static void FindVSWhere()
|
||||
{
|
||||
_vsWherePath = FileUtility
|
||||
.FindPackageAssetFullPath("VSWhere a:packages", "vswhere.exe")
|
||||
.FirstOrDefault();
|
||||
}
|
||||
|
||||
public static IEnumerable<IVisualStudioInstallation> GetVisualStudioInstallations()
|
||||
{
|
||||
@@ -37,7 +45,7 @@ namespace Microsoft.Unity.VisualStudio.Editor
|
||||
}
|
||||
}
|
||||
|
||||
private static bool IsCandidateToDiscovery(string path)
|
||||
private static bool IsCandidateForDiscovery(string path)
|
||||
{
|
||||
if (File.Exists(path) && VisualStudioEditor.IsWindows && Regex.IsMatch(path, "devenv.exe$", RegexOptions.IgnoreCase))
|
||||
return true;
|
||||
@@ -55,7 +63,7 @@ namespace Microsoft.Unity.VisualStudio.Editor
|
||||
if (string.IsNullOrEmpty(editorPath))
|
||||
return false;
|
||||
|
||||
if (!IsCandidateToDiscovery(editorPath))
|
||||
if (!IsCandidateForDiscovery(editorPath))
|
||||
return false;
|
||||
|
||||
// On windows we use the executable directly, so we can query extra information
|
||||
@@ -131,9 +139,7 @@ namespace Microsoft.Unity.VisualStudio.Editor
|
||||
|
||||
private static IEnumerable<VisualStudioInstallation> QueryVsWhere()
|
||||
{
|
||||
var progpath = FileUtility
|
||||
.FindPackageAssetFullPath("VSWhere a:packages", "vswhere.exe")
|
||||
.FirstOrDefault();
|
||||
var progpath = _vsWherePath;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(progpath))
|
||||
return Enumerable.Empty<VisualStudioInstallation>();
|
||||
|
||||
Reference in New Issue
Block a user