question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to load LiteDB.dll using Powershell 5.1 on Windows 10

See original GitHub issue

I cloned the repository. I opened the solution in Visual Studio 2017 Community. I built the solution. Using Powershell, one is able to load assemblies (most of the time).

When loading:

Set-Location -Path “C:\code\LiteDB-3.1.0\LiteDB-3.1.0\LiteDB\bin\Release\netstandard” Try {get-childitem"*.dll" | foreach { Write-host $.Name; $assembly = Add-type -path $.FullName}} catch { $error[0].Exception.LoaderExceptions}

I get this error:

Could not load file or assembly 'System.IO.FileSystem.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. Could not load file or assembly 'System.IO.FileSystem.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
wgrosscommented, Apr 16, 2017

@lboening @mbdavid I think the reason of this is the global declaration of dependencies in the project.json. net461 doesn’t need them and more importantly doesn’t provide these assemblies and therefore loading fails.

I’ve change the project.json (see pull request) and its working now with powershell on my machine.

0reactions
lboeningcommented, Feb 12, 2018

I think I should close this. The LiteDB project targets .net 4.0. Meanwhile, I am to grab the Litedb.dll, add it as an assembly, and work with it that way.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Powershell and .NET5.0 fails loading the assembly
This occurs because .NETCore 5 isn't supported by Windows Powershell 5.1 - only on versions 6 and above. For Powershell 5.1 or below,...
Read more >
Using a LiteDB portable database with your PowerShell ...
First you need to download the package from NuGet, then extract it. Grab the LiteDB.dll file from ..\lib\net45 folder and add it to...
Read more >
How to resolve issues when loading DLLs in PowerShell?
This post describes a few different things that can (and will) go wrong when you're trying to load DLLs in PowerShell, and a...
Read more >
Using LiteDB in PowerShell 7
LiteDB is a .NET native NoSQL embedded database. Built-in .NET, LiteDB is easily accessible to PowerShell and works wonderfully as a local ...
Read more >
Unable to install Powershell update on Server 2012 R2
I have been trying to install Powershell 5.1 in Windows Server 2012 R2 and it fails. I even tried the standalone installer KB3191564...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found