Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Powershell FxDependent package cannot use New-PSSession #48

Open
adityapatwardhan opened this issue Feb 25, 2020 · 0 comments
Open

Powershell FxDependent package cannot use New-PSSession #48

adityapatwardhan opened this issue Feb 25, 2020 · 0 comments

Comments

@adityapatwardhan
Copy link
Member

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;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant