microsoft / azuredatastudio

Azure Data Studio is a data management and development tool with connectivity to popular cloud and on-premises databases. Azure Data Studio supports Windows, macOS, and Linux, with immediate capability to connect to Azure SQL and SQL Server. Browse the extension library for more database support options including MySQL, PostgreSQL, and MongoDB.
https://learn.microsoft.com/sql/azure-data-studio
MIT License
7.51k stars 883 forks source link

[SQL DB Projects] Can add (and delete) *.sqlproj files to a SQL Project #22990

Open Charles-Gagnon opened 1 year ago

Charles-Gagnon commented 1 year ago

When you add an existing item you can select and add the *.sqlproj file itself. This means you can then also delete said file, which will then end up essentially deleting the project itself (the contents are still there though).

It seems like we should probably only allow certain files to be added, or at least filter out a few important ones like *.sqlproj from being selected.

Benjin commented 1 year ago

Historically, <None> items should be able to be any sort of file, so I'm thinking that the solution is to just to disallow adding the .sqlproj to itself (only blocking self-references, not blocking adding any .sqlproj to any project).

Benjin commented 1 year ago

Adding to DacFx.Projects with https://msdata.visualstudio.com/SQLToolsAndLibraries/_git/DacFx/pullrequest/1056966