Hi,
I downloaded the latest Aspose.PDF from the nuget site: NuGet Gallery | Aspose.PDF 23.11.0
Our web application uses MEF container for dependency injection, something like below:
RegistrationBuilder registrationBuilder = new RegistrationBuilder();
registrationBuilder.ForTypesDerivedFrom().Export();
registrationBuilder.ForTypesDerivedFrom().Export();
registrationBuilder.ForTypesDerivedFrom().Export();
try
{
((AggregateCatalog)this.mefContainer.Catalog).Catalogs.Add(new DirectoryCatalog(“bin”, registrationBuilder));
}
catch (ReflectionTypeLoadException reflectionTypeLoadException1)
{ /*log */ }
The issue is we run into is that the MEF fails with exceptions like:
2017-01-31 15:46:37.2204|ERROR|ServiceHost|Loaded Exeception Type FileNotFoundException, Message: Could not load file or assembly ‘Aspose.Foundation, Version=17.1.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56’ or one of its dependencies. The system cannot find the file specified.
2017-01-31 15:46:37.2204|ERROR|ServiceHost|Loaded Exeception Type FileNotFoundException, Message: Could not load file or assembly ‘Aspose.JavaScript, Version=17.1.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56’ or one of its dependencies. The system cannot find the file specified.
2017-01-31 15:46:37.2204|ERROR|ServiceHost|Loaded Exeception Type FileNotFoundException, Message: Could not load file or assembly ‘Aspose.Font, Version=17.1.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56’ or one of its dependencies. The system cannot find the file specified.
It appears Aspose.PDF is referencing these and other assemblies, which causes MEF to error out. Screenshot attached for your reference.
Your nuget package does not provide these assemblies, so I presume they are not really needed for the functionality to work. On the other hand, these references present cause our application load to fail, and we use an enterprise-wide hosting library, so we cannot quickly move away from the MEF setup.
Would it be possible to either
a. Provide the additional libraries, though they may not have any functionality within them (I cannot create them for our consumption as they are signed assemblies)
or b. provide us an updated Aspose.PDF with these assemblies not referred?
Thanks!