簡體   English   中英

為什么有些 NuGet package dll 被復制到解決方案的 output 目錄而有些沒有?

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

我有一個包含兩個項目的解決方案,項目 A 和項目 B。項目 A 是啟動項目,參考項目 B。項目 B 有一些 NuGet 包,包括 EMGU.CV 和 MaterialDesignThemes。 EMGU.CV 將其 dll 復制到項目 A 的 output 目錄,但 MaterialDesignThemes 沒有。 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?

不確定這是否相關,但我的 NuGet package 管理是使用 PackageReference,而不是 nuget.config。 我正在使用 VS 2019。

我意識到問題出在哪里。 未復制到啟動項目項目 A 的包是僅在項目 B 的 XAML 文件中引用的包。為了確保它們從項目 B 中復制過來,我使用它們的 XAML.cs 向這些包添加了方法調用文件。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM