JamesMc86 / G-CLI

A proxy mechanism allow LabVIEW programs to easily write out to the command line.
BSD 2-Clause "Simplified" License
71 stars 19 forks source link

Unhandled exception when running g-cli or labview-cli #131

Closed peterfoers closed 1 year ago

peterfoers commented 1 year ago

Please note, that I've posted this question on the NI forum before: here

I installed g-cli in a vm and when running any commands I get an error. It doesn't make a difference if I try to run a vi or just run the command without anything. I'm using Version 2.4.0.5

The error I see is:

Unhandled Exception: System.TypeInitializationException: The type initializer for 'G_CLI.LvVersions' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at G_CLI.LvVersions._ScanRegistry(RegistryView regView)
   at G_CLI.LvVersions.Scan()
   at G_CLI.LvVersions..cctor()
   --- End of inner exception stack trace ---
   at G_CLI.LvVersions.get_CurrentVersion()
   at G_CLI.Program.Main(String[] args)

Previously, I had labview-cli installed, which gave me the same result. Installation went without errors both times. I'm running on Win10 x64 with LabVIEW 2022 x86

What might be causing this?

JamesMc86 commented 1 year ago

This is a known issue due to the LabVIEW name change, see https://github.com/JamesMc86/G-CLI/issues/128

Best thing is to use the 3.0 beta from the releases page and I need to get that on VIPM!

peterfoers commented 1 year ago

Thanks for the quick reply! It works now.