I've been working on getting NHibernate to build and test under .NET 2.0, since I want to play with in in C# Express 2005 (So I can savor the rare occassion that I can get a free application from Microsoft). I thought I'd share really quick what I've done so far.
I'm using Tortoise CVS to sync the source for NHibernate. I don't know what others use, my only complaint so far is that it adds context menu items in the shell, so it's a little intrusive when I'm not working on source control-related tasks. I had some issues tracking down the connection string in the wiki, the one I used was ":pserver:anonymous@cvs.sourceforge.net:/cvsroot/nhibernate"
Once I got the Hibernate files down I tried to open the solution in C# Express Edition, but the NHibernate-2.0.sln file wasn't recognized. This might be because the Express Edition can't open a solution from the retail version of Visual Studio, but I think it's more likely that this was just an old solution from a beta version of .NET 2.0. I opened and converted the 1.1 solutions and it worked just fine, and built with no errors, although there were some warnings that it was using depricated interfaces.
I had a few questions at this point:
- Should there be JIRA work items corresponding to these warnings when building under 2.0?
- Is there any interest in converting portions on the NAnt build to use MSBuild? So instead of calling the NAnt build files for the various projects it would call MSBuild on the .csproj files for each project. That way there wouldn't be two build mechanisms to keep in sync.
I installed NUnit 2.2.0 and SqlExpress 2005 to run the tests, and after building the project using C# Express I tried to open the NHibernate.Test.nunit file in the NUnit Gui and got the following error:
"System.BadImageFormatException : The format of the file 'TestAssembly' is invalid"
It turns out that it's a .NET version issue, and the recommendation at this website
http://dotnet.org.za/armand/archive/2004/06/08/2054.aspx fixed the problem. Once the project loaded I needed good connection string to SqlExpress, in my case it was "Data Source=.\SQLEXPRESS;AttachDbFilename='C:\Documents and Settings\Michael Christiansen\My Documents\Visual Studio 2005\Projects\NHibernate\Test\nhibernate.mdf';Integrated Security=True;Connect Timeout=30;User Instance=True", where I had already created the .mdf file via C# Express. I used the Sql2000 drivers to connect to SqlExpress 2005. I ran the tests in NHibernate.Test.dll and all but one passed.
Questions
- Do you want test errors in a 2.0 environment in JIRA, or is it too early?
- I have issues where the NUnit GUI crashes every so often during tests. Is this possibly my configuration, or is the NUnit GUI sometimes unstable like that?
Hopefully this is helpful to someone.
- Mike[/url]