Problem with embedding interop types

.NET obfuscator and automated error reporting

Problem with embedding interop types

Postby Roger Billsdon » Wed Aug 18, 2010 8:41 pm

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
Roger Billsdon
Posts: 9
Joined: Sat Jul 31, 2010 7:10 am
Location: Cambs, UK

Postby james.billings » Fri Aug 20, 2010 8:13 am

Thanks for your post; I've just emailed you directly to go through this with you a little more if that's ok.
Posts: 1122
Joined: Wed Jun 16, 2010 10:10 am
Location: Red Gate

Postby slaphead99 » Tue Sep 07, 2010 12:55 pm

Happily the latest EAP should help with this issue. ... 131171.exe
Posts: 92
Joined: Wed Mar 10, 2010 1:27 pm

Return to SmartAssembly 5

Who is online

Users browsing this forum: No registered users and 0 guests