When I run a webapp from Visual Studio 2008 SP1 using the internal web server (not IIS) I receive the above mentioned error.
The full error (source file Default.aspx.cs):
Compiler Error Message: CS0433: The
type 'WebApplication3.Site1' exists in
both
'c:WindowsMicrosoft.NETFrameworkv2.0.50727Temporary
ASP.NET
Files
ootaa563bcf59deedc0App_Web_site1.master.cdcab7d2.muczzy9v.dll'
and
'c:WindowsMicrosoft.NETFrameworkv2.0.50727Temporary
ASP.NET
Files
ootaa563bcf59deedc0assemblydl344c3a3cf80dd34ed_6968ca01WebApplication3.DLL'
The preceding full warning:
Warning: CS0436: The type
'WebApplication3._Default' in
'c:WindowsMicrosoft.NETFrameworkv2.0.50727Temporary
ASP.NET
Files
ootaa563bcf59deedc0App_Web_default.aspx.cdcab7d2._tlkwdos.0.cs'
conflicts with the imported type
'WebApplication3._Default' in
'c:WindowsMicrosoft.NETFrameworkv2.0.50727Temporary
ASP.NET
Files
ootaa563bcf59deedc0assemblydl344c3a3cfe096e61c_6568ca01WebApplication3.DLL'.
Using the type defined in
'c:WindowsMicrosoft.NETFrameworkv2.0.50727Temporary
ASP.NET
Files
ootaa563bcf59deedc0App_Web_default.aspx.cdcab7d2._tlkwdos.0.cs'.
Source of warning points to an intermediate file App_Web_default.aspx.cdcab7d2._tlkwdos.0.cs:
Line 162:
Line 163: [System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()]
Line 164: public class default_aspx : global::WebApplication3._Default, System.Web.IHttpHandler {
Line 165:
Line 166: private static bool @__initialized;
and my question: where does this come from?
The webapp (not website!) has one Default.aspx and one Site1.Master, no dependencies. They're almost empty, with an asp:Label
on the page. Previously, this webapp worked fine. When I remove any references in Default.aspx.cs to the master, all goes well. The master has some code only.
It's actually one of many little fire-and-forget test webapps, so I couldn't care less. But I hadn't seen this before and now I'm curious of what to do, other then copying code into a new project (cleaning solution doesn't help).
Note: I've read this post and some others, they don't apply.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…