简体   繁体   中英

Why do some NuGet package dlls get copied to the solution's output directory and some don't?

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM