我正在尝试使用 iManage 扩展库(iManExt.dll)创建新文档。它在我的本地机器上运行良好。但是当我将它部署到其他机器时,即使所有 dll 都在那里,它也不起作用。我从桌面站点收到以下错误
System.MissingMethodException: Method not found: 'System.Type
System.Runtime.InteropServices.Marshal.GetTypeFrom CLSID(System.Guid)'.
以下是我用于创建新文档的 C# 代码。
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;
}