5
votes

I have a .net core class library I am attempting to build into a nugget package. however, on my build server (running team city), I am getting the following error:

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.

When I look in this directory, I ma missing the "Microsoft.NET.Sdk" folder from my build server. where do I get these tools without having to install visual studio?

Thanks!

1

1 Answers

5
votes

See the tracking issue on GitHub: https://github.com/Microsoft/msbuild/issues/1697

If you don't want to touch your build tools installation (by copying SDK files), you can also set the MSBuildSDKsPath environment variable to the location of the SDKs carried in the .net CLI (usually C:\Program Files\dotnet\sdk\1.0.0\Sdks\)