Unity3D + NHibernate, crash loading "Unity 3.5 .net full Base Class Libraries" -


i'm trying marry unity3d , nhibernate. after lot of magic works in editor, crashes in windows standalone .exe.

main data-access libs have:

mysql.data.dll i18n.dll i18n.west.dll system.data.dll (2.0.5, unity) nhibernate.dll (3.4.0) 

the crash upon win app startup is:

typeloadexception: not load type 'system.data.common.dbproviderfactories' assembly 'nhibernate'.   @ nhibernate.driver.mysqldatadriver..ctor () [0x00000] in d:\downloads\nh\nhibernate-3.4.0.ga-src\src\nhibernate\driver\mysqldatadriver.cs:27   .........  omitted system.reflection chain .......     @ nhibernate.connection.connectionprovider.configuredriver (idictionary`2 settings) [0x00020] in d:\downloads\nh\nhibernate-3.4.0.ga-src\src\nhibernate\connection\connectionprovider.cs:107  rethrow hibernateexception: not create driver nhibernate.driver.mysqldatadriver, nhibernate, version=3.4.0.0, culture=neutral, publickeytoken=null.   @ nhibernate.connection.connectionprovider.configuredriver (idictionary`2 settings) [0x00052] in d:\downloads\nh\nhibernate-3.4.0.ga-src\src\nhibernate\connection\connectionprovider.cs:113     @ nhibernate.connection.connectionprovider.configure (idictionary`2 settings) [0x0004f] in d:\downloads\nh\nhibernate-3.4.0.ga-src\src\nhibernate\connection\connectionprovider.cs:64     @ nhibernate.connection.connectionproviderfactory.newconnectionprovider (idictionary`2 settings) [0x000bd] in d:\downloads\nh\nhibernate-3.4.0.ga-src\src\nhibernate\connection\connectionproviderfactory.cs:50  

since cannot load system.data.common.dbproviderfactories, think can't system.data. @ same time system.data 100% loaded clearly, because there's authentication code works db directly, w/o involving nhibernate.

can because nhibernate built system.data .net framework visual studio profiles, while unity project uses 2.0.5 version?

i've tried build nhibernate system.data "unity 3.5 .net full base class libraries". it's built successfully, unity crashes when put system.data.dll plugins:

invalidprogramexception: invalid il code in system.data.common.dbconnectionstringbuilder:remove (string): il_0000: ret     

it's strange, isn't unity supposed read libs c:\program files (x86)\reference assemblies\microsoft\framework.netframework\v3.5\profile\unity full v3.5\system.data.dll?

at same time, can't build nhibernate c:\program files (x86)\unity\editor\data\mono\lib\mono\unity\system.data.dll. default loads v2.0.0 gac. when try explicitly write 2.0.5 version in .csproj, fails:

warning 2   primary reference "system.data, version=2.0.5.0, culture=neutral, publickeytoken=b77a5c561934e089 processorarchitecture=x86" not resolved because has indirect dependency on .net framework assembly "system.transactions, version=2.0.5.0, culture=neutral, publickeytoken=b77a5c561934e089" has higher version "2.0.5.0" version "2.0.0.0" in current target framework.   nhibernate 

i'm desperate - how should build nhibernate , libs use make working in unity?

hope, has answer. in advance! yura

well, after week of periodical trying made working:

  1. build nhibernate .net 3.5 (not "unity profile", regular 3.5)
  2. put 3.5 system.data.dll gac "plugins" folder in unity

that's it.

i'm still wondering why unity cannot accept libs ""unity 3.5 .net full base class libraries" .net profile, @ least doesn't block me anymore.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -