如何将.NET标准库更改为.NET框架库? [英] How can I change a .NET standard library to a .NET framework library?

查看:219
本文介绍了如何将.NET标准库更改为.NET框架库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用C#编写一个用于简单解析器的类库。最初创建它时,我使用的是.NET标准2.0,但是现在我需要将其迁移到.NET 4.6,以符合解决方案中的其他项目以及使用NUnit的要求。

I'm writing a class library for a simple parser in C#. When I first created it, I used .NET standard 2.0, but now I need to migrate it to .NET 4.6 both to conform to the other projects in my solution and in order to use NUnit.

我试图按照在Microsoft文档中,但是当我尝试在属性中选择另一个框架时,我只能找到其他.NET标准版本。

I tried to follow the instructions in the Microsoft documentation, but when I try to select another framework in the properties, I can only find other .NET standard versions.

如何迁移它?我需要手动编辑 .csproj 文件吗?

How can I migrate it? Will I need to manually edit the .csproj file?

推荐答案

打开项目文件(.csproj),然后将TargetFramework更改为net462

Open up the project file (.csproj) and change the TargetFramework to net462

  <PropertyGroup>
    <TargetFramework>net462</TargetFramework>
  </PropertyGroup>

这篇关于如何将.NET标准库更改为.NET框架库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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