3
votes

I have a VS2015 Solution compile and run successfully on local, but failed on TFS 2013 Build Server. I need help to get this built on the CI build.

There is .nuget solution folder contains just .config file to point to nuget feeds

.proj file has no reference to any nuget.targets. I commented it out.

Build Def using ReleaseTfvcTemplate.12.xaml

My log shows something like this

Built $/path/MyProj.csproj for default targets. C:\Program Files (x86)\MSBuild\14.0\bin\amd64\Microsoft.Common.CurrentVersion.targets (1819): > Could not resolve this reference. Could not locate the assembly "Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.

2

2 Answers

1
votes

Your project has a reference to Newtonsoft.Json that can't be resolved. You either need to checkin your packages folder (in root of solution) or enable Nuget restore during the build.

1
votes

The MSBuild parameter /p:VisualStudioVersion=14.0 fixed this issue