How to use the managed wrapper API
The managed wrappers provide an API that is much more friendly to managed developers, and insulates you from dealing with native code concepts like buffers and HRESULTS. Simply add a reference to Microsoft.Runtime.Hosting.dll. Relevant IClrMetaHost operations are available from the static methods of ClrMetahost, and ClrMetaHostPolicy provides the functionality of IClrMetaHostPolicy.
Some of the calls will require referencing Microsoft.Runtime.Hosting.Interop.dll as well in order to get the definitions for some of the types defined there. This reference will use Type Embedding"
by default in VS and won't have to be deployed with your application or library.
Expect this API to evolve (perhaps drastically) over time as we decide exactly how to expose this functionality to managed developers.