I am using .NET framwework 4.8 to make a C# class library using the Peak Basic API.
I was until yesterday running the version 4.9.0.942 without issue.
Then I have noticed in the Nugget package that 4.10.0.964 was available with a new parameter PCAN_DEVICE_GUID, which sound very interesting, hence I have decided to update to the latest version. Quite a bad idea to try that right before Christmas vacation !

After the update, my code is not working anymore. I am not originally a C# programmer, so maybe I have missed something very basic.
I have two projects in my solution a "Class Library (.NET Framework)" which is my main code, and a "Console App (.NET Framework)" which is for testing my class library.
I have also downloaded from Peak website the latest PCAN-Basic with "Download Latest Version".
Therefore, for the update I have:
- Updated the Peak Nuget package to 4.10.0.964 for both projects
- Copied in each project's folder the file "\PCAN-Basic\Include\PCANBasic.cs".
- Copied the file "\PCAN-Basic\x64\PCANBasic.dll" into the folder "C:\Windows\SysWOW64"
- Copied the file "\PCAN-Basic\x86\PCANBasic.dll" into the folder "C:\Windows\System32"
And when I try to do "myWorker.Start()", I get following error:
System.BadImageFormatException: 'An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)'
Error: The type initializer for 'Peak.Can.Basic.Api' threw an exception.
StackTrace: at Peak.Can.Basic.Api.SetValue(PcanChannel channel, PcanParameter parameter, UInt32 buffer)
at J8k3ueSJrCOMJAl558X.eWVAVDSUPe5JhLFLlvB.vdKSB42xLx(Boolean )
at J8k3ueSJrCOMJAl558X.eWVAVDSUPe5JhLFLlvB.SetBitrateAdapting(Boolean value)
at J8k3ueSJrCOMJAl558X.eWVAVDSUPe5JhLFLlvB.ytnSwZS38P(Boolean )
at Peak.Can.Basic.Worker.Start(Boolean ignoreBitrateCheck, Boolean deactivateReading, Boolean deactivateBroadcasting)
at PcanDll.PCANManager.ConnectWorker(PcanChannel canChannel, Object baudrate, Boolean canFd, String& errorDescription) in D:\Documents\02-Csharp\PcanDll_FrameWork_4_8\PcanDll\PcanDll\PcanDll.cs:line 145
But everything was fine before I had performed the update.
Anyone would have an idea?