LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.NET DLL Upgrade issue

Hi everyone,

 

I use LabVIEW 2016 and I am dealing with a DLL problem. I use some .NET DLLs and Invoke Nodes to interface with IDS Industrial cameras. I would like to update the .NET DLLs to a newer version but as soon as I replace the older ones with the new ones, all VIs are broken. I can go to each VI and replace the Invoke Nodes and reselect the new DLL. However, that would be a lot of work since this is a big project. I use no constructor, since there is none available that I can use. I am pretty sure it must be a way to better handle this situation without having to change everything manually but I failed finding a solution for that online and also on this forum. 

 

Both DLLs, old an new, have the same name. I tried deleting the Object Cache, closing the project, replacing the DLLs, loading the project and performing a mass compile. Unfortunately that did not help. 

 

Is there any way to do that in a less painful way?

 

Thanks in advance. 

0 Kudos
Message 1 of 6
(359 Views)

I have seen that I can select each Invoke Node, Right-Click and Relink Invoke Node. But I still have to do that on each Invoke Node one by one... 

0 Kudos
Message 2 of 6
(328 Views)

Is your code in a project?

I have replaced .net libraries in the past with new versions.  When I loaded my VIs, I got a warning that the version number of the dll had changed and I was prompted to approve the update.

0 Kudos
Message 3 of 6
(303 Views)

I have a case, where I get this message while loading the project, nevertheless, things are not updated automatically.

 

I see the requirement to relink certain revoke nodes AND to replace refnum constants with new versions(though this might be due to a strange programming style)

 

0 Kudos
Message 4 of 6
(66 Views)

If any of the inputs or the output of a .NET call is a "Generic", then you have to do this.

 

The reason is that LabVIEW uses .NET in a way that it identifies types using their "full name", sometimes known as the "fully qualified type name". 

 

And for a "Generic", this changes whenever the DLL it comes from updates its version.  A "List" generic of type String might look like this:

System.Collections.Generic.List`1[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]

 

Because it has that "Version=4.0.0.0" bit in the middle, it means that a version change means that LabVIEW sees it as a type change, even if the data is exactly the same as before.  And LabVIEW makes you "re-pick" all the nodes that use one of those, or re-create constants or terminals.

 

In most cases this is just something you have to deal with on each version update.  If you have access to the developers and they're willing to make your life easier, you can ask them to switch some of the generics to use other options (i.e. change the List to an Array) but in many cases that's not an option.

Message 5 of 6
(46 Views)

@Kyle97330 wrote:

If any of the inputs or the output of a .NET call is a "Generic", then you have to do this.

 

The reason is that LabVIEW uses .NET in a way that it identifies types using their "full name", sometimes known as the "fully qualified type name". 

 

And for a "Generic", this changes whenever the DLL it comes from updates its version.  A "List" generic of type String might look like this:

System.Collections.Generic.List`1[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]

 


Thanks for clarifying! I can deal with that, now Ithat I know the reason for this behavior!

0 Kudos
Message 6 of 6
(21 Views)