You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unable to import module - YamlDotNet already loaded #810
Make sure you are able to repro it on the latest version
Search the existing issues.
Steps to reproduce
Import a module that depends on YamlDotNet
Import Microsoft.PowerShell.PlatyPS
Expected behavior
Module Import successfully.
Actual behavior
PS> Import-Module Microsoft.PowerShell.PlatyPSImport-Module: Could not load file or assembly 'YamlDotNet, Version=15.0.0.0, Culture=neutral, PublicKeyToken=ec19458f3c15af5e'. Assembly with same name is already loaded
Error details
Environment data
PSVersion 7.5.2
PSEdition Core
GitCommitId 7.5.2
OS Microsoft Windows 10.0.22631
Platform Win32NT
PSCompatibleVersions {1.0,2.0,3.0,4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Version
1.0.1
Visuals
We have a module that has a dependency on YamlDotNet v16. When we import Microsoft.PowerShell.PlatyPS before importing our module to be able to to Get-Module <module-name> for New-MarkdownCommandHelp, we get and error that YamlDotNet is already in use.
If we first import our module, and then import Microsoft.PowerShell.PlatyPS, we get the error specified above.
Activity
marais-vzc commentedon Sep 1, 2025
🙈 I missed #579 . Once that is fixed, it will also fix this issue.