Visual Studio 2019 在 .Net Core 3.1 解决方案中创建 .NetStandard 2.0.3 库而不是 2.1 [英] Visual Studio 2019 creating .NetStandard 2.0.3 libraries instead of 2.1 inside a .Net Core 3.1 solution

查看:28
本文介绍了Visual Studio 2019 在 .Net Core 3.1 解决方案中创建 .NetStandard 2.0.3 库而不是 2.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近(昨天)更新了 Visual Studio 2019.我可以访问 .net core 3.1 sdk 并且可以创建 .net core 3.1 项目.但是,当我尝试创建 .net 标准库时,它默认为 2.0.3 而不是 2.1.

据我所知,.net 标准 2.1 应该带有 .net core 3.1.

我在这里误解了什么吗?

解决方案

创建一个空白解决方案并添加一个新的类库 (.NET Standard).在属性中将目标框架更改为 .NET Standard 2.1

保存更改并点击Project->Export template:

并创建一个

给它一个名称和描述并完成.

当你创建一个新项目时,选择你生成的模板,现在它总是设置为 .NET Standard 2.1 而不是 .NET Standard 2.0.

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?

解决方案

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 always set to .NET Standard 2.1 instead of .NET Standard 2.0.

这篇关于Visual Studio 2019 在 .Net Core 3.1 解决方案中创建 .NetStandard 2.0.3 库而不是 2.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆