Under MSTest in VS2010 two mscorlibs appear in the list, so the
Single() call throws during the static constructor for
NhRelinqQueryParser. This makes NHibernate-based tests fail in MSTest.
The problem is intermittent to some degree - on occasion the
initialisation completes successfully. Test runners other than the
Microsoft one (e.g. Gallio, ReSharper) can successfullly run the
tests.
No extra info to share on this - probably one for Re-Motion to look
into. We've been able to get around it by replacing Single() with
First() in the line shown above.
Cheers,
Nick
Fabian Schmied
unread,
Mar 29, 2011, 5:38:52 AM3/29/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
>
> Between 3.0 and 3.1, Relinq was updated to support medium trust. The
> ExpressionTransformerRegistry.CreateDefault() method now uses:
>
> GetReferencedAssemblies().Where(a => a.Name ==
> "mscorlib").Single()
>
>
> Under MSTest in VS2010 two mscorlibs appear in the list, so the
> Single() call throws during the static constructor for
> NhRelinqQueryParser. This makes NHibernate-based tests fail in MSTest.
>
> The problem is intermittent to some degree - on occasion the
> initialisation completes successfully. Test runners other than the
> Microsoft one (e.g. Gallio, ReSharper) can successfullly run the
> tests.
>
> No extra info to share on this - probably one for Re-Motion to look
> into. We've been able to get around it by replacing Single() with
> First() in the line shown above.