问题
I am creating Web Deployment Package zip files for my Web Applications
I found I am able to specify the Site Name of the application by including a pubxml during the packaging of my site and using the PublishProfile property during the build to specify that profile.
The pubxml has <DeployIisAppPath>WebSiteName</DeployIisAppPath> in it and that creates the site name as seen in the IIS Management screen.
I'd like to specify the location on disk of the website when it is deployed to a server that doesn't already have this app installed.
What property can I use to do this? I see that I could use -replace arguments as shown here: Specify different path for provider iisApp when creating package with msdeploy but I would rather the value be set in my pubxml.
回答1:
You have two options:
- Choose the checkbox for "Include IIS settings ...". When you do this a text box will light up with the title "physical Path of web application on destination server". Using the value for the parameter that is generated for this you can modify the destination app path.
- Another option for you is to use msdeploy.exe directly and recreate the package using "apphostconfig" provider instead of iisApp provider and then parameterize the application path on the destination server.
来源:https://stackoverflow.com/questions/16155632/how-can-i-set-the-deployment-path-for-an-iisapp-provider-using-msdeploy