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

Team Build: Publish locally using MSDeploy

Unfortunately sharing of the Publish Profile is not supported or implemented in MSBuild. The logic to publish from the profile is contained in VS itself. Fortunately the profile doesn’t contain much information so there are ways to achieve what you are looking for. Our targets do not specifically support the exact same steps as followed … Read more

Why are some Web.config transforms tokenised into SetParameters.xml and others are not?

This actually has nothing to do with config transforms. I just posted a very detailed blog at http://sedodream.com/2010/11/11/ASPNETWebApplicationPublishPackageTokenizingParameters.aspx. But some info here for you. In the Web Publishing Pipeline (WPP) we handle connection strings as special artifacts. We will automatically create parameters for you for all connection strings. This is because in many cases when … Read more

MsBuild and MsDeploy with multiple environments

The first attempt failed because Package target doesn’t exist in the solution file. When using MSBuild on a solution file, a temporary MSBuild project is created (SamplePackage.sln.metaproj); this project file contains only some targets (Build, Clean, Rebuild, Publish, …) Solution : DeployOnBuild & DeployTarget properties One way to do what you want is to use … Read more

Can MSBuild deploy using integrated authentication or only basic?

And the answer is… Following my edit above about the current identity’s username persisting to the MSDeploy command even when not passed in the original MSBuild call, I tried reconstructing the parameters to pass an empty username as follows: MSBuild.exe Web.csproj /p:Configuration=Debug /p:DeployOnBuild=True /p:DeployTarget=MSDeployPublish /p:MsDeployServiceUrl=http://[server name]/MsDeployAgentService /p:DeployIisAppPath=DeploymentTestProject /p:MSDeployPublishMethod=RemoteAgent /p:CreatePackageOnPublish=True /p:username= Which then generates the following … Read more

Make Web.config transformations work locally

if you want to transform a config file without using the Web Publishing Pipeline then you just use the TransformXml task manually. I’ve written a detailed blog post on this at http://sedodream.com/2010/04/26/ConfigTransformationsOutsideOfWebAppBuilds.aspx, but here are the high lights: <Project ToolsVersion=”4.0″ DefaultTargets=”Demo” xmlns=”http://schemas.microsoft.com/developer/msbuild/2003″> <UsingTask TaskName=”TransformXml” AssemblyFile=”$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.Tasks.dll”/> <Target Name=”Demo”> <TransformXml Source=”app.config” Transform=”Transform.xml” Destination=”app.prod.config”/> </Target> </Project> Here I … Read more

msdeploy (Web Deploy) failing with 401 auth issues

I’m assuming you’ve configured your server correctly for WebDeploy 2.0 as per this article: Configure Web Deploy (IIS.NET) Note: MS have released a refresh of Web Deploy 2.0 and the original link isn’t really valid any more. I’ve updated this but I think it’ll be a moving target over time. You also need to install … Read more

Build once and deploy to multiple environments with msdeploy & Visual Studio 2012

I can elaborate a bit on options #1/#3 and compare them. The previous reply was not accurate in stating that you have to build multiple times with PackageWeb, you only need to build once. Option 1: Parameters.xml and SetParameters.xml In this approach you will create a parameters.xml file in your web project which will declare … Read more

How to use command line msbuild to deploy VS2012 Web Site project without precompiling it?

For website project the publish process is not plumbed into the build process. For website project since there is no formal build process there was nothing for us to really extend. Note: the below contents requires to have VS 2012 (or VS2010 for that matter) and the Azure SDK on top of that. The features … Read more

tech