DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Bruce Axtens
Bruce Axtens

Posted on

In a non-UI application, how do I handle β€œThe calling thread cannot access this object because a different thread owns it”

0

I've read through the discussion at The calling thread cannot access this object because a different thread owns it but it's all about UI.

I have two C# EXEs that are purely command-line, but are throwing this error as well.

Perhaps the full exception message will help:

System.InvalidOperationException
  HResult=0x80131509
…

Top comments (0)

🌚 Browsing with dark mode makes you a better developer.

It's a scientific fact.