-
Notifications
You must be signed in to change notification settings - Fork 749
langversion 6 is not recognized with msbuild or csc compiler in VS 2017 #539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is a common problem with old msbuild detection methods and VS 2017 installation. |
But this is a trickly way. We can rely on a new MS supported tool: https://github.com/Microsoft/vswhere. basePathes = subprocess.check_output(
["vswhere", "-latest",
"-version", "[15.0, 16.0)",
"-requires", "Microsoft.Component.MSBuild",
"-property", "InstallationPath"]).splitlines() This code should do all the magic either for VS2017 msbuilds or old msbuild. |
@dmitriyse exactly! msbuild is not using registry keys anymore for some reason. That vswhere is a nice tool. One problem is that VS 2008 is not supported, but this is what is used for Python 2.7. microsoft/vswhere#89 In the meantime we can use vswhere for msbuild versions not in registry. |
…ssues. (#546) * vswhere.exe tool now distributed with the pythonnet sources, dotnet-core-2.0-x86 installation step removed. * .travis.yaml file simplification. * PYTHONNET_INTEROP_FILE env var introduced to allow working with custom interop*.cs file inside IDE. * pdb generation improved for all conditions Net 4.0/NetStandard 2.0 x Debug/Release. * Fix for the #539 classic build fails when VS 2017 installed. * Build fixes for the fresh Windows 10 SDKS. * Workaround: Mono downgrade to 5.2.0 to avoid broken mono 5.4.0.201
I guess this is solved by @dmitriyse build improvements, feel free to reopen if it's not. |
CSC : error CS1617: Invalid option '6' for /langversion; must be ISO-1, ISO-2, 3, 4, 5 or Default
Click to expand
The text was updated successfully, but these errors were encountered: