2011-10-01 4 views
1

NHibernate와 SQLite를 사용하여 SharpDevelop에서 작동하는 데 문제가 있습니다. Visual Studio 2010에서 .NET 4.0에 대한 정확한 문제가있는 사람들을 보았습니다. 그러나 .NET 3.5에서 일하고 있으며 이전에 이런 문제가 없었습니다.NHibernate + SQLite는 .NET 3.5에서 발생합니다.

나는 몇 가지 단위 테스트를하고 있어요 때마다 나는 다음과 같은 예외가 발생 NHibernate에를 통해 DB에 연결을하려고 해요 : 나는 대부분의 특정와의 마지막 줄 생각

SetUp : StructureMap.StructureMapException : StructureMap Exception Code: 207 
Internal exception while creating Instance '55c9fa8e-fa79-4698-8d06-7e305e73ac49' of PluginType SimplEconomics.Data.NHibernate.UnitOfWork.INHibernateUnitOfWork. Check the inner exception for more details. 
     ----> FluentNHibernate.Cfg.FluentConfigurationException : An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail. 


    ----> NHibernate.HibernateException : Could not create the driver from NHibernate.Driver.SQLite20Driver, NHibernate, Version=2.1.2.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4. 
    ----> System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation. 
    ----> NHibernate.HibernateException : The IDbCommand and IDbConnection implementation in the assembly System.Data.SQLite could not be found. Ensure that the assembly System.Data.SQLite is located in the application directory or in the Global Assembly Cache. If the assembly is in the GAC, use <qualifyAssembly/> element in the application configuration file to specify the full name of the assembly. - d:\Builds\FluentNH\src\FluentNHibernate\Cfg\FluentConfiguration.cs:93 

을 이상한 것은 내가 처음에 .NET 4.0 (최신 버전의 Sharpdevelop, 4 사용)에서 프로젝트를 만들었고 최신 SQLite 릴리스에서 약간의 문제가 있다는 것을 이해할 수 있었지만 .NET 3.5에서는이 문제가 발생했습니다. 전에 사용 했어.

누구든지 아이디어가 있습니까? 여기 BTW 내 사양의

:

  • SharpDevelop 3.2.1
  • .NET 4.0이 설치 2.1.2.4000
  • SQLite는 1.0.74.0
  • NHibernate에, 3.5
  • 윈도우 비스타 (있는 경우 그 문제)

이것은 나를 완전히 미치게한다. ..

편집 : 내가 성공하지 않고 다음과 같은 솔루션을 시도 것을 추가해야합니다 : A similar stackoverflow-thread

+0

SQLite DLL은/bin 디렉토리 (웹 인 경우) 또는 .exe 어셈블리와 같은 폴더에 있습니까? 또한 언제든지 워크 스테이션이 64 비트 OS에 있습니까? 나는 SQLite가 32 비트 및 64 비트 OS에 대해 다른 버전을 가지고 있다고 믿는다. – LordHits

+0

그것은 실제로 그것이었습니다. 이상하게도 테스트 프로젝트에서 SQLite에 대한 참조를 추가하지 않아도됩니다. 그러나 참조를 추가하고 그것을 항상 bin 디렉토리에 복사했는지 확인한 후에 참조가 작동했습니다. – Maffelu

+0

솔직히 말해서이 게시물을 답으로 변환하는 방법을 모르거나 도움이되는대로 댓글에 +1하는 방법을 모르겠습니다 ... – Maffelu

답변

1

이 SQLite는 DLL이 당신의/bin 디렉토리에 복사되어 있는지 확인합니다. 또한 SQLite는 Windows OS에 의존하지 않으며 32 비트 및 64 비트 버전을 모두 사용할 수 있으며 사용중인 OS에서 적절한 버전을 사용할 수 있습니다. SQLite home.

관련 문제