tags:

views:

171

answers:

2

I haven't made too many changes to my project which uses NHibernate, however now all unit tests fail for any time I use hql. I get the error "Could not load file or assembly 'Antlr3.Runtime, Version=3.1.0.39271, Culture=neutral, PublicKeyToken=3a9cab8f8d22bfb7' or one of its dependencies."

I am still referencing the Antlr3.Runtime dll that is in the required bins directory for NHibernate version 2.1 and the properties show the correct version. Copy Local is set to True.

I can't figure out what I may have accidentally changed. Any ideas?

A: 

Is the assembly 'really' copied locally ? Have you verified that ? If not, open your project-file using notepad or something like that, and verify if there's a 'private' node in the 'Reference' element for Antl3.Runtime, and make sure that it is set to 'true'.

http://stackoverflow.com/questions/546962/targetting-different-frameworks-using-msbuild-gives-problems-with-dependencies

Frederik Gheysels
I see it copied locally.
CountCet
A: 

Great advice on using Fusion Log. I had never even heard of it before.

I used this article from Scott Hanselman for a quick "How To" http://www.hanselman.com/blog/CommentView.aspx?guid=3654c8f3-c5c3-4dee-a01f-c9a8da3ef2fa

Fusion Log showed an error loading a version of the NHibernate.dll (The wrong version) which did now show up in Visual Studio.

Thanks!

CountCet