Red Gate forums :: View topic - Problem with embedding interop types
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SmartAssembly 5
SmartAssembly 5 forum

Problem with embedding interop types

Search in SmartAssembly 5 forum
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Jump to:  
Author Message
Roger Billsdon



Joined: 31 Jul 2010
Posts: 9
Location: Cambs, UK

PostPosted: Wed Aug 18, 2010 9:41 pm    Post subject: Problem with embedding interop types Reply with quote

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/2009/07/09/icustomqueryinterface-and-clr-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
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1144
Location: My desk.

PostPosted: Fri Aug 20, 2010 9:13 am    Post subject: Reply with quote

Thanks for your post; I've just emailed you directly to go through this with you a little more if that's ok.
Back to top
View user's profile Send private message
slaphead99



Joined: 10 Mar 2010
Posts: 93

PostPosted: Tue Sep 07, 2010 1:55 pm    Post subject: Reply with quote

Happily the latest EAP should help with this issue.
http://downloads.red-gate.com/EAP/Smartassembly/SmartAssembly_5.5.0.121_AnyCpu_r131171.exe
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies. All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group