[英]Roslyn compiler version used for projects missing Microsoft.Net.Compilers
Solution consists of 2 dll libraries, 1 console app and 1 web app. 解决方案包括2个dll库,1个控制台应用程序和1个Web应用程序。 Only the last project, the web one, uses
Microsoft.Net.Compilers
NuGet package. 只有最后一个项目,即web,使用
Microsoft.Net.Compilers
NuGet包。 Package has been updated to version 2.3.0 now, what means C# 7.1 and VB 15.3. 软件包已经更新到版本2.3.0,这意味着C#7.1和VB 15.3。
source: Roslyn NuGet packages 来源: Roslyn NuGet包
As 3 other projects do not have Microsoft.Net.Compilers NuGet package installed, what Roslyn compiler and C# version do they use? 由于其他3个项目没有安装Microsoft.Net.Compilers NuGet包,他们使用了什么Roslyn编译器和C#版本?
I use VS.Net 2017 15.2 with .NET Framework 4.7, so I would guess it shall C#7.0, but still Microsoft.Net.Compilers in version 2.2 should be installed there, but is not. 我使用VS.Net 2017 15.2和.NET Framework 4.7,所以我猜它应该是C#7.0,但是版本2.2中的Microsoft.Net.Compilers仍然应该安装在那里,但事实并非如此。
The Microsoft.Net.Compilers
package overrides (by setting properties in your project file) the default version of Roslyn included with MSBuild / Visual Studio. Microsoft.Net.Compilers
包覆盖(通过在项目文件中设置属性)MSBuild / Visual Studio附带的默认版本的Roslyn。
Regular class libraries that don't reference it are compiled using the Roslyn build included with your version of Visual Studio & MSBuild. 使用您的Visual Studio和MSBuild版本附带的Roslyn构建编译不引用它的常规类库。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.