Problem with embedding interop types

Roger BillsdonRoger Billsdon Posts: 14
edited September 7, 2010 8:55AM in SmartAssembly 5
Hi all

Since my previous posts I've encountered further problems when programs that use COM interop are obfuscated with SmartAssembly.

After a lot of further trial and error experimentation I now believe these problems arise when COM interop types are embedded in the assembly. In my case I'm using Visio and so far my testing suggests that all the "Specified cast is not valid System.StubHelpers.InterfaceMarshaler.ConvertToNative" errors can be avoided if in my program project properties the Microsoft.Office.Interop.Visio "Embed Interop Types" is changed from True to False. I got the idea to try this from: ... lr-v4.aspx

However, this work-around causes significant problems because, for example, embedding interop types allows programs to work with multiple versions of the Micrososoft Office programs (eg see

Is there any chance SmartAssembly can be made to work with embedded interop types?

Best regards
Roger Billsdon


Sign In or Register to comment.