且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何从可视化基础项目中删除未使用的类?

更新时间:2021-07-07 10:13:26

听起来好像你的实际文件和你的项目设置已经出来了步骤。最简单的方法是创建一个新项目,然后复制所需的源代码。
It sounds as though your actual files and your project settings have become out of step. The simplest thing to do would be to create a new project and just copy over the sources that you need.


请按照MSDN的说明进行操作:删除或删除项目或项目 - SQL Server Microsoft Docs [ ^ ]



Please, follow the instruction from MSDN: Remove or Delete an Item or Project - SQL Server | Microsoft Docs[^]

Quote:

删除项目项目:

To remove a project item:



  1. 在解决方案资源管理器中,选择要删除的项目项目。
  2. 在编辑菜单上,单击删除。
  3. 在确认对话框中,单击删除以从项目中删除该项目。



文件系统上仍存在已删除的项目。因此,您可以将删除的项目添加到其原始解决方案或其他解决方案。


A removed item still exists on the file system. Therefore, you can add a removed item to its original solution or to another solution.







如果你无法找到文件,您可以在左侧窗格中看到它,请转到:




IF you can not locate file and you're able to see it in the left pane, go to:

Tools->Options->Projects and Solutions->Track Active Item in Solution Explorer





如果无法访问上述内容,请按照以下说明操作:视觉工作室提示#8:使用全部显示添加现有文件文件 - 大脑转储 [ ^ ]

然后,您将能够从解决方案资源管理器中删除该文件。 />


最后,您始终可以显示所有文件:解决方案资源管理器不显示文件夹,尽管该文件夹存在于我的本地驱动器(本地副本)Visual Studio - Stack Overflow [ ^ ]



祝你好运!



If above is inaccessible, follow the instruction from: Visual Studio Tip #8: Adding existing files with Show All Files – The Brain Dump[^]
Then you'll be able to remove that files from solution explorer.

Finally, you can always show all files: Solution Explorer doesnt show the folder although the folder is present in my local drive (local copy) Visual studio - Stack Overflow[^]

Good luck!