I am developing an ASP.NET 5 MVC application. I have the Syncfusion.Presentation.AspNet.Mvc5 NuGet package version 19.2.0.55.
I have referenced using Syncfusion.Presentation; in the top section of the code.
I am running into a error when trying to open the presentation file
IPresentation srcPres = Presentation.Open(@"C:\RAPiD_Web\RAPiD_Web\Base\Slide Library\K3 Intro.pptx")
Error:
System.BadImageFormatException: 'Could not load file or assembly 'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context. (0x80131058)'
At first I didn't have the license key set. So, I got that generated and added to my Startup.cs as the first thing under Configure.
But this error is still happening.
Okay, looking at the NuGet packages, I see the exclamation next to the Syncfusion.Presenation.AspNet.Mvc5 package.
I have added the Syncfusion.Licensing as I did not have that before. I see in the warning message that this particular version 19.2.0.55 may not be compatible with .net5.0.
I had originally told my POC there at Syncfusion that I had already created a full web application (MVC) with Azure authentication using the new .net5.0 framework. I asked him if I could just add in the Syncfusion functionality or if I have to start a whole new application from scratch. He said that I could just add it to my existing one. However, now I am seeing possible issues.
My trial license is for the 19.2.0.55 version of the packages. I'm wondering if it may not be compatible with the .net5.0 framework....
Or maybe I'm missing other packages or have the wrong one.
Looks like that was it. Thanks!