gpt4 book ai didi

msbuild - 无法使用 msbuild 工具构建 .net core 1.1

转载 作者:行者123 更新时间:2023-12-04 18:58:52 25 4
gpt4 key购买 nike

我有一个 .net 核心类库,我正试图将其构建到一个 nugget 包中。但是,在我的构建服务器(运行团队城市)上,我收到以下错误:

C:\TeamCity\buildAgent\work\3c6531587491c25e\MySolution\MyProject.csproj error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.



当我查看此目录时,我可能会从构建服务器中丢失“Microsoft.NET.Sdk”文件夹。我从哪里获得这些工具而无需安装 Visual Studio?

谢谢!

最佳答案

查看 GitHub 上的跟踪问题:https://github.com/Microsoft/msbuild/issues/1697

如果您不想修改构建工具安装(通过复制 SDK 文件),您还可以设置 MSBuildSDKsPath .net CLI 中携带的 SDK 位置的环境变量(通常为 C:\Program Files\dotnet\sdk\1.0.0\Sdks\)

关于msbuild - 无法使用 msbuild 工具构建 .net core 1.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43216274/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com