Visual Studio 2015 was not able to load my MVC5 project in my solution and will display the same error message when I tried to use the "Update Project" via the context menu. The reason for this was a double entry in applicationhost.config.
Depending on the project settings, one of the following host.config applications will be used by Visual Studio 2015:
- "[Solution Path] .vs \ config \ applicationhost.config"
- "C: \ Users \ [username] \ Documents \ IISExpress \ Config \ ApplicationHost.config"
I opened applicationhost.config and found two "site" entries with the same name attribute:
<sites> <site name="WebSite" id="1" serverAutoStart="true"> [...] </site> <site name="WebSite" id="2" serverAutoStart="true"> [...] </site> </sites>
I deleted one of the "site" blocks:
<sites> <site name="WebSite" id="1" serverAutoStart="true"> [...] </site> </sites>
After that, I was able to successfully reload the MVC5 project.
Simon Oct 05 '16 at 8:35 2016-10-05 08:35
source share