Unittests fail after conversion to Silverlight 3

Topics: Prism v2 - Silverlight 3
Jul 20, 2009 at 5:16 PM

Hi,

I converted the prism solution to silverlight 3.  After the conversion a lot of unittests fail and it looks to me like it's always the same problem because the stack trace looks similar.
Please have a look at the following exception:

ViewsCollectionFixture.CanWrapCollectionCollection : FailedTest method Microsoft.Practices.Composite.Presentation.Tests.Regions.ViewsCollectionFixture.CanWrapCollectionCollection threw exception:  System.TypeInitializationException: The type initializer for 'MS.Internal.JoltHelper' threw an exception. --->  System.IO.FileNotFoundException: Could not load file or assembly 'System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
.
at MS.Internal.JoltHelper..cctor()
--- End of inner exception stack trace ---
at MS.Internal.JoltHelper.get_ThreadID()
at MS.Internal.XcpImports.CheckThread()
at System.Windows.DependencyObject..ctor(UInt32 nativeTypeIndex, IntPtr constructDO)
at System.Windows.DependencyObject..ctor()
at Microsoft.Practices.Composite.Presentation.Regions.ItemMetadata..ctor(Object item) in ItemMetadata.cs: line 43
at Microsoft.Practices.Composite.Presentation.Tests.Regions.ViewsCollectionFixture.CanWrapCollectionCollection() in ViewsCollectionFixture.cs: line 39

Do you have an idea what could cause the problem?

 



 

 

Jul 21, 2009 at 12:07 PM

Sir,

  I am also transfer SL 2 to 3, but I hadn't meet such problems. And you only need to care about the different between these 2 versions.

 

Jul 21, 2009 at 2:30 PM

Sorry I did not mention that I usually use the testrunner from resharper 4.5.  
Today I found out that the unittests run fine with the testrunner from the Silverlight Toolkit.