问题
I recently installed .NET 5 Preview 8 and created a new ASP.NET Core MVC project in Visual Studio 2019 16.8 Preview 2.
For all the NuGet packages it is showing yellow exclamation mark. There are no compilation errors, no warnings. The application works fine. No errors. But VS keeps showing yellow exclamation. This problem comes only for .NET 5 projects. ASP.NET Core 3.1 projects don't give this problem.
My project file is shown below :
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.0-preview.8.20414.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.0-preview.8.20407.4" />
</ItemGroup>
</Project>
What's the reason and how to fix it ??
Thank you.
回答1:
It's a known issue in .NET 5 Preview 8:
- Warning icons in Dependencies node in Solution Explorer
- For projects targeting .NET 5, warning icons may be displayed on packages listed in the Solution Explorer Depdendencies node
I don't think there's a fix available at the moment.
来源:https://stackoverflow.com/questions/63855684/visual-studio-2019-showing-yellow-exclamation-for-net-5-preview-8