正确的 .NET Core SDK 来构建 netstandard20 库
我有一些具有目标框架的库NetStandard20
。这些库由几个.NET Framework 4.6.1
库消费。
由于某些安全漏洞,IT部门从构建服务器中卸载了 .NET Core 2.0 。使用NetStandard20
的所有库现在都失败了以下错误:
c:\ bamboo6104 ...> nuget Restore MSBUILD自动检测:使用'C:\ Program Files(X86)\ Microsoft Visual Studio \ 2019 \ buildTools \ MSBUILD \ MSBUILD \ Current \ Current \ bin'使用MSBUILD版本'16 .11.2.50704'。 c:\ bamboo6104 \ xml-data \ build-dir \ bam-cus-job1 ... \ netStandard \ xxx.csproj:错误msb4236:SDK'ICROSOFT.NET.NET.NET.SDK'指定的指定。
该构建服务器已经具有 Visual Studio 2019 。需要安装哪种版本的SDK才能通过?我的笔记本电脑上有以下SDK:
是否会安装 2.1.526 版本可以解决构建问题?
由于我们有许多具有相同问题的库,因此我无法将库升级为.NET 5或6,而升级不是优先事项。
I have a few libraries with target framework netstandard20
. These libraries are consumed by a few .net framework 4.6.1
libraries.
The IT department uninstalled the .NET Core 2.0 from the build server because of some security vulnerability. All the libraries that use netstandard20
are now failing with the following error:
C:\bamboo6104...>nuget restore
MSBuild auto-detection: using msbuild version '16.11.2.50704' from 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\bin'.
C:\bamboo6104\xml-data\build-dir\BAM-CUS-JOB1...\netstandard\xxx.csproj : error MSB4236: The SDK 'Microsoft.NET.Sdk' specified could not be found.
The Build Server already has Visual Studio 2019. What version of SDK need to be installed for the build to pass? I have the following SDKs on my laptop:
Will installing 2.1.526 version resolve the build issue?
I can't upgrade the libraries to .NET 5 or 6 due to we have numerous libraries with the same problem and upgrade is not a priority.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论