Design Engineer

I am having issues with canlibCLSNET working correctly on windows 10. I’m using it with some C# code, and it runs fine on a couple windows 7 PC’s, and one windows 8 PC (all which are 64 bit). When I comment out the can bus code the application runs, so I have narrowed it down to this. I have installed the Kvaser drivers on the target windows 10 PC, and I added the Kvaser SDK for good measure. The canlib32.dll dependency is included in the C# application as well. I am using the canlibCLSNET that was located in the 4.0 framework folder. What happens is that the application immediately stops working the instant I try to run it. Any ideas what could be happening?

  • 4 answers
  • 396 views
  • 1 year ago by ewarnick

4 Answers

Hi!

I can see that your case has been handled via the [email protected]

If I understand correct, you needed to download the .NET 4.5 framework and install it.
Windows said that it was already installed, but after that, however, the Leaf Light works.

//Lars-Göran Fredriksson, FAE

  • July 10, 2018 11:10 am | by Lars-Göran Fredriksson

Ho again

(Your question was a bit modified but I present the anwser here anyway)

You need to check the following:
1. Do not build the sample project in the default install directory. Copy the project directory to another location before attempting to build. Depending on your PC setup, Visual Studio can silently fail during the build process because the OS is not allowing files in the \Program Files (x86)\ subdirectories to be overwritten without administrator rights.

2. Have you placed the linlib.dll in your application run directory? Make sure to use the correct version based on your project's target (x86 vs x64). You will find the dll in the CANlib SDK install directory:
x86
\Program Files (x86)\Kvaser\Canlib\Bin\

x64
\Program Files (x86)\Kvaser\Canlib\bin_x64\

3. Make sure your project target setting is x86 or x64. Do not leave the project target set to ANY CPU.

4. Remove the linlibCLSNET.dll reference from the project and then add the reference back. This will allow you to specify the path based on your new sample project location. Be sure to add the correct version based on the project's target and framework version. You will find these in the following CANlib SDK installation directory:
x86 Framework 4.0 or greater:
\Program Files (x86)\Kvaser\Canlib\dotnet\win32\fw40\

x64 Framework 4.0 or greater:
\Program Files (x86)\Kvaser\Canlib\dotnet\x64\fw40\

5. Make sure you have the C++ runtime for x86 and x64 installed. This runtime is only automatically installed if you have the Visual Studio C++ tools installed. If you only installed the VB or C# tools, you will need to install these runtimes.

Please let me know if checking these items does not lead to a solution.

Best regards,

Troy
--
Kvaser Support
[email protected]

  • May 17, 2018 11:29 am | by larsgoranfredriksson

Has there been a resolution for this?

  • May 16, 2018 3:38 pm | by aambriz

Hi, please send a message to [email protected] (att LGF) with a brief description, and I will let our developers have a look at it.

We need more information from you (parts of your code etc) and I assume that you want to keep that private (this is a public area), so it is better we do it in the "support forum".

When we have found out why you have this problem, then we can update this section but only with "anonymous" information.

Lars-Göran Fredriksson
FAE

  • May 17, 2018 9:08 am | by Lars-Göran Fredriksson

Hi!

If you still have porblems with this issue, please contact [email protected] (att: LGF) and we will help you as soon as possible.

We need some more information from you before we can reproduce this problem.

  • May 16, 2018 3:09 pm | by Lars-Göran Fredriksson

Your email address will not be published. Required fields are marked *

Your Answer