Import-Module fails
MaxFalcone opened this issue · comments
MaxFalcone commented
Description
When I'm trying to import pslitedb module it fails with error
Import-Module : Could not load file or assembly 'LiteDB, Version=5.0.9.0, Culture=neutral, PublicKeyToken=4ee40123013c9
f27' or one of its dependencies. The system cannot find the file specified.
At line:1 char:1
+ Import-Module pslitedb
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Import-Module], FileNotFoundException
+ FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.ImportModuleCommand
Steps to reproduce
Install-Module PSLiteDB
orInstall-Module PSLiteDB -Scope AllUsers
Import-Module PSLiteDB
- Error.
System info
Windows 10 or Windows Server 2019
Powershell 5
PSLiteDB 2.2.0
MaxFalcone commented
Kiran Reddy commented
Thank you for reporting this.
Seems to be happening only with powershell 5 and not with powershell 7. I am guessing something changed with .net, anyway need to investigate this a little more.
Tyler Miranda commented
Tyler Miranda commented
Thanks @v2kiran , this seems to be fixed in Windows Powershell 5.1 with version 2.3.0 of the module.
Kiran Reddy commented
@tylermiranda - welcome... forgot to mention that it was fixed in new version :) ...
install-module pslitedb -force