mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Summary ---------- When the same script file gets executed in multiple Runspaces, the RuntimeType generated from the powershell class defined in the file will be shared among those Runspaces. For different Runspaces, different SessionState should be used to run the static methods. Fix --- We use the `SessionStateKeeper` to query for the correct `SessionState` to use for a static method call. We already use `SessionStateKeeper` to track the `Runspace/SessionState` where a PowerShell class is defined, and thus we can leverage this for the static method invocation.
Testing
The tests are organized by testing language. Thus Pester tests, which are written in the PowerShell language, are in ./powershell and xUnit tests, written in C#, are in ./csharp. The sanity tests for the Full .NET build of PowerShell are in ./fullclr, and the third-party shebang test is in ./shebang.