Thanks for your help. I will do what you suggest. On Monday, September 23, 2013 8:06:31 AM UTC-5, Oskar Berggren wrote:
> NH 1.2 is extremely old. > Many use NH 3.x (compiled for .Net 3.5) running on the .Net 4 runtime. > > Suggested method of proceeding: > 1) Upgrade to NH 3.3.3-SP1. > 2) Compile/fix/test etc. so you have that working. There might be breaking > changes in NH - read the release notes and test. > 3) When you have that working, then you can try moving to .Net 4. > > If you need to move the project to the latest .Net platform, it seems like > a waste of time to try to figure if/how an ancient version of NH can run on > it. > > /Oskar > > > > > > 2013/9/20 cor <[email protected] <javascript:>> > >> I am new to NHiberate. I searched on this topic but could not seem to >> find an answer. >> >> Basically I have an existing .NET C# web application which is using >> NHibernate.dll version 1.2.0.3002. I am using Visual Studio 2010. If I >> use framework 3.5, the web applications retrieives the data from the >> database and no errors. But I need to convert this web app to framework >> 4.0. If I do that and then run the app. I get an error on a query using >> NHibernate. The attached file gives the error message. >> >> The Lines of code: >> IQuery query = NHibernateSession.CreateQuery("from >> Borrower where RUSBorrowerId = :RUSBorrowerId"); >> query.SetString("RUSBorrowerId", borrowerId); >> log.Error("Debug-before-List<Borrower> list = new >> List<Borrower>(query.List<Borrower>())"); >> List<Borrower> list = new >> List<Borrower>(query.List<Borrower>()); // the line where it errors out >> >> Does NHibernate 1.2.0.3002 work with .NET Framework 4.0? Or do I need to >> upgrade to a newer version of NHIbernate? If so, what version? Or do I >> need to just make some code changes to get it to work? >> >> What versions of NHIbernate work with the different versions of .NET >> Framework? >> >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "nhusers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected]<javascript:> >> . >> Visit this group at http://groups.google.com/group/nhusers. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/nhusers. For more options, visit https://groups.google.com/groups/opt_out.
