当我不小心点击Add New Winform时,Visual Studio会添加什么引用?

时间:2021-08-08 09:18:20

Strangely enough, this is not on The Google. And I could really use a list so I know which ones I need to remove.

奇怪的是,这不是谷歌。我真的可以使用列表,所以我知道我需要删除哪些。

3 个解决方案

#1


Just ran a little experiment (cleared references, added a winform), and it adds:

刚刚进行了一些实验(清除了参考文献,添加了一个winform),并添加了:

  • System
  • System.Data
  • System.Drawing
  • System.Windows.Forms
  • System.Xml

#2


On the references screen, there is an Unused References button. This will show you what reference are not being used and gives you the choice to remove them. This works 95% of the time. Every so often, if there is a shared library in there, it will tell you it isn't being used but it really is.

在参考屏幕上,有一个未使用的参考按钮。这将显示未使用的引用,并允许您选择删除它们。这有效率的95%。每隔一段时间,如果那里有一个共享库,它就会告诉你它没有被使用,但确实如此。

This is useful for problems like this, not just Windows Forms.

这对于像这样的问题很有用,而不仅仅是Windows Forms。

#3


Pretty much it will make sure that the following are added.

几乎它将确保添加以下内容。

  • System.Windows.Forms
  • System.Drawing

It may also try to add System.Data and System.Xml but those are defaults on most project types so it's hard to tell.

它也可能尝试添加System.Data和System.Xml,但这些是大多数项目类型的默认值,因此很难说。

#1


Just ran a little experiment (cleared references, added a winform), and it adds:

刚刚进行了一些实验(清除了参考文献,添加了一个winform),并添加了:

  • System
  • System.Data
  • System.Drawing
  • System.Windows.Forms
  • System.Xml

#2


On the references screen, there is an Unused References button. This will show you what reference are not being used and gives you the choice to remove them. This works 95% of the time. Every so often, if there is a shared library in there, it will tell you it isn't being used but it really is.

在参考屏幕上,有一个未使用的参考按钮。这将显示未使用的引用,并允许您选择删除它们。这有效率的95%。每隔一段时间,如果那里有一个共享库,它就会告诉你它没有被使用,但确实如此。

This is useful for problems like this, not just Windows Forms.

这对于像这样的问题很有用,而不仅仅是Windows Forms。

#3


Pretty much it will make sure that the following are added.

几乎它将确保添加以下内容。

  • System.Windows.Forms
  • System.Drawing

It may also try to add System.Data and System.Xml but those are defaults on most project types so it's hard to tell.

它也可能尝试添加System.Data和System.Xml,但这些是大多数项目类型的默认值,因此很难说。