I am working on upgrading our TeamCity projects from VS2012 to VS2015 and I am running into an issue compiling our MVC application.
Old MSBuild (v4.0.30319.34209) g
After a bit more googling, I stumbled upon this thread on MSDN.
The solution suggested here is to install the Windows 10 SDK. We did this on our TeamCity build server running Windows Server 2012 R2 using the default installation options, and after a reboot, our build was working again.
Hope this helps :)
In my case TFS was using the license compiler lc.exe
from the older SDK folder
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\lc.exe
instead of
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\x64\LC.exe
This issue was solved by adding the following msbuild argument to the build definition:
/p:FrameworkOverride="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2"
You can also get rid of these issues and make your life easier by installing visual studio on the build server and adding a visual studio build step to replace your 2015 msbuild step