-1

I have library "library.dll" where is something like that in the code:

PathModifier.AddEnvironmentPath("lib\\dlls", PathModifyMode.RelativeToProjectDirectory);

In this "dlls" folder are *.dll files (cca 20 files) which need to be added to Environment path. Properties of these files are set up like this:

Copy to Output Directiory: Do not copy and Build Action: Resource

Library has about 30 MB, so dll files are contained in. When I use this library in WPF project, there is problem, because it try to find "lib\dlls" in WPF project directory instead of inside the "library.dll".

Is there any solution, how to say "find dlls folder only inside library, not in project, where is library used"?

Thanks.

Mighty Badaboom
  • 6,067
  • 5
  • 34
  • 51
Martin
  • 1
  • 3

1 Answers1

0

If you are trying to centrilize the dependencies, then you should take a look at my answer here Nuget common folder. The idea is the same as saving all Nuget packages, all your dependencies should point to the same place, on this case the Common folder. On the Nuget scenario, you need to add an extra configuration to restore all packages from there and seed the nuget repository from that location. In your case I think that the WPF project is looking inside the bin folder, and because you have the resources as Do not copy, then you can't find them inside, if you change that Copy Always will bring those dependencies inside your bin folder.

Community
  • 1
  • 1
Zinov
  • 3,817
  • 5
  • 36
  • 70