Showing results for 
Search instead for 
Did you mean: 

VI with .NET runs in Dev environment, builds, but doesn't work in runtime

I'm using the Watlow F4T drivers to control a thermal chamber. Watlow provides LabVIEW drivers and at their heart is a .NET .dll. My application runs just fine in the development environment. I created a build spec and it builds just fine. I can run the .exe in simulate mode (bypasses the Watlow drivers) with no problem. When I run the .exe with the Watlow drivers, the .exe crashes with an unknown exception. It's clearly related to the Watlow drivers (runs fine in sim mode). 


In the build spec, I put the .dll in the "Always Included" category. Are there other caveats with .NET when building executables? 


LV2016, 32 bit

0 Kudos
Message 1 of 12

The driver i downloaded is not .dll based.


But I'm using LV2012. Not sure about LV2015/2016. Maybe they are different.



0 Kudos
Message 2 of 12

I downloaded the latest driver for a look-see. I don't have LabVIEW access at the moment but I can see that the package does not contain a custom .NET dll in the zip. If there are .NET calls  as you say then can you indicate what assembly they are statically linked to?

0 Kudos
Message 3 of 12

Try placing the dll in the .exe folder.


G# - Award winning reference based OOP for LV, for free! ADDQ VIPM Now on GitHub
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
Message 4 of 12

Is the driver joezhang downloaded the driver we are talking about, or did you download a different one?

NI Technical Support Engineer
0 Kudos
Message 5 of 12

Did you try using this method to enable .NET 4.0 not on your LabVIEW.exe, but creating a "Whatever.exe.config" for your build executable?

0 Kudos
Message 6 of 12

Attached is the driver I am using.

0 Kudos
Message 7 of 12

I'm using LV2016, so it uses CLR 4.0 and thus up to .NET 4.5. I'm not able to tell if the Watlow drivers point to an earlier .NET version. The link does say that assemblies pointing to earlier versions may not work with CLR 4.0. 

0 Kudos
Message 8 of 12

I'm having the same issue.  I can run the driver just fine in the labview environment but when I build the application, it crashed.


I tried to move their dll to the exe but that didn't help.


Was this issue resolved?  If so, could you provide a quick overview of the solution?

0 Kudos
Message 9 of 12

I ran out of time trying to figure it out so I switched to Modbus. I plan to revisit soon but can't say when. 

0 Kudos
Message 10 of 12