When I have just one <%@Register %> line in my page, it loads fine.
When I add a second one, it gives me this compilation error:
Compiler Error Message: CS0433: The
type ‘ASP.test1_ascx’ exists in both
‘c:\Users\me\AppData\Local\Temp\Temporary
ASP.NET
Files\root\c2d75602\aae4f906\App_Web_dta-e2tq.dll’
and
‘c:\Users\me\AppData\Local\Temp\Temporary
ASP.NET
Files\root\c2d75602\aae4f906\App_Web_layerwindow.ascx.cdcab7d2.zxul1sik.dll’
(slightly anonymized)
Any ideas?
EDIT: Additional information I just noticed: the line above the broken line in the YSOD said: [System.Diagnostics.DebuggerNonUserCodeAttribute()] When I searched for information on this, I found a page telling me to check to make sure I didn’t have any open brackets I wasn’t closing. Haven’t found any yet, but this may be part of the issue.
EDIT: Argh. Just want to kill the computer at this point. After daughtkom suggested creating a new project to see if the code worked from scratch, I did that and it worked. I then decided to create a new control and copied the Test1 code into there… and then it started working. (No changes to Test1 or Default.aspx, just created Test1-2.ascx.) Then I added the link to Test2 into Default.aspx… and now it’s giving me the same error, just with test2. And creating a Test2-2.ascx isn’t fixing it this time.
I ended up setting “<compilation batch=”false”>” in my web.config file, which fixed the issue. I found it from a MSDN article… somewhere. If I find the link again I’ll post it.