I have a build on TeamCity that packs a web project, ready for future deployment, currently using MSBuild 2013. When I recently clicked on some code, I got build errors (due to the fact that I used some C functions # 6), so I went to change the build configuration to use MSBuild 2015 instead and got this error:
[Error] C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Transform\Microsoft.Web.Publishing.AspNetCompileMerge.targets(132, 5): Can't find the valid AspnetMergePath
This error was mentioned earlier in other issues (for example, here: VS 2012 Publish: Cannot find a valid AspnetMergePath ), but, unfortunately, none of the mentioned fixes in these issues worked for me.
Things I have tried or already dealt with:
- The Web and WebApplication directories from the local machine (in C: \ Program Files (x86) \ MSBuild \ Microsoft \ VisualStudio \ v14.0) were copied to build the server (they were always there)
- Added
<TargetFrameworkSDKToolsDirectory>C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\</TargetFrameworkSDKToolsDirectory> to Microsoft.Web.Publishing.AspNetCompileMerge.targets file - Added
/p:AspnetMergePath="C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\" command to the MSBuild command
I'm losing a bit with this: pretty much the only thing I haven't tried is installing Visual Studio on the build server, but I'd really like to avoid this if I can (because I think you're funny that you need to install the full IDE on the CI server!).
Additional Information:
- everything works fine if you switch the build to MSBuild 2013 (although obviously we donβt want to get stuck in the past)
- We have a number of other clean collections that work with MSBuild 2015 without errors
source share