收到错误无法解决对程序集System.Web的依赖 [英] Getting an error Cannot resolve dependency to assembly System.Web

查看:73
本文介绍了收到错误无法解决对程序集System.Web的依赖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须更换主高清硬盘.昨天,我的HD被我们的IT技术人员取代了.因此,今天,在安装了VS 2015之后,我开始研究我们一直在开发的WPF应用程序.我进入该项目,从TFS获取最新信息并进行了构建.我失败并出现以下错误:

I had to have my primary HD replaced. Yesterday my HD was replaced by our IT tech staff. So today, after installing VS 2015, I started working on a WPF app we've been working on. I got into the project, did a Get Latest from TFS and did a build. I failed with the following error:

无法解析对程序集'System.Web,版本= 2.0.0.0,区域性=中性,PublicKeyToken = b03f5f7f11d50a3a'的依赖性,因为尚未预先加载.使用ReflectionOnly API时,必须通过ReflectionOnlyAssemblyResolve事件预先加载或根据需要加载相关程序集.

Cannot resolve dependency to assembly 'System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.

首先,我不知道为什么我们甚至需要System.Web.其次,它不在解决方案中任何项目的引用中.我知道,我已经看过了,但是在VS 2015中,直接打开.csproj文件.那么,什么在尝试使用它呢?需要什么?在这一点上,我准备添加它的原因是没有其他原因,只是为了使其得以构建.

First of all, I've no idea why we even need System.Web. Secondly, it isn't in the references of any project in the solution. I know, I've looked, but in VS 2015 AND opening the .csproj files directly. So, what is trying to use it? What needs it? At this point I'm about ready to add it for no other reason then just to make it build.

推荐答案

为什么我们甚至需要System.Web.其次,它不在 解决方案中的任何项目.我知道,我已经看过了,但是在VS 2015中 直接打开.csproj文件.那么,什么在尝试使用它呢?什么 需要吗?

why we even need System.Web. Secondly, it isn't in the references of any project in the solution. I know, I've looked, but in VS 2015 AND opening the .csproj files directly. So, what is trying to use it? What needs it?

System.Web.Dll是负责整个HTTP协议工作的旧库.请求发送和创建.您可以找到system.web是系统的成员:

System.Web.Dll is old library responsible for whole http-protocol working. requests sending and creation. And you can find the system.web is member of system:

此外,我们可以在Visual Studio输出中找到详细的构建日志,应加载系统,因此,如果该程序集丢失或与其他引用的二进制文件相比版本不同,则无法加载该程序集.

Besides, we can find the detail build log in the Visual studio Output, the system should be loaded, so if that assembly is missing or it is with a different version compared with the other referenced binaries, the assembly could not be loaded.

要解决此问题,您可以添加它或使用Visual Studio 2015创建一个新项目,然后将源文件复制到该项目中.然后重建它,检查它是否有效.

To resolve this issue, you could add it or create a new project with Visual Studio 2015 and copy the source files into this project. Then rebuild it, check if it works.

希望那些可以帮助您.

这篇关于收到错误无法解决对程序集System.Web的依赖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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