Could not load file or assembly

Joined
Nov 10, 2008
Messages
1
Reaction score
0
Hi,

I have developed an application in C#. Now I'm working on a tool which is again written in c# which will give me all the assemblies referenced by my application. In the code i need to get each assembly recursively and load it. When I run my tool some of the assemblies are loaded successfully but it end up giving following exception:


Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows.Forms' o
r one of its dependencies. The system cannot find the file specified.
File name: 'System.Windows.Forms'
at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, ____
embly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Asse
mbly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlM
ark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark
& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
at ReflectionDemoCSharp.ReferencedAssemblies.Main(String[] args) in C:\Documents and Settings\lasi\My Docum
ents\Visual Studio 2008\Projects\ConsoleApplication1\ConsoleApplication1\Program.cs:line 20

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DW
ORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].



Can anyone help me out with this. I'm totally stuck here.

Thanks in advance for all the inputs
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top