Visual Studio 2015 警告 System.Runtime not found(但 VS2013 没问题) [英] Visual Studio 2015 warns System.Runtime not found (but VS2013 is fine)

查看:26
本文介绍了Visual Studio 2015 警告 System.Runtime not found(但 VS2013 没问题)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Visual Studio 2015 中,我打开了一个用 Visual Studio 2013 创建的项目.重建这个项目并看到以下警告:

In Visual Studio 2015, I open a project that was created with Visual Studio 2013. Rebuild this project and see the following warning:

The referenced component 'System.Runtime' could not be found.

查看解决方案资源管理器中的References项,点击System.Runtime,Property窗口显示空白如下:

Looking at the References item in Solution Explorer, click System.Runtime, the Property window shows empty as below:

在 Visual Studio 2013 中,它显示:

In Visual Studio 2013, it shows:

而且这个 DLL 确实存在于文件夹中:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades

And this DLL does exist in the foler: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades

因此,当我构建项目时,Visual Studio 2013 没有发出警告,但 Visual Studio 2015 会发出警告.

So Visual Studio 2013 didn't whow warnings when I build the project, but Visual Studio 2015 does.

这是一个错误还是我错过了 Visual Studio 2015 中的某些内容?

Is this a bug or I miss something in Visual Studio 2015?

推荐答案

Include System.Runtime.InteropServices.RuntimeInformation 而不是 System.Runtime.它对我有用.

Include System.Runtime.InteropServices.RuntimeInformation instead of System.Runtime. It worked for me.

这篇关于Visual Studio 2015 警告 System.Runtime not found(但 VS2013 没问题)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆