Can I get a “sometimes portable” class library project to load in Visual Studio Express?

David Kean’s comment here gave me the answer I’m using for the moment: or remove the <ProjectTypeGuid> element entirely – this will opt you of “portable” enhancements, such as a UI for changing the target framework, etc I’ve tried that, and it works like a dream. On machines which have everything appropriately installed, you can … 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

web.config file transform from command line

If you add the following xml to the bottom of the .csproj file for your web application, you’ll ensure that the config transformation occurs before every build: <Import Project=”$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets” /> <Target Name=”BeforeBuild”> <TransformXml Source=”Web.Base.config” Transform=”Web.$(Configuration).config” Destination=”Web.config” /> </Target> Edit: In response to your comment, you should be able to use Web.config as the source parameter … 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 access artifacts folder after build in TFS online?

Within your build definition, I recommend adding a Copy Files step that will copy your the build artifacts from your msbuild results to the Build’s Artifact Staging Directory before you run the Publish Artifact step. Source Folder: $(Build.SourcesDirectory) Contents: **\bin\$(BuildConfiguration)\** Target Folder: $(Build.ArtifactStagingDirectory) I am assuming that the $(BuildConfiguration) variable is custom to your definition … Read more

Use 32bit “Program Files” directory in msbuild

In MSBuild 4.0+, there’s a $(MSBuildProgramFiles32) property for it, which you can confidently employ directly (especially if you’re prepared to put a ToolsVersion=”4.0″ at the top of the file to guarantee it’s going to be available and Fail Fast if it’s not). If you’re not and need something that can Do The Right Thing even … Read more