LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to force LV to update .NET references?

Solved!
Go to solution

Hello

 

I have a .NET dll developed by my coleague, which i usually update by just replacing the dll itself in the folder.

 

However whenever i do that, labview either tells me it's references updated (but they don't) or the references break and i have to replace all of them manually.

 

What is the appropriate method to updating the .dll so that LabVIEW would automatically update correctly?

0 Kudos
Message 1 of 5
(1,078 Views)

Is your colleague updating the version number of the DLL with each new release?  It seems that if the version number is the same then LabVIEW assumes everything is the same even if it's a different binary.

 

Even if the version does change, there's a problem LabVIEW has in that it doesn't update certain nodes automatically.  The most common ones I notice it doesn't update are usually anything that is a "Generic", something like a Nullable, List<> or a Dictionary<>. This is because the "fully qualified type name" includes the version of the DLL the type comes from, and LabVIEW doesn't pick that up as a change to be made.

 

My company has a similar situation (.NET developer releases a DLL, we have to use it) so for anything that's a "Generic" we ask for alternate "wrapper" functions to be created with similar inputs/outputs that hide the underlying generics from us, which bypasses the problem.  For instance, when using List<> generics, we ask for an alternate function to be created that uses an Array as the input or output instead.

Message 2 of 5
(1,037 Views)

@Kyle97330 wrote:

Is your colleague updating the version number of the DLL with each new release?  It seems that if the version number is the same then LabVIEW assumes everything is the same even if it's a different binary.

 

Even if the version does change, there's a problem LabVIEW has in that it doesn't update certain nodes automatically.  The most common ones I notice it doesn't update are usually anything that is a "Generic", something like a Nullable, List<> or a Dictionary<>. This is because the "fully qualified type name" includes the version of the DLL the type comes from, and LabVIEW doesn't pick that up as a change to be made.

 

My company has a similar situation (.NET developer releases a DLL, we have to use it) so for anything that's a "Generic" we ask for alternate "wrapper" functions to be created with similar inputs/outputs that hide the underlying generics from us, which bypasses the problem.  For instance, when using List<> generics, we ask for an alternate function to be created that uses an Array as the input or output instead.


He does update the version number and LabVIEW seems to detect that as it displays the message about using "newer" version for the nodes, but for some reason it doesn't actually update it and keeps using the old one (i don't know how, as it was deleted).

When i force it to be updated (closing LabVIEW, first loading dll in another dummy VI and then opening the VI that actually uses the dll) things get broken, even if functions to call and their arguments are the same as before.

0 Kudos
Message 3 of 5
(1,008 Views)
Solution
Accepted by topic author AeroSoul

Wait, are you saying that you tried to update the DLL version with the VI that uses it open?

 

You need to close LabVIEW, then change the DLL, then open it again.  Once it loads a version in memory, it's there until LabVIEW closes.

 

Something else to be careful of is where you keep your .LVPROJ project files.  If you keep your project file in a root directory and there's a DLL of the right name in any subfolder of that root directory, it will often open that one instead.  This is something you might do accidentally if you have a project file, and then do an EXE build into a subfolder of that, and LabVIEW puts a copy of the DLL in the build folder.

Message 4 of 5
(988 Views)

Completely closing LabVIEW helped... kind of annoying you have to do that tho.

0 Kudos
Message 5 of 5
(824 Views)