私は2つのプロジェクトを持っています(問題です)
DataAccessLayer
Tests
Fluent nHibernate を使用し、SQLite データベースをセットアップしています。
プロジェクトで (を使用して)を参照System.Data.SQLiteしましたが、プロジェクトで構成を実行すると、nHibernate は SQLite プロバイダー アセンブリを見つけることができません。DataAccessLayerCopyLocal = trueTests
これで、SQLite 参照をTestsプロジェクトに追加しましたが、問題なく実行されます。
DataAccessLayerしかし、データ アクセス レイヤー (使用するデータベース) がある場所であるため、アセンブリ参照をプロジェクトに残しておきたいと思います。
Testsプロジェクトからの SQLite アセンブリ参照がプロジェクトに表示されないのはなぜDataAccessLayerですか?
DataAccessLayerプロジェクトで参照されTestsます。
編集- app.config の接続文字列
<connectionStrings>
<add name="SQLiteLocal" connectionString="Data Source=SQLite.db;" providerName="System.Data.SQLite" />
</connectionStrings>
編集- 例外
----> NHibernate.HibernateException : Could not create the driver from
NHibernate.Driver.SQLite20Driver, NHibernate, Version=3.3.1.4000,
Culture=neutral, PublicKeyToken=aa95f207798dfdb4.
----> System.Reflection.TargetInvocationException : Exception has been thrown
by the target of an invocation.
----> System.ArgumentException : Unable to find the requested .Net Framework
Data Provider. It may not be installed.