要从命令行创建.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:
- 下载VS 2017 Update 3 Preview 3(如果已发布则进一步预览,如果您正在阅读此内容)
- 从此处下载最新的CLI / SDK: github/dotnet/cli/tree/release/2.0.0#installers-and-binaries
- 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: github/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
发布评论