F#,Visual Studio 2017和新的dotnet [英] F#, Visual Studio 2017 and dotnet new

查看:116
本文介绍了F#,Visual Studio 2017和新的dotnet的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

要从命令行创建.NET类库,可以运行脚本

To create a .NET class library from the command line, you can run the script

dotnet new classlib

在一个干净的文件夹中执行此操作,它将创建一个 csproj 可以在Visual Studio 2017中打开的文件。

Do that in a clean folder, and it will create a csproj file that can then be opened in Visual Studio 2017.

但是,运行脚本

dotnet new classlib -lang f#

在干净的文件夹中,然后将fsproj无法在Visual Studio 2017中打开随后创建的文件。错误消息为

in a clean folder, and the fsproj file that is subsequently create cannot be opened in Visual Studio 2017. The error message reads


导入的项目 C:\Program Files( x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\FSharp.NET.Sdk\Sdk\Sdk.props。确认声明中的路径正确,并且文件在磁盘上。

The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\FSharp.NET.Sdk\Sdk\Sdk.props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

我已搜索此问题的说明,并且似乎正在进行修复工作,但是我在过渡期间想知道是否可以安装任何插件来立即使它正常工作。

I have searched for clarification of this issue, and it appears that there is work ongoing to fix it, but I wondered in the interim if there are any add-ins I can install to get this working immediately.

推荐答案

显然,Visual Studio和.NET Core的最新预览版支持加载.fsproj项目。

The latest preview releases of Visual Studio and .NET Core support loading .fsproj projects, apparently.

在GitHub问题上查看此评论:


现在关闭此项目,因为这些项目加载了15.3。当前使用它们的方式:

Closing this now, as these projects load with 15.3. The current way to use them:

  • Download VS 2017 Update 3 Preview 3 (or a further preview if it's released and you're reading this)
  • Download the latest CLI/SDK from here: https://github.com/dotnet/cli/tree/release/2.0.0#installers-and-binaries

(是的,.NET SDK独立于VS。在VS 2017 Update 3 Previews中,您还需要获得.NET Core 2.0支持。)

(Yes, the .NET SDK is independent of VS. You will also need this to get .NET Core 2.0 support in VS 2017 Update 3 Previews).

这篇关于F#,Visual Studio 2017和新的dotnet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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