Problem
The command dotnet build ...
fails when run from TFS 2015 build agent with the following errors:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets(262,5): Error : Object reference not set to an instance of an object.
C:\Program Files\dotnet\dotnet.exe compile-csc @(path to dotnet-compile.rsp) returned Exit Code 1
Steps to Reproduce
- Create an ASP.NET Core 1.0 web application with Visual Studio 2015 (Tools Preview 2).
- Commit solution to TFS 2015 team project.
- Configure a TFS 2015 Windows build agent running as
NT AUTHORITY\NETWORK SERVICE
(the default). - Trigger a build using the MSBuild or VSBuild task to build the solution.
- Build fails with the errors above.
Environment
- Windows Server 2012 R2
- Team Foundation Server 2015 Update 2
- Visual Studio 2015 Community Update 3
- Microsoft .NET Core 1.0.0 - SDK Preview 2 (x64)
- Microsoft .NET Core 1.0.0 - VS 2015 Tooling Preview 2
dotnet --version
: 1.0.0-preview2-003121- TFS Build Agent Version: 14.95.25122.0