2

I'm curious how others do it, or if there's an easier way...

I'm having multiple projects which are referencing the same DLL i.e. nhibernate.dll. Those dlls are stored in version folders like NHibernate-3.2.0. If a new version comes out and we are going to upgrade to it, we create a new version folder and need to update all referencing projects to the new dll.

Is there some easier way to do that? Like some central project (lets call it REF_PROJ) which references nhibernate and all other projects are only referencing REF_PROJ? So the updating of the new version has only be done at one central place, the REF_PROJ.

Steve
  • 433
  • 7
  • 13

3 Answers3

3

Your solution is one way. The "better" way IMHO is to use nuget packages. Specifically the nhibernate nuget package. Then you can right click on the solution and update all the nhibernate packages when a new version comes out.

EDIT: To add to the other answer. If you wish to use a specific version of the nuget package that targets a particular version of the assembly in the package, use --version when you install them from the package manager console.

Matt Phillips
  • 11,249
  • 10
  • 46
  • 71
1

Just have a root folder, not version specific. Or if you really need version specific, then have 2 copies - one in the root folder and one in a version specific folder.

here is an example of what i mean.

nhibernate

--> nhibernate 3.2

----> nhibernate.dll

--> nhibernate.dll

Darren Kopp
  • 76,581
  • 9
  • 79
  • 93
0

Another solution is to using the GAC

register your assemblies into gac, and add reference to it from multiple projects without specifing assembly version . and update it easy with gac util.

pylover
  • 7,670
  • 8
  • 51
  • 73