Unhandled Exception-Method not found: ..LiteRepository.Insert... at ...FSharp.Extensions.LiteRepository.insertItem...
See original GitHub issueContinuing with my first steps, I find that I still need to include some module.
I get the following error addressed from the following line: LiteRepository.insertItem eorder
Unhandled Exception: System.MissingMethodException: Method not found: 'Void LiteDB.LiteRepository.Insert(System.__Canon, System.String)'.
at LiteDB.FSharp.Extensions.LiteRepository.insertItem[a](a item, LiteRepository lr)
at Program.main(String[] argv) in /app/appbook/Program.fs:line 248
let eorder = { Id = 1; Items = [item1;item2]; OrderNumRange = "" }
let queryedEOrder =
db
|> LiteRepository.insertItem eorder
|> LiteRepository.query<EOrder>
|> LiteQueryable.first
match queryedEOrder.Items with
| [item1;item2] ->
match item1,item2 with
| :? IBarcode,:? IColor ->
pass()
| _ -> fail()
| _ -> fail()
printfn "Hello World from F#!"
0 // return an integer exit code
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Why am I getting a MissingMethodException when calling ...
I've found that sometimes i have to "trick" PS by passing an expression to a method rather than a PS variable.
Read more >f# - Missing method exception while InvokeMember
I'm creating a COM component in F#. The component is expected to be used from scripting. The component code:
Read more >Type Extensions - F# | Microsoft Learn
Learn how F# type extensions allow you to add new members to a previously defined object type.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Confirmed & Thanks! Removing
<PackageReference Include="LiteDB" Version="4.1.4" />fromapp.fsprojanddotnet restore && dotnet runprint passed! on the screen:Thanks
Found it, you are using incompatible versions of
LiteDBandLiteDB.FSharp:The fix is to remove
<PackageReference Include="LiteDB" Version="4.1.4" />from your package references and rundotnet restore && dotnet runbecause the right version will be pulled in a dependency ofLiteDB.FSharp, so your project file will look something like:Can you please confirm the fix when you remove the
LiteDBpackage reference and rundotnet restore && dotnet run, I will close the issue for now, please re-open if the problem persists.