I am using VB.net and I am getting this error only in debugging mode.
Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it. This exception is only raised if a debugger is attached to the process.
The application works fine in release mode. Why? Please help.
View Complete Post