Binaries are added to /bin without a reference, why?

时间:2019-01-07 13:42:09

标签: visual-studio devexpress

I am using a custom built NuGet package with a set of binaries from DevExpress. Whenever I build the project from Visual Studio, a lot of "extra" DevExpress binaries, that I have not added a reference too, is also added to the bin folder.

I have installed a DevExpress suite of some sort so it might be that some of the GAC'ed binaries are added, but why ? I do not wish to have these binaries cluttering my bin folder.

VS references:

enter image description here

Bin folder:

enter image description here

2 个答案:

答案 0 :(得分:1)

可能是程序集知道其依赖关系。 Assembly Explorer向您显示哪个:

enter image description here

答案 1 :(得分:1)

除了Rolf的回答。

如果在项目中将引用设置为“本地”,则dll将会移动到输出文件夹(\ bin) enter image description here

在项目中,这些报酬将带有<private>True</Private>标签:

fx:

<Reference Include="log4net, Version=2.0.8.0, ...>
  <HintPath>..\packages\log4net.2.0.8\lib\net40-full\log4net.dll</HintPath>
  <Private>True</Private> <-- HERE
</Reference>