views:

18

answers:

2

I'm starting to use web deploy to build and deploy a web application. So far I can build a package and deploy it, but it's not doing much more than a xcopy deployment would do.

so my command to build the package is this:

msbuild EMP.WebAdmin.csproj /T:Package /P:Configuration=Release;PackageLocation="D:\Packages\WebAdmin.zip";DeployIisAppPath="TestWebAdmin"

If the TestWebAdmin already exists and the version of .net has been set to .net 4 everything seem to be fine. However, what I'd really like to do is have the package check to see if the deployment already exists, if not create it (preferably in a defined directory) and to ensure that any host headers are set correctly. Am I asking too much of web deploy, I've not been able to find a good article which talks about how to go t this kind of detail.

Is what I'm trying to do possible?

A: 

What are the settings on your Publish / Package Website tab for the project? Your site needs to be using IIS, and you need to check the box to include IIS application settings. Also, how are you deploying? My understanding is that the msbuild command you're using will build the package, but where are you calling msdeploy?

I don't have msdeploy creating the application for me, but it's running Sql update scripts I'm also including.

Andy
Yes, my site is using IIS, but for dev I use the development server. The checkbox to include IIS settings is disabled, is that because I'm using the development server? The call to msdeploy is done by msbuild, so the command above is what I'm using to create the package.
ilivewithian
Right, I've found unless you actually set the project to use IIS instead of the development service, it won't pick up the IIS settings. I'm also using the Package target, but that only builds the package for me. In my nant build script, I later call msdeploy to automate deployment to a development system (well, I can, once we have one in place, but I've tested auto deploy from the build server to my laptop, and that does work).
Andy