Here is another of my favorite problems with VS2005.
If I have a Web Application Project. If I build it (with no errors) then when I try to view it I get the error below. However,
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: The type ‘Company.Web.Equipment.Global’ is ambiguous: it could come from assembly ‘C:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Filesequipment3f386648c5a85b94App_Code.gv_z5p7w.DLL’ or from assembly ‘C:DataCompanyCompany.Web.EquipmentbinCompany.Web.Equipment.DLL’. Please specify the assembly explicitly in the type name.
Source Error:
|
Source File: /Equipment/global.asax Line: 1
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
I don’t know why it is only happening with this one web app.
Very frustrating.
Update: This has been resolved. The problem is obvious now. This was a web application that had been converted to a Web Site Project. When I tried to reimport the files manually into a new Web Application Project there was one minor, yet major, difference that was causing it to fail. The “CodeBehind” attribute had been changed to “CodeFile”. I didn’t think much of it at the time, but of course this indicates that it is going to actually USE the codefile when the page is accessed. By having a CodeFile attribute AND compiling the code into a DLL, I was ending up with copies of every class.