NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Testsand AssemblyLoadContext and WPF

Solved!
Go to solution

Hello,

 

We are migrating our code from TS2019 to 2025 and .net4.8 to .net8

 

From what I noticed teststand is using 'TSExecutionAssemblyLoadContext' for all code that user executes in sequence.

We call some WPF forms and those require isCollectible flag to be set to false in order to work properly.

Is there a way to modify this flag for TSExecutionAssemblyLoadContext??

 

Alternative would be to load all wpf code dynamically like a plugin approach in another context? This will lead to cross context issues when i need to pass some class to my wpf UI in sequence logic?

0 Kudos
Message 1 of 3
(105 Views)
Solution
Accepted by topic author pawhan11

In the newer version of TestStand where you can use .NET 8, there is a new option to load modules in a context where isCollectible is false. Recommend to use it.

 

To use the option, do the following:

  • In the step settings pane of .NET adapter, click 'Advanced Settings'.
  • Uncheck the checkbox which mentions 'Allow unload of the assemblies specified in the step'.

 

Shashidhar_0-1756876928868.png

 

-Shashidhar

0 Kudos
Message 2 of 3
(75 Views)

Thx, this allowed us to solve the issue!

0 Kudos
Message 3 of 3
(62 Views)