1

I am trying to fix warning

The type 'X' in 'A' conflicts with the imported type 'X' in 'B'

I have solution with 2 projects: A.exe and B.dll, both are referencing same nuget Newtonsoft.Json, therefore a warning.

This question (which seems to be exacly what I need) doesn't really have an answer, only a tip to use "Manage Nuget Packages for Solution", but there is no instructions what to do to have that what question is asking for.

In "Manage Nuget Packages for Solution" I can see what X is installed for both A and B, has same version, I can uninstall it, etc. But, how do I organize nuget to avoid having conflict warning (because as soon as I reference same nuget in 2 projects I will have it) - there is no info regarding this.

Question: how to use same nuget package for multiple projects in solution properly?

Community
  • 1
  • 1
Sinatr
  • 20,892
  • 15
  • 90
  • 319
  • "both are referencing same nuget Newtonsoft.Json, therefore a warning" - um, no, that's not the expected behaviour. It's perfectly normal for multiple projects in a solution to reference the same NuGet packages and it doesn't usually generate a warning. So I'm not clear on what the problem is you're facing and most of the rest of the question seems irrelevant/built on a bad assumption. – Damien_The_Unbeliever Apr 14 '16 at 07:48
  • I'd suggest you try creating a [MCVE] that demonstrates the problem, hopefully as simple as "Create empty solution. Add two class library projects. Do X, Y, Z. See warning". I've no idea what X, Y and Z are though. – Damien_The_Unbeliever Apr 14 '16 at 07:54
  • @Damien_The_Unbeliever, thanks for telling that it's not normal. I am indeed failed to create MCVE with new project from first attempt. Give me few moments to investigate that. – Sinatr Apr 14 '16 at 08:04
  • @Damien_The_Unbeliever, you were right. This has nothing to do with nuget, it's [shared project issue](http://stackoverflow.com/q/36618541/1997232). Will delete question in few moments. – Sinatr Apr 14 '16 at 09:11

0 Answers0