Domanda

Is it possible to use the VS2012 profile specific web.config transformations within a VS2010 project?

Utilizing build configurations is getting out of had with the project I am currently working on. Thus I have been looking at alternatives such as Douglas Rathbone's "Multiple Tiers" approach.

I am aware that with the launch of VS2012 this is a solved problem, however I don't have the opertunity to upgrade to VS2012 yet.

È stato utile?

Soluzione

Yes, it is possible.

If you install the Windows Azure SDK for .NET (VS 2010 SP1) from this Microsoft link here: http://msdn.microsoft.com/library/jj161045 it will give you the updated Web Deploy functionality that was included with 2012.

Then, you can create a Web.<profile_name>.config file in your project and it will use that file, after applying any changes from a Configuration-named config file if it exists, as outlined in this post: http://www.hanselman.com/blog/TinyHappyFeatures3PublishingImprovementsChainedConfigTransformsAndDeployingASPNETAppsFromTheCommandLine.aspx

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top