All,
I would like to inquire what is the best way to share types (that reside in an assembly) from a library obtained using nuget across my multiple project libraries.
Ex:
My Lib1 <= builds into assembly1 (separate project lib)
My Lib2 <= builds into assembly2 (separate project lib)
My Lib3 <= builds into assembly3 (separate project lib)
Lib1, Lib2, Lib3 all need to reference some type from the same nuget package1
Do I install the same nuget package1 (using nuget manager) for all: Lib1, Lib2, Lib3?
*** NOTE: All my libraries are in the same solution.
If that's the case, what about if you need to update nuget package1 to newer version... If I do it in Lib1 I have to remember to update nuget packages for Lib2, and Lib3. <= I suppose during build you may get warnings?
Any suggestions would be greatly appreciated.
I think yes, this is the best approach - you will always have direct reference to the library which you are actually using when you install the nuget.
Regarding versioning problem, in Visual Studio this is solved pretty nice. Just open 'Manage Nuget Packages for Solution' by right clicking on your solution name in Solution explorer:
And if the same package has different version, it would appear in Consolidate
tab: