简体   繁体   中英

Weird behavior when opening web project in Visual Studio 2012

I have a solution with a web project (the "main" project - lets call it the DataPortal project.) where the project will not open unless take the following steps.

  1. Open solution. The DataPortal project is greyed out and says "Unable to open project".
  2. Right click the DataPortal project node and choose Edit DataPortal.vbproj
  3. Change the UseIIS node in the project from True to False. Save the file.
  4. Right click the DataPortal project and choose Load Project. The project loads.
  5. Now open the DataPortal project files Property page. (Alt-Enter)
  6. Check the option button in the Property sheet that says Use Local IIS Web Server.
  7. Check the checkbox that says Use IIS Express. The Project Url already has a value in it.

Now everything works great. And I can work until I shut down VS but when I re-open the solution I have to go back through it all again.

Can anyone tell me how to fix it so that UseIIS is okay at startup? Is there some way to get insight into the project load error for more information about it?

Maybe you could try to start Visual Studio with the log switch and see if it reports anything.

devenv.exe /log

( /log documentation on msdn)

Also, when Visual Studio behaves strange I usually delete both *proj.user and *.suo files and sometimes it resolves the issue.

Try deleting (or editing) your DataPortal.vbproj.user file. I had this problem a few days ago, and I think that's what I did to solve it. Project settings that aren't team shared (which may include run settings for your web app) are in this file.

Probably you have some problems with IIS port. Try to diagnose using Fiddler or looking into IIS logs...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM