We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

The type initializer for 'Aspose.Slides.Presentation' threw an exception

Message=The type initializer for ‘Aspose.Slides.Presentation’ threw an exception.
at Aspose.Slides.Presentation…ctor(String file)
at AsposeDemo.Program.Ppt2Pdf(String fromPath, String toPath) in E:\myproject\SharePrint\code\Demo\AsposeDemo\AsposeDemo\Program.cs:line 145
at AsposeDemo.Program.Main(String[] args) in E:\myproject\SharePrint\code\Demo\AsposeDemo\AsposeDemo\Program.cs:line 47

内部异常 1:
TypeLoadException: Could not load type ‘System.Drawing.FontStyle’ from assembly ‘System.Drawing, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’.

My Framework is .net core 2.0

Welcome to our community! Thank you for posting the query. Please check the issue using the latest version of Aspose.Slides. If the issue persists, please share and specify the following:

  • input presentation file you used
  • code example reproducing the exception
  • OS version where the error occurs