1

I have created a package with a bunch of assemblies that we will provide to our users. I want our users to be able to pick and add only references they need from within the package to a project. The user should be able to add this package at a solution level and then pick the references to be added to each project from the package added. Is this possible with NuGet?

Example:

MyPackage - contain foo.dll, bar.dll, bla.dll

  1. User installs package "MyPackage" to solution
  2. Project 1 - select and add reference foo.dll, bar.dll
  3. Project 2 - select and add reference bla.dll

Currently, every reference of the package is added to every project. This is not the desired setup. I want only the selected references added. Is there a way to do this with Nuget?

1 Answer 1

2

NuGet is not designed to work this way. Packages are whole delivery units. Our recommendation in this scenario would be to package the individual assemblies according to how you want them individually installable.

Sign up to request clarification or add additional context in comments.

1 Comment

Isn't this a common scenario? We are part of the infrastructure group and provide libraries that are available for various scenarios like logging, database connectivity, network connectivity, XML parsing etc. Though we can package them separately as different packages, it would be convenient to add the package once to a solution; then pick libraries and add them as references to various projects that need specific features only.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.