I am trying to use ArcFM with my ArcGIS project, and I've noticed a bug.
If my main thread is marked with the [STAThread]
attribute, the program hangs on exit with the OS Loader Lock exception. When I remove that attribute the program ends just fine.
The following code hangs
[STAThread]
private static void Main()
{
MMAppInitialize mmAppInitialize = new MMAppInitialize();
mmAppInitialize.IsProductCodeAvailable(mmLicensedProductCode.mmLPDesigner);
}
Anyone here have seen it before? Is there something I am doing wrong?
I figured I have to run on STAThread, since otherwise all my COM invocations will be marshalled to a different thread from the main.