在调试模式下运行时出错.

编程入门 行业动态 更新时间:2024-10-27 04:38:29
本文介绍了在调试模式下运行时出错.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我使用VB2008. 我正在开发一个主要应用程序,该应用程序由表单和包含在一个单独项目中的用户控件组成,并编译为omctl.dll 在主应用程序中,我引用omctl.dll,其用户控件出现在工具箱中.我在主应用程序中的表单上添加了各种控件,这些控件已设置为运行表单OM. OM在设计器中显示,但是当我运行该应用程序时,我收到以下消息:-

I use VB2008. I am developing a main application which consists of forms, and usercontrols contained in a separate project which I compile into omctl.dll In the main application I reference omctl.dll, and its usercontrols appear in the toolbox. I have added various controls onto the forms in the main application which has been set to run a form OM. OM shows in the designer, but when I run the app, I get the following message:-

System.InvalidOperationException was unhandled Message="An error occurred creating the form. See Exception.InnerException for details. The error is: Could not load file or assembly ''omctl, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'' or one of its dependencies. The system cannot find the file specified." Source="om" StackTrace: at OM.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190 at OM.My.MyProject.MyForms.get_Manager() at OM.My.MyApplication.OnCreateMainForm() in D:\Visual Studio 2008\Projects\MyApp\My Project\Application.Designer.vb:line 35 at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine) at OM.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81 at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException: System.IO.FileNotFoundException Message="Could not load file or assembly ''omctl, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'' or one of its dependencies. The system cannot find the file specified." Source="om" FileName="omctl, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" FusionLog="=== Pre-bind state information ===\r\nLOG: User = Stuart-PC\\Stuart\r\nLOG: DisplayName = omctl, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null\n (Fully-specified)\r\nLOG: Appbase = file:///D:/Visual Studio 2008/Projects/MyApp/bin/Debug/\r\nLOG: Initial PrivatePath = NULL\r\nCalling assembly : om, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.\r\n===\r\nLOG: This bind starts in default load context.\r\nLOG: Using application configuration file: D:\\Visual Studio 2008\\Projects\\MyApp\\bin\\Debug\\om.vshost.exe.Config\r\nLOG: Using machine configuration file from C:\\Windows\\Microsoft.NET\\Framework64\\v2.0.50727\\config\\machine.config.\r\nLOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).\r\nLOG: Attempting download of new URL file:///D:/Visual Studio 2008/Projects/MyApp/bin/Debug/omctl.DLL.\r\nLOG: Attempting download of new URL file:///D:/Visual Studio 2008/Projects/MyApp/bin/Debug/omctl/omctl.DLL.\r\nLOG: Attempting download of new URL file:///D:/Visual Studio 2008/Projects/MyApp/bin/Debug/omctl.EXE.\r\nLOG: Attempting download of new URL file:///D:/Visual Studio 2008/Projects/MyApp/bin/Debug/omctl/omctl.EXE.\r\n" StackTrace: at OM.Manager..ctor() InnerException:

我什至无法进入新"子例程.在F8和F5上均失败 顺便说一句-omctl.dll存在但omctl.exe不存在 有帮助吗?

I cannot even get to the New subroutione. It fails on F8 as well as F5 by the way - omctl.dll exists but not omctl.exe Any help?

推荐答案

0)您是否确实在应用程序中添加了对omctl.dll的引用? 1)它是否依赖可能会破坏作品的第三者大会? 2)一些第三方的东西要求您将应用程序编译为x86而不是任何CPU". 0) Have you actually added a reference to omctl.dll to your application? 1) Does it rely on a 3rd party assembly that could be fouling up the works? 2) Some 3rd party stuff requires that you compile youor app as x86 instead of "Any CPU".

更多推荐

在调试模式下运行时出错.

本文发布于:2023-11-16 15:01:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1605339.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:模式下

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!