By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,529 Members | 1,826 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,529 IT Pros & Developers. It's quick & easy.

"Could not load file or assembly" exception

P: 3
I'm trying to migrate a large solution (20 or so projects) from .NET 1.1 to
.NET 2.0. I've taken care of all the compile errors, but now I'm getting an
exception shortly after I start up the app.

Exception:
System.TypeInitializationException "The type initializer for 'MyClass' threw
an exception."

InnerException:
System.IO.FileLoadException "Could not load file or assembly 'MyLib, Version
1.0.2862.16401, Culture=neutral, PublicKeyToken=null' or one of its
dependencies. Exception from HRESULT: 0xE0434F4D"

The exe is built from VB code. 'MyClass' is in a managed C++ dll, and
'MyLib' is a different managed C++ dll. I've been stuck on this problem for
days. Any help would be greatly appreciated. Thanks.
Nov 2 '07 #1
Share this Question
Share on Google+
1 Reply


Plater
Expert 5K+
P: 7,872
I would guess it just wants you to re-build the .dlls and then update the references to them.

Actually it sounds like you already re-built them so they have a different digital signature now. The project is still looking for the old ones though and doesn't like the new ones.
Try removing the references to the DLLs and then re-adding them.
Nov 2 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.