How do you call msdeploy from powershell when the parameters have spaces?

Using the technique from Keith’s answer to How to run exe in powershell with parameters with spaces and quotes question you linked to, running echoargs -verb:dump -source:appHostConfig=$sitename -verbose gave me this output: Arg 0 is <-verb:dump> Arg 1 is <-source:appHostConfig=default> Arg 2 is <web> Arg 3 is <site> Arg 4 is <-verbose> This would explain … Read more

How do I configure MSBuild to use a saved publishProfile for WebDeploy?

I’m sorry to tell you that the publish.xml file which VS2010 uses was not designed to be used in this way. In fact it was not even designed to be checked-in/shared with others. The logic for reading/writing those files are strictly contained inside Visual Studio and not available through MSBuild. So there is no straight … Read more

Valid Parameters for MSDeploy via MSBuild

Here’s a list I’ve compiled for my own reference, along with some of the legal values that can be used. Note that these are passed into MSBuild using the /p:<PropertyName>=<Value> syntax. DeployOnBuild True False DeployTarget MsDeployPublish Package Configuration Name of a valid solution configuration CreatePackageOnPublish True False DeployIisAppPath <Web Site Name>/<Folder> MsDeployServiceUrl Location of MSDeploy … Read more

How can I get TFS2010 to run MSDEPLOY for me through MSBUILD?

IIS7 + related answer …. Ok – here’s what I ended up doing. More or less, following the post by Simon Weaver in this thread/question. But when it comes to the MSBuild settings .. most people here are using following setting: /p:MSDeployPublishMethod=RemoteAgent which is NOT RIGHT for IIS7. Using this setting means TFS tries to … Read more

MSBuild target package not found

I just got this working without installing VS2010 by following these steps on the build server: If .NET Framework 4 isn’t installed, install it Install the Web Deployment tool from http://www.iis.net/download/webdeploy From the C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0 folder on your dev machine copy the “Web” and “Web Applications” folders to the equivalent directory on your build server. … Read more

How to Publish Web with msbuild?

I got it mostly working without a custom msbuild script. Here are the relevant TeamCity build configuration settings: Artifact paths: %system.teamcity.build.workingDir%\MyProject\obj\Debug\Package\PackageTmp Type of runner: MSBuild (Runner for MSBuild files) Build file path: MyProject\MyProject.csproj Working directory: same as checkout directory MSBuild version: Microsoft .NET Framework 4.0 MSBuild ToolsVersion: 4.0 Run platform: x86 Targets: Package Command line … Read more

How do you include additional files using VS2010 web deployment packages?

Great question. I just posted a very detailed blog entry about this at Web Deployment Tool (MSDeploy) : Build Package including extra files or excluding specific files. Here is the synopsis. After including files, I show how to exclude files as well. Including Extra Files Including extra files into the package is a bit harder … Read more