You've already forked com.unity.ide.cursor
mirror of
https://github.com/boxqkrtm/com.unity.ide.cursor.git
synced 2026-05-15 06:40:08 +00:00
com.unity.ide.visualstudio@2.0.21
## [2.0.21] - 2023-09-05 Integration: - Only disable the legacy `com.unity.ide.vscode` package going forward. - Fix json parsing issues with specific non-UTF code pages. Project generation: - Target `netstandard2.1` instead of `netstandard2.0`. - Set `defaultSolution` in `settings.json`. - Remove `files.exclude` entries for root `csproj` and `sln` files in `settings.json` when needed. - Add `vstuc` launch configuration to `launch.json` when needed. - Add `visualstudiotoolsforunity.vstuc` entry to `extensions.json` when needed. - You can prevent the package from patching those configuration files by creating a `.vscode/.vstupatchdisable` file.
This commit is contained in:
@@ -228,7 +228,24 @@ namespace Microsoft.Unity.VisualStudio.Editor
|
||||
if (string.IsNullOrWhiteSpace(progpath))
|
||||
return Enumerable.Empty<VisualStudioInstallation>();
|
||||
|
||||
var result = ProcessRunner.StartAndWaitForExit(progpath, "-prerelease -format json -utf8");
|
||||
const string arguments = "-prerelease -format json";
|
||||
|
||||
// We've seen issues with json parsing in utf8 mode and with specific non-UTF code pages like 949 (Korea)
|
||||
// So try with utf8 first, then fallback to non utf8 in case of an issue
|
||||
// See https://github.com/microsoft/vswhere/issues/264
|
||||
try
|
||||
{
|
||||
return QueryVsWhere(progpath, $"{arguments} -utf8");
|
||||
}
|
||||
catch
|
||||
{
|
||||
return QueryVsWhere(progpath, $"{arguments}");
|
||||
}
|
||||
}
|
||||
|
||||
private static IEnumerable<VisualStudioInstallation> QueryVsWhere(string progpath, string arguments)
|
||||
{
|
||||
var result = ProcessRunner.StartAndWaitForExit(progpath, arguments);
|
||||
|
||||
if (!result.Success)
|
||||
throw new Exception($"Failure while running vswhere: {result.Error}");
|
||||
|
||||
Reference in New Issue
Block a user