LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.net assembly build error

Hi everyone,

 

I use LabView 2010 with the NI Vision package for various image processing tasks. I wanted to generate a .net assembly, but stumbled upon an error building it.

 

The image shows the VI I wanted to export for test purposes.

 

Unbenannt.png

 

 

 

 

 

 

 

 

 

 

However, when I want to build the assembly, I get an error:

 

 

Error 1172 occurred at Error calling method NationalInstruments.LabVIEW.VIParser.VIParser.SetVIInformation, (System.Reflection.TargetInvocationException: Ein Aufrufziel hat einen Ausnahmefehler verursacht.
Inner Exception: System.IndexOutOfRangeException: Der Index war außerhalb des Arraybereichs.)

Possible reason(s):

LabVIEW: A .NET exception occurred in an external assembly. For information about correcting this error, copy the following exception (in bold), and search the Microsoft Developer Network (MSDN) Web site or the Web for a possible explanation.
System.IndexOutOfRangeException in AB_Engine_InteropAssembly_ProtoDefined.vi->AB_InteropAssembly.lvclass:Build.vi->AB_Engine_Build.vi->AB_Build_Invoke.vi->AB_Build_Invoke.vi.ProxyCaller

 

I would much appreciate any help in finding the source of this error. When I build the assembly as a shared library, no problems arise.

 

Thanks in advance,

George

 

 

 

Message 1 of 8
(4,301 Views)

I had a similar error and the reason was a broken build specification. Try to create a new build specification for the interop assembly . Modifying the existing build spec was not succesfull.

Maybe it's a LV2010 bug.

 

Hope it helps

Christian

0 Kudos
Message 2 of 8
(4,197 Views)

Similar problems with multiple TKs

 

Working with R&D, the GPS TK, NI Audio TK and SM TK encounter the simillar issues.  We suspect it is an installer issue related to this report.

 

Essentially, you may predict this behavior will exist for TKs that install with the "For latest" option.  That is, you can automatically install support for

8.5

8.6

Latest

 

Current workaround is to build .NET interops or DLLs that require these toolkits with LabVIEW 8.6.1

 

R&D? can you add to this summary?


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 8
(4,182 Views)

Edit

 

CAR 221903


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 8
(4,175 Views)

Along these lines I'm pretty sure I got this error, because I had deleted one of the VI outputs that was (of course) still referenced in the function prototype.

 

Error 1172 occurred at Invoke Node System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
    Inner Exception: System.NullReferenceException: Object reference not set to an instance of an object.

Possible reason(s):

LabVIEW:  A .NET exception occurred in an external assembly. For information about correcting this error, copy the following exception (in bold),
and search the Microsoft Developer Network (MSDN) Web site or the Web for a possible explanation.
System.NullReferenceException in AB_InteropAssembly.lvclass:Build.vi->AB_Engine_Build.vi->AB_Build_Invoke.vi->AB_Build_Invoke.vi.ProxyCaller

 

Message 5 of 8
(3,324 Views)

Yes, I got this error when I deleted (in my case) a VI input. You then have to remove the VI from the "Exported VIs" list in the assembly properties and re-add it to correct the prototype.

0 Kudos
Message 6 of 8
(2,983 Views)

@JonP wrote:

Yes, I got this error when I deleted (in my case) a VI input. You then have to remove the VI from the "Exported VIs" list in the assembly properties and re-add it to correct the prototype.


Jon,  Check the post dates above 😉 


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 8
(2,976 Views)
Jon,  Check the post dates above 😉 

Yes, I saw the dates, but this error is still occurring in LabVIEW 2015 at least - I found this post when I Google'd it - so any information I can add is surely relevant. I'm not sure why people seem to think that it is bad form to reply to an old post, even if it is just to confirm that a suggested fix works.

0 Kudos
Message 8 of 8
(2,966 Views)