0

I have a solution with two projects, project A and project B. Project A is the startup project and references project B. Project B has a few NuGet packages including EMGU.CV and MaterialDesignThemes. EMGU.CV copies it's dll to project A's output directory, but MaterialDesignThemes does not. I either have to manually copy the dll over, or add the NuGet package to project A. Is there a way to make all NuGet packages copy themselves over to the startup project's output directory?

Not sure if this is relevant, but my NuGet package management is with PackageReference, not nuget.config. And I'm using VS 2019.

Vic
  • 55
  • 7
  • Which frameworks (e.g. .NET Core or Standard) do A and B use? – thatguy Jun 27 '20 at 21:26
  • .NET Framework 4.7.2 . – Vic Jun 28 '20 at 18:23
  • Can you post the project file of A? – thatguy Jun 29 '20 at 16:20
  • @thatguy, As I was prepping a mock up of the projects I was describing for you to see, I realized what the issue was. The packages that were not being copied over to the startup project were packages that were not referenced anywhere in the code, beside within XAML files. So, within the XAML.cs files, I called methods from those packages and now they are copying over properly. I didn't know that the packages have to be used within the code to get them to copy over, but It makes sense. – Vic Jun 29 '20 at 18:21

1 Answers1

0

I realized what the issue was. The packages that were not copied over to the startup project, project A, were packages that were only referenced within XAML files of project B. To ensure they got copied over from project B, I added method calls to those packages with their XAML.cs file.

Vic
  • 55
  • 7