【发布时间】:2017-04-09 11:45:54
【问题描述】:
我试图关注 https://github.com/enricosada/fsharp-dotnet-cli-samples/wiki/Getting-Started#hello-world 在我的 mac 上开始使用 f# 和 dotnet core。
% mkdir helloworld % cd helloworld % dotnet new --lang "f#" 在 /Users/User/dotnet/helloworld 中创建了新的 F# 项目。 %ls Program.fs 项目.json在这里,我已经可以看出,没有我遵循的教程中概述的 NuGet.Config。那么
% dotnet 还原 日志:恢复 /Users/User/dotnet/helloworld/project.json 的包... 日志:在 /Users/User/dotnet/helloworld/project.json 中恢复工具 'dotnet-compile-fsc' 的包... log :将锁定文件写入磁盘。路径:/Users/User/dotnet/helloworld/project.lock.json 日志:/Users/User/dotnet/helloworld/project.json log : 恢复在 2148 毫秒内完成。 % 点网运行 项目 helloworld (.NETCoreApp,Version=v1.1) 将被编译,因为缺少预期的输出 为 .NETCoreApp 编译 helloworld,Version=v1.1 找不到指定的框架“Microsoft.NETCore.App”,版本“1.0.0”。 - 检查应用程序依赖项并定位安装在以下位置的框架版本: /usr/local/share/dotnet/shared/Microsoft.NETCore.App - 安装了以下版本: 1.1.0 - 或者,安装框架版本“1.0.0”。 /usr/local/share/dotnet/dotnet compile-fsc @/Users/User/dotnet/helloworld/obj/Debug/netcoreapp1.1/dotnet-compile.rsp 返回退出代码 131 编译失败。 0 个警告 0 错误 经过时间 00:00:00.4439997Dotnet 信息说
% dotnet --info .NET 命令行工具 (1.0.0-preview2-1-003177) 产品信息: 版本:1.0.0-preview2-1-003177 提交 SHA-1 哈希:a2df9c2576 运行环境: 操作系统名称:Mac OS X 操作系统版本:10.12 操作系统平台:达尔文 RID:osx.10.12-x64【问题讨论】:
-
那些说明提到(在顶部)安装 .Net Core Preview 1。但 github.com/dotnet/cli/releases 列出了 Preview 3,其 release announcement 提到他们正在远离
project.json并返回.csproj格式,尽管它是.csproj格式,显然比以前的样子大大简化了。也许您只需将 .NET CLI 工具更新到 1.0 预览版 3 并重试?
标签: .net f# dotnet-cli