Skip to content

Instantly share code, notes, and snippets.

@SimonCropp
Created March 28, 2013 03:33
Show Gist options
  • Save SimonCropp/5260357 to your computer and use it in GitHub Desktop.
Save SimonCropp/5260357 to your computer and use it in GitHub Desktop.
System.Threading.ThreadStateException : Current thread must be set to single thread apartment (STA) mode before OLE calls can be made.
at System.Windows.OleServicesContext.SetDispatcherThread()
at System.Windows.OleServicesContext.get_CurrentOleServicesContext()
at System.Windows.Clipboard.CriticalSetDataObject(Object data, Boolean copy)
at ApprovalTests.Reporters.ClipboardReporter.Report(String approved, String received)
at ApprovalTests.Approvers.FileApprover.ReportFailure(IApprovalFailureReporter reporter)
at ApprovalTests.Core.Approvals.Verify(IApprovalApprover approver, IApprovalFailureReporter reporter)
at ApprovalTests.Approvals.Verify(IApprovalWriter writer, IApprovalNamer namer, IApprovalFailureReporter reporter)
at ApprovalTests.Approvals.Verify(IApprovalWriter writer)
at ApprovalTests.Xml.XmlApprovals.VerifyText(String text, String fileExtensionWithoutDot, Boolean safely)
at ApprovalTests.Html.HtmlApprovals.VerifyHtml(String html)
at ApprovalTests.Approvals.VerifyHtml(String html)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment