2017-01-23 4 views
1

Ich habe dotnet 1.0.0-preview2-003131 auf meinem Windows 7-Rechner installiert. Wenn ich den Befehl dotnet restore mit cmd in das Verzeichnis meiner .NET-Core-Projekt ausführen, bekomme ich diese Fehler:Konnte runtime.ubuntu in dotnet restore nicht beheben

log : Restoring packages for C:\Projects\TestDotNetCore\Test2\project.json... 
error: Unable to resolve 'runtime.ubuntu.16.04-x64.Microsoft.NETCore.DotNetHostP 
olicy (>= 1.0.1)' for '.NETCoreApp,Version=v1.0 (ubuntu.16.04-x64)'. 
error: Unable to resolve 'runtime.ubuntu.16.04-x64.Microsoft.NETCore.Runtime.Cor 
eCLR (>= 1.0.4)' for '.NETCoreApp,Version=v1.0 (ubuntu.16.04-x64)'. 
error: Unable to resolve 'runtime.ubuntu.16.04-x64.Microsoft.NETCore.DotNetHostR 
esolver (>= 1.0.1)' for '.NETCoreApp,Version=v1.0 (ubuntu.16.04-x64)'. 
error: Unable to resolve 'runtime.ubuntu.16.04-x64.Microsoft.NETCore.Jit (>= 1.0 
.4)' for '.NETCoreApp,Version=v1.0 (ubuntu.16.04-x64)'. 
error: Unable to resolve 'runtime.ubuntu.16.04-x64.runtime.native.System (>= 1.0 
.1)' for '.NETCoreApp,Version=v1.0 (ubuntu.16.04-x64)'. 
error: Unable to resolve 'runtime.ubuntu.16.04-x64.runtime.native.System.Net.Sec 
urity (>= 1.0.1)' for '.NETCoreApp,Version=v1.0 (ubuntu.16.04-x64)'. 
error: Unable to resolve 'runtime.ubuntu.16.04-x64.runtime.native.System.Securit 
y.Cryptography (>= 1.0.1)' for '.NETCoreApp,Version=v1.0 (ubuntu.16.04-x64)'. 
error: Unable to resolve 'runtime.ubuntu.16.04-x64.runtime.native.System.Net.Htt 
p (>= 1.0.1)' for '.NETCoreApp,Version=v1.0 (ubuntu.16.04-x64)'. 
error: Unable to resolve 'runtime.ubuntu.16.04-x64.Microsoft.NETCore.DotNetHost 
(>= 1.0.1)' for '.NETCoreApp,Version=v1.0 (ubuntu.16.04-x64)'. 
error: Unable to resolve 'runtime.ubuntu.16.04-x64.runtime.native.System.IO.Comp 
ression (>= 1.0.1)' for '.NETCoreApp,Version=v1.0 (ubuntu.16.04-x64)'. 
log : Lock file has not changed. Skipping lock file write. Path: C:\Projects\Te 
stDotNetCore\Test2\project.lock.json 
log : C:\Projects\TestDotNetCore\Test2\project.json 
log : Restore failed in 1315ms. 

Errors in C:\Projects\TestDotNetCore\Test2\project.json 
    Unable to resolve 'runtime.ubuntu.16.04-x64.Microsoft.NETCore.DotNetHostPoli 
cy (>= 1.0.1)' for '.NETCoreApp,Version=v1.0 (ubuntu.16.04-x64)'. 
    Unable to resolve 'runtime.ubuntu.16.04-x64.Microsoft.NETCore.Runtime.CoreCL 
R (>= 1.0.4)' for '.NETCoreApp,Version=v1.0 (ubuntu.16.04-x64)'. 
    Unable to resolve 'runtime.ubuntu.16.04-x64.Microsoft.NETCore.DotNetHostReso 
lver (>= 1.0.1)' for '.NETCoreApp,Version=v1.0 (ubuntu.16.04-x64)'. 
    Unable to resolve 'runtime.ubuntu.16.04-x64.Microsoft.NETCore.Jit (>= 1.0.4) 
' for '.NETCoreApp,Version=v1.0 (ubuntu.16.04-x64)'. 
    Unable to resolve 'runtime.ubuntu.16.04-x64.runtime.native.System (>= 1.0.1) 
' for '.NETCoreApp,Version=v1.0 (ubuntu.16.04-x64)'. 
    Unable to resolve 'runtime.ubuntu.16.04-x64.runtime.native.System.Net.Securi 
ty (>= 1.0.1)' for '.NETCoreApp,Version=v1.0 (ubuntu.16.04-x64)'. 
    Unable to resolve 'runtime.ubuntu.16.04-x64.runtime.native.System.Security.C 
ryptography (>= 1.0.1)' for '.NETCoreApp,Version=v1.0 (ubuntu.16.04-x64)'. 
    Unable to resolve 'runtime.ubuntu.16.04-x64.runtime.native.System.Net.Http (
>= 1.0.1)' for '.NETCoreApp,Version=v1.0 (ubuntu.16.04-x64)'. 
    Unable to resolve 'runtime.ubuntu.16.04-x64.Microsoft.NETCore.DotNetHost (>= 
1.0.1)' for '.NETCoreApp,Version=v1.0 (ubuntu.16.04-x64)'. 
    Unable to resolve 'runtime.ubuntu.16.04-x64.runtime.native.System.IO.Compres 
sion (>= 1.0.1)' for '.NETCoreApp,Version=v1.0 (ubuntu.16.04-x64)'. 

Meine project.json wie folgt aussieht:

{ 
    "version": "1.0.0-*", 
    "buildOptions": { 
     "debugType": "portable", 
     "emitEntryPoint": true 
    }, 

    "dependencies": { 
     "Microsoft.NETCore.App": { 
      "version": "1.0.1" 
     } 
    }, 
    "frameworks": { 
     "netcoreapp1.0": { 
      "imports": "dnxcore50" 

     } 
    }, 
    "runtimes": { 
     "win7-x64": {}, 
     "ubuntu.16.04-x64": {} 
    } 
} 
+1

Und wenn Sie diese Zeile "ubuntu.16.04-x64" kommentieren: {} ' – Hackerman

Antwort

1

den runtimes Abschnitt Entfernen von Ihre project.json Datei oder zumindest die ubuntu.16.04-x64 Zeile.

Sofern Sie keine self-contained application erstellen, benötigen Sie nicht die runtimes Abschnitt.

Verwandte Themen