Interop dlls不再自动创建 [英] Interop dlls no longer created automatically

查看:66
本文介绍了Interop dlls不再自动创建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

回到VS2008的时代,我创建了一个非常大的C#解决方案,其中包括12个项目。



当我将xyz.tlb的引用添加到给定项目时,VS2008自动创建了一个DLL interop.xyz.dll,事情很棒。所有

Back in the days of VS2008 I created a very large C# solution that included 12 projects.

When I added a reference to xyz.tlb to a given project, VS2008 automatically created a DLL interop.xyz.dll and things were great. All the

using xyz;

语句很酷



这些天,对于vs2015,情况似乎已经不再如此了。



有谁可以解释我在这里缺少的东西?



我尝试过:



*删除并重新添加tlb参考。



*查找interop.xyz.dll的副本,将其放在一个公共位置并添加对它的引用。我讨厌的是,如果我升级产品xyz并更新xyz.tlb,我的解决方案将不是最新的。从理论上讲,通过COM规则,它应该是向后兼容的,但有些供应商并不总是很好。

statements were cool

These days, with vs2015, this is no longer seems to be the case.

Can anyone shed some light on what I'm missing here?

What I have tried:

* Deleting and re-adding the tlb reference.

* Finding a copy of interop.xyz.dll, placing it in a common location and adding a reference to it. What I hate about this is that if I upgrade product xyz and xyz.tlb is updated, my solution won't be up to date. Theoretically, by COM rules it ought to be backward compatible, but some vendors haven't always played nice.

推荐答案

我不知道它在VS2008中是怎么回事以及为什么它改变了,但有两种方法来处理COM DLL ...

如何:从类型库生成互操作程序集 [ ^ ]

如何:添加对类型库的引用 [ ^ ]
I do not know how it was in VS2008 and why it changed, however there are two ways to deal with COM DLLs...
How to: Generate Interop Assemblies from Type Libraries[^]
How to: Add References to Type Libraries[^]


这篇关于Interop dlls不再自动创建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆