I am trying to load in a PSD file, and I keep getting “Image loading failed”
Aspose.PSD.CoreExceptions.ImageLoadException
HResult=0x80131500
Message=Image loading failed.
Source=Aspose.PSD
StackTrace:
at Aspose.PSD.Image.(StreamContainer , LoadOptions )
at Aspose.PSD.Image.Load(String filePath, LoadOptions loadOptions)
at AsposeTest.Program.Main(String[] args) in C:\Users\myth_\source\repos\AsposeTest\AsposeTest\Program.cs:line 17
Inner Exception 1:
TypeInitializationException: The type initializer for ' ’ threw an exception.
Inner Exception 2:
TypeInitializationException: The type initializer for ' ’ threw an exception.
Inner Exception 3:
FileLoadException: Could not load file or assembly ‘System.Text.Encoding.CodePages, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’. The located assembly’s manifest definition does not match the assembly reference. (0x80131040)
The line trying to load it:
var options = new PsdLoadOptions() { LoadEffectsResource = true };
using (var img = (PsdImage)Aspose.PSD.Image.Load(@“C:\Unmatched\VSGraphicTemplate.psd”, options))
I am on the nuget version 22.9.0. I’ve tried past versions as well and it appears to be an issue a ways back. I am happy to provide my PSD file and source in a message if necessary!