方法一、放在Bat文件中
"C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\tlbimp.exe" E:\...\Projectname.tlb /out:E:\...\InteropFiles\Interop.ProjectnameLib.dll /namespace:ProjectnameLib/nologo
方法二、属性配置
参考:.Net互操作性 http://www.cnblogs.com/linlf03/archive/2011/09/24/2189621.html