Visual Studio 2015 IntelliSense不会显示所有方法

Visual Studio 2015 IntelliSense不会显示所有方法

问题描述:

我最近从2013年升级到了Visual Studio 2015,因为出于某些原因,即使多次尝试安装,2013也无法在Windows 10上运行.

I recently upgraded to Visual Studio 2015 from 2013 because for some reason 2013 would not work on Windows 10 for me, even after multiple install attempts.

唯一的问题是IntelliSense不会显示其他形式的方法.例如,当我开始输入其中一种表单的名称之一时,IntelliSense唯一显示的内容是:

The only issue is IntelliSense is not displaying methods from other forms. For example, when I start typing one of the names of one of my forms, the only thing IntelliSense displays is:

但是,该表单具有许多公共方法,并且IntelliSense在2013年之前运行良好.

However, the form has dozens of public methods, and the IntelliSense worked fine before in 2013.

有趣的是,如果我记得手动输入名称,即Form1.TestMethod(),仍然可以调用该方法.

Interestingly, I can still call the method if I remember the name by manually typing it, i.e. Form1.TestMethod().

有人知道这个解决方法吗?我正在使用Visual Studio 2015 Update 1.

Does anyone know the fix for this? I am using Visual Studio 2015 Update 1.

我遇到了完全相同的问题,并与Microsoft发生了支持事件.他们已经按照下面的答案验证了这是VS 2015 Update-1的错误.我们有几台仅运行VS 2015(无更新1)的计算机,它们运行良好.我将传递从Microsoft获得的任何进一步的信息.

I have the exact same problem and opened a support incident with Microsoft. They have verified per their answer below, that this is a bug with VS 2015 Update-1. We have a few computers running with just VS 2015(no update 1) that work just fine. I will pass along any further information that I receive from Microsoft.

Microsoft的答复:

Response from Microsoft:

"是的,仅在Visual Studio 2015 update1中会发生这种情况. 是VS2015 Update1中的一个错误,我正在与产品团队讨论修复问题 这个问题.

"Yes this happens only with Visual Studio 2015 update1. It seems to be a bug in VS2015 Update1, I am discussing with product team to fix this issue.

如果只是避免使用表单的默认实例.创建表单实例,将其存储在局部变量或字段中,然后传递这些实例 周围的参考很容易.这也是更好的做法 这将使您的代码整体上更强大.

If you just avoid using default instance of forms. Creating a form instance, storing it in a local variable or field, and passing those references around is easy enough. It's also a much better practice that will make your code stronger overall.

将其作为新Form2

f.TextBox1.Text =嗨"