When updating Aspose to the latest version(23.7) I am getting following error: System.IO.FileNotFoundException HResult=0x80070002 Message=Could not load file or assembly 'System.Runtime, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
Note: I am working on a C# project that target.net6.0 and is deployed as a cloud function
Can you advise on how to fix this?
@d.gerard,
Which Aspose for .NET APIs you are using? Which particular API (Aspose.Words or Aspose.PDF or else, etc.) triggers this issue after updating its reference to latest version? It looks the error is related to the missing System.Runtime assembly. Please make sure that the Microsoft.NETCore.App package version is 3.1 or later (installed on your end), as it contains the required assembly. Otherwise, please update the package. To update the package, you can try using the following command in the Package Manager Console:
Update-Package Microsoft.NETCore.App
Alternatively, you can also try adding a reference to the System.Runtime assembly manually in your project by right-clicking on the References folder in your project and selecting “Add Reference”. Then, navigate to the “Assemblies” tab and search for required “System.Runtime” in the list. After updating the package or adding the reference, rebuild your project and try updating Aspose libraries to the latest version again.
If you still find the issue, kindly do provide a standalone sample project to reproduce the issue on our end, we will check it soon.
PS. please zip the project prior attaching here.
Hello @amjad.sahi
I am using both Aspose.Words and Aspose.Pdf. The failure is occuring when starting up the azure function before receiving any requests. Here’s a screen shot.
image.png (512.3 KB)
Here’s the csproj file of the project. Let me know if something is not correct.AsposeDocumentConverter.zip (600 Bytes)
Note: The project does not contain the package Microsoft.NETCore.App
@d.gerard
Can you please share the complete error stack information with us so that we can try to determine the actual cause behind this issue you are facing?