Visual Studio 2017的VSTO应用程序中Intellisense不起作用-堆栈溢出 最近30次来自stackoverflow.com 2024-06-29T08:55:55Z https://stackoverflow.com/feeds/question/48176563 https://creativecommons.org/licenses/by-sa/4.0/rdf https://stackoverflow.com/q/48176563 0 Intellisense在Visual Studio 2017的VSTO应用程序中不起作用 合法鹰 https://stackoverflow.com/users/3908162 2018-01-09T20:59:46Z 2018年1月10日T08:14:12Z <p>我在Visual Studio 2017中创建了一个VSTO Excel插件</p>(第页)<p>在所有子例程上方的模块顶部,有一行:</p><pre><code>Public xlApp=Globals(公共xlApp=全局)。此插件。应用程序</code></pre><p>在这个模块中的几个子程序中,我使用了<code>xlApp。活动单元格。多个位置的值</code>。由于我最初是在编写subs,所以在键入<code>xlApp后会弹出Intellisense</code>并将提供所有预期选项。然而,情况发生了变化</p>(第页)<p>现在,当我键入<code>xlApp时</code>我在Intellisense中只看到Equals、GetHashCode、GetType和ToString。如果我键入<code>xlApp。活动单元格。Value</code>尽管缺乏智能感知,但它不会引发编译或构建错误,并且应用程序按预期运行,尽管继续编写其他功能要困难得多</p>(第页)<p>有人能告诉我该怎么找罪犯吗</p>(第页)<p>当我键入<code>Globals时,仍然会得到预期的Intellisense选项。此插件。应用</code>,所以我知道它在项目中仍然可用,但它似乎无法识别“xlApp”别名</p>(第页) https://stackoverflow.com/questions/48176563/intellisense-not-working-in-vsto-app-for-visual-studio-2017/48182946#48182946 1 Sara Liu的回答-智能感知MSFT在Visual Studio 2017的VSTO应用程序中不起作用 Sara Liu-医学博士 https://stackoverflow.com/users/6593065 2018年1月10日T08:14:12Z 2018年1月10日T08:14:12Z <p>请使用以下语句:<strong>Public xlApp As Excel。应用程序=全局。此插件。应用程序</strong></p><p>然后,当您键入xlApp.时。,成员列表如下:<a href=“https://i.sstatic.net/fgAoR.png“rel=”nofollow noreferrer“><img src=”https://i.sstatic.net/fgAoR.png“alt=”在此处输入图像描述“></a></p>