未能加载类型'XXX.Global“ [英] Could not load type 'XXX.Global'

查看:750
本文介绍了未能加载类型'XXX.Global“的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从迁移ASP.NET 1.1到ASP.NET 2.0的一个项目,我不断打这个错误。

Migrating a project from ASP.NET 1.1 to ASP.NET 2.0 and I keep hitting this error.

我实际上并不需要全球,因为我没有加入任何东西,但在我删除它,我得到更多的错误。

I don't actually need Global because I am not adding anything to it, but after I remove it I get more errors.

推荐答案

有几件事情,你可以用这个试试,似乎发生了很多和解决方案,每个人都似乎有所不同。

There are a few things you can try with this, seems to happen alot and the solution varies for everyone it seems.


  • 如果你仍在使用IIS虚拟目录,确保它尖尖的正确的目录,并检查ASP.NET版本设置为,确保它被设置为ASP.NET 2.0。

  • If you are still using the IIS virtual directory make sure its pointed to the correct directory and also check the ASP.NET version it is set to, make sure it is set to ASP.NET 2.0.

清除出你的bin /调试/ OBJ所有的人。做的清洁液的再一个的生成解决方案

Clear out your bin/debug/obj all of them. Do a Clean solution and then a Build Solution.

检查项目文件在文本编辑器,并确保它在那里寻找的全局文件是正确的,有时它不改变​​目录。

Check your project file in a text editor and make sure where its looking for the global file is correct, sometimes it doesnt change the directory.

从溶液中取出全球和保存和关闭后,将其重新添加。确保在ASPX文件点后正确的所有脚本标记。

Remove the global from the solution and add it back after saving and closing. make sure all the script tags in the ASPX file point to the correct one after.

您可以尝试运行的转换为Web应用程序的工具,即重做所有code和项目文件。

You can try running the Convert to Web Application tool, that redoes all of the code and project files.

IIS防爆preSS使用错误的根目录下(见答案的 VS 2012启动应用

IIS Express is using the wrong root directory (see answer in VS 2012 launching app based on wrong path)

请确保您关闭VS你们可以试一试了。

Make sure you close VS after you try them.

这些都是一些事情我知道的尝试。希望其中一个适合你。

Those are some things I know to try. Hope one of them works for you.

这篇关于未能加载类型'XXX.Global“的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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