vb.net 类未注册异常

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15478117/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-17 12:50:51  来源:igfitidea点击:

Class Not registered Exception

vb.netexception-handlingvb6-migration

提问by user1934161

Recently i migrate the project from vb6 to vb.net with framework 2.0 in visual studio 2008 in xp system it is working fine in that. After that i changed the framework to 3.5 and opened the project in vs2010 in xp only there also it is working fine for me.

最近,我将项目从 vb6 迁移到 vb.net,使用框架 2.0 在 Visual Studio 2008 中在 xp 系统中运行良好。之后,我将框架更改为 3.5,并仅在 xp 中在 vs2010 中打开了该项目,它对我来说也很好用。

Now i changed my Operating system to windows 7. here i opened the project i got some issues i solved and then build it it is succeed. but when i am trying to run i got error like below

现在我将操作系统更改为 Windows 7。在这里我打开了项目,我解决了一些问题,然后构建它成功了。但是当我尝试运行时出现如下错误

An error occurred creating the form. See Exception.InnerException for details. The error is: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))

创建表单时出错。有关详细信息,请参阅 Exception.InnerException。错误是:类未注册(来自 HRESULT 的异常:0x80040154 (REGDB_E_CLASSNOTREG))

回答by J...

This needs more detail. Please include the inner exception details and the call stack - this will help to determine which component is throwing the error.

这需要更多细节。请包括内部异常详细信息和调用堆栈 - 这将有助于确定哪个组件引发错误。

The error itself is clear - one of the classes you are using is not registered on the Win7 system (ie : missing DLL, etc). This could be because the component/library was never installed on the Win7 system or the installation is corrupt. It could also be because it is a 32-bit component and you are targeting AnyCPUor x64in your compilation options.

错误本身很明显 - 您正在使用的类之一未在 Win7 系统上注册(即:缺少 DLL 等)。这可能是因为该组件/库从未安装在 Win7 系统上或安装已损坏。也可能是因为它是一个 32 位组件并且您的目标是AnyCPUx64在您的编译选项中。