core mail
core mail

Reputation: 1

I want to encrypt my Localdatabase and my application involves xamarin.forms,xamarin.mac,and a classlibrary. I am using package sqlite-net-sqlcipher

STRUCTURE:
I am using xamarin.forms and Cocoa app(xamarin.mac) in integration with it.

My xamarin.forms deals with all the UI, and the Cocoa app(xamarin.mac) does interaction with all the mac API's.

I have a seperate class library that handles all the database parts. All of these projects build successfully when I build them individually.

The moment I set my xamarin.mac project as my start up and run the application, it throws the following error at the line new SQLiteAsyncConnection(connectionstring)

ERROR: System.DLLNotFoundException: e_sqlcipher assembly:<unknown assembly> type:<unknown type> member:(null)

This error comes in my classlibrary(This is added as reference in the xamarin.mac).

NOTE: There is no code involved in the xamarin.forms or xamain.mac that would need the package sqlite-net-sqlcipher to be installed in them. So I have downloaded that package only in the classlibrary.

Show less

I have tried this
My application serves for different platforms for windows i use wpf , for macOS, I use xamarin.max with xamarin.forms. But classlibrary is common for both which handles the database code(localdatabase).

There is also wpf application that deals with windows. The Wpf takes the role of xamarin.forms and xamarin.mac in windows ie it displays the ui and interacts with the windows api's.

The class library(this is same for both mac and windows) with the package sqlite-net-sqlcipher.

This is my setup for windows when i build wpf project and class library individually they build good with out any error

. The moment i set wpf as my startup project it threw the error
Error in windows
Message = "Unable to load DLL 'e_sqlcipher': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"

so what i have done is added the e_sqlcipher.dll in the bin folder of wpf project. It worked fine

But for mac i have done the same i have added the e_sqlcipher.dll file manully in bin it didnt work out.
Again i have modified my .csproj file and this time i have automated the adding of e_sqlcipher.dll into bin. still it didnt workout.

It throws the error
ERROR: System.DLLNotFoundException: e_sqlcipher assembly:<unknown assembly> type:<unknown type> member:(null)

**Error in Windows:
Message = "Unable to load DLL 'e_sqlcipher': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"

- resolved by adding e_sqlcipher.dll to bin i.e added made it available in final output

Error in Mac:
ERROR: System.DLLNotFoundException: e_sqlcipher assembly:<unknown assembly> type:<unknown type> member:(null)**

- not being resolved even after adding the e_sqlcipher.dll to final output folder(bin)
Help me

Upvotes: 0

Views: 52

Answers (0)

Related Questions