I Can't Access My New Methods in My .NET DLL

Updated May 3, 2018

Reported In

Software

  • LabVIEW
  • LabWindows/CVI

Issue Details

I've created a C# .NET dll and whenever I update it by adding new functions or changing parameters, I am unable to select the new updated method from within LabVIEW. LabVIEW keeps calling the older version instead.

Solution

LabVIEW's .NET Constructor Nodes will continue to point to your original assembly.  To have the Constructor Node point to the new assembly, we need to make sure that the .NET Runtime is not seeing the old assembly.  

To load a new version of an existing .NET assembly:
  1. Close your Project (or quit LabVIEW if you aren't using a project) that contains the VI you were using to load the .NET assembly
  2. Move the original .dll so that the .NET Runtime is not able to find it
  3. Create a new VI; place a Constructor Node and point it to the updated .dll
  4. Close this new VI without saving
  5. Open your original VI and point it to the new .dll 

Additional Information

It's also possible to create a copy of the .dll you currently have within your Project Directory and adjust it's name to indicate a new version, then point your Constructor Node at this.  This functionally does the same thing as the steps above, but will also crowd you Project Directory with multiple versions of the .dll.