通过 NuGet 和设计器工具栏发布具有依赖关系的组件

Publishing Component with Dependency via NuGet and the Designer Toolbar

我有一个开源 Windows 表单控件,每个人都可以通过 NuGet 使用它,但是,这个控件依赖于我的其他库之一来处理动画。

现在的问题是用户在添加 NuGet 包后在工具箱中看不到控件,事实上,他们甚至不能手动添加控件,因为它依赖于其他库,而且事实上两个库在不同的文件夹中。

所以问题是,是否有更好的方法从 NuGet 包向工具栏添加控件?至于现在,他们需要编译他们的项目一次,然后将 /bin/Debug/bin/Release 文件夹中的库添加到工具栏。


有问题的图书馆是:

https://github.com/falahati/CircularProgressBar

It seems NuGet is not built to handle these dependency scenarios and Designer Toolbox doesn't actually follow the added references to the project, as result it won't be able to add the control to the toolbox.

鉴于依赖项导致问题的情况,它似乎是设计使然(或不受支持)。

I wanted to know if NuGet offers another way to put the dependent library next to the main library.

您是否尝试过将 2 个程序集合并在一起来解决这个问题。 Microsoft 的工具 ILMerge 可以让您做到这一点。这里我们合并 Primary.dll Secondary.dll (and etc) 到 Merged.dll 与 log.txt 合并出来。

ilmerge /log:log.txt /out:Merged.dll Primary.dll Secondary.dll