What are the challenges you face when working across database platforms? Take the survey

Type could not be loaded by merged dll

anders.isacsonanders.isacson Posts: 12 Bronze 2
edited July 7, 2014 10:29AM in SmartAssembly
When running my software obfuscated using SmartAssembly 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=, 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?


Sign In or Register to comment.