To avoid those warnings, you need to add an ApplicationMgr.ExitApplication event handler such as the following one I copied from the simple C# UI example:
private void axApplicationMgr_ExitApplication(object sender, System.EventArgs e)
{
GC.Collect(); // force .net garbage collection to ensure ensure all TestStand objects are freed before the TestStand engine unloads
GC.WaitForPendingFinalizers();
}
The reason this is needed is that when an ActiveX control sends an event via a .net interop assembly, any ActiveX interface parameters are wrapped in .net classes even if the event is not used by the client .net application. Although the .net wrapper is not used once the event completes, it is not finalized until it is garbage collected. Thus, it keeps a reference to the ActiveX object it wraps, which in this case is an Execution. When the engine shuts down, it tries to warn you if any TestStand objects have not been released on the assumption that this indicates a bug in your application. However, the engine has no way to determine that an ActiveX object has yet to be released only because an unreferenced .net wrapper has yet to be finalized. While some people like to categorize a call to GC.Collect as a bad practice, we have not found a detectable drawback to using it in this way to smooth the interaction with ActiveX APIs. When destruction order matters, there is really no other work around since you can't call Dispose on those objects that never reach your source code.
I recommend starting with the simple C# UI example and removing what you don't need (like the call to Close in the ExitApplication handler) instead starting from scratch.