-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
area-sdk-docsArea - SDK docsArea - SDK docsissue-doc-bugIssue - error in documentationIssue - error in documentation
Description
Prerequisites
- Write a descriptive title.
- Search the existing issues.
- I am reporting the documentation problem for version of PowerShell I am using.
Version
7.2
Link to affected document
Description of the documentation error
- AlcModuleAssemblyLoadContext does not handle if the file to load is not in the path. In this case it should return null and not LoadFromAssemblyPath. In my test, this was triggering an error about System.Runtime not being found.
- AlcModuleResolveEventHandler OnRemove signature is incorrect and is missing the PSModuleInfo argument. See https://docs.microsoft.com/en-us/dotnet/api/system.management.automation.imoduleassemblycleanup.onremove?view=powershellsdk-7.0.0#System_Management_Automation_IModuleAssemblyCleanup_OnRemove_System_Management_Automation_PSModuleInfo_
Suggested fix
Add the following for #1
if (!File.Exists(assemblyPath))
return null;Change the line with OnRemove to:
public void OnRemove(PSModuleInfo psModuleInfo)Metadata
Metadata
Assignees
Labels
area-sdk-docsArea - SDK docsArea - SDK docsissue-doc-bugIssue - error in documentationIssue - error in documentation