Get error during build. Could not load file or assembly 'System.Data.SQLite' or one of its dependencies.

StackOverflow https://stackoverflow.com/questions/17984180

  •  04-06-2022
  •  | 
  •  

Question

I have build error after I move my classes to Class Project. I know this is caused by Elmah but I not sure what's wrong.

Could not load file or assembly 'System.Data.SQLite' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Normally this error occur in IIS if configured the wrong platform. But now I can't even build the website. FYI, I have set the Build Platform to x86.

Was it helpful?

Solution

I found out the cause. I referenced it in my new Class Project but removed it in the Website project. After I added the "System.Data.SQLite" reference in both Class Project & website project. It works !

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top