com.unity.ide.visualstudio@1.0.11

## [1.0.11] - 2019-05-21

Fix detection of visual studio for mac installation.
This commit is contained in:
Unity Technologies
2019-05-21 00:00:00 +00:00
parent da4b454a79
commit d6ef04ed17
4 changed files with 19 additions and 7 deletions

View File

@@ -1,5 +1,9 @@
# Code Editor Package for Visual Studio
## [1.0.11] - 2019-05-21
Fix detection of visual studio for mac installation.
## [1.0.10] - 2019-05-04
Fix ignored comintegration executable

View File

@@ -73,7 +73,7 @@ namespace VisualStudioEditor
internal static Dictionary<VisualStudioVersion, string[]> InstalledVisualStudios { get; private set; }
internal static bool IsOSX => Environment.OSVersion.Platform == PlatformID.Unix;
internal static bool IsOSX => Application.platform == RuntimePlatform.OSXEditor;
internal static bool IsWindows => !IsOSX && Path.DirectorySeparatorChar == '\\' && Environment.NewLine == "\r\n";
public CodeEditor.Installation[] Installations => m_Discoverability.PathCallback();
@@ -89,7 +89,7 @@ namespace VisualStudioEditor
public bool TryGetInstallationForPath(string editorPath, out CodeEditor.Installation installation)
{
var lowerCasePath = editorPath.ToLower();
if (lowerCasePath.EndsWith("vcsexpress.exe"))
if (lowerCasePath.EndsWith("vcsexpress.exe", StringComparison.OrdinalIgnoreCase))
{
installation = new CodeEditor.Installation
{
@@ -100,7 +100,9 @@ namespace VisualStudioEditor
return true;
}
if (lowerCasePath.EndsWith("devenv.exe"))
if (lowerCasePath.EndsWith("devenv.exe", StringComparison.OrdinalIgnoreCase)
|| lowerCasePath.Replace(" ", "").EndsWith("visualstudio.app", StringComparison.OrdinalIgnoreCase)
|| lowerCasePath.Replace(" ", "").EndsWith("visualstudio(preview).app", StringComparison.OrdinalIgnoreCase))
{
installation = new CodeEditor.Installation
{
@@ -110,9 +112,9 @@ namespace VisualStudioEditor
m_Installation = installation;
return true;
}
var filename = Path.GetFileName(lowerCasePath.Replace('\\', Path.DirectorySeparatorChar).Replace('/', Path.DirectorySeparatorChar)).Replace(" ", "");
if (filename == "visualstudio.app" || filename == "visualstudio(preview).app" || lowerCasePath.Contains("monodevelop") || lowerCasePath.Contains("xamarinstudio") || lowerCasePath.Contains("xamarin studio"))
if (lowerCasePath.Contains("monodevelop")
|| lowerCasePath.Replace(" ", "").Contains("xamarinstudio"))
{
installation = new CodeEditor.Installation
{

View File

@@ -129,6 +129,9 @@ namespace VisualStudioEditor
case VisualStudioVersion.VisualStudio2017:
vsVersion = "15.0";
break;
case VisualStudioVersion.VisualStudio2019:
vsVersion = "16.0";
break;
// VS 2015 and under are still installed in the registry
// using their project names
case VisualStudioVersion.VisualStudio2015:
@@ -209,6 +212,9 @@ namespace VisualStudioEditor
case 15:
vsVersion = VisualStudioVersion.VisualStudio2017;
return true;
case 16:
vsVersion = VisualStudioVersion.VisualStudio2019;
return true;
}
vsVersion = VisualStudioVersion.Invalid;

View File

@@ -2,7 +2,7 @@
"name": "com.unity.ide.visualstudio",
"displayName": "Visual Studio Editor",
"description": "Code editor integration for supporting Visual Studio as code editor for unity. Adds support for generating csproj files for intellisense purposes, auto discovery of installations, etc.",
"version": "1.0.10",
"version": "1.0.11",
"unity": "2019.2",
"unityRelease": "0a12",
"dependencies": {},
@@ -12,6 +12,6 @@
"repository": {
"type": "git",
"url": "git@github.cds.internal.unity3d.com:unity/com.unity.ide.visualstudio.git",
"revision": "6924aaf1b1348340ecfb22efee40faadd4fa379a"
"revision": "7378597cbd075d617aade65f1aa9c13a22c00d1c"
}
}