Visual Studio Hangs When Using NationalInstruments.TestStand.Interop.API

Updated Jul 4, 2018

Reported In

Software

  • TestStand

Programming Language

  • C# .NET

Issue Details

I am trying to use the NationalInstruments.TestStand.Interop.API (.NET interop assemblies for the TestStand API) to generate sequence files. I am able to correctly generate sequence files but there appears to be an issue using Visual Studio after a finalize routine is called. Visual Studio seems to hang only when I have created a new engine.

Solution

TestStand Engine needs to be launched in its own AppDomain to properly load and unload the unmanaged code that the TestStand engine is based on. You must not define a destructor because unloading AppDomains and releasing unmanaged code references does not work in a .NET destructor.

WAS THIS ARTICLE HELPFUL?

Not Helpful