LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to write the build specification version in the lvlibp version number?

I would like to build a lvlibp from a lvlib and set the build specification version number to the lvlibp version number with a pre-build action.

 

I tried two solutions in the pre-build action without success:

1- Read the version number of the build specification and set the version number of the lvlib by property node,

2- Read the version number of the build specification and write the version number in the xml file of the lvlib,

 

For each solution, the lvilb seems to be in memory as soon as the build is launched and the version is not taken into account. The version of the lvlibp is not overwritten by the build specification version number.

I don't have any error and in the 2nd solution, if I check the version number of the lvlib after the build, it's equal to the build specification version number.

 

Have you got a solution?

 

0 Kudos
Message 1 of 3
(3,209 Views)

Hi DMous,

 

Here you will find the explanations of what you are seeing :

In building executables, allow Pre-Build Action to modify Version Information before Version Informa...

 

Regards,

 

Valentin
Certified LabVIEW Architect
Certified TestStand Architect
Certified LabWindowsCVI Developer
National Instruments France

0 Kudos
Message 2 of 3
(3,167 Views)

Yes, I discovered that the Pre-Build Action "grabs" the Version number first, then lets you modify it in the Project, then continues with the Build using the original Version number.  I did complain, and NI basically said "That's the way we do it".  Grrr ...

 

My "Workaround" is to Code LabVIEW Once, Build Twice (a very bad paraphrase from carpentery).  During the first Build, the Pre-Build Action will update the Build Number in the Project.  Immediately do another Build, during which time the Pre-Build Action will use the updated Build Number.

 

Does this seem as silly to you as it does to me?  If so, go to my Idea Exchange post (LabVIEW Idea Exchange) and make a comment or vote for this idea, 

 

Bob Schor

0 Kudos
Message 3 of 3
(3,149 Views)