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:
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?