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

What if two nuget package point to the same Dll

$
0
0

Ok. So I have one solution with three projects

  1. Project-A.csproj(turned into A.nupkg)
  2. Project B.csproj(turned into B.nupkg)
  3. Utils.csproj

Since utils.csproj has a lot of central functions both A and B have reference to utils.dll as a project reference. So basically when I go to /bin folder of either A or B I can see utils.dll. So far so good.

Now, I have another project. LEt's call it consumer.csproj which does reference both A.nupkg and B.nupkg in the same order mentioned. Also, Utils.dll has some functions which expects certain .json files which it does expect to be at certain location.

Now, when I reference A.nupkg first, it does bring in utils.dll with it and then my consumer project knows that it needs to go to /A/lib when running code does ask for utils.dll. which was OK until when my consumer project did call some B.nupkg functionality which in turn called, utils.csproj functionality which was looking for some json files in a.nupkg/lib folder because now everytime utils.csproj is called, compiler just goes to A.nupkg folder looking for it.

Is there anything I am doing wrong here? If not, what can I do to resolve this issue

Now I


Viewing all articles
Browse latest Browse all 3067

Trending Articles



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