Browse Source

X86 compatibility: enhanced exception message

Marcin Ziąbek 1 year ago
parent
commit
00c67cb26a
1 changed files with 4 additions and 1 deletions
  1. 4 1
      Source/QuestPDF/Skia/SkNativeDependencyCompatibilityChecker.cs

+ 4 - 1
Source/QuestPDF/Skia/SkNativeDependencyCompatibilityChecker.cs

@@ -32,9 +32,12 @@ internal static class SkNativeDependencyCompatibilityChecker
                 $"{exceptionBaseMessage}{paragraph}" +
                 $"{exceptionBaseMessage}{paragraph}" +
                 "Your runtime is currently not supported by QuestPDF. " +
                 "Your runtime is currently not supported by QuestPDF. " +
                 $"Currently supported runtimes are: {string.Join(", ", SkNativeDependencyProvider.SupportedPlatforms)}.";
                 $"Currently supported runtimes are: {string.Join(", ", SkNativeDependencyProvider.SupportedPlatforms)}.";
-            
+
             if (RuntimeInformation.ProcessArchitecture is Architecture.X86)
             if (RuntimeInformation.ProcessArchitecture is Architecture.X86)
+            {
                 message += $"{paragraph}Please consider setting the 'Platform target' property to 'x64' in your project settings.";
                 message += $"{paragraph}Please consider setting the 'Platform target' property to 'x64' in your project settings.";
+                message += $"{paragraph}When running in IIS, Azure AppService, Azure Function, AWS Lambda, Beanstalk, etc. please ensure that the platform or work process is set to 'x64'.";
+            }
             
             
             if (RuntimeInformation.ProcessArchitecture is Architecture.Arm)
             if (RuntimeInformation.ProcessArchitecture is Architecture.Arm)
                 message += $"{paragraph}Please consider setting the 'Platform target' property to 'Arm64' in your project settings.";
                 message += $"{paragraph}Please consider setting the 'Platform target' property to 'Arm64' in your project settings.";