System.Web.Hosting没有在VS2008中找到 [英] System.Web.Hosting not found in VS2008

查看:172
本文介绍了System.Web.Hosting没有在VS2008中找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让卡西尼般的​​服务器,一个特定的asp.net web应用程序。客户端是不愉快的卡西尼接口,​​所以我只是扩大了卡西尼code,增加新的功能,并提供了一​​个重新审视的用户界面。

I am trying to make a Cassini-like server for a particular asp.net web application. The Client is not happy with the Cassini interface, so I am just expanding the Cassini code, adding new features, and providing a fresh look to the UI.

现在我面临的问题是,从卡西尼号源中的所有文件使用 System.Web.Hosting 命名空间。 Visual Studio中引发我一个错误说:

Now the problem I am facing is, all the files from Cassini source use the System.Web.Hosting namespace. Visual Studio throws me an error saying:

类型或命名空间名称'托管'没有命名空间System.Web程序存在(是否缺少程序集引用?)

The type or namespace name 'Hosting' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)

我在想什么吗?我已经写了

What am I missing here? I have already written

using System.Web.Hosting;

在cs文件的第一行。我使用的.Net FW 3.5和VS2008。

in the first line of the .cs file. I am using .Net FW 3.5 and VS2008.

任何帮助将是严重AP preciated。

Any help would be seriously appreciated.

感谢。

推荐答案

最有可能的,你的项目是针对的客户端配置文件版本的.NET Framework,这不包括 System.Web.Hosting 命名空间的

Most likely, your project is targeting the "Client Profile" version of the .NET Framework, which doesn't include the System.Web.Hosting namespace.

你需要改变你的项目为目标的完整版本的框架,然后添加一个引用的System.Web 要做到为此,请按照下列步骤操作:

You need to change your project to target the full version of the framework, and then add a reference to System.Web. To do this, follow these steps:

  1. 打开在Solution Explorer中的属性双击项目属性。

  1. Open your project Properties by double-clicking on "Properties" in the Solution Explorer.

从下拉框中标有目标框架,选择.NET框架3.5。 Visual Studio会告诉你,这需要关闭并重新打开您的项目,所以请确保它被保存先点击之前的是。

From the drop-down box labeled "Target framework," choose ".NET Framework 3.5". Visual Studio will inform you that this requires closing and re-opening your project, so make sure that it is saved first before clicking "Yes".

在您的项目重新打开,右键单击在Solution Explorer参考,然后从上下文菜单中选择添加引用。

When your project re-opens, right click on "References" in the Solution Explorer, and select "Add Reference" from the context menu.

找到名为System.Web程序的项目在出现的对话框中的.NET选项卡下,点击OK。

Find the item named "System.Web" under the ".NET" tab in the resulting dialog box, and click OK.

这篇关于System.Web.Hosting没有在VS2008中找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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