LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.NET DLL Problems After Compiling to EXE [LabView 2016]

Hello,

 

I am developing an application that makes use of a .NET DLL (well, multiple, but it's the same for all of them) I wrote myself to communicate with / read from some measurement devices.

On the development machine in the LabView development environment, everything works fine.

However, after compliation into an executable (which I plan to run on a different machine), it does not work anymore.

This is still on the development machine, just in exe form.

I made sure to change all DLL paths to lead to AppEnv\data and confirmed the DLLs exist in there.

There is no error message; everything compiles and starts up fine, even with debug mode enabled.

However, when accessing one of the DLL functions, there seems to be no response.

Still no error messages or crashes.

 

From what I've been able to gather so far, it looked like the DLLs when accessed by the exe were unable to properly communicate over our network, but even with firewalls opened etc. there was no change.

 

I have searched for a while, but have been unable to find a solution.

Therefore I would be happy about any and all input, be it ideas or solutions.

 

Thank you for your time.

0 Kudos
Message 1 of 4
(2,181 Views)

Hi 5Argan,

 

As I understand, the network connection is necessary for the DLL  to return valid data. 

Could you please try to create a basic .NET DLL, which for example: adds two values together and then add this DLL to your project and create EXE. If it works then at least we will know that the problem lays indeed in the network connection. If not, then we need to investigate further...

 

Mateusz. 

---
CLA,CTD,CLED
0 Kudos
Message 2 of 4
(2,134 Views)

Hi Mateusz,

 

sorry for responding so late, I was out of town for a bit.

I created a DLL that adds two integers like you said, and it does work flawlessly in the .exe, which supports the theory that the issue does lie within the network connection.

I have an idea of what to try next, but I might not be able to test my idea in the next 1 or 2 days.

In addition, since I do not know if my idea will work, I'd welcome any further suggestions you might have.

 

5argan

0 Kudos
Message 3 of 4
(2,116 Views)

Update:

I created a new LabVIEW-project with only 1 VI, in which I call just the DLL. There it works without any issue (both in the dev environment as well as as an exe).

I'm going to investigate further. So far my theory is that it somehow has a faulty version of the DLL stored somewhere and copies that when building to exe or someting like that, instead of the correct one it uses during execution.

 

At least now I know if I can't get it to work, I can just fix it by copying most of it into a new project.

0 Kudos
Message 4 of 4
(2,108 Views)