More to the point, I have a native C++ application, that may never need to use managed types. I would like the CLR to remain unloaded until I the codepath that actually depends on managed types is actually hit.
I was trying to accomplish this using the /clr switch in Visual Studio 2005, but as far as I can tell as soon as I use that switch, the entire C++ app becomes a managed app. Is there a way to specify it only for a certain compilation unit or function? I tried to mark my main() function in my test app with #pragma unmanaged, but that didn't stop it from loading the CLR at startup.