C# application selects X32 driver instead of X64

13/09/2019 by Kvaser

The canlib32.dll used by your application comes in 32 bit and 64 bit. The appropriate version is placed in the Windows\system32 and the Windows SysWow64 subdirectories by the driver installation. So, the 32 in the dll name does not indicate 32 bit.

If you are getting an exception thrown, you could be running into one of the following:

  1. Missing the proper Framework version for the application target.
  2. The Visual Studio x64 C++ runtime is not installed.  The canlibCLSNET.dlls are built using C++. So, you need the x64 bit version of the C++ runtime redistributable for the 64 bit canlibCLSNET.dll.