I recently upgraded from 6.9, to 10.5. However, I can’t seem to keep from getting this error (below). I did all the usual resolutions for this type of error. I cleaned the solution and rebuilt. I cleared out the ASP.NET Temporary Files. I went through every project and deleted all references of the Aspose DLL and then used Nuget to install the Aspose.PDF (which brings it up to 10.5.1).
Hi there,
Are you saying not to update using NuGet? Or are you saying that I should update using Nuget using the explicit version number like below?
Update-Package Aspose.PDF -version 10.5.1
And actually, if you can recommend a way that I can just clear out all of the Aspose.Pdf references and add it to the project in a way you can guarantee I don’t run into this issue, that would be more ideal.
I just updated all projects in the solution that use the Aspose.PDF in NUGET (apparently the latest version is 10.6) and it uninstalled 10.5.1 from all of them and then successfully updated to 10.6 and now I get this error:
Could not load file or assembly ‘Aspose.Pdf, Version=10.6.0.0, Culture=neutral, PublicKeyToken=6947866647e416ec’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.IO.FileLoadException: Could not load file or assembly ‘Aspose.Pdf, Version=10.6.0.0, Culture=neutral, PublicKeyToken=6947866647e416ec’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Source Error:
|
Source File: c:\Users\rich_001\Documents\TFS\Main\Mb3Aspose\Pdf.cs Line: 23
Assembly Load Trace: The following information can be helpful to determine why the assembly ‘Aspose.Pdf, Version=10.6.0.0, Culture=neutral, PublicKeyToken=6947866647e416ec’ could not be loaded.
What’s weird is that in another assembly (which is VB.NET) it works fine in my VB.NET website. But when I try to use it from this assembly (which is CS) that’s the one I get the error on. Is there something around the fact that it’s a CS assembly being used in a VB.NET website?
Well, I converted the entire assembly to VB to see if that made a difference but it didn’t. I made a brand new project, added the Aspose.Pdf 10.6 via Nuget and I get the same exact error.
So, I unistalled and removed every reference of Aspose from every project in my solution so there was no trace of it anywhere. I closed VS and reinstalled Aspose using the MSI installer. I started VS back up and added the reference to 10.5 (which is the version I installed) and I get this:
Could not load file or assembly ‘Aspose.Pdf, Version=10.5.0.0, Culture=neutral, PublicKeyToken=6947866647e416ec’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.IO.FileLoadException: Could not load file or assembly ‘Aspose.Pdf, Version=10.5.0.0, Culture=neutral, PublicKeyToken=6947866647e416ec’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Source Error:
|
Source File: c:\Users\rich_001\Documents\TFS\Main\Mb3Aspose\Pdf.cs Line: 23
Assembly Load Trace: The following information can be helpful to determine why the assembly ‘Aspose.Pdf, Version=10.5.0.0, Culture=neutral, PublicKeyToken=6947866647e416ec’ could not be loaded.
|
Stack Trace:
|
I finally figured it out. I had a folder called “Dependencies” in my web project which is where the 6.9 version was referenced from initially so every time that I tried to reference the new version of a different location it would always just reference the old version from the original location. Seems like a bug in VisualStudio to me but who knows. Anyway, I deleted that version from the folder and it is referencing properly now.
Hi there,