VWD 2008 添加对公共类的引用

发布于 2024-07-22 09:20:15 字数 110 浏览 4 评论 0原文

从 VWD2005 升级到 VWD2008 后出现问题。 在 VWD2008 中,App_Code 不再存在。

如何添加对 VWD2005 App_Code 目录中存在的类的引用?

Problems started after upgrading from VWD2005 to VWD2008.
In VWD2008 the App_Code does not exist any more.

How can i add a reference to a class that existed in the App_Code directory of VWD2005?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

锦爱 2024-07-29 09:20:15

这里出现了全局应用程序类,也称为 Global.asax

我所要做的就是将其添加到我的项目中。

And here comes the Global application class also know as Global.asax

All i had to do is add it to my project.

樱花落人离去 2024-07-29 09:20:15

VWD2008 支持 Web 应用程序和网站。

Web 应用程序没有 app_code 文件夹。

检查您的项目类型,您可能有一个 Web 应用程序而不是网站。 您可以将其重新创建为网站,或者仅添加一个名为 code 或其他名称的文件夹。

编辑:在网站中只有一个默认命名空间,并且 app_code 文件夹中的任何代码都可以在任何地方访问。 在 Web 应用程序中,文件夹中的代码具有不同的命名空间,因此必须通过其命名空间或通过在文件顶部添加 using 来引用。

VWD2008 supports web applications as well as web sites.

Web Applications do not have an app_code folder.

Check your project type, You probably have a Web Application instead of a Web Site. You can recreate it as a web site or alternatively just add a folder called code or whatever.

EDIT: In a Web Site there is only one default namespace and any code in the app_code folder is accessible everywhere. In a Web Application the code in a folder has a different namespace and therefore must be referenced by its namespace or by adding a using at the top of the file.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文