I have a .net standard 2.0 class library in a .net 4.7.1 web solution.
Building the solution locally works fine, but when the TFS server builds the solution it is unable to compile the .net 2.0 standard library. It crashes during compilation and complains that system.object etc is not defined or imported.
It's a TFS 2015 running the old tfsbuild.proj style xml files. The build server is otherwise up to date with .net 4.7.1, latest .net core 2.0.3, latest visual studio, latest build tools.
I can see that it generates a csc.exe command to compile the .net standard 2.0 project that crashes. If I simply was to run "dotnet build", it works great.
Watching the logs of the build I can see that the CoreCompile step when running in VS or "dotnet build" contains a "References" Task Parameter with references to the .net standard 2 library. This Task Parameter is missing in the CoreCompile step when the build server is running the build.
Does anyone have a suggestion on how to best proceed to get msbuild on the tfs server to successfully compile the .net standard 2.0 project?
Could I get msbuild to generate the necessary "References" task parameter?
Is my best option to turn off automatic building of .net standard projects and try to do everything manually as build steps with "dotnet build" instead, since dotnet build correctly identifies the necessary references?