12-11-2012 05:40 PM
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?
Solved! Go to Solution.
12-11-2012 06:12 PM
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,
01-02-2013 02:27 PM
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