bug: VS 2008 – Web Application Project opened as Web Site
I just bumped into a weird Visual Studio (aka. Vicious Studio) bug. Not the first, but this is a pretty annoying one. I have taken an old .NET 1.1 Web application and converted it to .NET 3.5 using the VS Conversion Wizard. Everything seems ok, and I convert to Web Site to a Web Application Project. No problems so far. I fix some issues, close the solution, do some other stuff. Some days later I open the solution again. I then have about 200 errors and the Web Application Project is opened as a Web Site. Also the designer and resx files are not connected to the asp and codebehind files:
Ok, I have to start digging into the project and solution files. Comparing them to other solutions using Web Application project files, I can't seem to find anything suspicious. After some googling with no result, I decide to stare at the screen for a while and use WinMerge to determine what the difference might be. Suddenly I find one minor difference:
The solution file that works:
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Clock", "Clock.vbproj", "{3B3D0F02-D310-4BFB-83AD-F62758BB8624}"
The one that fails:
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Calendar", "Calendar\", "{7B411329-B1CB-457F-A954-898DX16B85A6}"
That's it. The Calendar project reference is missing the whole path to the project file. When i change it to:
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Calendar", "Calendar\Calendar.vbproj", "{7B411329-B1CB-457F-A954-898DX16B85A6}"
it opens as a Web Application Project, and now the resx and designer files are properly connected:
6 Comments to bug: VS 2008 – Web Application Project opened as Web Site
Thanks a lot!!. That was exactly what i was looking for. Changing the sln file and removing the .webinfo file solved everything.
January 30, 2009
Legend… crazy wee bug, thanks for posting about it as while I could see the sln mess being created, the webinfo being the cause is a golden piece of information.
June 18, 2009
Thanks a lot…we only had to remove the webinfo file and did not change anything in the sln file. That worked…
June 19, 2009
Thanks a lot, removing webinfo file did the magic
August 19, 2009
we recently converted a legacy application and had this same issue… removing the webinfo file did the thing
March 31, 2011
Thanks man – I spent over 7 hours trying to figure out what was wrong with my new laptop. I even uninstalled and reinstalled VS 2008. You saved me.
Leave a comment
Search
Knut Hamang
Recent Posts
Recent Comments
- Tim M on Passing an object to ObjectDataSource
- harin yadav.C on Html to Pdf in .NET
- harin yadav.C on Html to Pdf in .NET
- gautham on Html to Pdf in .NET
- How To Convert HTML To PDF With Image Tags Using iTextSharp | Top Online Trading on Html to Pdf in .NET


December 9, 2008