Assembly.LoadFrom() Manifest Exception

Assembly.LoadFrom() Manifest Exception

BlackBox_
Advisor Advisor
240 Views
0 Replies
Message 1 of 1

Assembly.LoadFrom() Manifest Exception

BlackBox_
Advisor
Advisor

Trying to load a resource .dll (built by others) in order to get an Icon used, and getting the following Exception: 

 

"The module was expected to contain an assembly manifest."

 

I have the Icon name needed; if there's no manifest, then GetManifestResourceStream() seems to be out.

 

Example:

 

Icon icon = new Icon(dll.GetManifestResourceStream(iconName));

 

Is there a better way to obtain the Assembly's stream (to obtain the Icon)?

 

Another approach might be CustomizationSection, but there doesn't seem to be a way to obtain the Icon used by a given Command saved to CUIx (even with a known Element ID?), and I'd rather avoid the overhead needed to iterate each-and-every-single Main, Enterprise, and Partial CUIx file, etc to find it, as I already know where the resource .dll file is.

 

Trying to find a code-based version of doing this, so I don't have to manually export each-and-every-single Icon for each version's CUIx, and save those BMPs to the app's folder for use, when it's all referencing same OOTB source Icons.

 

Any assistance would be greatly appreciated. 

 

 


"How we think determines what we do, and what we do determines what we get."

Sincpac C3D ~ Autodesk Exchange Apps

0 Likes
241 Views
0 Replies
Replies (0)