LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot build my application after updating an assembly version number.

Hi NG,

I have a strange build issue with LabVIEW 8.5 that I could not get solved:

I have a LabVIEW App. that uses a strong named assembly that I wrote.
After I made an update to the Assembly version number (2 entries in GAC),
LabVIEW tells me that there is a new version of the assembly and the references have been updated automatically.
However, when I save the changes I get another warning telling that the assembly location has changed from [vi path]\<gac>\[assembly name] to <gac>\[assembly] and this warning appears every time I save changes to the vi.
Despite I can run the app successfully out of LabVIEW (Prof.) I cannot build an executable because
the dependency checker warns about the same issue  (file not found...).

I tried several situations of updating the ref (with old assembly installed and not installed) but everything fails.

How can I build an application after a reference assembly was updated?

Thanks for your help!

Best Regards,

Sebastian Dau [MCPD]
0 Kudos
Message 1 of 17
(4,338 Views)

I'm not sure if this will help, but try pressing ctrl+shift+run arrow on the top level VI.

This will do a force compile and should hopefully make LV reload the assembly. If this works right, the code should be broken and you will need to reselect the relevant constructors\methods and hopefully after you save you will be able to build.


___________________
Try to take over the world!
0 Kudos
Message 2 of 17
(4,329 Views)
Hi & thanks for the quick response.

I'd tried that earlier and it did not solve the issue.

When I rebuild the vi, all those warnings popup and building continous to fail.

Any further advice?

Thanks in advance,

Sebastian Dau
0 Kudos
Message 3 of 17
(4,329 Views)

hi there

delete the constructor node (just reselect/rebrowse the assembly sometimes seems not to relink) and recreate it. maybe you have to select the methods/properties again by hand.

 

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 4 of 17
(4,327 Views)
Hi,

i know this behaviour from older versions but LV 8.5 claims to be fine on that items.

On the other hand, I even have control vis that encapsulate the .NET refernces in trict type defs.
Such controls don't have constructor nodes and also fail to find the corresponding assemblies.

Thanks for your post.

Sebastian
0 Kudos
Message 5 of 17
(4,324 Views)

Perhaps this has to do with the fact that your assembly is registered in the GAC. Would it work if you place the DLL in the application folder?

How do the .NET languages deal with strongly named assemblies which change versions?


___________________
Try to take over the world!
0 Kudos
Message 6 of 17
(4,317 Views)

that's because the references controls also have to be relinked. the names of the objects are still the same, but they are registered with a new ID. you have to reselect them also.

 

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 7 of 17
(4,318 Views)
Maybe it helps to put the warning message (on each file save) into this thread:

c:\LabVIEW 8.5\instr.lib\czFramework Driver\cz_Unit\RefNum AbstractSpectrometer.ctl
    - The .NET assembly expected to be at "e:\LabVIEW 8.5\instr.lib\czFramework Driver\cz_Unit\RefNum AbstractSpectrometer.ctl\<GAC>\CZFramework" was loaded from "<GAC>\CZFramework".


Error on each build:

Error copying files.
Source: e:\LabVIEW 8.5\instr.lib\czFramework Driver\cz_Unit\RefNum AbstractSpectrometer.ctl\<GAC>\CZFramework
Destination: E:\LabVIEW 8.5\instr.lib\czFramework Driver\builds\Untitled Project 2\My Application\data\data\CZFramework

Any advice on how to get around the build issue?

Thanks, Sebastian

0 Kudos
Message 8 of 17
(4,316 Views)
Hi

updating the refs manuelle does not work either.
It seems like once lv detected the update it struggles with the paths.
0 Kudos
Message 9 of 17
(4,312 Views)
Hello J. Mondry,

could you post the project and the two assembly versions so that I could reproduce the issus her on my system.

Best Regards

Benjamin
0 Kudos
Message 10 of 17
(4,220 Views)