Hi Guys, I've now moved my blog to http://www.mackolicious.com/blog please follow that link to see my latest posts
Friday, 28 September 2012
System.IO.FileNotFoundException: Could not load file or assembly 'Missing.Assembly.dll, Version=1.0.20.15800, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified
Have you ever seen a error like the one below:
System.IO.FileNotFoundException: Could not load file or assembly 'Missing.Assembly.dll, Version=1.0.20.15800, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified
The first thing to think is Ahhhhhhh! I have all the references what is going on??!
Don't panic here's a few steps to diagnosing this issue, and hopefully resolving it.
STEP 1. Make sure you can debug the code and ascertain which assembly is throwing the exception.
STEP 2. Once you know which assembly is complaining about the missing DLL you then need to find the corresponding project and check that project's references:
If the reference that is in the exception exists then move on to STEP 3.
STEP 3. If the reference exists then you need to look a little deeper, into the second part of the exception or one of its dependencies. This is key, what this means is that Missing.Assembly.dll is referencing an assembly you're not (FACT).
What you need to do is ascertain exactly which assembly it is referencing and which version it is referencing. This is actually quite tricky for large projects but the easiest way to find out is by looking at where the exception occured (i.e. the line of code) and what that particular piece of code needs to work in terms of references.
Do this by looking at the using statements:
Good luck :)
Any questions?
Subscribe to:
Posts (Atom)