1

I would like to convert one of the unit test projects to use a json format of the project file. Unit tests are using NHibernate and SQLite to execute. Project.json file looks like this,

{
  "version": "1.0.0-*",
  "compilationOptions": {
    "emitEntryPoint": true
  },

  "dependencies": {
    "System.Data.SQLite.Core": "1.0.99",
    "NUnit": "3.2.0",
    "NUnitLite": "3.2.0",
    "NSubstitute": "1.9.2"
  },

  "runtimes": {
    "win": { },
    "win-anycpu": {
      "#import": [ "win" ]
    }
  },

  "commands": {
    "test": "Infrastructure.Test"
  },

  "frameworks": {
    "dnx451": {
      "dependencies": {
        "Domain": "1.0.0-*",
        "Infrastructure": "1.0.0-*"
      }
    }
  },

  "exclude": [
  ],
  "publishExclude": [
    "**.user",
    "**.vspscc"
  ],
  "scripts": {
    "prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ]
  }
}

The problem is when I try to run this, I am getting exception saying Unable to load DLL 'SQLite.Interop.dll': I figure this is because there are 2 different x86 and x64 binaries of the above file shipped with the package and they are located in the build folder.

How do I get this working? Full source can be found here

Cœur
  • 37,241
  • 25
  • 195
  • 267
Low Flying Pelican
  • 5,974
  • 1
  • 32
  • 43

1 Answers1

0

run this in Package Manager Console

PM> Update-Package -reinstall System.Data.SQLite.Core

for detail see this link

Community
  • 1
  • 1
rashfmnb
  • 9,959
  • 4
  • 33
  • 44
  • Package is already added... issue is SQLite.Interop.dll is located in build folder instead of lib folder of the package.. and with above configuration it does not seems to copy the correct dll file to the folder where actual execution happens – Low Flying Pelican Mar 29 '16 at 22:45
  • for detail see this link http://stackoverflow.com/questions/13028069/unable-to-load-dll-sqlite-interop-dll – rashfmnb Mar 30 '16 at 11:44
  • above link is related to .csproj files, and the problem is when I use a project.json file instead of using a .csproj project file – Low Flying Pelican Mar 30 '16 at 11:54
  • did you manage to solve the problem while using project.json file? – Nishith Sep 06 '17 at 06:22