Red Gate forums :: View topic - Can an Outlook Add-in be obfuscated, and if so, how do I do
Return to www.red-gate.com RSS Feed Available

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

Can an Outlook Add-in be obfuscated, and if so, how do I do

Search in SmartAssembly 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
mdpowersslo



Joined: 29 Aug 2012
Posts: 6
Location: SLO, CA

PostPosted: Wed Aug 29, 2012 8:30 pm    Post subject: Can an Outlook Add-in be obfuscated, and if so, how do I do Reply with quote

I am brand new to SmartAssembly, and am having problems finding some answers to questions. Please forgive me if this has already been answered.

We have two Outlook add-ins, both written in C#, one using VS2010 and VSTO2010, the other (for Outlook 2003) using VS2005 and VSTO2005.

For now, I'm going to worry only about the VS/VSTO2010 add-in; answers to the questions on this may help me figure out what to do for the older add-in.

As part of the build process, VSTO2010 creates a "Manifest" file that contains hash codes representing each of the DLLs on which the main DLL is dependent. That manifest file is installed along with the DLLs, and is used by the VSTO loader to make sure that nothing has changed.

SmartAssembly is a post-build process that changes the contents of the main DLL ... and either merges or embeds each of the DLLs on which the main DLL is dependent into the main. The hash code for the main then does not match the value saved in the Manifest ... and the other DLLs are not present. The VSTO loader encounters an error, and the add-in does not get loaded into Outlook.

Is there ANY way to get around this "Catch-22"???
Back to top
View user's profile Send private message
Chris.Allen



Joined: 12 Mar 2009
Posts: 586

PostPosted: Fri Aug 31, 2012 10:15 am    Post subject: Reply with quote

Quote:

SmartAssembly is a post-build process that changes the contents of the main DLL ... and either merges or embeds each of the DLLs on which the main DLL is dependent into the main.



Merging/embedding is an option.
Back to top
View user's profile Send private message
mdpowersslo



Joined: 29 Aug 2012
Posts: 6
Location: SLO, CA

PostPosted: Fri Aug 31, 2012 8:10 pm    Post subject: Reply with quote

Merging/embedding is NOT an option ... merging the other DLLs into the main changes the main so that it no longer matches the hash recorded in the Manifest.
Back to top
View user's profile Send private message
Holden-ar



Joined: 23 Jan 2013
Posts: 1
Location: Argentina

PostPosted: Wed Jan 23, 2013 1:04 pm    Post subject: Reply with quote

Have anyone solved this problem? I'm on the same scenario with VSTO.
Thank you in advance.
Back to top
View user's profile Send private message
mdpowersslo



Joined: 29 Aug 2012
Posts: 6
Location: SLO, CA

PostPosted: Wed Jan 23, 2013 5:24 pm    Post subject: Reply with quote

Actually, the solution is fairly simple, if not cumbersome ... and may not necessarily work for you.

What I do now is to obfuscate each of the assemblies that I reference in the main Outlook add-in, and reset the references for those assemblies to the obfuscated products. I do NOT obfuscate the main add-in assembly. This way, the manifest generated during the Visual Studio build of the main add-in assembly is calculated against the actual assemblies used. For us it works beautifully.

This works if your main add-in assembly does not need to be obfuscated, but only the lower-level referenced assemblies. If you have things in the main assembly that you want obfuscated, you could refactor those things into another assembly.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic 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