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.
When you select the the configuration to create the package then it will generate that config only. For example if you select production configuration then it will generate the production web.config depending on what transformations you have on the web.config.
There is no way it will create multiple config files. It is by design of Visual Studio and it is there since VS 2010.
The <TransformWebConfigEnabled>False</TransformWebConfigEnabled> is to tell that in the production.config file do not do any transformation and copy the main web.config as it is. This works as expected in VS 2012 and VS 2010. In case you having issue related
to this then please open a case with us and we will help you with that.
enigmab17
0 Points
1 Post
VS2012 pubxml and TransformWebConfigEnabled
Jan 15, 2013 03:55 PM|LINK
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
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
element into both the pubxml and the proj file and both ways it get's completely ignored and the web.config is transformed regardless.
I am expecting to see in the publish directory:
Web.config, Web.Debug.config, Web.Build2.Config, Web.Build3.Config, Web.Build4.Config
Parashuram
Member
98 Points
39 Posts
Re: VS2012 pubxml and TransformWebConfigEnabled
Feb 25, 2013 04:53 PM|LINK
When you select the the configuration to create the package then it will generate that config only. For example if you select production configuration then it will generate the production web.config depending on what transformations you have on the web.config.
There is no way it will create multiple config files. It is by design of Visual Studio and it is there since VS 2010.
The <TransformWebConfigEnabled>False</TransformWebConfigEnabled> is to tell that in the production.config file do not do any transformation and copy the main web.config as it is. This works as expected in VS 2012 and VS 2010. In case you having issue related to this then please open a case with us and we will help you with that.
mli
Member
9 Points
3 Posts
Re: VS2012 pubxml and TransformWebConfigEnabled
Feb 28, 2013 10:25 AM|LINK
I have the exact same behavoir, whatever I try, the transforms seem to happen anyway when doing a Publish to FileSystem in VS2012.
This is very annoying as I'm transforming on build, and thus end up with insert transforms being applied twice.
Please advise.
mli
Member
9 Points
3 Posts
Re: VS2012 pubxml and TransformWebConfigEnabled
Feb 28, 2013 12:33 PM|LINK
Found the answser.
Turned on diagnostics and it seems there is yet another boolean that is taken into account when publishing:
<ProfileTransformWebConfigEnabled>False</ProfileTransformWebConfigEnabled>
This one did the trick for me.
Heavy sigh...