title: PowerShell 5.1 & PowerShell 7 same script, different outcomes
body: <p>I am trying to run this script:</p>
  <pre><code>$dll = Add-Type -Path \\machineX\Folder\\AL.Scripting.dll
  New-Object AL.Scripting.BsmScriptObject
  </code></pre>
  <p>When running on PS 5.1 everything runs fine, but when ran on PW 7 I get:</p>
  <pre><code>System.AggregateException: One or more errors occurred. 
  (Error importing Scripting Object DLL.Exception calling &quot;.ctor&quot; with &quot;0&quot; argument(s):
   &quot;Method not found: 'Void System.AppDomainSetup.set_ApplicationBase(System.String)'.&quot;)
  </code></pre>
  <p>I am trying to make this PW command result accessible through .NET Core API, but it seems it's to be impossible, because .NET Core solutions can use only PowerShell 6.0-7.0 versions. Maybe is there any workarounds?</p>