I use TeamCity as my integration server and got it working sweetly after some fiddling and help from Doug Rathbone's great post (thanks Doug). Then I wanted to use the Visual Studio 2010 Web Deployment Project to get it copied to my web server box after the build. I anticipated problems and of course they came thick and fast in the form of things like:
- The specified task executable location "bin\aspnet_merge.exe" is invalid.
- The specified task executable location "C:\Program Files\MSBuild\Microsoft\WebDeployment\v10.0\aspnet_merge.exe" is invalid.
- The "CollectFilesinFolder" task was not found. Check the following…
- The "Microsoft.WebDeployment.Tasks.AspNetMerge" task could not be loaded from the assembly…
- Install windows SDK on your build server. Use web installer and unchecked everything except for ".NET Development Tools" depending on your target framework (version/framework):
6.1 at
http://www.microsoft.com/downloads/en/confirmation.aspx?familyId=e6e1c3df-a74f-4207-8586-711ebe331cdc&displayLang=en
or 7.1/3.5 at
http://www.microsoft.com/downloads/en/confirmation.aspx?familyId=c17ba869-9671-4330-a63e-1fd44e0e2505&displayLang=en
or 7.1/4.0
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=6b6c21d2-2006-4afa-9702-529fa782d63b&displaylang=en#SystemRequirements.
- Copy the files from your dev box:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web
and
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplication
to the equivalent paths on your build server. - You'll also need to adjust the location of your ASPNet merge path so on the build machine edit:
C:\Program Files (x86)\MSBuild\Microsoft\WebDeployment\v10.0\Microsoft.WebDeployment.targets
Alter:
<AspNetMerge
ExePath="$(AspnetMergePath)"
to C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools
Thanks for this post - saved me a good bit of time figuring out why my project wouldn't build in Team City. Cheers, Karl
ReplyDeleteGlad it helped. Infrastructure problems are so frustrating when you just want to get on and code.
Deletethis helped me too - thanks for taking the time to post it.
ReplyDeleteThank you very much! Very helpful.
ReplyDelete