As I say, I’ve got an application which I’ll refer to as “AppName” (note the upper case ‘A’ and ‘N’) which, for example, attempts to reference “My.Application.Info.ProductName”.
Adding a breakpoint and putting a QuickWatch on that call shows the error:
My.Application.Info.ProductName 'Application' is ambiguous between declarations in Modules 'appname.My.MyProject' and 'AppName.My.MyProject'.
The program is apparently taking my application and flat-out inventing a lower-case version of its namespace. I’ve searched the code with Match Case on, and there’s no Project, Module, Class, String or even variable name with the lower-case “appname”.
I’ve tried explicitly referencing “AppName.My.Application.Info.ProductName”, and it’s still shown as being ambiguous. I’ve tried referencing “[AppName].My.Application.Info.ProductName” with the same result.
Annoyingly, even though this reference can’t be resolved, the code carries on happily, and resolves to “appname.My.Application.Info.ProductName” which, “appname” not existing, returns an empty string instead of the information stored in AppName’s My.Application.Info section.
Does anyone know where this phantom lowercase namespace is coming from and how I can get rid of it so that my code can actually do what it’s supposed to be doing?
If AppName is a common name that might be used by some framework components, you might want to change the name to something else and see if the error disappears.
E.g. rename AppName to AppName_XyZ22_13.