加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c# – Visual Studio代码 – 添加引用错误

发布时间:2020-12-15 22:14:17 所属栏目:百科 来源:网络整理
导读:当我在Visual Studio Code(v 0.1.0)编辑器中打开Visual Studio 2013 C#项目,下载链接 here时,我遇到了十几个错误: The type ‘Object’ is defined in the assembly that is not referenced. You must add reference to assembly ‘mscorlib,Version=2.0.5.
当我在Visual Studio Code(v 0.1.0)编辑器中打开Visual Studio 2013 C#项目,下载链接 here时,我遇到了十几个错误:

The type ‘Object’ is defined in the assembly that is not referenced.
You must add reference to assembly ‘mscorlib,Version=2.0.5.0,
Culture=neutral,PublicKeyToken=7cec85d7bea7798e,Retargetable=Yes’.
[my c# project name]

Project使用.NET Framework 4.5.在Visual Studio 2013中打开项目时自动引用的mscorelib.dll是Version = 4.0.0.0.

有没有办法配置VS2013项目,以便Visual Studio代码正确识别引用和框架版本?

系统:Windows,未安装Visual Studio 2015组件.

解决方法

根据此StackOverflow answer,您可以尝试以下方法来解决您的问题:

I was able to fix this by issuing an update-package -reinstall command at the Package Manager Console.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读