将安装Visual Studio 2015年的变化用VS 2013编译器?编译器、Studio、Visual、VS

2023-09-04 13:02:16 作者:良人未归、旧城已空

什么C#编译器的Visual Studio 2013的使用?如果我要安装Visual Studio 2015年其新的罗​​斯林的编译器,会影响我的的Visual Studio 2013 的安装?

What C# compiler does Visual Studio 2013 use? If I were to install Visual Studio 2015 with its new Roslyn compiler, would that affect my Visual Studio 2013 installation?

我问,因为我们有一些测试已知在我们的code是建立与Visual Studio 2015年一些数字在八个显著的数字不同失败。在Visual Studio的2015年发布的解决方案可能会增加对测试的容差,但我想了解如何Visual Studio的决定使用哪个编译器。

I ask because we have some tests that are known to fail when our code is built with Visual Studio 2015. Some numbers differ at the eight significant figure. The solution when Visual Studio 2015 is released will probably be to increase the tolerances on the tests, but I'd like to understand how Visual Studio decides which compiler to use.

可以的Visual Studio 2013中明确设置为使用旧的编译器?或MSBuild的脚本?

Can Visual Studio 2013 be explicitly set to use the old compiler? Or an msbuild script?

推荐答案

没有。安装Visual Studio 2015年不会改变使用VS 2013年在命令行编译器,可以通过运行之间进行选择相应的 msbuild.exe

No. Installing Visual Studio 2015 doesn't change the compiler used by VS 2013. At the command line, you can choose between by running the corresponding msbuild.exe

的测试失败是由于.NET框架4.6,而不是在编译器中的变化。

The test failures were due to .NET Framework 4.6 , rather than a change in compiler.

每的 https://github.com/Microsoft/dotnet/blob/master/docs/testing-with-ryujit.md

Fixed the problem by setting the 'use legacy JIT' environment COMPLUS_useLegacyJit variable per https://github.com/Microsoft/dotnet/blob/master/docs/testing-with-ryujit.md