Run web.config transformation from command-line

asp.net-mvc-2msbuildvisual studio 2010

Good day!

I want to have ability to build ASP.NET MVC 2 project using VS2010 Publish dialog and from command-line.

For command-line I get the following to work:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe .\SolutionFolder\MyProject.csproj /p:Configuration=Release;DeployOnBuild=True;PackageAsSingleFile=False;outdir=c:\_OutputFolder\

The only problem I have that Web.config transformation are not applied (but added to WebDeploy package). I don't use WebDeploy. Is there any way to apply Web.config transformations?

Thanks!

Best Answer

You can also try using the XDT Transformation Tool:

http://ctt.codeplex.com

I'm using this instead of messing with obscure msbuild targets.

Related Topic