PowerShellAssemblyLoadContextInitializer.SetPowerShellAssemblyLoadContext Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Create a singleton of PowerShellAssemblyLoadContext. Then register to the Resolving event of the load context that loads this assembly.
public:
static void SetPowerShellAssemblyLoadContext(System::String ^ basePaths);
public:
static void SetPowerShellAssemblyLoadContext(Platform::String ^ basePaths);
static void SetPowerShellAssemblyLoadContext(std::wstring const & basePaths);
public static void SetPowerShellAssemblyLoadContext (string basePaths);
static member SetPowerShellAssemblyLoadContext : string -> unit
Public Shared Sub SetPowerShellAssemblyLoadContext (basePaths As String)
Parameters
- basePaths
- String
Base directory paths that are separated by semicolon ';'. They will be the default paths to probe assemblies.
Remarks
This method is to be used by native host whose TPA list doesn't include PS assemblies, such as the in-box Nano powershell, the PS remote WinRM plugin, in-box Nano DSC and in-box Nano SCOM agent.