Hi Team,
I am trying to use show method of toast notification in my automation, but I am getting below exception.
“The calling thread must be STA, because many UI components require this.”
Could you please let me know how to resolve this.
Hi Team,
I am trying to use show method of toast notification in my automation, but I am getting below exception.
“The calling thread must be STA, because many UI components require this.”
Could you please let me know how to resolve this.
@LaxmiVenkataMownK I believe that these must be shown off of a Windows Form thread based on this error. If you don’t have a Windows Form in your solution, you can basically have a hidden one by doing the following. The form must technically be visible for this to work, so make sure it isn’t explicitly hidden. It will be invisible to a user however.
This really helps. Thank you @ThomasSasnett