Initial Commit
This commit is contained in:
parent
53eb92e9af
commit
270ab7d11f
15341 changed files with 700234 additions and 0 deletions
|
@ -0,0 +1,27 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
using System;
|
||||
using UnityEditor.Compilation;
|
||||
|
||||
namespace Microsoft.Unity.VisualStudio.Editor
|
||||
{
|
||||
internal static class UnityInstallation
|
||||
{
|
||||
public static Version LatestLanguageVersionSupported(Assembly assembly)
|
||||
{
|
||||
#if UNITY_2020_2_OR_NEWER
|
||||
if (assembly?.compilerOptions != null && Version.TryParse(assembly.compilerOptions.LanguageVersion, out var result))
|
||||
return result;
|
||||
|
||||
// if parsing fails, we know at least we have support for 8.0
|
||||
return new Version(8, 0);
|
||||
#else
|
||||
return new Version(7, 3);
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue