[英]How to create an F# library with target framework as .NET Standard 2.0?
I am trying to create an F# class library with target framework as .NET Standard 2.0. 我正在尝试创建一个目标框架为.NET Standard 2.0的F#类库。 When I try to create a new project in Visual Studio 2017, I don't see any option to create a class library with target framework as .NET Standard 2.0 (attached screenshot) 当我尝试在Visual Studio 2017中创建新项目时,看不到使用目标框架创建为.NET Standard 2.0的类库的任何选项(附加屏幕截图)
When trying to create an F# project, I see a bunch of options to create projects in .NET framework or the option to create an ASP.NET Core web application (which uses .NET Core). 尝试创建F#项目时,我看到了很多在.NET框架中创建项目的选项或创建ASP.NET Core Web应用程序(使用.NET Core)的选项。
Can someone help me how to create an F# library with target framework as .NET Standard 2.0? 有人可以帮我如何使用目标框架(如.NET Standard 2.0)创建F#库吗?
You don't normally directly target .NET Standard when creating project, with class libraries being the exception. 通常,创建项目时通常不会直接针对.NET Standard,但类库除外。 .NET Standard is a specification that the different .NET platforms implement. .NET Standard是不同.NET平台实施的规范。 For example, if you were creating a new asp.net project that targets .NET Core, you would need to target .Net Core 2.0 in order to indirectly target .NET Standard 2.0. 例如,如果要创建一个针对.NET Core的新asp.net项目,则需要针对.Net Core 2.0,以便间接针对.NET Standard 2.0。
The following link explains this further and also shows the version of .NET Standard supported by each .Net platform: 下面的链接对此进行了进一步说明,并显示了每个.Net平台支持的.NET Standard版本:
https://docs.microsoft.com/en-us/dotnet/standard/net-standard https://docs.microsoft.com/en-us/dotnet/standard/net-standard
When creating class libraries, you can choose to directly target .NET Standard by following these steps (Visual Studio 2017): 创建类库时,您可以按照以下步骤(Visual Studio 2017)选择直接定位.NET Standard:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.