Evento
Construír aplicacións intelixentes
Mar 17, 11 PM - Mar 21, 11 PM
Únete á serie de encontros para construír solucións de IA escalables baseadas en casos de uso do mundo real con compañeiros desenvolvedores e expertos.
Rexistrar agoraEste explorador xa non é compatible.
Actualice a Microsoft Edge para dispoñer das funcionalidades máis recentes, as actualizacións de seguranza e a asistencia 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
Comentarios de .NET
.NET é un proxecto de código aberto. Selecciona unha ligazón para ofrecer comentarios:
Evento
Construír aplicacións intelixentes
Mar 17, 11 PM - Mar 21, 11 PM
Únete á serie de encontros para construír solucións de IA escalables baseadas en casos de uso do mundo real con compañeiros desenvolvedores e expertos.
Rexistrar agoraFormación
Módulo
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ón
Obtenga información sobre .NET Standard, sus versiones y las implementaciones de .NET que lo admiten.
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.
Destino multiplataforma para bibliotecas de .NET - .NET
Procedimientos recomendados para la creación de bibliotecas de .NET multiplataforma.