I have an ASP.NET Core project that builds properly with Visual Studio, but it doesn\'t build under MSBuild.
It doesn\'t find all the common libraries (system, etc.)
I had similar problems with a .NET Core 2 project that would build just fine on my workstation - both within Visual Studio 2017 and using MSBuild only - but did not build in TeamCity. The error message was:
C:\Program Files\dotnet\sdk\2.1.4\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(327, 5):
Assets file 'D:\TeamCity\buildAgent\work\596486b1d4e7a8e7\Source\Integrations\SomeAPI\obj\project.assets.json' not found.
Run a NuGet package restore to generate this file.
In my build configuration I already had a NuGet install step before the build step:
It turned out I had to use: