Is there a way to create a nuget package that defines .NET library dependencies?

One of my libraries has a dependency on System.Configuration, but this .NET lib is not enabled by default in most types of projects in Visual Studio. Is there any way to teach NuGet Package Manager to add this .NET link when installing my library?

+4
source share
1 answer

You can use the frameworkAssembly element in your nuspec package. This will cause NuGet to add a link to the project when your package is installed.

<frameworkAssemblies> <frameworkAssembly assemblyName="System.Configuration" /> </frameworkAssemblies> 
+4
source

Source: https://habr.com/ru/post/1392939/


All Articles