Often when making changes to a VS2008 ASP.net project we get a message like:
BC30560: 'mymodule_ascx' is ambiguous in the namespace 'ASP'.
This goes away after a recompile or sometimes just waiting 10 seconds and refreshing the page.
Any way to get rid of it?
I recently came across this problem and it was only happening on one server even though all were running the same code. I thoroughly investigated the problem to make sure there were no user controls with clashing names, temp files were cleared out, etc.
The only thing that solved the problems (it seems permanently) is changing the batch attribute of the compilation element to false in the web.config, as suggested in the following link:
http://personalinertia.blogspot.com/2007/06/there-bug-in-compiler.html
<compilation debug="true" batch="false">
I firmly believe that this is in fact a bug in the compiler as suggested on that site.
I used to have this problem sometimes too. If I remember correctly it was caused by something like the following:
<%@ Page Inherits="_Default" %>
or perhaps
<%@ Page ClassName="_Default" %>
Or something like that. I'm not 100% sure which attribute it was (it's been a while).
But look look for something like _Default in your Page directive and replace them with actual class names in all of your files. For some reason, ASP.Net doesn't always interpret the _Default correctly, yielding temporary ambiguous references.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With