Application Startup Error


Author
Message
Bill Cunnien
Bill Cunnien
StrataFrame VIP (4.1K reputation)StrataFrame VIP (4.1K reputation)StrataFrame VIP (4.1K reputation)StrataFrame VIP (4.1K reputation)StrataFrame VIP (4.1K reputation)StrataFrame VIP (4.1K reputation)StrataFrame VIP (4.1K reputation)StrataFrame VIP (4.1K reputation)StrataFrame VIP (4.1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
Several of my users are randomly getting the following error:



Message: An error occurred while creating the main form



Source: MicroFour StrataFrame UI



Inner Exception: System.Reflection.TargetInvocationException: Exception

has been thrown by the target of an invocation. --->

System.IO.FileLoadException: Could not load file or assembly

'DevExpress.XtraNavBar.v8.2, Version=8.2.4.0, Culture=neutral,

PublicKeyToken=9b171c9fd64da1d1' or one of its dependencies. The process

cannot access the file because it is being used by another process.

(Exception from HRESULT: 0x80070020)



File name: 'DevExpress.XtraNavBar.v8.2, Version=8.2.4.0,

Culture=neutral, PublicKeyToken=9b171c9fd64da1d1'

at Aspire.SF.MainForm.InitializeComponent()

at Aspire.SF.MainForm..ctor()



It does not generate the error if the user tries to start the application again. It typically occurs after the application has updated itself (click once procedures). I realize that the assembly referenced is a DevEx assembly, but I was wondering if there was a way to check for this while starting the app and gracefully closing the app or restarting the app without the user getting the unhandled error message.



Thanks!

Bill
Reply
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (12K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
OK, well at least this makes sense. I wonder if putting a Thread.Sleep() call in there would help to give it time to unload the app (besides an error handling)? Not sure, just a thought.



Also, any reason why you are managing the update when the app opens, rather than just letting ClickOnce handle it?
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search