NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Developing in NI TestStand and Visual Studio.NET concurrently

Solved!
Go to solution

I have question about NI TestStand and a .dll that I’m developing in C#. I’m trying to figure out how to get TestStand to unload a .dll that I’m calling when a sequence is complete. I’m modifying the .dll in Visual Studio.NET while running TestStand but even when I finish running a sequence, the .dll is still loaded and I can’t recompile the .dll in Visual Studio. I would have to exit TestStand and then I can recompile the .dll. Is there any way around this?

0 Kudos
Message 1 of 3
(3,522 Views)
Solution
Accepted by MSumulong

In TestStand Sequence Editor go to File>>Unload All Modules.  It will release the DLL.

 

Also, you can dynamically do it at the end of your sequence.  Put a Statement step with:

RunState.Engine.UnloadAllModules()

 

That way you don't have to do the manual way every time.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 2 of 3
(3,520 Views)

You can also change the unload setting of your step modules to "Unload after sequence executes" rather than the default of "Unload when sequence file is unloaded". You  also have to make sure you aren't holding onto any .NET references in any global variables or that will keep the appdomain (and thus your dll) from getting unloaded.

 

-Doug

Message 3 of 3
(3,442 Views)