-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Building and Testing NHibernate under .NET 2.0
PostPosted: Sun Dec 11, 2005 9:07 pm 
Newbie

Joined: Sun Dec 11, 2005 7:48 pm
Posts: 1
Location: United States
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]


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 12, 2005 8:58 am 
Contributor
Contributor

Joined: Thu May 12, 2005 9:45 am
Posts: 593
Location: nhibernate.org
I use TortoiseCVS and really like its integration in the shell. Note that you can configure it to put them only in specific directories...

.NET 2.0 integration is new and should improve with the time.
The errors you get from the CVS might be work-in-progress. But if you think it is really a bug related to .NET 2.0, then feel free to create a JIRA issue for that.

And about NUnit, you may ask your question on their forum...

_________________
Pierre Henri Kuaté.
Get NHibernate in Action Now!


Top
 Profile  
 
 Post subject: Where to download an NHibernate-2.0 assembly?
PostPosted: Tue May 16, 2006 1:02 pm 
Newbie

Joined: Thu May 04, 2006 4:23 am
Posts: 16
Location: Germany
Hi,

it would be helpful if there was an out-of-the-box NHibernate-2.0 assembly for download (compiled and tested in .NET 2.0).

Ideally the NHibernate-2.0 assembly would have a strong name (with the Attribute: Processorarchitecture="MSIL") so that it could be put right into the GlobalAssemblyCache and be selected as a reference to a ".NET-Assembly" (the ones in the GAC) in Visual Studio 2005 Express.

The NHibernate-2.0 assembly needs not support all features of .NET 2.0 now.
It's more important that it makes no problems to use and is stable in production.
Later on more things, newly introduced in .NET 2.0 (like generic containers and other classes) could be incorporated.


Thanks to all developers,
Michael


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 16, 2006 1:54 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
You can just use the released version (built for .NET 1.1), it will work on .NET 2 without problems.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.