简体   繁体   English

为什么Visual Studio 2010(Intellisense)会停止生成接口指针?

[英]Why would Visual Studio 2010 (Intellisense) stop generating an interface pointer?

I had working code that implemented a wrapper and interface along the lines of: 我的工作代码按照以下方式实现了包装器和接口:

public class wrapper : wrapperInterface {
    ...
}

Intellisense was generating a wrapperInterfacePtr so that in a C++ header I had a valid statement of: Intellisense正在生成wrapperInterfacePtr,以便在C ++标头中,我具有以下有效语句:

wrapper::wrapperInterfacePtr m_wrapper;

I was mucking around trying to add some Delegate functionality so I could pass a C++ callback into the C# (I failed), and at some point during the mucking around the auto-generated wrapperInterfacePtr became undefined. 我正在尝试添加一些Delegate功能,以便可以将C ++回调传递到C#中(我失败了),并且在自动生成的wrapperInterfacePtr发生更改的某个时候,它变得不确定。 Even after I returned all the code to (what appears) to be its original state, Intellisense is not generating wrapperInterfacePtr. 即使我将所有代码返回(显示为原始状态),Intellisense也不会生成wrapperInterfacePtr。

Any thoughts on how what I could have done, or how to kick-start Intellisense? 关于我该怎么做或如何启动Intellisense的任何想法?

Ok, I got it to work again. 好的,我让它再次工作。 I can't give the definitive reason it failed, but I have an idea. 我无法给出失败的确切原因,但我有个主意。 The new c# managed code is on top of a huge library of existing C++ unmanaged code. 新的c#托管代码位于现有C ++非托管代码的巨大库的顶部。 I build the managed code using VS and then use an in-house tool to build everything else. 我使用VS构建托管代码,然后使用内部工具构建其他所有内容。 The in-house build tool doesn't do a clean unless you really, really force the issue. 内部构建工具不会清理干净,除非您确实确实提出了这个问题。 (It would take days.) When I did a build-clean on the dlls that interfaced with the managed code, that fixed the problem. (这需要几天的时间。)当我对与托管代码接口的dll进行构建清理时,此问题得以解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM