Problem with embedding interop types

.NET obfuscator and automated error reporting

Moderators: Luke Jefferson, Alex.Davies, melvyn.harbour

Problem with embedding interop types

Postby Roger Billsdon » Wed Aug 18, 2010 9: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: http://blogs.msdn.com/b/jmstall/archive ... 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 http://msdn.microsoft.com/en-us/library/dd409610.aspx)

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 8:10 am
Location: Cambs, UK

Postby james.billings » Fri Aug 20, 2010 9: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.
james.billings
 
Posts: 1146
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.

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

Happily the latest EAP should help with this issue.
http://downloads.red-gate.com/EAP/Smart ... 131171.exe
slaphead99
 
Posts: 92
Joined: Wed Mar 10, 2010 2:27 pm


Return to SmartAssembly 5

Who is online

Users browsing this forum: No registered users and 0 guests