2016-11-25 1 views
4

나는 내 Mac에서 f # 및 dotnet core를 시작하려면 https://github.com/enricosada/fsharp-dotnet-cli-samples/wiki/Getting-Started#hello-world을 따르려고했습니다.f #을 사용하여 dotnet cli가있는 Mac에서

 
% mkdir helloworld 
% cd helloworld 
% dotnet new --lang "f#" 
Created new F# project in /Users/User/dotnet/helloworld. 
% ls 
Program.fs project.json 

여기에서 필자는 내가 수행 한 튜토리얼에서 설명한대로 NuGet.Config가 없다는 것을 이미 알 수 있습니다. 그런 다음

 
% dotnet restore 
log : Restoring packages for /Users/User/dotnet/helloworld/project.json... 
log : Restoring packages for tool 'dotnet-compile-fsc' in /Users/User/dotnet/helloworld/project.json... 
log : Writing lock file to disk. Path: /Users/User/dotnet/helloworld/project.lock.json 
log : /Users/User/dotnet/helloworld/project.json 
log : Restore completed in 2148ms. 
% dotnet run 
Project helloworld (.NETCoreApp,Version=v1.1) will be compiled because expected outputs are missing 
Compiling helloworld for .NETCoreApp,Version=v1.1 
The specified framework 'Microsoft.NETCore.App', version '1.0.0' was not found. 
    - Check application dependencies and target a framework version installed at: 
     /usr/local/share/dotnet/shared/Microsoft.NETCore.App 
    - The following versions are installed: 
     1.1.0 
    - Alternatively, install the framework version '1.0.0'. 
/usr/local/share/dotnet/dotnet compile-fsc @/Users/User/dotnet/helloworld/obj/Debug/netcoreapp1.1/dotnet-compile.rsp returned Exit Code 131 

Compilation failed. 
    0 Warning(s) 
    0 Error(s) 

Time elapsed 00:00:00.4439997 

DOTNET 정보는 내가 dotnet new --lang "f#"

를 사용하여 F # 프로젝트를 만들 때 전에 비슷한 문제가 있었다

 
% dotnet --info 
.NET Command Line Tools (1.0.0-preview2-1-003177) 

Product Information: 
Version:   1.0.0-preview2-1-003177 
Commit SHA-1 hash: a2df9c2576 

Runtime Environment: 
OS Name:  Mac OS X 
OS Version: 10.12 
OS Platform: Darwin 
RID:   osx.10.12-x64 
+1

그 지침 https://github.com/dotnet/netcorecli-fsc/wiki/.NET-Core-SDK-preview2.1를 참조 nuget.org 아직 없기 때문에 dev에 피드를 사용하여 다음과 같은 dotnet restore을하고 해결할 수 있습니다 .Net Core Preview 1 설치 (맨 위) 언급. 그러나 https://github.com/dotnet/cli/releases에는 [릴리스 공지] (https://blogs.msdn.microsoft.com/)의 Preview 3 목록이 있습니다. dotnet/2016/11/16/announce-net-core-tools-msbuild-alpha /)는 그들이 project.json과 bac에서 멀어지고 있다고 언급했다. k를'.csproj' 형식으로 변환합니다. 그러나이 형식은 이전처럼 모양이 크게 단순화 된'.csproj' 형식입니다. 아마도 .NET CLI 도구를 1.0 미리보기 3으로 업데이트하고 다시 시도하기 만하면됩니까? – rmunn

답변

2

말한다 문제는 당신에 project.json 파일을 볼이 종속성이 있습니다 : dotnet-compile-fsc.

"tools": { 
    "dotnet-compile-fsc": "1.0.0-preview2.1-*" 
}, 

작성 당시에는 .Net Core 1.0. * 런타임 만 지원되며, .Net Core 1.1. * 런타임은 지원되지 않습니다.

이 문제를 해결하려면 install the .Net Core 1.0.* runtime from here을 입력하고 dotnet run을 다시 실행하십시오. 1.1. * 및 1.0. * 런타임은 모두 문제없이 로컬로 설치할 수 있습니다.

here is the issue reported on GitHub. 수정 사항이 있지만 NuGet에 아직 없습니다.

1

현재 dotnet-compile-fsc은 .NET Core 1.1 (현재, sdk preview2.1)에서는 작동하지 않으며 .NET Core 1.0 (LTS, sdk preview2)에서만 작동합니다.

당신은 새로운 패키지가

dotnet restore -f https://www.myget.org/F/netcorecli-fsc-preview2-1/api/v3/index.json

더 많은 정보/해결

관련 문제