简体   繁体   English

Roslyn编译器版本用于缺少Microsoft.Net.Compilers的项目

[英]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.

相关问题 microsoft.net.compilers 包中的编译器版本是什么? - What version of the compiler is in a microsoft.net.compilers package? Microsoft.Net.Compilers 的目的是什么? - What is the purpose of Microsoft.Net.Compilers? Microsoft.Net.Compilers v2.0.1在Azure上失败 - Microsoft.Net.Compilers v2.0.1 fails on Azure 部署时Microsoft.Net.Compilers程序包错误 - Microsoft.Net.Compilers Package Error When Deployed Microsoft.Net.Compilers程序包在更新时中断 - Microsoft.Net.Compilers package breaks when updated 如何在解决方案级别使用 Microsoft.Net.Compilers? - How can I use Microsoft.Net.Compilers at solution level? 尽管使用了Microsoft.Net.Compilers nuget包,但VS2013上的C#6错误消息 - C# 6 error messages on VS2013 despite using Microsoft.Net.Compilers nuget package 在Microsoft.Net.Compilers上添加依赖项后无法加载Visual Studio 2015项目 - Unable to load Visual Studio 2015 project after adding dependency on Microsoft.Net.Compilers Microsoft.Net.Compilers 仅在 MSBuild v16.3 及更高版本上受支持 - Microsoft.Net.Compilers is only supported on MSBuild v16.3 and above 缺少的文件是 packages\Microsoft.Net.Compilers.2.4.0\build\Microsoft.Net.Compilers.props - The missing file is packages\Microsoft.Net.Compilers.2.4.0\build\Microsoft.Net.Compilers.props
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM