Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS2012 pubxml and TransformWebConfigEnabled

Maybe someone can advise me.

I am trying to publish a project using VS2012. I have setup a publish profile to publish it to a file system drive.

I have several environments/build configurations required and thusly am using Web.Config transformations.

At the moment, I have a web.config + 5 transforms (one for each build config). When the solution is published, it successfully deploys to the file system specified. However it also transforms the Web.Config into web.config.

I have modified the .pubxml to include the <TransformWebConfigEnabled>False</TransformWebConfigEnabled> element, but the publish process just seems to ignore it and transform the web.config regardless. Followed via this link: http://msdn.microsoft.com/en-us/library/dd465342(v=vs.100).aspx

Can anyone advise?

[edit] I have tried putting <TransformWebConfigEnabled>False</TransformWebConfigEnabled> element into both the pubxml and the proj file and both ways it get's completely ignored and the web.config is transformed regardless.

like image 450
enigma.b17 Avatar asked Jun 28 '26 22:06

enigma.b17


1 Answers

You are sticking it in the wrong file. You want to modify

YourProject.csproj

instead of PublishProfile.pubxml.

like image 56
Caleb Jares Avatar answered Jul 03 '26 08:07

Caleb Jares



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!