Managed C++ Static Constructor not called in .net4
问题 I've recently moved a project I'm working on from .NET 3.5 to .NET 4. I'm using C#, Managed C++ and Unmanaged C++. In one of my Managed C++ (interop) I'm having a static constructor: public ref class StaticPool : public BaseStaticPools { public: static StaticPool() { InitializePools(); } static Poolable^ Dequeue() { return (Poolable^)Dequeue(Poolable::typeid); } private: static void InitializePools() { BaseStaticPools::CreatePool(Poolable::typeid); } }; In .NET 3.5 once Dequeue() had been