Assembly not found exception when run UnitTests on TeamCity
Posted: Fri Jul 14, 2017 1:58 pm
We are using using the semibindable version of LightningChartUltimate (LightningChartUltimateWPF8, v8.1.1.1)
We are running unit tests with NUnit 2.6.3 on TeamCity 2017.1.1. If we instantiate LightningChartUltimate inside a unit test the following Exception appears:
[13:51:02]Step 1/1: Run UnitTests (NUnit) (13s)
[13:51:02][Step 1/1] Starting: "C:\Program Files\TeamCity\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe" #TeamCityImplicit
[13:51:02][Step 1/1] in directory: C:\TcWork\Metrohm.Controls.Chart.Components_ChartControl_UnitTest.trunk
[13:51:04][Step 1/1] Start TeamCity NUnit Test Runner
[13:51:04][Step 1/1] Running NUnit-2.6.3 tests under .NET Framework v4.0 x64
[13:51:05][Step 1/1] Metrohm.Controls.Chart.Test.dll (9s)
[13:51:05][Metrohm.Controls.Chart.Test.dll] Metrohm.Controls.Chart.Test.Tracker.ClassTest.Feature_WhenScenario_ThenBehaviour (9s)
[13:51:05][Metrohm.Controls.Chart.Test.Tracker.ClassTest.Feature_WhenScenario_ThenBehaviour] [Test Error Output]
Log: SetUp ClassTest Feature_WhenScenario_ThenBehaviour
Log: Test ClassTest Feature_WhenScenario_ThenBehaviour
[13:51:07][Metrohm.Controls.Chart.Test.Tracker.ClassTest.Feature_WhenScenario_ThenBehaviour] [Test Error Output]
Unhandled exception in remote appdomain: Arction.Wpf.SemibindableCharting.ChartException: Assembly not found: Render device create failed: Rendering engine initialization failed. None of the requested engines could be loaded. For more information, use GetLastEngineInitResults() method.Stack trace: bei Arction.Wpf.SemibindableCharting.LightningChartUltimate.XVC(ErrorType A, Object C, String F, String H, Boolean I, Exception J)
bei Arction.Wpf.SemibindableCharting.LightningChartUltimate.CWC()
bei Arction.Wpf.SemibindableCharting.LightningChartUltimate.ControlLoadedWPF(Object sender, RoutedEventArgs e)
bei Arction.Wpf.SemibindableCharting.LightningChartUltimate.XVC(ErrorType A, Object C, String F, String H, Boolean I, Exception J)
bei Arction.Wpf.SemibindableCharting.LightningChartUltimate.ControlLoadedWPF(Object sender, RoutedEventArgs e)
bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
bei System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
bei System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
bei MS.Internal.LoadedOrUnloadedOperation.DoWork()
bei System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
bei System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
bei System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
bei System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
bei System.Windows.Interop.HwndTarget.OnResize()
bei System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
bei System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
bei System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
Have you any idea what goes wrong and which assembly is missing?
We haven't had this problem with LightningChart version 7.1.2 (non bindable version)
Please have a look at the attached code sample containing the unit test.
We are running unit tests with NUnit 2.6.3 on TeamCity 2017.1.1. If we instantiate LightningChartUltimate inside a unit test the following Exception appears:
[13:51:02]Step 1/1: Run UnitTests (NUnit) (13s)
[13:51:02][Step 1/1] Starting: "C:\Program Files\TeamCity\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe" #TeamCityImplicit
[13:51:02][Step 1/1] in directory: C:\TcWork\Metrohm.Controls.Chart.Components_ChartControl_UnitTest.trunk
[13:51:04][Step 1/1] Start TeamCity NUnit Test Runner
[13:51:04][Step 1/1] Running NUnit-2.6.3 tests under .NET Framework v4.0 x64
[13:51:05][Step 1/1] Metrohm.Controls.Chart.Test.dll (9s)
[13:51:05][Metrohm.Controls.Chart.Test.dll] Metrohm.Controls.Chart.Test.Tracker.ClassTest.Feature_WhenScenario_ThenBehaviour (9s)
[13:51:05][Metrohm.Controls.Chart.Test.Tracker.ClassTest.Feature_WhenScenario_ThenBehaviour] [Test Error Output]
Log: SetUp ClassTest Feature_WhenScenario_ThenBehaviour
Log: Test ClassTest Feature_WhenScenario_ThenBehaviour
[13:51:07][Metrohm.Controls.Chart.Test.Tracker.ClassTest.Feature_WhenScenario_ThenBehaviour] [Test Error Output]
Unhandled exception in remote appdomain: Arction.Wpf.SemibindableCharting.ChartException: Assembly not found: Render device create failed: Rendering engine initialization failed. None of the requested engines could be loaded. For more information, use GetLastEngineInitResults() method.Stack trace: bei Arction.Wpf.SemibindableCharting.LightningChartUltimate.XVC(ErrorType A, Object C, String F, String H, Boolean I, Exception J)
bei Arction.Wpf.SemibindableCharting.LightningChartUltimate.CWC()
bei Arction.Wpf.SemibindableCharting.LightningChartUltimate.ControlLoadedWPF(Object sender, RoutedEventArgs e)
bei Arction.Wpf.SemibindableCharting.LightningChartUltimate.XVC(ErrorType A, Object C, String F, String H, Boolean I, Exception J)
bei Arction.Wpf.SemibindableCharting.LightningChartUltimate.ControlLoadedWPF(Object sender, RoutedEventArgs e)
bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
bei System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
bei System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
bei MS.Internal.LoadedOrUnloadedOperation.DoWork()
bei System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
bei System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
bei System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
bei System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
bei System.Windows.Interop.HwndTarget.OnResize()
bei System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
bei System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
bei System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
Have you any idea what goes wrong and which assembly is missing?
We haven't had this problem with LightningChart version 7.1.2 (non bindable version)
Please have a look at the attached code sample containing the unit test.