How to share multiple binary files between source projects in one solution?

I have a small solution, about 20 projects. The solution also included about six source projects written by a third-party ACME service provider. Now, finally, this other side provides us with only a few DLLs. I just included their source, one project in the DLL, in the solution, and therefore I am looking for a neat way to include all of these assemblies in the solution, so they can be referenced from many projects that need them.

My most obvious options are:

  • Create an AcmeAssembly project, add all the DLLs as project elements that will be copied for output.
  • Create the AcmeAssembly solutions AcmeAssembly . Faster and easier than the original project with binary code, but folders with solutions have a very, very big drawback in the absence of the ability to group files without a solution file, that is, outside of VS.
  • Create a NuGet package containing all the necessary binaries. Then, at least, we also have a partially โ€œphysicalโ€ grouping in the packages folders. My problem here is that I have never written a NuGet package, but I am not asking how it is here. I ask about three possible solutions, and more would be welcome, and if NuGet wins, I will learn how to write a package.

I cannot just use the output folders of the project bin\debug and bin\release . For me, these are strictly output folders, and there should also be displayed nothing but other assembly assemblies. Removing the bin folder should have absolutely zero effect for the build, so, of course, there is no place for storing binary files.

+5
source share
2 answers

Advantages of nuget over other solutions:

  • Version support
  • Support is integrated in Visual Studio and MSBuild
  • There are no "magic folders" that all developers should have on their machines.
0
source

Create your Acme library folder (something like: C: \ Source \ Library \ AcmeLibrary). Put all your Acme dll in this folder. Then create a solutions folder in VS and add existing items to it (do not add the folder, but the items in the C: \ Source \ Library \ AcmeLibrary folder to the solutions folder using the "Add an existing item ..." menu selection).

0
source

All Articles