Cannot load Aspose DLLs : the system cannot find the file specified (MSI)

I’ve installed Aspose Total (Aspose.Total_for_.NET.msi), and it works fine with Visual Studio.

According to the documentation:

Using the installer has a couple of advantages: It makes all necessary entries into the system registry to expose Aspose.Words for .NET API classes, adding the assembly to the Add Reference dialog box in Visual Studio etc.

Hovewer, it seems the DLLs are not loadable from their location:

  • In VS, when adding references, .NET tab doesn’t show theses dlls (except Aspose .Email for .NET 2.0) ; I have to add them through the “Browse” one
  • I noticed VS performs a local copy of the referenced DLLs

Moreover, when I try to use a compiled DLL or an executable outside the dev directory, I get this error:

Could not load assembly ‘Aspose.Words, Version=17.1.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56’ or one of its dependencies. The system cannot find the file specified."

Ultimately, Microsoft Process Monitor shows theses access attempts:

HKLM\SOFTWARE\Microsoft\Fusion\PublisherPolicy\Default\v4.0_policy.17.1.Aspose.Words__716fcc553a201e56
HKLM\SOFTWARE\Microsoft\Fusion\PublisherPolicy\Default\policy.17.1.Aspose.Words__716fcc553a201e56

These keys are not added in the registry.

Did I miss something with the msi installer ? I’m looking for a solution usable for a production environment.

@monir.aittahar,

The latest version of Aspose.Words for .NET does not write any special information to the Windows Registry. All the information which you can find inside Windows Registry with key = “Aspose” is the service information written by Windows
.
But Aspose.Words for .NET reads fonts Keys from the Registry e.g:

RegistryKey fontsKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts", false)

We have updated the documentation in this regard.

Secondly, after installation, in Visual Studio 2015, you can add reference by going through the “Browser” tab or “Assemblies -> Extensions” section. After the “Aspose.Words” reference is added, you can go to “Properties” and change value of “Copy Local” attribute to “false”.

@awais.hafeez,

Thanks for your reply.

I’m using Aspose Total + VS2010. I set the “copy local” property to false. Then the generated application produces the same error message:

Could not load assembly ‘Aspose.Words, Version=17.1.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56’ or one of its dependencies. The system cannot find the file specified.

It’s said it’s not recommended to manually add DLLs into the GAC on a production environment. How can I make our applications runnable without manually copying Aspose DLL in their directory ?

Regards,

Monir

@monir.aittahar,

Thanks for sharing the details.

I have tested the scenario where I have separately installed Aspose.Words for .NET 17.10 and I am able to notice Aspose.Words for .NET 17.10 under .NET Tab. Furthermore, I have used Aspose.Words.dll in a sample project based in Visual Studio 2010 and I am unable to notice any issue. Can you please try using the latest release and share your findings.Aspose_Words.PNG (28.9 KB)

In case you still face the same problem, please feel free to contact.

Dear all,

Thanks codewarior. You’re right, it’s working with Aspose.Words for .NET 17.10. But It doesn’t for Aspose.Total (even for the latest one released).

We have now purchased a license for Aspose.Total. Why should I do? If I dowload separately Aspose.Words, Aspose.Cells and Aspose.Presentation (assuming these DLLs will be visible), will our license file (Aspose.Total.lic) work?

Regards,

Monir

@monir.aittahar,

Thanks for contacting support.

Aspose.Total for .NET is a package of all the APIs targeting .NET framework and it always contains the latest release of individual API. However it appears to be an issue related to the scripts which we are using to create this package as its not including the latest release versions. I am in coordination with related team and hopefully it will be resolves soon. For the time being, you may consider using separate release of Aspose.Words for .NET 17.10 to resolve your problem. We are sorry for your inconvenience.

Thank you. :slight_smile:

The main thing is to be able to use our license file.

(Do you plan to notify users when it will be out, or should I check out the website for further updates ?)

@monir.aittahar,

Are you facing any issue while using the license ?

Please share some details because as per my understanding, you have been facing issues while using product binaries in your project. Furthermore, concerning to the resolution, once the problem is resolved, we will update you within this forum thread.

No, I didn’t say that. :slight_smile:

I was just wondering if installing separate products will prevent us to use our Total license file.
I’ll check that and tell you.

@monir.aittahar,

You can use Aspose.Total.lic with all APIs targeting .NET Framework.

@codewarior,

Thanks. I’ve installed Aspose.Words_17.10.msi, Aspose.Cells_17.10.msi and Aspose.Slides_17.9.1.msi.

The last one, referenced as Aspose.Slides in the Control Panel remains not accessible from .NET tab from Add a Reference popup.

Update: also the problem remains : i cannot run my custom dll without having Aspose DLL copied in its directory.

Regards,


Monir

@monir.aittahar,

Thanks sharing the details.

We are checking above stated scenario and will keep you posted with our findings.

@monir.aittahar,

I have tested the scenario and have managed to reproduce the same issue that Aspose.Slides do not appear under .NET tab. The team is further looking into this matter and will keep you updated on the status of correction. Aspose_Slides_NET_Reference_Issue.PNG (30.2 KB)

@monir.aittahar

I have added an issue with ID SLIDESNET-39415 in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be fixed.

Dear all,

Thank you. Another point is also remaining:

[This] problem remains : i cannot run my custom dll without having Aspose DLL copied in its directory.

Actually I want in our production environment to install the Api in a clean directory tree (for example F:\Apis\Aspose\...). It’s not possible currently, since I need to copy the dlls in the directory of our own applications.

Regards.

@monir.aittahar,

Thanks for sharing the details.

You can install Aspose APIs in any directory but when you reference the APIs in your application, they are copied into bin director of solution. In case we are still unable to understand the problem, please share some further details. We are sorry for this inconvenience.

Yes, it works if the DLL are copied in the bin directory.

Actually I wanted to make it working this way (for example):

F:\Apis\Aspose\...\
F:\Custom\DLLs\aDLLUsingAspose.DLL
F:\Custom\EXEs\anEXEUsingADLLUsingAspose.EXE

So the EXE loads aDLLUsingAspose.DLL, which loads Aspose.*.DLL. Right ? At this time, It will work only If a copy Aspose DLLs into F:\Custom\DLLs. I rather avoid duplicate files…

But maybe this way is against the good practices ?

@monir.aittahar,

Thanks for sharing the details.

Before we comment any further, we need to first test the scenario and will get back to you soon.

The issues you have found earlier (filed as SLIDESNET-39415) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by mudassir.fayyaz