问题
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