简体   繁体   中英

“is ambiguous” Error message in vb.net when nothing is ambiguous

We have asp.net vb.net application which gives us random error situations.

we are getting error messages like this:

   Exception message: D:\xxxxxx\xxxxxx\artikkelit\bootstrapbartikkeli.aspx.vb(14): error BC30554: 'masterit_bootstrapb' is ambiguous.

<%@ Page Language="VB" Debug="false" AutoEventWireup="false" CodeFile="bootstrapbartikkeli.aspx.vb" Inherits="bootstrapbartikkeli" MasterPageFile="/masterit/bootstrapB.master" %>

Problem is that there is no double refrence to masterit_bootstrapb. class name is unique on site. Most of times this error occurs when we modify master or nested master. We can resolve this error by re-saving master and application vb-file. Sometimes it requires many re-savings to get it work. It seems like re compiling code in right order makes some magic to this...?

Same application and master is working fine on our test site thought.

How could we see the actual source of this "is ambiguous" error message? Is there any way we could trace deeper into this? This one application is making these erros thought we have many other applications that have this same master file on without ambigious erros.

Is it possible that our test site could cause this error message to our production site? Both sites are on same server, but on diffrent application pools.

Its namespace ambugity, you could have easily added a class and specifed the namespace in the class that is used assembly-wide rather than the class being a part of that assembly namespace.

Its entirely possible one of the sites has a different reference leading to the above.

Edit:

You could do a search on masterit_bootstrapb and check the project doesn't have any classes that define it at a class level. Unfortunately Visual Studio (or other tools) are not good at detecting these ambiguous errors..

http://msdn.microsoft.com/en-us/library/8f0k13d2.aspx

You have provided a name that is ambiguous and therefore conflicts with another name. The Visual Basic compiler does not have any conflict resolution rules; you must disambiguate names yourself.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM