Quantcast
Channel: Visual Studio General Questions forum
Viewing all articles
Browse latest Browse all 21115

Odd occurance of BC30969 when mixing languages

$
0
0

This may seem like a strange use case but it is legitimate in my code base.  I have a C++/CLI project "sandwiched" between two VB.NET projects.  For example, project C depends on (references) project M depends on project A1.  (Of course, in C there is an explicit reference to both M and A1).

C->M->A1

Where C and A1 are VB.NET and M is C++/CLI.

Also in the solution, and this is the strange part, there is a project A2 which is VB.NET and produces a dll by the same name as A1 (both produce A.dll).  There are no references to A2 by any other projects.  Regardless, when building, I get from project C:

error BC30969: Reference required to assembly 'A, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' containing type 'A.Class1', but a suitable reference could not be found due to ambiguity between projects 'A1' and 'A2'.

My question is, why is there ambiguity between A1 and A2 when I only ever reference A1?  It seems that the mere presence of A2 causes this to happen.

Note that this doesn't happen unless, as in my case, M is C++/CLI.  If M is a VB.NET project, then this doesn't happen.

I have an example solution with project files that demonstrates this behavior.  I'd be happy to share it with anyone however I don't see how to attach a file to this post.

Thanks,

John


Viewing all articles
Browse latest Browse all 21115

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>