Wenn ich Visual Studio 2015 Update 3 verwenden, um eine neue ASP.NET Core MVC App zu erstellen, funktioniert es einwandfrei. Allerdings, wenn ich sagte, nehmen App und aktualisiert es Nuget Pakete zu ASP.NET Core 1.0.1, bekomme ich die Fehler folgenden bauen:ASP.NET Core 1.0.1 bricht Projekte
Can not find runtime target for framework '.NETCoreApp,Version=v1.0' compatible with one of the target runtimes: 'win10-x64, win81-x64, win8-x64, win7-x64'. Possible cause
1. The project has not been restored or restore failed - run `dotnet restore`
2. The project does not list one of 'win10-x64, win81-x64, win8-x64, win7-x64' in the 'runtimes' section.
3. You may be trying to publish a library, which is not supported. Use `dotnet pack` to distribute libraries.
Ist das ein Fehler oder etwas Umwelt?
Nachtrag:
Das Protokoll von der Wiederherstellung sieht gut aus:
log : Restoring packages for <path to project>\project.json...
log : Restoring packages for tool 'Microsoft.AspNetCore.Server.IISIntegration.Tools' in E:\Software Projects\subq\src\SubQ.API\project.json...
log : Lock file has not changed. Skipping lock file write. Path: <path to project>\project.lock.json
log : <path to project>\project.json
log : Restore completed in 6210ms.
project.json wie folgt aussieht:
{
"dependencies": {
"Microsoft.AspNetCore.Mvc": "1.0.1",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.1",
"Microsoft.EntityFrameworkCore.SqlServer": "1.0.1",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
"Microsoft.Extensions.Configuration.FileExtensions": "1.0.0",
"Microsoft.Extensions.Configuration.Json": "1.0.0",
"Microsoft.Extensions.Logging": "1.0.0",
"Microsoft.Extensions.Logging.Console": "1.0.0",
"Microsoft.Extensions.Logging.Debug": "1.0.0",
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0",
"Microsoft.NETCore.App": "1.0.1"
},
"tools": {
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
},
"frameworks": {
"netcoreapp1.0": {
"imports": [
"dotnet5.6",
"portable-net45+win8"
],
"runtimes": {
"win10-x64": {}
}
}
},
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
"runtimeOptions": {
"configProperties": {
"System.GC.Server": true
}
},
"publishOptions": {
"include": [
"wwwroot",
"Views",
"Areas/**/Views",
"appsettings.json",
"web.config"
]
},
"scripts": {
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
}
}
Die neueste SDK installiert ist.
Haben Sie das .NET Core 1.0.1 SDK installiert? – Tseng
Versuchen Sie auch, den Befehl 'dotnet restore' in dem Ordner auszuführen, in dem sich Ihre project.json befindet. – Ignas
@Tseng: Ja, ich habe es bereits installiert. – kettch