jason-roberts / FeatureToggle

Simple, reliable feature toggles in .NET
http://dontcodetired.com/blog/?tag=/featuretoggle
Apache License 2.0
689 stars 111 forks source link

When installing FeatureToggle 4.0.2 to a "classic" .NET 4.6.1 app or library Nuget wants to install 47 other dependencies #160

Closed bartread closed 6 years ago

bartread commented 6 years ago

I wanted to use FeatureToggle 4.0.2 in our web application, which currently runs on "classic" .NET 4.6.1. However, when I tried to install via the NuGet package manager in Visual Studio 2017, it presented me with a list of 47 other dependencies - all different versions of system libraries relating to .NET Core and .NET Standard - that it wanted to install:

image

This seems both excessive and unnecessary for a (relatively) simple utility library, as well as being liable to cause problems. Is it possible to build FeatureToggle 4.x.x and later, as per FeatureToggle 3.5.1, in such a way that these dependencies are not required, please?

(In the meantime I will use FeatureToggle 3.5.1 to avoid this issue.)

jochenvangasse commented 6 years ago

+1

corkupine commented 6 years ago

+1

mikanyg commented 6 years ago

This is not a FeatureToggle issue, but the way that .NET Standard packages work in .NET 4.6.1 which uses the packages.config style for dependency tracking.

FeatureToggle package depends on FeatureToggle.Common which targets .NET Standard 1.6.1 which will add all the assembly references in "classic" projects.

I think Microsoft tweaked this for packages targeting .NET Standard 2.0, but needs verification.

jason-roberts commented 6 years ago

Thanks for replying @mikanyg - version 5 is likely to be a fully/pure .NET standard library. https://github.com/jason-roberts/FeatureToggle/issues/155

elovelan commented 6 years ago

for the time-being, any consuming application can try using the Microsoft.Packaging.Tools.Trimming package