c# - 截至今天,omnisharp 无法正常启动(无法从程序集中加载“CheckForDuplicateFrameworkReferences”任务 [...])
问题描述
完整的错误:
无法从程序集 /usr/lib64/dotnet/sdk/5.0.100/Sdks/Microsoft.NET.Sdk/targets/../tools/net472/Microsoft.NET.Build.Tasks 加载“CheckForDuplicateFrameworkReferences”任务。 dll。无效图像 确认声明正确、程序集及其所有依赖项可用,并且任务包含实现 Microsoft.Build.Framework.ITask 的公共类。
看起来 C# 扩展是 6 天前更新的,我很肯定从那以后我一直在使用 VS Code。
我尝试创建一个新项目(dotnet new mvc),但打开它时出现同样的错误。
我尝试了 "omnisharp.path": "latest" 解决方案,但没有帮助。另外,我没有安装单声道,所以单声道设置也无济于事。
谁知道这个问题是否有其他解决方案?
解决方案
As a last effort, I double checked here if I was using the right Fedora repository, and it turns out that I was not using microsoft's own repository (I think they didn't have one when I first installed dotnet), but a copr repository (copr repo for dotnet owned by @dotnet-sig).
When I replaced the copr version with the one from microsoft's repository, everything worked like it should. Both were dotnet 5.0, so I didn't think it would make a difference, but luckily it did.
推荐阅读
- jquery - 哪个 DatetimePicker 更适合 Internet Explorer
- svg - Highcharts 导出服务器不导出标签
- java - 为什么 JPQL 表达式不能导航到作为集合的关系字段之外?
- python-3.x - 创建列连接字符串
- python - 用于 HoughCircle 的 Canny 变换 VS 脱粒图像
- jekyll - 在 Jekyll 中强制使用绝对 URL
- python - 如何在odoo 12的抬头细节发票模块中正确添加One2many关系?
- java - 无法将 java.lang.Long 字段 Event.idEvent 设置为 java.lang.Long
- swift - “扩大图书馆的表面积”是什么意思?
- excel - 函数未返回所需值