Last post Mar 17, 2008 05:57 PM by Trochtova
Mar 15, 2008 02:03 PM|Trochtova|LINK
Can I use a web deployment project and msbuild.exe to deploy a web service on machines without Visual Studio installed?
I want to be able to build and deploy my web service, which is the part of an open source project, using one simple command, which should work also on machines without Visual Studio installed. So I created my web service and then I added the web deployment
project for it to the same solution. If I run msbuild.exe and pass the solution file to it as an argument on my development machine (with VS installed), everything works fine. When my colleague tries the same thing on his machine (without VS installed), the
build fails with error:
The imported project "C:\Program Files\MSBuild\Microsoft\WebDeployment\v8.0\Microsoft.WebDeployment.targets" was not found.
How to fix this problem? Is it possible to fix it (is it possible to use web deployment projects this way)?
Mar 16, 2008 03:14 AM|Imco|LINK
If web deployment projects haven't been installed on a specific computer the build targets likely won't be available (maybe they ship with a newer .net, I don't know)
It wasn't with WDP specifically, but I encountered the same issue you have with missing targets at some point and decided to include any I use (except for those documented
here) alongside my own. See
this how-to for a brief example of target re-use. The good news is that so far I haven't noticed anything that puts targets anywhere except for "%program files%\msbuild" so you shouldn't have to look too hard to find them.
I hope that helps.
Mar 16, 2008 10:25 AM|Trochtova|LINK
Thank you for your response. Unfortunatelly the build target isn't the only thing which is missing. WDP installation also copies aspnet_merge.exe into the C:\Program Files\MSBuild\Microsoft\WebDeployment\v8.0 directory and this tool is expected to be on
that location by the WDP build task.
Mar 17, 2008 03:22 PM|hongping|LINK
You might want to consider using the command-line tools aspnet_compiler.exe and aspnet_merge.exe directly. These tools do not require VS to be installed.
Managing ASP.NET Precompiled Output for Deployment Using the aspnet_merge.exe Command:
Mar 17, 2008 05:57 PM|Trochtova|LINK
I have temporarily solved the problem this way: I distribute the required files (msbuild targets, corresponding binaries and the aspnet_merge.exe tool) together with my web service's source files. I have also added the msbuild target which copies the required
files to the correct directory (%program files%\MSBuild\Microsoft\WebDeployment\v8.0) before building and deploying the web service to my build process. But I am not sure I don't violate some licence terms by distributing the WDP add-in's files.