PDF converting fails while running test on CI. I'm using GhostscriptsSharp library for converting.
I'm not facing this issue while running my test locally, PDF-file is converted to images correctly.
I've been searching the internet for a solution but so far every thing I've found hasn't helped me find a solution.
An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) at GhostscriptSharp.GhostscriptWrapper.CreateAPIInstance(IntPtr& pinstance, IntPtr caller_handle) at GhostscriptSharp.GhostscriptWrapper.CallAPI(String[] args) at GhostscriptSharp.GhostscriptWrapper.GeneratePageThumbs(String inputPath, String outputPath, Int32 firstPage, Int32 lastPage, Int32 width, Int32 height) at Framework.Utils.FileUtils.ConvertPdfToImages(String pdfPath, String imagesPath, Int32 pageCount) in c:\TeamCity\buildAgent\work\8e7aa88e702dfaf7\Framework\Utils\FileUtils.cs:line 90 at StepDefinitions.General.Search.SearchTableSteps.ThenImagesAreCorrectInDownloadedDocumentFromSearchGrid(Table table) in c:\TeamCity\buildAgent\work\8e7aa88e702dfaf7\StepDefinitions\General\Search\SearchTableSteps.cs:line 282 at TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, TimeSpan& duration) at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch match, Object[] arguments) at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance stepInstance) at TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep() at Features.Clerk.Version_2.Clerk_QuickDocFeature.ScenarioCleanup() in c:\TeamCity\buildAgent\work\8e7aa88e702dfaf7\Features\Clerk\version_2\ClerkQuickDoc.feature.cs:line 0 at Features.Clerk.Version_2.Clerk_QuickDocFeature.Clerk_DownloadRedactedDocument() in c:\TeamCity\buildAgent\work\8e7aa88e702dfaf7\Features\Clerk\version_2\ClerkQuickDoc.feature:line 28 at TechTalk.SpecRun.Framework.TaskExecutors.StaticOrInstanceMethodExecutor.ExecuteInternal(ITestThreadExecutionContext testThreadExecutionContext) in c:\TeamCity\buildAgent\work\1ace6ed01d0a43bb\TechTalk.SpecRun.Framework.Interfaces\TaskExecutors\StaticOrInstanceMethodExecutor.cs:line 40 at TechTalk.SpecRun.Framework.TestAssemblyExecutor.ExecuteTestNodeTask(TestNode testNode, ITaskExecutor task, TraceEventType eventType) in c:\TeamCity\buildAgent\work\1ace6ed01d0a43bb\TechTalk.SpecRun.Framework.Executor\TestAssemblyExecutor.cs:line 215