Assembly Load Failed
Keywords: ObjectClrOption Use Assembly GAC Global Assembly Cache EXECUTE::CLR: Assembly Load Failed Instantiable
Question:
Just as a test (and for future compiled exes I might place on other systems)... I ran the gacutil into a db table, then created references to each assembly. I then ran a script to determine if the call to ObjectCLROption() would succeed.
A few assemblies failed to load, but cannot be captured by LastError(). My GACutil showed over 1100+ assemblies of which about 15 errored out when I tried to run ObjectCLROption with "use".
The few that Failed failed by displaying a message:
EXECUTE::CLR: Assembly load failed
Execute ObjectClrOption("use","mcupdate, Version=6.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35,processorArchitechure=x86")
[OK] [Cancel]
Answer:
Some assemblies will fail to load, for a variety of valid reasons. Two that come to mind are the following.
- Not all assemblies expose instantiable objects. For example, one that exposes a single abstract base class. Since abstract classes cannot be instantiated, you cannot load it by creating an instance of one of the objects that it exposes.
- Some assemblies are dependent on objects exposed by other assemblies.
Article ID: W17803
Filename: Assembly Load Failed.txt
File Created: 2013:04:29:07:55:48
Last Updated: 2013:04:29:07:55:48