Hello
We want to use Aspose.Words in a Dynamics CRM plugin. Dynamics CRM requires all dependent assemblies merged into one assembly using ILMerge.
Unfortunately, Aspose.Words.dll throws a TypeInitializationException when the Aspose.Words.dll is merged into the calling assembly.
Problem is easily reproducable: Create a class library which tries to save a Docx file using Pdf Save Options.
Merge Aspose.Words.dll into the Class Library.
Call the class library.
Exception details:
The type initializer for ‘Aspose.Words.Properties.BuiltInDocumentProperties’ threw an exception.
I’ve attached a solution which reproduces the behaviour. The same code runs without any problems when using Aspose with a normal reference.
Hi Rolf,
Hi Awais
I double checked, the error still occurs. Please be aware that the exception is only thrown with ConsoleApplication1 (named ConsoleApplication.Problem in the solution). The other project, Console Application, named ConsoleApplicationWorking, is only attached as an example to proof the error only occurs when using Aspose in a merged library.
The ILMerge Tool is called in the Post Build Event of the AsposeTest Project. I included the ILMerge Tool in the project.
Maybe you're referencing the unmerged version of AsposeTest.dll when you're reproducing the error. This will work. I modified the project to ensure the correct (AsposeMerged.dll, not working) dll is referenced and attached it again.
I use Version 14.7.0.0 of Aspose.Words.dll.
Best regards
Rolf
Hi Rolf,
The issues you have found earlier (filed as WORDSNET-10704) have been fixed in this .NET update and this Java update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.