Could not load file or assembly Basler.Pylon.dll
Every time I open a C# Solution for editing containing "using Basler.Pylon;" I get: C:\Program Files\Basler\pylon 6\Development\Assemblies\Basler.Pylon\x64\Basler.Pylon.dll Could not load file or assembly 'file:///C:\Program Files\Basler\pylon 6\Development\Assemblies\Basler.Pylon\x64\Basler.Pylon.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format.
The DLL is exactly in that directory. I think this may be related to set Active Solution platform CPU to "any". but this seems to be the only available option.
I believe this could be related to this Build Warning:
Severity Code Description Project Path File Line Source Suppression State Warning There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "Basler.Pylon, Version=184.108.40.206, Culture=neutral, PublicKeyToken=e389355f398382ab, processorArchitecture=x86", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. WpfAppDistortion101 Build
Any advise what needs to be changed?