Skip to content

Powershell FxDependent package cannot use New-PSSession #48

Open
@adityapatwardhan

Description

@adityapatwardhan

When using Powershell framework dependent package, the trusted assembly list must be looked up at two locations, under PSHOMEDIR and CORECLRDIR from the c:\Windows\System32\PowerShell\7.0.0-rc.3\RemotePowerShellConfig.txt file.

this->GetTrustedAssemblyList(hostEnvironment.GetCoreCLRDirectoryPath(), assemblyList, listEmpty);
if (listEmpty)
{
// Fall back to attempt to load the CLR from the alternate inbox location
char coreCLRPowerShellExtInstallPath[MAX_PATH];
::ExpandEnvironmentStringsA(coreCLRPowerShellExtInstallDirectory, coreCLRPowerShellExtInstallPath, MAX_PATH);
this->GetTrustedAssemblyList(coreCLRPowerShellExtInstallPath, assemblyList, listEmpty);
}
if (listEmpty)
{
// No CoreCLR assemblies were found in either location. There is no
// point in continuing.
this->output->DisplayMessage(false, g_STARTING_CLR_FAILED, GetLastError());
return EXIT_CODE_INIT_FAILURE;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions