System.IO exception at run time referencing

System.IO exception at run time referencing

Old forum URL: forums.lhotka.net/forums/t/9078.aspx


vbbeta posted on Monday, June 14, 2010

I have a strange problem when running my Csla referenced app. 

at design time there is no issues when i build the solution everything builds fine

 

 but when i`m ruining the UI it causes a error as soon the data source try to the bind the controls to the BusinessBase or any csla Objects , i got a System.IO.FileNotFoundException

 

Could not load file or assembly 'Csla, Version=4.0.0.0, Culture=neutral, PublicKeyToken=93be5fdc093e4c30' or one of its dependencies. The system cannot find the file specified.

my stack trace is this

 

  at TestApp.Form1.NavBarItem1_LinkClicked(Object sender, NavBarLinkEventArgs e)
   at DevExpress.XtraNavBar.NavBarItem.RaiseLinkEvent(Object linkEvent, NavBarItemLink link)
   at DevExpress.XtraNavBar.NavBarItem.RaiseLinkClicked(NavBarItemLink link)
   at DevExpress.XtraNavBar.NavBarItem.RaiseLinkClickedCore(NavBarItemLink link)
   at DevExpress.XtraNavBar.NavBarControl.RaiseLinkClicked(NavBarItemLink link)
   at DevExpress.XtraNavBar.ViewInfo.NavBarViewInfo.DoLinkClick(NavBarHitInfo hitInfo)
   at DevExpress.XtraNavBar.ViewInfo.NavBarViewInfo.DoClick(NavBarHitInfo hitInfo)
   at DevExpress.XtraNavBar.ViewInfo.NavBarViewInfo.OnMouseUp(MouseEventArgs e)
   at DevExpress.XtraNavBar.NavBarControl.OnMouseUp(MouseEventArgs ev)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at DevExpress.XtraNavBar.NavBarControl.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(ApplicationContext context)
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
   at TestApp.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
   at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

 

 

 

 

 

 

RockfordLhotka replied on Monday, June 14, 2010

Make sure Csla.dll is in the directory with your EXE - that's where .NET looks for the assembly.

Also make sure you've built everything for the correct CPU target - especially in VS10 it seems that there are more/different options or defaults and that's been the cause of some confusion.

vbbeta replied on Monday, June 14, 2010

That works so far

Copyright (c) Marimer LLC