Unit tests fail with Visual Studio 2012

Unit tests fail with Visual Studio 2012

Old forum URL: forums.lhotka.net/forums/t/11575.aspx

Holger posted on Wednesday, September 12, 2012

After upgrading our development environment to VS2012, we have different unit tests which are not working anymore. They are all throwing an "SerializationException: Type is not resolved for member".

Csla.DataPortalException: DataPortal.Fetch fehlgeschlagen (Configuration system failed to initialize) ---> System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize ---> System.Runtime.Serialization.SerializationException: Type is not resolved for member 'Manor.Business.Security.ManorPrincipal,Manor.Business, Version=, Culture=neutral, PublicKeyToken=2cf1045ba16b8991'.

The tests use a custom principal class derived from CslaPrincipal. The principal login procedure is called under "TestInitialize". The same coding works with VS2010.

Does anyone have an idea?

public void MyTestInitialize()

public void ShouldTestSomething()
 //Call to factory method of Csla ReadOnly List here

JonnyBee replied on Wednesday, September 12, 2012

Start by reading this recent thread: http://forums.lhotka.net/forums/p/11545/53518.aspx

Holger replied on Thursday, September 13, 2012

Thank you, it is working now.

The unit tests work with System.Security.Principal.GenericPrincipal instance in Csla.ApplicationContext.User.

Copyright (c) Marimer LLC