LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Thoric

Conditional Disable Structure to recognise .NET installations

Status: New

If I build an executable that incorporates any kind of .NET, such as the Simplicity AI PDF Toolkit, it obviously requires.NET on the target computer to work. If .NET is absent, the VI will load as a broken VI and an awful error message is displayed to the operator, typically along the lines of:

 

networkRuntimeError.JPG

 

It would be great if we could place all our .NET code inside a Conditional Disable structure that accepts something like ".NET == True" as a parameter, thus allowing .NET code to run on a machine with .NET installed, but not resulting in a broken VI should it be absent. This would also give developers the opportunity to place something useful into the other case, such as a popup message stating ".NET is required for PDF generation." for example, or even some other replacement code if they so wish.

 

Therefore I would like to see the list of Conditional Disable structure pre-defined symbols include a new one for "Windows .NET"

Thoric (CLA, CLED, CTD and LabVIEW Champion)


3 Comments
Mr.Mike
NI Employee (retired)

That error message should definitely a bug (a "CAR" at NI).  A) It's incorrect, and B) it's repeated over and over.  There's an existing CAR (98245) open on it, but that CAR only mentions the error message once.  I added a link to this from the CAR.

 

As for the conditional disable for .NET, I think that's a good idea.

-- Mike
GregR
Active Participant

Is it really sufficient to trigger off the existence of the .NET framework or is this about the existence of a specific .NET assembly? Just because I have the framework doesn't mean I have the "Simplicity AI PDF Toolkit".

Thoric
Trusted Enthusiast

GregR - I was specifically thinking about the .NET Framework, not a particular assembly.

 

My intention would be to install the .NET dependencies with the application, so in my example I could be confident that the Simplicity AI PDF Toolkit would be present in ./data folder. But if the .NET Framework doesn't exist on the target PC then there's no way to detect this at application launch and react appropriately, LabVIEW simply shows the front panel as a broken VI and displays a horrible error dialogue.

 

With a lot of installers, the .NET Framework installer is built into the main installer and will install .NET if it's not detected on the PC (such as the Windows Office installer). With effort, this can be achieved with a script that follows the LabVIEW app installation, but it's not graceful.

Thoric (CLA, CLED, CTD and LabVIEW Champion)