Ok. So I have one solution with three projects
- Project-A.csproj(turned into A.nupkg)
- Project B.csproj(turned into B.nupkg)
- 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