I have a Visual Studio 2012 MVC web project with which I am using IIS Express as the web server in a development environment. By default, IIS Express stores all of its configuration options in the Documents\IISExpress\config\applicationhost.config. I would like to isolate my application's site configuration into a stand-alone IIS Express configuration file and store it in source control along with all of the other project assets. This is easy enough to do, however I am struggling with how to make Visual Studio tell IISExpress to use this configuration file when I start debugging within Visual Studio. I can manually launch IISExpress and pass it a configuration file via /config: parameter and that works great, however I do not see any way of passing command line parameters to IIS Express when Visual Studio launches IIS Express. I have poked around in the .csproj looking for a field which I could populate related to IIS Express command line parameters and have found nothing.
I've also tried setting the web project's 'Start Action' to 'Launch External Program' and have this program be IIS Express with my specified command line parameters and set the 'Servers' section to 'Use a Custom Web Server', however this always results in a message stating 'Unable to start debugging on the web server'. It appears that when configured this way, Visual Studio is attempting to attach to the web server host process before actually executing the command specified in 'Start external program'
If I attempt to run IISExpress as a 'Post Build Event', it actually runs, but this blocks Visual Studio from actually continuing on with executing my code in debug (I guess it is waiting for IIS Express to exit -- which would defeat the whole purpose).
What am I missing? How do I integrate IIS Express with a custom configuration file within a Visual Studio project?