I’m trying to use CB 2.0, DB 21 in a .NET class library project unit test (.NET Framework v4.6.1). The code that I’m using to create a database is the following:
Couchbase.Lite.Support.NetDesktop.Activate();
var db = new Database("database");
But in the first line I’m getting the error Could not find LiteCore.dll! Nothing is going to work!
. What I’m doing wrong?
Steps to reproduce:
- Create a unit test project.
- Create a test method
- Add the above code snippet
- Run test method
My environment:
- macOS 10.13.2
- Rider IDE 2017.3
Looks like you opened an issue about this on the repo. I will make further correspondence through there. FYI I promise I will see it even if you don’t post the same text in three different places
1 Like
Sorry for that! How can I fix this situation? Maybe excluding this post? Thank you for your help!
No problem. It’s not inherently a bad thing, but posting here and on GitHub and on Stack Overflow has the potential to leave one of those avenues unanswered when everything is resolved.
But I put some comments onto the GitHub issue. I’m not familiar with the Rider environment. I’d like to get a bit more detailed information about it (for example, is it using Mono?). Please put that info onto the ticket.
I have solved my issue creating an .Net Core app and migrating all my unit test code to this project.
Also, for testing purposes I have created a project targeting .Net Framework V4.7 (instead of v4.6.1). Then I have installed Couchbase Lite 2.0 in this project and all worked fine too. So this seems to be a bug in .NET 4.6.1 via mono.
Thanks for the help.