[英]How to share many binary files between source projects in one solution?
I have a smallish solution, with about under twenty projects. 我有一个小的解决方案,大约有不到20个项目。 The solution used to also contain about six source projects written by a third party service provider, ACME.
该解决方案过去还包含由第三方服务提供商ACME编写的大约六个源项目。 Now, finally, this other party is supplying us only with a handful of DLLs.
现在,最后,这个对方只向我们提供了一些DLL。 I used to just included their source, one project per DLL, in the solution, and so I am looking for a neat way to include all these assemblies in the solution, so they can be referenced from the many projects that need them.
我过去只是在解决方案中包含了他们的源代码,每个DLL的一个项目,所以我正在寻找一种巧妙的方法将所有这些程序集包含在解决方案中,因此可以从需要它们的许多项目中引用它们。
My immediately apparent options are: 我立即明显的选择是:
AcmeAssembly
project, add all DLLs as project items set to copy to output. AcmeAssembly
项目,将所有DLL添加为要复制到输出的项目项。 AcmeAssembly
solution folder. AcmeAssembly
解决方案文件夹。 Quicker and simpler than a 'binary-only' source project, but solution folders have the very, very large drawback of having no means of grouping the files without a solution file, ie outside of VS. packages
folders. packages
文件夹中也有一个部分“phycical”分组。 My problem here is I have never written a NuGet package, but I am not asking how to here. I can't simply use the project's output bin\\debug
and bin\\release
folders. 我不能简单地使用项目的输出
bin\\debug
和bin\\release
文件夹。 To me, these are strictly output folders, and nothing but other dependency assemblies should also be output there. 对我来说,这些是严格的输出文件夹,除此之外,还应该输出其他依赖程序集。 Deleting the
bin
folder should have absolutely zero effect on a build, so that is certainly no place to store binaries. 删除
bin
文件夹应该对构建产生绝对零影响,因此当然不能存储二进制文件。
Create your Acme library folder (something like: C:\\Source\\Library\\AcmeLibrary). 创建您的Acme库文件夹(类似于:C:\\ Source \\ Library \\ AcmeLibrary)。 Put all of your Acme dll's in that folder.
将所有Acme dll放在该文件夹中。 Then create the Solution Folder in VS and add the existing items to it (don't add the folder, but the items in the C:\\Source\\Library\\AcmeLibrary folder to the solution folder using "Add Existing Item..." menu selection).
然后在VS中创建解决方案文件夹并将现有项添加到它(不要使用“添加现有项...”菜单将文件夹,但C:\\ Source \\ Library \\ AcmeLibrary文件夹中的项目添加到解决方案文件夹中选择)。
The advantages of nuget over the other solutions are: nuget优于其他解决方案的优势是:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.