Unhandled exception trapped in the Silverlight Client. System.IO.FileNotFoundException

Nov 16, 2012 at 9:04 AM

Hi,

We use Statlight to execute our silverlight tests on our TFS server. Recently it stopped working and we can not figure out why. Another project on the same TFS server can still successfully use Statlight to execute their tests.

I can reproduce the error locally and the dump below comes from my local machine.

Anyone that have any ideas?

Thanks!

Fredrik


StatLight - Version 1.6.4375Copyright (C) 2009-2011 Jason JarrettAll Rights Reserved.
****************** Input options as configured ******************ContinuousIntegrationMode          : FalseDllPaths                           : IEnumerable<string>                                     {                                     }ForceBrowserStart                  : FalseIsRequestingDebug                  : TrueMethodsToTest                      : IEnumerable<string>                                     {                                     }MicrosoftTestingFrameworkVersion   : NumberOfBrowserHosts               : 1OutputForTeamCity                  : FalseQueryString                        : ReportOutputFileType               : MSGenericTestReportOutputPath                   : C:\Temp\TestResults\Umc.VigiLyze.Web.Test.Silverlight.result.xmlSettingsOverride                   : System.Collections.Generic.Dictionary`2[System.String,System.String]StartWebServerOnly                 : FalseTagFilters                         : UnitTestProviderType               : UndefinedUseRemoteTestPage                  : FalseWebBrowserType                     : SelfHostedWindowGeometry                     : StatLight.Core.Configuration.WindowGeometryXapPaths                           : IEnumerable<string>                                     {                                       'C:\TFSProjects\VigiLyze\Main\Umc.VigiLyze.Web\Web\ClientBin\Umc.VigiLyze.Web.Test.Silverlight.xap'                                     }*****************************************************************Starting configuration for: C:\TFSProjects\VigiLyze\Main\Umc.VigiLyze.Web\Web\ClientBin\Umc.VigiLyze.Web.Test.Silverlight.xapXapItems.FilesContainedWithinXap = AppManifest.xamlXapItems.FilesContainedWithinXap = Castle.Core-Silverlight.dllXapItems.FilesContainedWithinXap = Castle.DynamicProxy-Silverlight.dllXapItems.FilesContainedWithinXap = GalaSoft.MvvmLight.SL4.dllXapItems.FilesContainedWithinXap = Microsoft.Practices.ServiceLocation.dllXapItems.FilesContainedWithinXap = Microsoft.Practices.Unity.Silverlight.dllXapItems.FilesContainedWithinXap = Microsoft.Silverlight.Testing.dllXapItems.FilesContainedWithinXap = Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dllXapItems.FilesContainedWithinXap = Rhino.Mocks 3.5.Silverlight.dllXapItems.FilesContainedWithinXap = ServiceReferences.ClientConfigXapItems.FilesContainedWithinXap = System.ComponentModel.DataAnnotations.dllXapItems.FilesContainedWithinXap = system.dllXapItems.FilesContainedWithinXap = System.Net.dllXapItems.FilesContainedWithinXap = System.Windows.Browser.dllXapItems.FilesContainedWithinXap = System.Windows.Controls.Data.dllXapItems.FilesContainedWithinXap = System.Windows.Controls.Data.Input.dllXapItems.FilesContainedWithinXap = System.Windows.Controls.DataVisualization.Toolkit.dllXapItems.FilesContainedWithinXap = System.Windows.Controls.dllXapItems.FilesContainedWithinXap = System.Windows.Controls.Input.dllXapItems.FilesContainedWithinXap = System.Windows.Controls.Navigation.dllXapItems.FilesContainedWithinXap = System.Windows.Controls.Toolkit.dllXapItems.FilesContainedWithinXap = System.Windows.Controls.Toolkit.Internals.dllXapItems.FilesContainedWithinXap = System.Windows.Data.dllXapItems.FilesContainedWithinXap = System.Windows.dllXapItems.FilesContainedWithinXap = System.Windows.Interactivity.dllXapItems.FilesContainedWithinXap = System.Xml.dllXapItems.FilesContainedWithinXap = System.Xml.Linq.dllXapItems.FilesContainedWithinXap = System.Xml.Serialization.dllXapItems.FilesContainedWithinXap = Umc.Beacon.General.Model.Silverlight.dllXapItems.FilesContainedWithinXap = Umc.VigiLyze.Web.Silverlight.dllXapItems.FilesContainedWithinXap = Umc.VigiLyze.Web.Silverlight.Infrastructure.dllXapItems.FilesContainedWithinXap = Umc.VigiLyze.Web.Silverlight.Module.dllXapItems.FilesContainedWithinXap = Umc.VigiLyze.Web.Silverlight.Utilities.dllXapItems.FilesContainedWithinXap = Umc.VigiLyze.Web.Test.Silverlight.dllIncoming Microsoft.Silverlight.Testing.dll file's hash = 3DCDF4616E1AE9989BD99D7D3C5FE55044C44206RunnerType = OneTimeConsoleAttempting to open port at http://localhost:8887/testPageUrlWithQueryString = http://localhost:8887/GetHtmlTestPage?IRunner typeof(OnetimeRunner)

Starting Test Run: 2012-11-16 09:56:58
Listening on http://localhost:8887/Loading XapHost file [MSTest2011December]Loading XapHost [C:\StatLight\StatLight.Client.For.MSTest2011December.xap]XapItems.FilesContainedWithinXap = AppManifest.xamlXapItems.FilesContainedWithinXap = Castle.Core-Silverlight.dllXapItems.FilesContainedWithinXap = Castle.DynamicProxy-Silverlight.dllXapItems.FilesContainedWithinXap = GalaSoft.MvvmLight.SL4.dllXapItems.FilesContainedWithinXap = Microsoft.Practices.ServiceLocation.dllXapItems.FilesContainedWithinXap = Microsoft.Practices.Unity.Silverlight.dllXapItems.FilesContainedWithinXap = Microsoft.Silverlight.Testing.dllXapItems.FilesContainedWithinXap = Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dllXapItems.FilesContainedWithinXap = Rhino.Mocks 3.5.Silverlight.dllXapItems.FilesContainedWithinXap = ServiceReferences.ClientConfigXapItems.FilesContainedWithinXap = System.ComponentModel.DataAnnotations.dllXapItems.FilesContainedWithinXap = system.dllXapItems.FilesContainedWithinXap = System.Net.dllXapItems.FilesContainedWithinXap = System.Windows.Browser.dllXapItems.FilesContainedWithinXap = System.Windows.Controls.Data.dllXapItems.FilesContainedWithinXap = System.Windows.Controls.Data.Input.dllXapItems.FilesContainedWithinXap = System.Windows.Controls.DataVisualization.Toolkit.dllXapItems.FilesContainedWithinXap = System.Windows.Controls.dllXapItems.FilesContainedWithinXap = System.Windows.Controls.Input.dllXapItems.FilesContainedWithinXap = System.Windows.Controls.Navigation.dllXapItems.FilesContainedWithinXap = System.Windows.Controls.Toolkit.dllXapItems.FilesContainedWithinXap = System.Windows.Controls.Toolkit.Internals.dllXapItems.FilesContainedWithinXap = System.Windows.Data.dllXapItems.FilesContainedWithinXap = System.Windows.dllXapItems.FilesContainedWithinXap = System.Windows.Interactivity.dllXapItems.FilesContainedWithinXap = System.Xml.dllXapItems.FilesContainedWithinXap = System.Xml.Linq.dllXapItems.FilesContainedWithinXap = System.Xml.Serialization.dllXapItems.FilesContainedWithinXap = Umc.Beacon.General.Model.Silverlight.dllXapItems.FilesContainedWithinXap = Umc.VigiLyze.Web.Silverlight.dllXapItems.FilesContainedWithinXap = Umc.VigiLyze.Web.Silverlight.Infrastructure.dllXapItems.FilesContainedWithinXap = Umc.VigiLyze.Web.Silverlight.Module.dllXapItems.FilesContainedWithinXap = Umc.VigiLyze.Web.Silverlight.Utilities.dllXapItems.FilesContainedWithinXap = Umc.VigiLyze.Web.Test.Silverlight.dllre-writing host xap with the following files    -  already has file AppManifest.xaml    add -  Castle.Core-Silverlight.dll        updated AppManifest - Castle.Core-Silverlight    add -  Castle.DynamicProxy-Silverlight.dll        updated AppManifest - Castle.DynamicProxy-Silverlight    add -  GalaSoft.MvvmLight.SL4.dll        updated AppManifest - GalaSoft.MvvmLight.SL4    add -  Microsoft.Practices.ServiceLocation.dll        updated AppManifest - Microsoft.Practices.ServiceLocation    add -  Microsoft.Practices.Unity.Silverlight.dll        updated AppManifest - Microsoft.Practices.Unity.Silverlight    -  already has file Microsoft.Silverlight.Testing.dll    -  already has file Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll    add -  Rhino.Mocks 3.5.Silverlight.dll        updated AppManifest - Rhino.Mocks 3.5.Silverlight    add -  ServiceReferences.ClientConfig    add -  System.ComponentModel.DataAnnotations.dll        updated AppManifest - System.ComponentModel.DataAnnotations    add -  system.dll        updated AppManifest - system    add -  System.Net.dll        updated AppManifest - System.Net    add -  System.Windows.Browser.dll        updated AppManifest - System.Windows.Browser    add -  System.Windows.Controls.Data.dll        updated AppManifest - System.Windows.Controls.Data    add -  System.Windows.Controls.Data.Input.dll        updated AppManifest - System.Windows.Controls.Data.Input    add -  System.Windows.Controls.DataVisualization.Toolkit.dll        updated AppManifest - System.Windows.Controls.DataVisualization.Toolkit    -  already has file System.Windows.Controls.dll    add -  System.Windows.Controls.Input.dll        updated AppManifest - System.Windows.Controls.Input    add -  System.Windows.Controls.Navigation.dll        updated AppManifest - System.Windows.Controls.Navigation    add -  System.Windows.Controls.Toolkit.dll        updated AppManifest - System.Windows.Controls.Toolkit    add -  System.Windows.Controls.Toolkit.Internals.dll        updated AppManifest - System.Windows.Controls.Toolkit.Internals    add -  System.Windows.Data.dll        updated AppManifest - System.Windows.Data    add -  System.Windows.dll        updated AppManifest - System.Windows    add -  System.Windows.Interactivity.dll        updated AppManifest - System.Windows.Interactivity    add -  System.Xml.dll        updated AppManifest - System.Xml    -  already has file System.Xml.Linq.dll    -  already has file System.Xml.Serialization.dll    add -  Umc.Beacon.General.Model.Silverlight.dll        updated AppManifest - Umc.Beacon.General.Model.Silverlight    add -  Umc.VigiLyze.Web.Silverlight.dll        updated AppManifest - Umc.VigiLyze.Web.Silverlight    add -  Umc.VigiLyze.Web.Silverlight.Infrastructure.dll        updated AppManifest - Umc.VigiLyze.Web.Silverlight.Infrastructure    add -  Umc.VigiLyze.Web.Silverlight.Module.dll        updated AppManifest - Umc.VigiLyze.Web.Silverlight.Module    add -  Umc.VigiLyze.Web.Silverlight.Utilities.dll        updated AppManifest - Umc.VigiLyze.Web.Silverlight.Utilities    add -  Umc.VigiLyze.Web.Test.Silverlight.dll        updated AppManifest - Umc.VigiLyze.Web.Test.SilverlightException Message: System.IO.FileNotFoundException: Could not load file or assembly 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.File name: 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'   at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)   at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)   at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)   at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit)   at System.RuntimeType.GetCustomAttributes(Boolean inherit)   at StatLight.Client.Harness.Hosts.MSTest.UnitTestProviders.DynamicAttributeHelper.GetAllAttributes(MemberInfo method, String attributeName)   at StatLight.Client.Harness.Hosts.MSTest.UnitTestProviders.MSTest.UnitTestFrameworkAssembly.<GetTestClasses>b__0(Type type)   at System.Linq.Enumerable.WhereListIterator`1.MoveNext()   at StatLight.Client.Harness.Hosts.MSTest.UnitTestProviders.DynamicAttributeHelper.GetTestClasses(Assembly assembly, Func`2 filter, Func`2 createType)   at StatLight.Client.Harness.Hosts.MSTest.UnitTestProviders.MSTest.UnitTestFrameworkAssembly.GetTestClasses()   at Microsoft.Silverlight.Testing.UnitTesting.Metadata.UnitTestProviders.GetAssemblyProvider(UnitTestHarness harness, Assembly testAssembly)   at Microsoft.Silverlight.Testing.Harness.UnitTestHarness.PrepareTestAssemblyTasks()   at Microsoft.Silverlight.Testing.Harness.UnitTestHarness.Initialize()   at Microsoft.Silverlight.Testing.Harness.UnitTestHarness.Run()   at Microsoft.Silverlight.Testing.UnitTestSystem.Run(UnitTestSettings settings)   at Microsoft.Silverlight.Testing.UnitTestSystem.<>c__DisplayClass2.<CreateTestPage>b__1()   at Microsoft.Silverlight.Testing.UnitTestSystem.PrepareTestService(UnitTestSettings inputSettings, Action complete)   at Microsoft.Silverlight.Testing.UnitTestSystem.CreateTestPage(UnitTestSettings settings)   at StatLight.Client.Harness.Hosts.MSTest.MSTestRunnerHost.StartRun()   at StatLight.Client.Harness.Hosts.StatLightSystemBase.DisplayTestHarness()   at StatLight.Client.Harness.Hosts.NormalStatLightSystem.OnTestRunConfigurationDownloaded(ClientTestRunConfiguration clientTestRunConfiguration)   at StatLight.Client.Harness.Hosts.StatLightSystemBase.<GoGetTheTestRunConfiguration>b__13(Object sender, OpenReadCompletedEventArgs e)   at System.Net.WebClient.OnOpenReadCompleted(OpenReadCompletedEventArgs e)   at System.Net.WebClient.OpenReadOperationCompleted(Object arg)
------------------ Test Failed ------------------Test Namespace:    Test Class:        Test Method:       Other Info:        Unhandled exception trapped in the Silverlight Client.
System.IO.FileNotFoundException: Could not load file or assembly 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.File name: 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'   at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)   at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)   at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)   at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit)   at System.RuntimeType.GetCustomAttributes(Boolean inherit)   at StatLight.Client.Harness.Hosts.MSTest.UnitTestProviders.DynamicAttributeHelper.GetAllAttributes(MemberInfo method, String attributeName)   at StatLight.Client.Harness.Hosts.MSTest.UnitTestProviders.MSTest.UnitTestFrameworkAssembly.<GetTestClasses>b__0(Type type)   at System.Linq.Enumerable.WhereListIterator`1.MoveNext()   at StatLight.Client.Harness.Hosts.MSTest.UnitTestProviders.DynamicAttributeHelper.GetTestClasses(Assembly assembly, Func`2 filter, Func`2 createType)   at StatLight.Client.Harness.Hosts.MSTest.UnitTestProviders.MSTest.UnitTestFrameworkAssembly.GetTestClasses()   at Microsoft.Silverlight.Testing.UnitTesting.Metadata.UnitTestProviders.GetAssemblyProvider(UnitTestHarness harness, Assembly testAssembly)   at Microsoft.Silverlight.Testing.Harness.UnitTestHarness.PrepareTestAssemblyTasks()   at Microsoft.Silverlight.Testing.Harness.UnitTestHarness.Initialize()   at Microsoft.Silverlight.Testing.Harness.UnitTestHarness.Run()   at Microsoft.Silverlight.Testing.UnitTestSystem.Run(UnitTestSettings settings)   at Microsoft.Silverlight.Testing.UnitTestSystem.<>c__DisplayClass2.<CreateTestPage>b__1()   at Microsoft.Silverlight.Testing.UnitTestSystem.PrepareTestService(UnitTestSettings inputSettings, Action complete)   at Microsoft.Silverlight.Testing.UnitTestSystem.CreateTestPage(UnitTestSettings settings)   at StatLight.Client.Harness.Hosts.MSTest.MSTestRunnerHost.StartRun()   at StatLight.Client.Harness.Hosts.StatLightSystemBase.DisplayTestHarness()   at StatLight.Client.Harness.Hosts.NormalStatLightSystem.OnTestRunConfigurationDownloaded(ClientTestRunConfiguration clientTestRunConfiguration)   at StatLight.Client.Harness.Hosts.StatLightSystemBase.<GoGetTheTestRunConfiguration>b__13(Object sender, OpenReadCompletedEventArgs e)   at System.Net.WebClient.OnOpenReadCompleted(OpenReadCompletedEventArgs e)   at System.Net.WebClient.OpenReadOperationCompleted(Object arg)-------------------------------------------------

Nov 16, 2012 at 10:26 AM

Problem solved!

It was an old version of Microsoft.Practices.Unity.Silverlight that had wrongly been added to one of our projects.

/Fredrik