Visual Studio 2019 creating .NetStandard 2.0.3 libraries instead of 2.1 inside a .Net Core 3.1 solution

☆樱花仙子☆ 提交于 2020-05-30 05:16:56

问题


i've recently (yesterday) updated visual studio 2019. I have access to .net core 3.1 sdk and can create .net core 3.1 projects. However, when i try to create a .net standard library, it defaults to 2.0.3 instead of 2.1.

As far as i understand, .net standard 2.1 should come with .net core 3.1.

Am i misunderstanding something here?


回答1:


Create a blank solution and add a new Class Library (.NET Standard). In properties change the target framework to .NET Standard 2.1

Save the changes and click on Project->Export template:

and create an Project template based on the class lib project.

give it a name and description and finish.

and when you create a new project, select your generated template and now it is alwayss set to .NET Standard 2.1 instead of .NET Standard 2.0.



来源:https://stackoverflow.com/questions/59550768/visual-studio-2019-creating-netstandard-2-0-3-libraries-instead-of-2-1-inside-a

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