C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets (990): .NET Framework v3.5 Service Pack 1 was not found. In order to target ".NETFramework,Version=v2.0", .NET Framework v3.5 Service Pack 1 or later must be installed.
Local compilation with Visual Studio looked fine and the build server was able to complete successfully if I excluded the TDS projects from the build configuration. This pointed to a problem in the TDS projects themselves.
Further investigation yielded that this is a TargetFrameworkVersion issue within the XML of the TDS project files. In my scenario the project files had a value of:
If the build server only has the most recent .NET assemblies installed, it will not be able to compile this project. Luckily, there are 3 easy steps to fix this for any TDS project file:
- Open up the .scproj file for manual editing with your favourite text editor application.
- Change <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> to <TargetFrameworkVersion>v4.5<TargetFrameworkVersion>
- Save the project file.
NOTE: You may have to repeat this multiple times within a single project file. I noticed that my particular TDS project had two instances of the TargetFrameworkVersion tag in the XML!