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:
Can anyone help me out with this. Im totally stuck here.
Thanks in advance for all the inputs
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.FileN otFoundExceptio n: 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.Reflecti on.Assembly._nL oad(AssemblyNam e fileName, String codeBase, Evidence assemblySecurit y, ____
embly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotF ound, Boolean forIntrospectio n)
at System.Reflecti on.Assembly.nLo ad(AssemblyName fileName, String codeBase, Evidence assemblySecurit y, Asse
mbly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotF ound, Boolean forIntrospectio n)
at System.Reflecti on.Assembly.Int ernalLoad(Assem blyName assemblyRef, Evidence assemblySecurit y, StackCrawlM
ark& stackMark, Boolean forIntrospectio n)
at System.Reflecti on.Assembly.Int ernalLoad(Strin g assemblyString, Evidence assemblySecurit y, StackCrawlMark
& stackMark, Boolean forIntrospectio n)
at System.Reflecti on.Assembly.Loa d(String assemblyString)
at ReflectionDemoC Sharp.Reference dAssemblies.Mai n(String[] args) in C:\Documents and Settings\lasi\M y Docum
ents\Visual Studio 2008\Projects\C onsoleApplicati on1\ConsoleAppl ication1\Progra m.cs:line 20
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\M icrosoft\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\M icrosoft\Fusion !EnableLog].
r one of its dependencies. The system cannot find the file specified.
File name: 'System.Windows .Forms'
at System.Reflecti on.Assembly._nL oad(AssemblyNam e fileName, String codeBase, Evidence assemblySecurit y, ____
embly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotF ound, Boolean forIntrospectio n)
at System.Reflecti on.Assembly.nLo ad(AssemblyName fileName, String codeBase, Evidence assemblySecurit y, Asse
mbly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotF ound, Boolean forIntrospectio n)
at System.Reflecti on.Assembly.Int ernalLoad(Assem blyName assemblyRef, Evidence assemblySecurit y, StackCrawlM
ark& stackMark, Boolean forIntrospectio n)
at System.Reflecti on.Assembly.Int ernalLoad(Strin g assemblyString, Evidence assemblySecurit y, StackCrawlMark
& stackMark, Boolean forIntrospectio n)
at System.Reflecti on.Assembly.Loa d(String assemblyString)
at ReflectionDemoC Sharp.Reference dAssemblies.Mai n(String[] args) in C:\Documents and Settings\lasi\M y Docum
ents\Visual Studio 2008\Projects\C onsoleApplicati on1\ConsoleAppl ication1\Progra m.cs:line 20
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\M icrosoft\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\M icrosoft\Fusion !EnableLog].
Can anyone help me out with this. Im totally stuck here.
Thanks in advance for all the inputs
Comment