Dispatcher.CheckAccess() dies

Mar 22, 2012 at 5:15 PM

I'm using AgUnit, which in turn uses StatLight, to run some non-UI Silverlight unit tests.  Part of my code calls Deployment.Current.Dispatcher.CheckAccess().  That test is failing with the following exception:

[MyTest] threw exception:
System.Exception: Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
at MS.Internal.XcpImports.Deployment_GetCurrent(ref IntPtr pDeployment)
at System.Windows.Deployment.get_Current()
at MyCode.ThreadingSupport.ExecuteOnUiThread(Action executeHandler) in ThreadingSupport.cs: line 10
... 

I searched the web and didn't find anyone else having this problem.

Any ideas?

Mar 22, 2012 at 5:22 PM

FWIW, I ran it outside of AgUnit (StatLight command line) and it worked just fine.

Coordinator
Mar 23, 2012 at 3:37 PM

Sorry to hear the troubles and thanks for the update.

I'm afraid I don't have much to offer here to help you out either...

Mar 26, 2012 at 12:14 PM

@staxmanade, no worries.  It appears to be an AgUnit problem, not a StatLight problem.

Mar 26, 2012 at 12:17 PM

I've opened a discussion in AgUnit's forums: http://agunit.codeplex.com/discussions/350050