Rob*_*Rob 3 macos omnisharp visual-studio-code asp.net-core
我在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代码中打开该文件夹时,我在"输出"窗口中看到了这个:
下载和配置.NET核心调试器...遥测:启用日志:恢复包/Users/rheckart/.vscode/extensions/ms-vscode.csharp-0.3.7/coreclr-debug/project.json ... info:提交恢复...日志:锁定文件未更改.跳过锁定文件写入.路径:/Users/rheckart/.vscode/extensions/ms-vscode.csharp-0.3.7/coreclr-debug/project.lock.json日志:/Users/rheckart/.vscode/extensions/ms-vscode.csharp-0.3 .7/coreclr-debug/project.json日志:恢复在632ms完成.
使用的NuGet Config文件:/Users/rheckart/.vscode/extensions/ms-vscode.csharp-0.3.7/coreclr-debug/NuGet.config
使用的Feed: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遥测是:启用错误:无法找到运行目标框架"DNXCore,版本= 5.0版"与目标运行时的一个兼容:"osx.10.11-64 ".可能的原因:1.项目尚未恢复或恢复失败 - 运行
dotnet restore2.项目未在"运行时"部分列出"osx.10.11-x64"之一.错误:System.InvalidOperationException:找不到与其中一个目标运行时兼容的框架'DNXCore,Version = v5.0'的运行时目标:'osx.10.11-x64'.可能的原因:1.项目尚未恢复或恢复失败 - 运行
dotnet restore2.项目未在"运行时"部分列出"osx.10.11-x64"之一.在Microsoft.DotNet.ProjectModel.BuildWorkspace.GetRuntimeContext(ProjectContext上下文,IEnumerable的1 runtimeIdentifiers) at System.Linq.Enumerable.WhereSelectListIterator2.MoveNext()在System.Collections.Generic.List1..ctor(IEnumerable1集合)
在System.Linq.Enumerable.ToList [TSource](IEnumerable`1源)在微软.DotNet.Tools.Publish.PublishCommand.TryPrepareForPublish()
在Microsoft.DotNet.Tools.Publish.PublishCommand.<> c__DisplayClass0_0.b__0()在Microsoft.DotNet.Cli.CommandLine.CommandLineApplication.Execute(字串[] args)在微软.DotNet.Tools.Publish.PublishCommand.Run(String [] args)dotnet退出,错误代码1安装.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": { }
}
}
Run Code Online (Sandbox Code Playgroud)
如果我尝试使用.NET Core Launch(Web)在VS Code中运行调试,则会收到错误消息:
未找到调试适配器可执行文件'/Users/rheckart/.vscode/extensions/ms-vscode.csharp-0.3.7/coreclr-debug/debugAdapters/OpenDebugAD7'.
关于为什么这不起作用的任何想法?
小智 9
我收到了同样的错误.对我来说,我注意到VS Code C#扩展有一个更新(我在左下角的图标上看到了绿色圆圈).一旦我安装了更新(版本1.0.10)并重新启动了VS Code,错误就消失了,我得到了"成功安装.NET Core Debugger".
| 归档时间: |
|
| 查看次数: |
2726 次 |
| 最近记录: |