Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

How to create .Net library that reference NuGet package without exposing the package public methods and classes

$
0
0

Main Goal: I want to create a library with fewer dependencies as possible.

The Problem:

I have a .Net Standard library (a.dll) that references a NuGet package (package) for internal usages.I tried to achieve the following behavior when a user referencing a.dll:

  1. The user will not have any access to the package classes and methods.
  2. The user will be able to reference a different version of the package and both versions will be loaded to the process.

How can I achieve this behavior?

Possible Solution: Copy the package code and change the assembly name and all the modifier access to internal. Big disadvantage: very difficult to maintain.


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>