Ich habe die neueste Version von Visual Studio Code (1.1.1) in OSX El Capitan (10.11.4) installiert. Ich habe auch die neueste Version von Core RC2 installiert. dotnet - Version gibt mir 1.0.0-preview1-002702. Einer der Web-Threads, die ich gelesen habe, sagte, dass ich die ältere Version von OmniSharp löschen und die neueste installieren werde, was ich getan habe. Ich habe OpenSSL auch über Brew installiert.Fehler bei der Installation von .NET Core Debugger unter OSX
Als ich den neuesten yo-Generator für aspnet installiert und eine Beispiel-App erstellt habe, läuft es gut. Wenn ich versuche, diesen Ordner in Visual Studio-Code zu öffnen, erhalte ich diese im Ausgabefenster:
Downloading and configuring the .NET Core Debugger... Telemetry is: Enabled log : Restoring packages for /Users/rheckart/.vscode/extensions/ms-vscode.csharp-0.3.7/coreclr-debug/project.json... info : Committing restore... log : Lock file has not changed. Skipping lock file write. Path: /Users/rheckart/.vscode/extensions/ms-vscode.csharp-0.3.7/coreclr-debug/project.lock.json log : /Users/rheckart/.vscode/extensions/ms-vscode.csharp-0.3.7/coreclr-debug/project.json log : Restore completed in 632ms.
NuGet Config files used: /Users/rheckart/.vscode/extensions/ms-vscode.csharp-0.3.7/coreclr-debug/NuGet.config
Feeds used: https://www.myget.org/F/dotnet-core/api/v3/index.json https://api.nuget.org/v3/index.json https://www.myget.org/F/coreclr-debug/api/v3/index.json Telemetry is: Enabled Error: Can not find runtime target for framework 'DNXCore,Version=v5.0' compatible with one of the target runtimes: 'osx.10.11-x64'. Possible causes: 1. The project has not been restored or restore failed - run
dotnet restore
2. The project does not list one of 'osx.10.11-x64' in the 'runtimes' section. Error:System.InvalidOperationException: Can not find runtime target for framework 'DNXCore,Version=v5.0' compatible with one of the target runtimes: 'osx.10.11-x64'. Possible causes: 1. The project has not been restored or restore failed - run
dotnet restore
2. The project does not list one of 'osx.10.11-x64' in the 'runtimes' section. at Microsoft.DotNet.ProjectModel.BuildWorkspace.GetRuntimeContext(ProjectContext context, IEnumerable1 runtimeIdentifiers) at System.Linq.Enumerable.WhereSelectListIterator
2.MoveNext() at System.Collections.Generic.List1..ctor(IEnumerable
1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) at Microsoft.DotNet.Tools.Publish.PublishCommand.TryPrepareForPublish()
at Microsoft.DotNet.Tools.Publish.PublishCommand.<>c__DisplayClass0_0.b__0() at Microsoft.DotNet.Cli.CommandLine.CommandLineApplication.Execute(String[] args) at Microsoft.DotNet.Tools.Publish.PublishCommand.Run(String[] args) dotnet exited with error code 1 Error while installing .NET Core Debugger.
Ich habe versucht, 1 & 2 beiden Schritte zu tun, aber ich immer noch die gleichen Fehler. Meine project.json Datei sieht wie folgt aus:
{
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.0-rc2-3002702",
"type": "platform"
},
"Microsoft.AspNetCore.Mvc": "1.0.0-rc2-final",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-rc2-final",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-final",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-final",
"Microsoft.Extensions.Configuration.FileExtensions": "1.0.0-rc2-final",
"Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-final",
"Microsoft.Extensions.Logging": "1.0.0-rc2-final",
"Microsoft.Extensions.Logging.Console": "1.0.0-rc2-final",
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc2-final"
},
"tools": {
"Microsoft.AspNetCore.Server.IISIntegration.Tools": {
"version": "1.0.0-preview1-final",
"imports": "portable-net45+win8+dnxcore50"
}
},
"frameworks": {
"netcoreapp1.0": {
"imports": [
"dotnet5.6",
"dnxcore50",
"portable-net45+win8"
]
}
},
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
"runtimeOptions": {
"gcServer": true
},
"publishOptions": {
"include": [
"wwwroot",
"Views",
"appsettings.json",
"web.config"
]
},
"scripts": {
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
},
"tooling": {
"defaultNamespace": "rc2api"
},
"runtimes": {
"osx.10.11-x64": { }
}
}
Wenn ich versuche, debug in VS-Code ausführen mit dem .NET Core-Launch (web), ich einen Fehler:
Debug adapter executable '/Users/rheckart/.vscode/extensions/ms-vscode.csharp-0.3.7/coreclr-debug/debugAdapters/OpenDebugAD7' not found.
Beliebig Ideen, warum das nicht funktioniert?
Die kleine - und ich meine winzig - grüner Punkt in der linken unteren Ecke war der Trick, der das Problem gelöst. Danke für die Hilfe! Rock on Debugging in OSX! – Rob
Das hat es sortiert, Prost! – JMK