I have been developing some simplistic packages and in my mind there is something I cannot understand completely. It is all related to the question whether or not I can 'wrap' somehow a package reference so that it does not break my package.
The concrete setup is as follow:
- I have a package that contains only some extension methods making the work with collections easier. Lets call this package
Collection extensions
- I have another package (that I am currently working over) that I want to reference the
Collection extensions
. But I do not want thisCollection extensions
package to be listed as a dependency on NuGet as this may lead to some issues whenever there is a mismatch (or a conflict) between the different used versions of theCollection extensions
.
I have tried to set the Private assets
metadata to All
for the package reference but then this is what I encountered: Could not load file or assembly '<assembly_name>'
.
I would appreciate your help!
P.S.: Maybe what I want to achieve is not possible (or hard to achieve). If you think like that, please let me know how would you manage such dependencies because I am planning to develop more helper
packages and would like to know whether this is a correct approach or not. Thank you in advance!