I have a solution for sites with three publishing profiles that we use to convert connection strings for each target environment:
- Test - localhost connections, no conversions, default values ββare marked in
- Stage - VM Environment
- Production is the real deal
We also have some application settings that need to be converted for each environment. Thus, we used regular configuration-based conversions.
- Debugging - Conversion Settings for Stage
- Release Settings - transform for Production
This leaves us marinating when we try to pack a test profile. We pack it so that testers can deploy their systems from build artifacts instead of source code. But the test package picks up the Debug application settings.
Is there a way to tell msbuild about a website package using the Test profile, but skip the configuration conversion? Or do I need to restructure assembly configurations around the environment? (i.e. leave Debug and Release on your own and create build configuration for each environment)
Command Line Statement
I am creating my test configuration in the Debug solution configuration and, of course, Web.Debug.config converted Web.Debug.config file. There is no Web.Test.config file because Test is a "public profile" and not an assembly configuration.
cmd> msbuild websites.sln /t:Build /p:Configuration=Debug;Platform="Any CPU";DeployOnBuild=true;DeployTarget=Package;PublishProfile=Test;VisualStudioVersion=11.0
Maybe I'm doing something wrong. I feel that Config / Platform are redundant since I provide them in the Publish Profile dialog box. The version of Visual Studio was a surprise to me, but it was necessary to create a zip package.
source share