5

I am porting an app from iOS to Win8 and would like to use NHibernate in the app to store relational data, but whenever I add the NHibernate.dll & lesli.Collections.dll I get the following errors:

Error 2 Cannot find type System.ApplicationException in module mscorlib.dll.

Error 1 Cannot resolve Assembly or Windows Metadata file 'System.Data.dll'

If someone could point me in the direction of possible solution that would be great, I've been unable to find one as of yet

CStreel
  • 2,642
  • 2
  • 19
  • 37
  • are you trying to use NHibernate in a winrt app? – Dirk Trilsbeek Oct 17 '12 at 07:22
  • Yes, I would like to target WinRT. But the main goal is that this becomes a Store App. From testing different templates, it seem Windows Store Apps have a portion of the .NET Framework removed. In this case I think NHibernate relies on System.Data (Which has been removed from the Windows Store .NET Framework) to connect to a Database, so if you know of another library that can connect to a SQLite DB I would be very grateful – CStreel Oct 17 '12 at 11:26
  • 1
    see here, someone already seems to have a solution: http://stackoverflow.com/questions/10905084/can-i-use-entity-framework-or-linq-to-sql-with-windows-8-metro-style-apps – Dirk Trilsbeek Oct 17 '12 at 13:19
  • +1 for using NHibernate in a Metro. – Nick Ryan Oct 17 '12 at 15:49
  • Cheers for that Dirk, if you post that as an answer I will accept it – CStreel Oct 17 '12 at 21:47

1 Answers1

4

It seems System.Data is not available for Windows Store applications. http://visualstudiomagazine.com/blogs/data-driver/2012/09/data-devs-local-access-windows-store.aspx NHibernate relies heavily on System.Data.

Oskar Berggren
  • 5,583
  • 1
  • 19
  • 36