.NET Profiler sets the ApartmentState of my Process

Use this forum to discuss and/or suggest future improvements of .NET Memory Profiler and to report bugs.
Post Reply
Sascha Fueller

.NET Profiler sets the ApartmentState of my Process

Post by Sascha Fueller » Tue Aug 30, 2005 12:38 pm


our application should use the SingleThreadedApartment for COM-Interop.
Till now we used the STAThreadAttribute.
For some other reasons we now have to set the ApartmentState-Property in the Main-Method, so the Attribute isn't used anymore.

This works fine. But when I start the process from profiler, then the apartment state gets multithreaded. I think it is because profiling code is executed before our code is called.

Is there any possibility to set the appertment state in code and using profiling?


Andreas Suurkuusk
Posts: 1030
Joined: Wed Mar 02, 2005 7:53 pm

Post by Andreas Suurkuusk » Tue Aug 30, 2005 9:27 pm

This is a known issue. After the first GC the profiler initializes the COM apartment (if not already initialized). We will try to fix this in version 2.6 of the profiler.
Best regards,

Andreas Suurkuusk
SciTech Software AB

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests