在HttpContext的类库不可用 [英] HttpContext not available in Class Library

查看:694
本文介绍了在HttpContext的类库不可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的一个项目,我有一个C#类库,需要使用 System.web.HttpContext 。我在另一个项目做过没有问题,但现在它不工作。我不知道我失踪,他们俩都是针对.NET 3.5和我已经添加了引用的System.Web 并添加指令使用的System.Web



然而,当我尝试做的HttpContext 没有被找到。我使用的完整路径 System.web.HttpContext ,但出现的唯一的事情都与ASP 3项审判。



下面是从工作项目智能感知和截图的非工作的IntelliSense



下面是工作截图





和下面的非工作截图



不工作截图任何帮助,您可以提供</p

解决方案



谢谢DIV>

这意味着,无论你使用的是客户端配置文件作为目标框架或引用System.Web程序不正确添加。


I am working on a project where I have a C# class library which needs to use the System.web.HttpContext. I've done this before in another project without problem but now its not working. I'm not sure what I am missing they're both targeting .net 3.5 and I've added the reference System.web and added the directive using System.web.

However, when I try and do HttpContext nothing is found. I've tried using the full path System.web.HttpContext but the only thing that comes up are 3 items related to ASP.

Below are screenshots from the working project intellisense and the non-working intellisense

Below is the working screenshot

and below is the non working screenshot

Thanks for any help you can provide

解决方案

This means that either you are using a Client Profile as the Target Framework or the reference to System.Web was not added correctly.

这篇关于在HttpContext的类库不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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