gpt4 book ai didi

macos - 在 OSX 上安装 .NET Core 调试器时出错

转载 作者:行者123 更新时间:2023-12-01 08:52:51 24 4
gpt4 key购买 nike

我已经在 OSX El Capitan (10.11.4) 中安装了最新版本的 Visual Studio Code (1.1.1)。我还安装了最新版本的 Core RC2。 dotnet --version 给我 1.0.0-preview1-002702。我读过的一个网络线程说要删除旧版本的 OmniSharp 并安装最新版本,我做到了。我还通过 Brew 安装了 OpenSSL。

当我为 aspnet 安装了最新的 yo 生成器并创建了一个示例应用程序时,它运行良好。当我尝试在 Visual Studio Code 中打开该文件夹时,我在“输出”窗口中得到以下信息:

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(IEnumerable1 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.



我尝试执行第 1 步和第 2 步,但仍然出现相同的错误。我的 project.json 文件如下所示:
{
"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": { }
}
}

如果我尝试使用 在 VS Code 中运行调试.NET Core 发布(网络) ,我收到一个错误:

Debug adapter executable '/Users/rheckart/.vscode/extensions/ms-vscode.csharp-0.3.7/coreclr-debug/debugAdapters/OpenDebugAD7' not found.



关于为什么这不起作用的任何想法?

最佳答案

我收到了同样的错误。对我来说,我注意到有一个可用于 VS Code C# 扩展的更新(我看到左下角图标上的绿色圆圈)。一旦我安装了更新(版本 1.0.10)并重新启动 VS Code,错误就消失了,我得到“成功安装 .NET Core 调试器”。

关于macos - 在 OSX 上安装 .NET Core 调试器时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37285705/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com