Running MSBuild fails to read SDKToolsPath
Solution 1:
I couldn't face putting Visual Studio on the build server.
The SDK v7.0A is the SDK installed with Visual Studio 2010 (The A indicates this is a VS release). Since then, a newer version has been released. Microsoft Windows SDK for Windows 7 and .NET Framework AKA v7.1.
I've installed this on my build server. And then via the Windows SDK 7.1 Command Prompt (Start => All Programs => Microsoft Windows SDK 7.1), I set the default version of the SDK to be 7.1.
Steps:
cd Setup
WindowsSdkVer.exe -version:v7.1
Edit to include LordHits' comment: one doesn't need to install the entire SDK. Installing just the ".NET Development/Intellisense and Reference Assemblies" and ".NET Development/Tools" options is enough.
Solution 2:
Simply pass GenerateSerializationAssemblies parameter with value Off to your MsBuild.
msbuild.exe /p:GenerateSerializationAssemblies=Off
Solution 3:
I had to bite the bullet and install VS 2010 on our build server to fix this issue. As far as I can see, there's no 7.0A version of the Windows SDK available anywhere on MSDN. However, installing VS 2010 appears to install it, creating a 7.0A regkey and a 7.0A folder in Program Files\Microsoft SDKs\Windows.
Solution 4:
I manually pass the variables to MSBuild on build server.
msbuild.exe MyProject.csproj "/p:TargetFrameworkSDKToolsDirectory=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools" "/p:AspnetMergePath=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools"