mercredi 2 septembre 2015

Deploying ASP.NET MVC app with SQLite to Azure Web Site

I have an ASP.NET MVC 5 application that uses SQLite. I installed the System.Data.SQLite.Core nuget package.

On my local system, I get a few *sqlite*.dll in my .\bin folder, and in a x86 and x64 subdirectory, I have SQLite.Interop.dll for 32- and 64-bit systems. Locally, this works just fine - I'm running on Win7 x64 and thus the x64 interop DLL gets loaded and used.

When I deploy this app to Azure Web Sites, however, neither of the two subdirectories is present on Azure, and neither of the SQLite.interop.dll has been included into the .\bin folder on the target Azure Web Site - and thus my app crashes with an exception

DllNotFoundException: Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

OK - so what's happening here? Why doesn't the Publish function from VS 2015 "get it" and include the appropriate SQLite.Interop.dll into the deployment? Can I somehow instruct VS to do so?? If so: how??

Aucun commentaire:

Enregistrer un commentaire