Free Support Forum - aspose.com

FileNotFoundException after upgrading

I am attempting to upgrade the version of Aspose I am using in my project and running into an issue.

System.IO.FileNotFoundException was unhandled
  Message=Could not load file or assembly 'aspose.foundation-1.7.9-net20, Version=1.7.9.0, Culture=neutral, PublicKeyToken=716fcc553a201e56' or one of its dependencies. The system cannot find the file specified.
  Source=Aspose.Pdf
  FileName=aspose.foundation-1.7.9-net20, Version=1.7.9.0, Culture=neutral, PublicKeyToken=716fcc553a201e56
  FusionLog=""
  StackTrace:
       at   . .  (  )
       at   . . (   ,   )
       at   . . ()
       at   . .Save(Stream )
       at   . .Save(Stream )
       at Aspose.Pdf.Document.Save(Stream output)....
  InnerException: 

I was using

Aspose.Cells 7.3.3.0
Aspose.Pdf 7.4.0.0
Aspose.Slides 6.7.0.0
Aspose.Words 11.8.0.0

and I updated to
Aspose.Cells 7.4.2.0
Aspose.Pdf 7.8.0.0
Aspose.Slides 7.2.0.0
Aspose.Words 13.2.0.0

I was able to use these assemblies with the exact same license file and code in a small console app I wrote but when I updated the assemblies in my main project I get the previous error. My project is using .Net 3.5 x64.

Hi John,


Thanks for your inquiry. Can you please double check whether you are referencing latest dll of Aspose.Pdf in your project? Hopefully it will fix the issue. If issue persist then please share your sample project and source document here? So we will test it at our end and will provide your more information accordingly.

Sorry for the inconvenience faced.

Best Regards,

I can verify that I am using the latest assemblies which I indicated in the post above.

public class PdfConverter : IConverter
{
    private Document Document { get; set; }
    public int TotalPages { get; protected set; }
    public int CurrentPageNumber { get; protected set; }
    public Stream CurrentPage { get; protected set; }

    public PdfConverter(Stream document)
    {
        document.Seek(0, SeekOrigin.Begin);
        Document = new Document(document);
        TotalPages = PublishHelper.GetPageCountPdf(document);
        CurrentPageNumber = 0;
    }

    public bool NextPage()
    {
        if (++CurrentPageNumber > TotalPages)
            return false;

        CurrentPage = new MemoryStream();
        Document newDoc = new Document();
        newDoc.Pages.Add(Document.Pages[CurrentPageNumber]);
        newDoc.Save(CurrentPage);
        newDoc.Dispose();
        CurrentPage.Seek(0, SeekOrigin.Begin);
        return true;
    }
}

The red line is where I am getting the error. This code runs fine when loaded in a small console app, however, when I run it in my main project, I get the error. The assemblies are the same between the two projects. The stream being passed into the constructor is a pdf file.

Hi John,


Thanks for your feedback. I’m working over your query and will get back to you soon.

Best Regards,

Hi John,


Thanks for your patience. I’ve tested the scenario with Aspose.Pdf for .Net 7.8.0, using your sample code and I’m afraid I’m unable to notice the reported issue. Could you please share a sample project to replicate the issue and please also confirm how you are referencing the Aspose.Pdf dll in your project from GAC or else?

Sorry for the inconvenience faced.

Best Regards,

Unfortunately I am unable to reproduce the issue in a sample program. The Aspose.Pdf dll is being deployed to the GAC.

Hi John,

Thanks for your feedback. I've logged an issue against exception shared above, regarding missing assembly, in our issue tracking system as PDFNEWNET-35138 for further investigation and resolution. We will keep you update about issue progress via this forum thread.

Sorry for the inconvenience faced.

Best Regards,

Hi John,


Thanks for your patience. As we have recently released new version of Aspose.Pdf for .Net 7.9.0, we will appreciate if you please download and test your project with new release and share the results?

Thanks for your cooperation.

Best Regards,

I am also using this from within SharePoint 2010. I have not yet tried the latest version of Aspose.Pdf but I will as soon as I get a chance.

Hi Daniel/John,


Thanks for your feedback. I’ve shared your findings/information with the development team. Hopefully it would help us in investigation and resolution of the issue. We will keep you updated about issue progress via this forum thread.

Sorry for the inconvenience faced.

Best Regards,

Hi Daniel,


Thanks for your feedback. I’ve also shared your provided additional information with development team. We will update you via this forum thread as soon as the issue is resolved.

Sorry for the inconvenience faced.

Best Regards,

The issues you have found earlier (filed as PDFNEWNET-35138) have been fixed in Aspose.Pdf for .NET 8.0.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.