sskodje / ScreenRecorderLib

A .NET library for screen recording in Windows, using native Microsoft Media Foundation for realtime encoding to h264 video or PNG images.
MIT License
408 stars 93 forks source link

question: how to resolve You need to specify platform (x86, Win32 or x64). #246

Closed PavanMudigondaTR closed 1 year ago

PavanMudigondaTR commented 1 year ago

Hi, I am trying to use ScreenRecorderLib in Selenium C# and I am getting this error and I am not sure how to resolve it.

Error:

D:\Users\xxxxxxxx.nuget\packages\screenrecorderlib\5.2.0\build\ScreenRecorderLib.targets(6,5): error : ScreenRecorderLib does not work correctly on 'AnyCPU' platform. You need to specify platform (x86, Win32 or x64). [D:\xxxxxxx\VOTestAutomation\VOTestAutomation.csproj]

sskodje commented 1 year ago

The error is because c++ does not supported "Any CPU" compile platform, like c# does. You have to chose either x86 or x64 to compile your project against in configuration manager.

PavanMudigondaTR commented 1 year ago

thanks it works now with x86