You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When consuming a .NET Standard (netstandardx.y) package from a .NET Framework (net4x) project that's below .NET Framework 4.7.2 (for example net461) a bunch of extra support and shim binaries must be distributed due to some compatibility issues. This can balloon the size of the application that must be distributed to customers.
The versions listed here represent the rules that NuGet uses to determine whether a given .NET Standard library is applicable. While NuGet considers .NET Framework 4.6.1 as supporting .NET Standard 1.5 through 2.0, there are several issues with consuming .NET Standard libraries that were built for those versions from .NET Framework 4.6.1 projects. For .NET Framework projects that need to use such libraries, we recommend that you upgrade the project to target .NET Framework 4.7.2 or higher.
In the multi-targeting documentation it is recommended that library authors should:
✔️ CONSIDER adding a target for net461 when you're offering a netstandard2.0 target.
Using .NET Standard 2.0 from .NET Framework has some issues that were addressed in .NET Framework 4.7.2. You can improve the experience for developers that are still on .NET Framework 4.6.1 - 4.7.1 by offering them a binary that is built for .NET Framework 4.6.1.
When application authors wish to consume System.CommandLine, but are unable to target .NET Frameworks newer than 4.7.2 they must ship all these extra DLLs because the System.CommandLine package only supports .NET Standard 2.0 (netstandard2.0)
Proposal
Introduce a net461 target framework in the System.CommandLine project so that consumers that must target .NET Framework have a better experience.
In src/System.CommandLine/System.CommandLine.csproj:
Note that .NET Framework 4.7.2 was only first pre-installed in Windows 10 April 2018 Update (version 1803), and the last version of Windows to support 4.7.2 is Windows 7 SP1.
Consumers of System.CommandLine that must support Windows Vista cannot target .NET Core (not supported) and also cannot target any version of .NET Framework beyond 4.6, so it's open as to what the lowest reasonable .NET Framework version you'd want to try and support, be that 4.5, 4.6, 4.6.1, or newer.
Problem Background
When consuming a .NET Standard (
netstandardx.y
) package from a .NET Framework (net4x
) project that's below .NET Framework 4.7.2 (for examplenet461
) a bunch of extra support and shim binaries must be distributed due to some compatibility issues. This can balloon the size of the application that must be distributed to customers.See https://docs.microsoft.com/en-us/dotnet/standard/net-standard#net-implementation-support, table footnote [2]:
In the multi-targeting documentation it is recommended that library authors should:
Source: https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/cross-platform-targeting#multi-targeting
When application authors wish to consume
System.CommandLine
, but are unable to target .NET Frameworks newer than 4.7.2 they must ship all these extra DLLs because theSystem.CommandLine
package only supports .NET Standard 2.0 (netstandard2.0
)Proposal
Introduce a
net461
target framework in theSystem.CommandLine
project so that consumers that must target .NET Framework have a better experience.In
src/System.CommandLine/System.CommandLine.csproj
:The text was updated successfully, but these errors were encountered: