Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I have a smallish solution, with about under twenty projects. The solution used to also contain about six source projects written by a third party service provider, ACME. Now, finally, this other party is supplying us only with a handful of DLLs. 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.

My immediately apparent options are:

  1. Create an AcmeAssembly project, add all DLLs as project items set to copy to output.
  2. Create an AcmeAssembly solution folder. 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, i.e. outside of VS.
  3. Create a NuGet package that includes all the required binaries. Then at least we also have a partly 'phycical' grouping in the packages folders. My problem here is I have never written a NuGet package, but I am not asking how to here. I am asking about three candidate solutions, and more will be welcome, and if NuGet wins, I get to learn to write a package.

I can't simply use the project's output bin\debug and bin\release folders. 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.

like image 881
ProfK Avatar asked Nov 21 '22 13:11

ProfK


1 Answers

The advantages of nuget over the other solutions are:

  1. Support for versioning
  2. Support is built in into Visual Studio and MSBuild
  3. No 'magic folders' that all developers need to have on their machines
like image 184
Emond Avatar answered Nov 24 '22 02:11

Emond