Red Gate forums :: View topic - Type could not be loaded by merged dll
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

Type could not be loaded by merged dll

Search in SmartAssembly 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
anders.isacson



Joined: 03 Jul 2014
Posts: 1
Location: Gothenburg Sweden

PostPosted: Thu Jul 03, 2014 10:51 am    Post subject: Type could not be loaded by merged dll Reply with quote

When running my software obfuscated using SmartAssembly 6.8.0.121 I get the following runtime error (own translation from Swedish):

System.TypeLoadException: the type Microsoft.Office.Interop.Excel.AppEvents_Event could not be loaded from the assembly myExe, Version=7.2.0.4, Culture=neutral, PublicKeyToken=null. The type is marked as valid for type similarity, but it is not marked as public.

tack trace:
at myDll.Exports.ExportExcel.ExportResults(Boolean , String , DataGridViewDoubleCellFormats )
...

myDll.dll is merged into myExe.exe ExportExcel is a public class in myDll that uses Microsoft.Office.Interop.Excel. ExportResults is called by a backgroundWorker defined in myDll.

Before I did split my exe project into one exe project and several dll projects I did not have this problem (ExportResults was part of myExe.exe).

How can I solve this issue?
Back to top
View user's profile Send private message
Chris.Allen



Joined: 12 Mar 2009
Posts: 594

PostPosted: Mon Jul 07, 2014 3:29 pm    Post subject: Reply with quote

I'm a little confused why its trying to load a MS namespace type from your assembly- did you manage to merge a microsoft namespace into your executable?
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