1

I am trying to create new document using iManage extension library(iManExt.dll). It works in my local machine fine. But when I deploy that to other machine it doesn’t work even though all dll in there. I am getting following error from desksite

System.MissingMethodException: Method not found: 'System.Type  
System.Runtime.InteropServices.Marshal.GetTypeFrom CLSID(System.Guid)'.

Following is my c# code for creating new document.

private IManage.IManDocument NewDocumentProfile(IManage.IManFolder aFolder, String aFileName)
{
    IManage.IManDocument NewDocument;

    IMANEXTLib.ImportCmd MyCommand = new IMANEXTLib.ImportCmd();
    IMANEXTLib.ContextItems MyContext = new IMANEXTLib.ContextItems();

    MyContext.Add("ParentWindow", Helper.GetActiveWindow());
    MyContext.Add("ImanDestinationObject", aFolder);

    MyContext.Add("IManExt.Import.KeepCheckedOut", 0);
    MyContext.Add("IManExt.Import.FileName", aFileName);
    MyContext.Add("IManExt.CalledFromIntegration", false);
    MyContext.Add("IManExt.OpenCmd.NoCmdUI", false);

    MyCommand.Initialize(MyContext);
    MyCommand.Update();

    if (MyCommand.Status == (int)IMANEXTLib.CommandStatus.nrActiveCommand)
    {
        MyCommand.Execute();
        NewDocument = MyContext.Item("ImportedDocument");
    }
    else
    {
        NewDocument = null;
    }
    return NewDocument;
}
VMAtm
  • 27,943
  • 17
  • 79
  • 125

1 Answers1

0

thanks for answers. I resolved that issue. But, I don’t know why it’s happened. When I set embed interop types property of that dll (IMANEXTLib) to false it works fine. But when I set it true, it doesn’t work.