Disabling ambiguous reference error when using a shared resource assembly

I was wondering if there is a way to disable an "ambiguous reference" error in Resharper 7 when using an assembly that uses shared resources.

We are currently using a resource assembly to store string and images that are used in multiple versions of our product. Basically, we have folders that represent each "white label" version of our product. Inside each of these folders is a resource file. To make sure that the right resource is selected we create a MSBuild compile condition in the project file.

However, when we use the resource in our code it shows "ambiguous reference" error.


            label2.Text = Vendor.Resources.CompanyName;

Resources is considered an ambiguous reference since it exists in the resource assembly in two version folders.

Now building the project succeeds because of the conditionals in the project file.

I understand why Resharper thinks there is an error-since it doesn't know about the compile conditions. However, I would like to know how I can disable this specific type of error so my file doesn't continuously tell me there is an error.

1 comment
Comment actions Permalink

Hello Bruce
     I'm afraid this error cannot be disabled. Could you please attach a small sample solution demonstrating your configuration and we'll see if we can address this problem in one of the future releases. Thank you!

Andrey Serebryansky

Software Developer

JetBrains, Inc


"Develop with pleasure!"


Please sign in to leave a comment.