无法加载类型'Namespace。[Global]'&不同的硬盘? [英] Could not load type 'Namespace.[Global]' & different harddrives?

查看:65
本文介绍了无法加载类型'Namespace。[Global]'&不同的硬盘?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们刚刚将我们的VS2003 1.1 VB Web项目(其工作价格为b $ b罚款)转换为VS2005 2.0,现在我得到:


解析器错误消息:无法加载类型''<命名空间>。[全局]''。

来源错误:

第1行:<%@ Application Codebehind =" Global。 asax.vb"

Inherits ="< Namespace> ;. [Global]" %>


我已经做了很多我在网上找不到的东西,但是这里

是一些独特的东西关于我发生了什么。


*我在J驱动器上进行了所有开发。 (本地驱动器)。

*我读到这个错误意味着你需要重新编译所以我删除了

web app dll和pdb文件。他们还没有被重建......因为最初的错误是
。鸡蛋前的鸡肉?

*当我排除/删除Global。*文件时,我会收到错误,说明

我的部分用户控件也无法加载

*其中一些用户控件现在也有图像文件找不到
,(确实存在)。丢失的图片网址看起来像/ web

app folder / graphics / image.gif

*现在出于某种原因而不是在解决方案中显示我的网络应用程序名称

资源管理器说J:\ ... \ Web应用程序名称。


有没有人有这些事情发生? 2.0不喜欢虚拟文件夹

在不同的硬盘上?我读到Global现在是一个关键字,我可以吗?
安全地将[Global]重命名为Global2


帮助!

谢谢


JF

We just converted our VS2003 1.1 VB web project (which was working
fine) to VS2005 2.0 and now I get:

Parser Error Message: Could not load type ''<Namespace>.[Global]''.
Source Error:
Line 1: <%@ Application Codebehind="Global.asax.vb"
Inherits="<Namespace>.[Global]" %>

I''ve done a lot of things I''ve found on the web to no avial, but here
are some unique things about what is happening to me.

* I have all my development on a J drive. (local drive).
* I read that this error means you need to recompile so I deleted the
web app dll and pdb files. They haven''t been rebuilt yet...because of
the initial error. Chicken before the egg?
* When I exclude/delete Global.* files I then get errors saying that
some of my User controls could also not be loaded
* Several of these User controls also now have image files can''t be
found, (that really do exist). The missing image urls look like /web
app folder/graphics/image.gif
* Now for some reason instead of showing my web app name in Solution
Explorer is says "J:\...\Web app name".

Has anyone had these things happen? Does 2.0 not like virtual folders
on different harddrives? I read that Global is now a keyword, Can I
safely rename [Global] to Global2

Help!
Thanks

JF

推荐答案

ASP.NET 2.0中不存在Global.asax.vb (当我转换为2.0时,我遇到了与你相同的问题

)。我的建议是通过在另一个文件中放置(并可能修改)Global.asax.vb

中的任何代码来更新您的

应用程序。如果你不想费心去寻找把这个代码移到哪里的话,你可以创建一个名为Global的类,但是在长的

中这个路线可能会给你带来比它更值得的麻烦,所以我只需要花费时间来更新你的应用程序以使用ASP.NET

2.0''功能/约定并摆脱Global.asax / Global.asax.vb。你可以获得一些特定代码的帮助
Global.asax.vb如果你在这里发布它。祝你好运!

-

Nathan Sokalski
nj ********@hotmail.com
http:/ /www.nathansokalski.com/

" thefritz_j" < th ******** @ hotmail.comwrote in message

news:11 ********************** @ m58g2000cwm.googlegr oups.com ...
Global.asax.vb does not exist in ASP.NET 2.0 (I had the same problem as you
when I converted to 2.0). My recommendation would be to update your
application by placing (and possibly modifying) any code in Global.asax.vb
in another file. If you don''t want to bother trying to figure out where to
move this code to, you could create a class named Global, but in the long
taking this route will probably cause you more trouble than it''s worth, so I
would just sacrifice the time to update your application to use ASP.NET
2.0''s features/conventions and get rid of Global.asax/Global.asax.vb. You
can probably get help with some of the specific code you have in
Global.asax.vb if you post it here. Good Luck!
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"thefritz_j" <th********@hotmail.comwrote in message
news:11**********************@m58g2000cwm.googlegr oups.com...

我们刚刚转换了我们的VS2003 1.1 VB网站项目(工作正好...... b $ b罚款)到VS2005 2.0现在我得到:


分析器错误消息:无法加载类型''<命名空间>。[全局]''。

源错误:

第1行:<%@ Application Codebehind =" Global.asax.vb"

Inherits ="< Namespace>。[Global]" %>


我已经做了很多我在网上找不到的东西,但是这里

是一些独特的东西关于我发生了什么。


*我在J驱动器上进行了所有开发。 (本地驱动器)。

*我读到这个错误意味着你需要重新编译所以我删除了

web app dll和pdb文件。他们还没有被重建......因为最初的错误是
。鸡蛋前的鸡肉?

*当我排除/删除Global。*文件时,我会收到错误,说明

我的部分用户控件也无法加载

*其中一些用户控件现在也有图像文件找不到
,(确实存在)。丢失的图片网址看起来像/ web

app folder / graphics / image.gif

*现在出于某种原因而不是在解决方案中显示我的网络应用程序名称

资源管理器说J:\ ... \ Web应用程序名称。


有没有人有这些事情发生? 2.0不喜欢虚拟文件夹

在不同的硬盘上?我读到Global现在是一个关键字,我可以吗?
安全地将[Global]重命名为Global2


帮助!

谢谢


JF
We just converted our VS2003 1.1 VB web project (which was working
fine) to VS2005 2.0 and now I get:

Parser Error Message: Could not load type ''<Namespace>.[Global]''.
Source Error:
Line 1: <%@ Application Codebehind="Global.asax.vb"
Inherits="<Namespace>.[Global]" %>

I''ve done a lot of things I''ve found on the web to no avial, but here
are some unique things about what is happening to me.

* I have all my development on a J drive. (local drive).
* I read that this error means you need to recompile so I deleted the
web app dll and pdb files. They haven''t been rebuilt yet...because of
the initial error. Chicken before the egg?
* When I exclude/delete Global.* files I then get errors saying that
some of my User controls could also not be loaded
* Several of these User controls also now have image files can''t be
found, (that really do exist). The missing image urls look like /web
app folder/graphics/image.gif
* Now for some reason instead of showing my web app name in Solution
Explorer is says "J:\...\Web app name".

Has anyone had these things happen? Does 2.0 not like virtual folders
on different harddrives? I read that Global is now a keyword, Can I
safely rename [Global] to Global2

Help!
Thanks

JF



re:

Global.asax.vb在ASP.NET 2.0中不存在
Global.asax.vb does not exist in ASP.NET 2.0



实际上,确实如此,但你必须将它放在App_Code目录中。 />
如果放在那里它会编译好。


Global.asax.cs相同


转换向导将为您移动文件。


Juan T. Llibre,asp.net MVP

asp.net faq: http://asp.net.do/faq/

foros de asp.net, en espa?ol: http://asp.net.do/foros/

===================================

Nathan Sokalski < nj ******** @ hotmail.comwrote in message

news:%2 **************** @ TK2MSFTNGP03.phx。 gbl ...

Actually, it does, but you have to place it in the App_Code directory.
It will compile just fine if placed there.

The same for Global.asax.cs

The conversion wizard will move the files for you.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espa?ol : http://asp.net.do/foros/
===================================
"Nathan Sokalski" <nj********@hotmail.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...


在ASP.NET 2.0中不存在Global.asax.vb(当我转换为
时,我遇到了同样的问题b $ b 2.0)。我的建议是通过在另一个文件中将Global.asax.vb中的任何代码放置(并可能修改)

来更新您的应用程序。如果你不想费心去找这个代码移动到哪里,你可以创建一个名为Global的类,但是在这条路上很长一段时间

可能会给你带来比它更值得的麻烦,所以我只是花时间来更新你的应用程序以使用ASP.NET 2.0的功能/约定并摆脱

Global.asax / Global.asax.vb。如果您在此处发布,您可以获得有关

Global.asax.vb中某些特定代码的帮助。祝你好运!

-

Nathan Sokalski
nj ********@hotmail.com
http:/ /www.nathansokalski.com/

" thefritz_j" < th ******** @ hotmail.comwrote in message

news:11 ********************** @ m58g2000cwm.googlegr oups.com ...
Global.asax.vb does not exist in ASP.NET 2.0 (I had the same problem as you when I converted to
2.0). My recommendation would be to update your application by placing (and possibly modifying)
any code in Global.asax.vb in another file. If you don''t want to bother trying to figure out where
to move this code to, you could create a class named Global, but in the long taking this route
will probably cause you more trouble than it''s worth, so I would just sacrifice the time to update
your application to use ASP.NET 2.0''s features/conventions and get rid of
Global.asax/Global.asax.vb. You can probably get help with some of the specific code you have in
Global.asax.vb if you post it here. Good Luck!
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"thefritz_j" <th********@hotmail.comwrote in message
news:11**********************@m58g2000cwm.googlegr oups.com...

>我们刚刚将我们的VS2003 1.1 VB Web项目(工作正常)转换为VS2005 2.0现在我得到:

分析器错误消息:无法加载类型''<命名空间>。[全局]''。
来源错误:
第1行:< %@ Application Codebehind =" Global.asax.vb"
Inherits ="< Namespace>。[Global]" %>

我做了很多我在网上找不到的东西,但是这里有一些关于我发生的事情的独特事情。

*我在J驱动器上进行了所有开发。 (本地驱动器)。
*我读到这个错误意味着你需要重新编译所以我删除了
web app dll和pdb文件。他们还没有被重建......因为最初的错误。鸡蛋前的鸡肉?
*当我排除/删除Global。*文件时,我会收到错误,说明我的某些用户控件也无法加载
*其中一些用户控件也是现在无法找到图像文件,(确实存在)。丢失的图片网址看起来像是/ web
app folder / graphics / image.gif
*现在由于某种原因而不是在解决方案中显示我的网络应用程序名称
资源管理器说J:\\ \\ ... \ Web应用程序名称。

有没有人有这些事情发生? 2.0不喜欢不同硬盘上的虚拟文件夹吗?我读到Global现在是一个关键词,我可以安全地将[Global]重命名为Global2

帮助!
谢谢

JF
>We just converted our VS2003 1.1 VB web project (which was working
fine) to VS2005 2.0 and now I get:

Parser Error Message: Could not load type ''<Namespace>.[Global]''.
Source Error:
Line 1: <%@ Application Codebehind="Global.asax.vb"
Inherits="<Namespace>.[Global]" %>

I''ve done a lot of things I''ve found on the web to no avial, but here
are some unique things about what is happening to me.

* I have all my development on a J drive. (local drive).
* I read that this error means you need to recompile so I deleted the
web app dll and pdb files. They haven''t been rebuilt yet...because of
the initial error. Chicken before the egg?
* When I exclude/delete Global.* files I then get errors saying that
some of my User controls could also not be loaded
* Several of these User controls also now have image files can''t be
found, (that really do exist). The missing image urls look like /web
app folder/graphics/image.gif
* Now for some reason instead of showing my web app name in Solution
Explorer is says "J:\...\Web app name".

Has anyone had these things happen? Does 2.0 not like virtual folders
on different harddrives? I read that Global is now a keyword, Can I
safely rename [Global] to Global2

Help!
Thanks

JF




对不起,我的错误。但是,我仍然建议摆脱它,因为它通常不是2.0中推荐或最有效的方法。什么

代码你有没有在Global.asax(没有自动放在那里)?

当我转换时,大多数东西有一个地方,它可以很容易

移动到没有任何重大更改,因为通常很少的代码

手动添加到Global.asax.vb或Global.asax.cs。

-

Nathan Sokalski
nj ****** **@hotmail.com
http://www.nathansokalski.com /


" Juan T. Llibre" < no *********** @ nowhere.comwrote in message

news:OE ************** @ TK2MSFTNGP03.phx。 gbl ...
Sorry, my error. However, I still recommend getting rid of it since it is
not usually the recommended or most efficient way to do things in 2.0. What
code do you have in Global.asax (that was not placed there automatically)?
When I converted, most of the stuff had a place that it could be easily
moved to without any major changes, since there is usually very little code
that is manually added to Global.asax.vb or Global.asax.cs.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:OE**************@TK2MSFTNGP03.phx.gbl...

re:
re:

> ASP中不存在Global.asax.vb .NET 2.0
>Global.asax.vb does not exist in ASP.NET 2.0



实际上,确实如此,但你必须将它放在App_Code目录中。

如果放置它会编译得很好那里。


Global.asax.cs相同


转换向导会为你移动文件。



Juan T. Llibre,asp.net MVP

asp.net faq: http://asp.net.do/faq/

foros de asp.net,en espa?ol: http://asp.net.do/foros/

= ==================================

" Nathan Sokalski" < nj ******** @ hotmail.comwrote in message

news:%2 **************** @ TK2MSFTNGP03.phx。 gbl ...


Actually, it does, but you have to place it in the App_Code directory.
It will compile just fine if placed there.

The same for Global.asax.cs

The conversion wizard will move the files for you.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espa?ol : http://asp.net.do/foros/
===================================
"Nathan Sokalski" <nj********@hotmail.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...


> ASP.NET 2.0中不存在Global.asax.vb(当我转换时,我遇到了与你相同的问题到2.0)。我的建议是通过在另一个文件中放置(并可能修改)
Global.asax.vb中的任何代码来更新您的应用程序。如果你不想费心去寻找将代码移到哪里,你可以创建一个名为
Global的类,但是长期以来这条路线可能会让你更多麻烦而不是它的价值,所以我只是花时间更新你的应用程序以使用ASP.NET 2.0的功能/约定并摆脱
Global.asax / Global .asax.vb。如果你在这里发布它,你可以获得Global.asax.vb中的一些特定代码的帮助。祝你好运!
-
Nathan Sokalski
nj ******** @ hotmail.com
http://www.nathansokalski.com/

" thefritz_j" < th ******** @ hotmail.comwrote in message
新闻:11 ********************** @ m58g2000cwm.googleg roups.com ...
>Global.asax.vb does not exist in ASP.NET 2.0 (I had the same problem as
you when I converted to 2.0). My recommendation would be to update your
application by placing (and possibly modifying) any code in
Global.asax.vb in another file. If you don''t want to bother trying to
figure out where to move this code to, you could create a class named
Global, but in the long taking this route will probably cause you more
trouble than it''s worth, so I would just sacrifice the time to update
your application to use ASP.NET 2.0''s features/conventions and get rid of
Global.asax/Global.asax.vb. You can probably get help with some of the
specific code you have in Global.asax.vb if you post it here. Good Luck!
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"thefritz_j" <th********@hotmail.comwrote in message
news:11**********************@m58g2000cwm.googleg roups.com...

>>我们刚刚将我们的VS2003 1.1 VB Web项目(工作正常)转换为VS2005 2.0现在我得到:

分析器错误消息:无法加载类型''<命名空间>。[全局]''。
来源错误:
第1行:<%@ Application Codebehind =" Global.asax.vb"
Inherits ="< Namespace>。[Global]" %>

我做了很多我在网上找不到的东西,但是这里有一些关于我发生的事情的独特事情。

*我在J驱动器上进行了所有开发。 (本地驱动器)。
*我读到这个错误意味着你需要重新编译所以我删除了
web app dll和pdb文件。他们还没有被重建......因为最初的错误。鸡蛋前的鸡肉?
*当我排除/删除Global。*文件时,我会收到错误,说明我的某些用户控件也无法加载
*其中一些用户控件也是现在无法找到图像文件,(确实存在)。丢失的图片网址看起来像是/ web
app folder / graphics / image.gif
*现在由于某种原因而不是在解决方案中显示我的网络应用程序名称
资源管理器说J:\\ \\ ... \ Web应用程序名称。

有没有人有这些事情发生? 2.0不喜欢不同硬盘上的虚拟文件夹吗?我读到Global现在是一个关键词,我可以安全地将[Global]重命名为Global2

帮助!
谢谢

JF
>>We just converted our VS2003 1.1 VB web project (which was working
fine) to VS2005 2.0 and now I get:

Parser Error Message: Could not load type ''<Namespace>.[Global]''.
Source Error:
Line 1: <%@ Application Codebehind="Global.asax.vb"
Inherits="<Namespace>.[Global]" %>

I''ve done a lot of things I''ve found on the web to no avial, but here
are some unique things about what is happening to me.

* I have all my development on a J drive. (local drive).
* I read that this error means you need to recompile so I deleted the
web app dll and pdb files. They haven''t been rebuilt yet...because of
the initial error. Chicken before the egg?
* When I exclude/delete Global.* files I then get errors saying that
some of my User controls could also not be loaded
* Several of these User controls also now have image files can''t be
found, (that really do exist). The missing image urls look like /web
app folder/graphics/image.gif
* Now for some reason instead of showing my web app name in Solution
Explorer is says "J:\...\Web app name".

Has anyone had these things happen? Does 2.0 not like virtual folders
on different harddrives? I read that Global is now a keyword, Can I
safely rename [Global] to Global2

Help!
Thanks

JF





这篇关于无法加载类型'Namespace。[Global]'&amp;不同的硬盘?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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