Visual Studio 2019 showing yellow exclamation for .NET 5 Preview 8

好久不见. 提交于 2021-02-11 06:11:45

问题


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:

  1. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!