移除或删除项或项目Remove or Delete an Item or Project

适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions) 是Azure SQL 数据库Azure SQL DatabaseYesAzure SQL 数据库Azure SQL Database 是Azure SQL 托管实例Azure SQL Managed InstanceYesAzure SQL 托管实例Azure SQL Managed Instance 是Azure Synapse AnalyticsAzure Synapse AnalyticsyesAzure Synapse AnalyticsAzure Synapse Analytics 是并行数据仓库Parallel Data Warehouseyes并行数据仓库Parallel Data Warehouse适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions) 是Azure SQL 数据库Azure SQL DatabaseYesAzure SQL 数据库Azure SQL Database 是Azure SQL 托管实例Azure SQL Managed InstanceYesAzure SQL 托管实例Azure SQL Managed Instance 是Azure Synapse AnalyticsAzure Synapse AnalyticsyesAzure Synapse AnalyticsAzure Synapse Analytics 是并行数据仓库Parallel Data Warehouseyes并行数据仓库Parallel Data Warehouse

SQL Server Management StudioSQL Server Management Studio 项目中的项目项为查询、连接和杂项文件。Project items in SQL Server Management StudioSQL Server Management Studio projects are Queries, Connections, and Miscellaneous files. 您可以从解决方案中移除项目查询文件和杂项文件,而并不清除存储区中的文件。You can remove project queries and miscellaneous files from your solution without erasing the files from storage. 如果项目或项在当前解决方案中不再有用,但是您希望将其包含到其他解决方案中,此时可以将其移除。Remove a project or item when it is not useful in the current solution but you want to include it in another solution.

移除项目项To remove a project item

  1. 在解决方案资源管理器中,选择想要移除的项目项。In Solution Explorer, select the project item you want to remove.

  2. 在“编辑”**** 菜单上,单击“删除”****。On the Edit menu, click Remove.

  3. 在确认对话框中,单击“删除”**** 以从项目中删除项。On the confirmation dialog, click Remove to remove the item from the project.

已移除的项仍存在于文件系统中。A removed item still exists on the file system. 因此,您可以将已移除的项添加到各自的初始解决方案或其他解决方案中。Therefore, you can add a removed item to its original solution or to another solution.

删除项目To remove a project

  1. 在解决方案资源管理器中,选择想要移除的项目。In Solution Explorer, select the project you want to remove.

  2. 在“编辑”**** 菜单上,单击“删除”****。On the Edit menu, click Remove.

  3. 在确认对话框中,单击“确定”**** 以从解决方案中删除项目。On the confirmation dialog, click OK, to remove the project from the solution.

您可以永久删除项目,但是必须先从 SQL Server Management StudioSQL Server Management Studio 解决方案中移除对该项目的所有引用,然后再使用 MicrosoftMicrosoft Windows 资源管理器从存储区中永久删除关联的文件。You can delete a project permanently, but you first need to remove any references to the project from SQL Server Management StudioSQL Server Management Studio solutions, and then use MicrosoftMicrosoft Windows Explorer to permanently delete the associated files from storage.

删除项目To delete a project

  1. 在解决方案资源管理器中,移除要从解决方案中删除的项目。In Solution Explorer, remove the project you want to delete from the solution.

  2. 在 Windows 资源管理器中,找到并选中与所要删除的项目或项相关联的文件。In Windows Explorer, locate and select the files associated with the project or item you want to delete.

  3. 在“文件”**** 菜单上,单击“删除”****。On the File menu, click Delete.

另请参阅See Also

解决方案资源管理器Solution Explorer
向项目添加新项Add New Items to a Project
向项目中添加现有项Add Existing Items to a Project