Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

How can I disambiguate an ambiguous reference produced by a NuGet package and a .dll file used side by side?

$
0
0

I have a solution, that uses the Newtonsoft JSON library to get things done.It is added to the project via NuGet.

Now I need to add another library to the project (That.Other.Library), which happens to be a plain old .dll file.The problem is that this .dll also uses the Newtonsoft JSON library and has it included as well.

Now I get an error message about the ambiguity:

The type 'JsonConvert' exists in both 'Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' and 'That.Other.Library, Version=, Culture=neutral, PublicKeyToken=null'

How can I specify that I only want to use the Newtonsoft JSON library which I added via NuGet and that I do not want to use anything that came along with some .dll file?

My intuition is that I somehow need to make the fully qualified names even more qualified by specifying what assembly it should come from or something like that, but I don't know how to do that.


Viewing all articles
Browse latest Browse all 3067

Trending Articles



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