How to build a interop dll from the UIAutomationClient.dll

拥有回忆 提交于 2019-12-13 01:05:56

问题


I want to create / build a interop dll from the existing UIAutomationClient.dll Version 4.0.. I tried to use the TlbImp.exe with the following command:

TlbImp.exe path\UIAutomationClient.dll out:Interop.UIAutomationClient.dll

But i'm getting the following error message:

Microsoft (R) .NET Framework Type Library to Assembly Converter 4.0.4013 Copyright (C) Microsoft Corporation. All rights reserved.

TlbImp : error TI0000 : The input file 'C:\Users\patrick\Desktop\UIAutomationCli ent.dll' is not a valid type library.

Is there another way to create the interop dll or a solution to this error ?


回答1:


It is present on your machine in the Common7\IDE\PublicAssemblies subdirectory of your VS install directory. It carries a Microsoft copyright and is not part of the redistributable files so just making a copy is a bit iffy, even though it doesn't contain any code.

You can create your own by running Tlbimp.exe on c:\windows\syswow64\uiautomationcore.dll. Use system32 on a 32-bit operating system.

You ought to wonder a bit about the reason you have a dependency on it.



来源:https://stackoverflow.com/questions/18079477/how-to-build-a-interop-dll-from-the-uiautomationclient-dll

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!