Showing posts with label MonoDevelop. Show all posts
Showing posts with label MonoDevelop. Show all posts

Friday, December 3, 2010

Unix transport error when unit testing NHibernate for Postgresql under Mono

If you happen to encounter the following error while doing unit testing for NHibernate for Postgresql under Mono...

Internal error
        RemotingException: Unix transport error.

...Change your Npgsql version to a Mono one, then that error won't happen.

That error will appear on unit testing if you are using MS .NET version of Npgsql (example: http://pgfoundry.org/frs/download.php/2868/Npgsql2.0.11-bin-ms.net4.0.zip) under Mono. When unit testing under Mono, you must use Mono version of Npgsql (example: http://pgfoundry.org/frs/download.php/2860/Npgsql2.0.11-bin-mono2.0.zip)

Weird problem, the error only appear when the code is run under Unit Testing(built-in in MonoDevelop). But when run independently, MS .NET version of Npgsql will run just fine under Mono. Anyway, to make matters simple, use Mono version of the component if you are building Mono stuff





Saturday, October 23, 2010

Troubleshooting NHibernate on MonoDevelop

If you received this kind of error when you run your MonoDevelop NHibernate program even though you already add the necessary dialect in your app.config file ...

Unhandled Exception: NHibernate.MappingException: Could not compile the mapping document: AwesomeNHibernate.RecordCompanyDatabase.hbm.xml ---> System.InvalidOperationException: Could not find the dialect in the configuration

..., just change your app.config's Copy to output directory property from Do not copy to Always copy