2017-09-12 15 views
0

명령 줄에서 테스트를 실행할 때 아래 오류가 나타납니다. 필자의 테스트 환경에서는 re-sharper를 사용합니다. VS2015에서 실행하면 모든 테스트가 통과됩니다. 그러나 nunit framework을 사용하여 명령 줄에서 실행하면 구성 설정이 실패합니다. 내 현재 프로젝트는 .NET 4.6.2입니다.Nhibernate Nunit Framework 예외

SetUp : System.TypeInitializationException : The type initializer for 'NHibernate.Cfg.Configuration' threw an exception. 
     System.TypeInitializationException : The type initializer for 'NHibernate.LoggerProvider' threw an exception. 
     System.ApplicationException : Unable to instantiate: NHibernate.Log4NetLoggerFactory 
     System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation. 
     System.TypeInitializationException : The type initializer for 'NHibernate.Log4NetLoggerFactory' threw an exception. 
     System.NullReferenceException : Object reference not set to an instance of an object. 
     at NHibernate.Cfg.Configuration.Reset() in C:\Projects\nhibernate-core\src\NHibernate\Cfg\Configuration.cs:line 177 

Nhibernate 2.0에서 Nhibernate 4.0으로 업그레이드 할 때이 문제가 발생했습니다. Nhibernate 버전 2.0 DLL을 사용하여 테스트를 실행할 수 있습니다.

답변

0

최신 nunit.framework.dll에서 테스트를 실행하기 위해 테스트 프레임 워크 빌드 파일을 업데이트했습니다. (테스트 프로젝트에 대한 참조가 아님).