AX 2009 .NET Business Connector fails while creating instance of XmlDocument

RTM version (5.0.593.0) of .NET Business Connect fails with following exception while creating instance of XmlDocument class in X++ code. System.Runtime.InteropServices.SEHException: External component has thrown an exception. at AxCore_CallStatic(Char* , Char* , tagVARIANT* , Int32 , tagVARIANT* ) at Microsoft.Dynamics.BusinessConnectorNet.Axapta.CallStaticClassMethod(String className, String methodName, Object[] paramList) at Microsoft.Dynamics.BusinessConnectorNet.Axapta.CallStaticClassMethod(String className, String methodName) at BusinessLogic.DocumentationManager.GetXml() in D:\Development\AX\BC.NET Sample…