Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does the message BC30560 'mymodule_ascx' is ambiguous in the namespace 'ASP' come up sometimes then go away?

Tags:

asp.net

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?

like image 934
alexmac Avatar asked Oct 08 '08 07:10

alexmac


2 Answers

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.

like image 193
jam40jeff Avatar answered Nov 06 '22 11:11

jam40jeff


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.

like image 40
Nathan Avatar answered Nov 06 '22 11:11

Nathan