Esdeveniment
Crea aplicacions intel·ligents
17 de març, 21 - 21 de març, 10
Uneix-te a la sèrie de trobades per crear solucions d'IA escalables basades en casos d'ús del món real amb altres desenvolupadors i experts.
Registreu-vos-hi araAquest navegador ja no s’admet.
Feu l’actualització al Microsoft Edge per aprofitar les característiques més recents, les actualitzacions de seguretat i l’assistència tècnica.
A warning is now emitted when a project that targets netstandard1.x
is built with the .NET 9+ SDK.
Previously, you could build a project that targeted .NET Standard 1.0 - .NET Standard 1.6 without any build warnings.
Starting in .NET 9, if you build a project that targets .NET Standard 1.0 - .NET Standard 1.6, the following warning is emitted:
warning NETSDK1215: Targeting .NET Standard prior to 2.0 is no longer recommended. See https://aka.ms/dotnet/dotnet-standard-guidance for more details.
.NET 9 Preview 6
This change can affect source compatibility.
The build warning was introduced to encourage customers to target .NET Standard 2.0 or .NET 6+. If you target .NET Standard 1.x, you're limiting yourself to a subset of .NET Framework 4.5, which is over 10 years old. A lot of innovation has happened since then that you're missing out on. In addition, .NET Standard 1.x is distributed as a granular set of NuGet packages, which creates a large package dependency graph and results in a lot of packages being downloaded when the project is built.
For more information, see What is the downside of targeting .NET Standard 1.x?.
Update your TargetFramework
property to netstandard2.0
or netstandard2.1
.
If you must stay on an older .NET Standard version, you can set <CheckNotRecommendedTargetFramework>
to false
in your project file (for example, .csproj file) or Directory.Build.props file to skip the target framework version check:
<PropertyGroup>
...
<CheckNotRecommendedTargetFramework>false</CheckNotRecommendedTargetFramework>
</PropertyGroup>
Alternatively, you can suppress the warning using the <NoWarn>
property in your project file:
<PropertyGroup>
...
<!-- Disable "Targeting .NET Standard prior to 2.0 is no longer recommended." warning -->
<NoWarn>$(NoWarn);NETSDK1215</NoWarn>
</PropertyGroup>
N/A
Comentaris de .NET
.NET és un projecte de codi obert. Seleccioneu un enllaç per enviar comentaris:
Esdeveniment
Crea aplicacions intel·ligents
17 de març, 21 - 21 de març, 10
Uneix-te a la sèrie de trobades per crear solucions d'IA escalables basades en casos d'ús del món real amb altres desenvolupadors i experts.
Registreu-vos-hi araFormació
Mòdul
En este módulo, aprenderá cuándo, por qué y cómo modernizar una aplicación de ASP.NET Framework a ASP.NET Core utilizando el Asistente para actualización.
Documentació
Obtenga información sobre .NET Standard, sus versiones y las implementaciones de .NET que lo admiten.
Destino multiplataforma para bibliotecas de .NET - .NET
Procedimientos recomendados para la creación de bibliotecas de .NET multiplataforma.
Plataformas de destino en proyectos de estilo SDK: .NET - .NET
Obtenga información sobre las plataformas de destino para las aplicaciones y bibliotecas de .NET.