Consider the following scenario:
Note that by default the "*.pubxml.user
" file is not included in source control: http://msdn.microsoft.com/en-us/library/ff398069.aspx
The reason is the information about the build configuration is stored in the file "*.pubxml.user
" (See node called <LastUsedBuildConfiguration>
).
This behavior is problematic especially when you use Web config transformations ("Web.Release.config") to change connection strings.
=> How can I fix this problem if I don't want to save "*.pubxml.user
" file into source control (because this file can contains other information inappropriate for a public repository for example)?
Related articles:
There are two aspects to this; sharing the value in the drop down for the Publish dialog and support for command line. Below are my comments on both.
When we released the publish bits in VS2012 RTM we were writing LastUseBuildConfiguraiton into the .pubxml.user file. We have since moved that to the .pubxml file itself so that it is shared with other team members. You can get the latest build at:
If you have installed one of those and you are still seeing the behavior where the Config is not shared that is likely because the .pubxml was created with an older drop. The solution is to delete the .pubxml and .pubxml.user file and create it again with the latest.
For command line scenarios the Configuration property needs to be set explicitly. The .pubxml (or .pubxml.user) file cannot override that value. For more details see my blog at http://sedodream.com/2012/10/27/MSBuildHowToSetTheConfigurationProperty.aspx.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With