I have converted some of my class libraries to .NET Standard with Visual Studio 2017.
It was easy, add the .NET Standard class library project instead of the original project and add all the files there. The .csproj file even looks like a nuspec file with package information, etc. Inside the project settings, the checkbox “Create NuGet package at build” was checked, which I checked. Easy peasy.
However, users of the .NET Framework of my class library now get a lot of dependencies, I counted at least 20 other nuget packages that were added, most of which were completely unnecessary for my library. In other words, it was easy "easy peasy ? "
Is this just a byproduct for me using .NET Standard as the only build output and should I add the .NET Framework library back?
Packages such as the following will be added to the project that is wasting my library: even if they are completely unnecessary:
- System.Security.Cryptography. *
- System.xml. *
- System.io. *
etc .. many packages added. My library parses an array of "illustrious" ones and does not require much.
The Visual Studio project is configured to use .NET Standard 1.0, and the only link is "NETStandardLibrary", so I didn’t like the fact that I added all of them.
I inspected the package and it does not seem to list all of these files.
Is it possible to add only those packages that I need and still use .NET Standard 1.0?
My class library is open source: https://github.com/lassevk/DiffLib
The nuget package is here: http://www.nuget.org/packages/difflib/2017.4.24.2347
source share