I have a Visual Studio application that has several solution configurations. There is a Web.config conversion file for each configuration. For example, Web.Debug.config, Web.Release.config, etc.
We also have several developers working on this project who have non-standard SQL Express instance names because of how they installed SQL Express, and instead of constantly editing Web.Debug.config to run in their environment. I have a solution configuration setting for each of them and added the following to the very bottom of the .csproj file. This code works in that it starts creating Web.config and MyWebApp.dll.config in the VS / obj / Debug-DeveloperName / folder.
The converted .config files are ideal, but IIS Express still uses the root Web.config (not converted).
Is there a way to force IIS Express to use these converted Web.config files for local debugging?
<UsingTask TaskName="TransformXml" AssemblyFile="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.Tasks.dll" /> <Target Name="AfterCompile" Condition="exists('Web.$(Configuration).config')"> <TransformXml Source="Web.config" Destination="$(IntermediateOutputPath)$(TargetFileName).config" Transform="Web.$(Configuration).config" /> </Target>
Using the Web.Debug.Config web application works for most of us, but not for everyone.
Should there be a way to force IIS Express to use the converted Web.Debug-DeveloperName.config during local debugging?
Do I need to copy the converted Web.config file to another folder?
source share