|
| 1 | +--- |
| 2 | +title: "Breaking change: Older framework versions dropped from packages" |
| 3 | +description: Learn about the .NET 6 breaking change in core .NET libraries where older framework versions have been dropped from the core libraries packages. |
| 4 | +ms.date: 06/23/2021 |
| 5 | +--- |
| 6 | +# Older framework versions dropped from package |
| 7 | + |
| 8 | +Starting with .NET 6 Preview 5, the core libraries packages can no longer be installed into projects whose target framework is older than: |
| 9 | + |
| 10 | +- .NET Framework 4.6.1 |
| 11 | +- .NET Core 3.1 |
| 12 | +- .NET Standard 2.0 |
| 13 | + |
| 14 | +## Change description |
| 15 | + |
| 16 | +Previously, you were able to upgrade the packages to the latest version, even if you were using them from a framework older than .NET Framework 4.6.1, .NET Core 3.1, or .NET Standard 2.0. Starting in .NET 6, if you're referencing an impacted package from an earlier framework, you can no longer update the referenced package to the latest version. |
| 17 | + |
| 18 | +## Version introduced |
| 19 | + |
| 20 | +6.0 Preview 5 |
| 21 | + |
| 22 | +## Reason for change |
| 23 | + |
| 24 | +Continuing to build for all frameworks increases the complexity and size of a package. In the past, .NET solved this issue by building only for current frameworks and *harvesting* binaries for older frameworks. Harvesting means that during build, the earlier version of the package is downloaded and the binaries are extracted. |
| 25 | + |
| 26 | +While consuming a harvested binary means that you can always update without worrying that a framework is dropped, it also means that you don't get any bug fixes or new features. In other words, harvested assets can't be serviced. That's hidden from you because you're able to keep updating the package to a later version even though you're consuming the same old binary that's no longer updated. |
| 27 | + |
| 28 | +Starting with .NET 6, .NET no longer performs any form of harvesting to ensure that all shipped assets can be serviced. |
| 29 | + |
| 30 | +## Recommended action |
| 31 | + |
| 32 | +If your project is maintained but not evolving, simply don't upgrade the impacted packages. This is generally not a huge take back because you're already consuming a frozen binary. |
| 33 | + |
| 34 | +If your project is evolving, upgrade it to a later framework version, such as: |
| 35 | + |
| 36 | +- .NET Framework 4.6.1 |
| 37 | +- .NET Core 3.1 |
| 38 | +- .NET Standard 2.0 |
| 39 | + |
| 40 | +## Affected APIs |
| 41 | + |
| 42 | +The following packages no longer ship old frameworks: |
| 43 | + |
| 44 | +- Microsoft.Extensions.DependencyModel |
| 45 | +- Microsoft.Win32.Registry.AccessControl |
| 46 | +- Microsoft.Win32.SystemEvents |
| 47 | +- System.ComponentModel.Annotations |
| 48 | +- System.ComponentModel.Composition |
| 49 | +- System.ComponentModel.Composition.Registration |
| 50 | +- System.Composition.AttributedModel |
| 51 | +- System.Composition.Convention |
| 52 | +- System.Composition.Hosting |
| 53 | +- System.Composition.Runtime |
| 54 | +- System.Composition.TypedParts |
| 55 | +- System.Data.Odbc |
| 56 | +- System.Diagnostics.DiagnosticSource |
| 57 | +- System.Diagnostics.EventLog |
| 58 | +- System.Diagnostics.PerformanceCounter |
| 59 | +- System.DirectoryServices |
| 60 | +- System.DirectoryServices.AccountManagement |
| 61 | +- System.DirectoryServices.Protocols |
| 62 | +- System.Drawing.Common |
| 63 | +- System.IO.Packaging |
| 64 | +- System.IO.Pipelines |
| 65 | +- System.Management |
| 66 | +- System.Net.Http.WinHttpHandler |
| 67 | +- System.Reflection.Context |
| 68 | +- System.Runtime.Caching |
| 69 | +- System.Runtime.CompilerServices.Unsafe |
| 70 | +- System.Security.Cryptography.Cng |
| 71 | +- System.Security.Cryptography.OpenSsl |
| 72 | +- System.Security.Cryptography.Pkcs |
| 73 | +- System.Security.Cryptography.ProtectedData |
| 74 | +- System.ServiceProcess.ServiceController |
| 75 | +- System.Speech |
| 76 | +- System.Text.Encoding.CodePages |
| 77 | +- System.Text.Encodings.Web |
| 78 | +- System.Threading.AccessControl |
| 79 | +- System.Threading.Channels |
| 80 | + |
| 81 | +The following packages will no longer be updated because their implementation is now part of the .NET 6 platform: |
| 82 | + |
| 83 | +- Microsoft.Win32.Registry |
| 84 | +- System.ComponentModel.Annotations |
| 85 | +- System.IO.FileSystem.AccessControl |
| 86 | +- System.IO.Pipes.AccessControl |
| 87 | +- System.Security.AccessControl |
| 88 | +- System.Security.Cryptography.Cng |
| 89 | +- System.Security.Cryptography.OpenSsl |
| 90 | +- System.Security.Principal.Windows |
| 91 | + |
| 92 | +<!-- |
| 93 | +
|
| 94 | +### Category |
| 95 | +
|
| 96 | +Core .NET libraries |
| 97 | +
|
| 98 | +--> |
0 commit comments