Hi Jonas,
I'm glad that this is working for you now but the command should really work with
*any* valid configuration file, not just ServiceConfiguration.Local.cscfg. It shouldn't matter what the file name is or where it's stored.
Just in case, I tested again with ServiceConfiguration.Local.cscfg and I still see the same behavior. That is, whenever I update the configuration, the role fails to restart and instead goes into an endless loop. Moreover, it appears that I'm also unable
to restart a role by simply right clicking its deployment in the compute emulator and choosing “Restart”. Same result.
After further testing, I find that once a role goes into a loop, stopping the site manually from the IISExpress tray icon using “Stop Site” allows the role to eventually restart in the compute emulator. Note that you may need to attempt stopping the site a
few times before it succeeds (It appears that you need to do this while the status of the role is shown in the emulator as "Unknown", but I'm not certain about this). Even more curious is that once you do that, you can then update the configuration with any
configuration file, as I expected, and do this any number of times and it will work every time until you stop the deployment. Another interesting fact is that switching the project from IIS Express to Full IIS “fixes the problem” and everything starts to work
as I described in my first reply to this thread.
It seems that there’s something wrong with IIS Express, at least in my machine, and perhaps all this may be entirely unrelated to the problems that you were having, but can you confirm whether you are able to successfully restart a role in the emulator?
Also, what is your development environment? I'm running Visual Studio 2012 RC on Windows 8 RP.
Thanks,
Fernando
UPDATE: I now realize that the term "Full IIS" may lead to some confusion. When I mention switching to Full IIS, I'm referring to switching the Local Development Server in the cloud project properties from IIS Express to IIS Web Server and *not* to
uncommenting the <sites> element.