2017-10-12 2 views
1

Fedorea 26에서 실행 중이므로 처음으로 dotnet core asp 응용 프로그램을 빌드하고 있습니다. 아래의 dotnet restore 명령을 시도 할 때 오류가 발생하면 this 자습서를 따르십시오.단순한 yo 프로젝트에서 dotnet 복원 오류가 발생했습니다

yodotnet core 1.x 응용 프로그램을 빌드하지만 다음과 같이 나는 dotnet core 2.0.0이 있다는 의혹이 있습니다.

올바른지, 그렇다면 yo을 업그레이드하여 dotnet 2.0 프로젝트를 만들 수 있습니까?

yo aspnet 

_-----_  ╭──────────────────────────╮ 
|  | │  Welcome to the  │ 
|--(o)--| │ marvellous ASP.NET Core │ 

---------´ │ generator! │ (_´U _) ╰──────────────────────────╯ / \/ | ~ |
'._ .'__
'|° ´ Y

? What type of application do you want to create? Empty Web Application 
? What's the name of your ASP.NET application? WeatherMicroservice 
    create WeatherMicroservice/.gitignore 
    create WeatherMicroservice/Program.cs 
    create WeatherMicroservice/Startup.cs 
    create WeatherMicroservice/WeatherMicroservice.csproj 
    create WeatherMicroservice/web.config 
    create WeatherMicroservice/Properties/launchSettings.json 
    create WeatherMicroservice/runtimeconfig.template.json 
    create WeatherMicroservice/README.md 
    create WeatherMicroservice/global.json 


Your project is now created, you can use the following commands to get going 
    cd "WeatherMicroservice" 
    dotnet restore 
    dotnet build (optional, build will also happen when it's run) 
    dotnet run 


[[email protected] asp-core]$ cd WeatherMicroservice/ 
[[email protected] WeatherMicroservice]$ dotnet restore 

The specified SDK version [1.0.0-rc4-004771] from global.json [/home/idf/Documents/asp-core/WeatherMicroservice/global.json] not found; install specified SDK version 
Did you mean to run dotnet SDK commands? Please install dotnet SDK from: 
    http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409 

이것은 dotnet의 버전이 설치됩니다

[[email protected] WeatherMicroservice]$ dotnet --info output: 
The specified SDK version [1.0.0-rc4-004771] from global.json [/home/idf/Documents/asp-core/WeatherMicroservice/global.json] not found; install specified SDK version 

Microsoft .NET Core Shared Framework Host 

    Version : 2.0.0 
    Build : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d 

[[email protected] WeatherMicroservice]$ 

답변

3

ASP.NET Core 1.0 RC4에 아직도있다. 또한 .NET Core 2.0으로 업그레이드하려면 ticket 요청이 있습니다.

아마 가장 좋은 옵션은 dotnet new입니다. dotnet new -l을 입력하여 사용 가능한 모든 템플릿을 나열 할 수 있습니다. 빈 웹 응용 프로그램 프로젝트의 경우 dotnet new web. dotnet new에 대한 자세한 내용은 this 링크를 확인하십시오.

0

파일 열기 global.json 로 작성 무엇을 참조하십시오

{ 
"sdk": { 
"version": "xxx.yyy.zzz" 
} 
} 

지금, 개방 콘솔 적어 :

dotnet --version 

당신은 당신의 JSON 파일에서이 버전을 쓸 필요

관련 문제