Support .sqlproj in the .NET SDK
See original GitHub issueFrom @whibdev on Friday, December 27, 2019 8:33:45 PM
dotnet sln add .sqlproj - Invalid Project
When using cli to add a SQL Server Database Project (.sqlproj) to a solution, error occurs:
Invalid project [PathToProject].sqlproj
. The imported project “C:\Program Files\dotnet\sdk\3.1.100\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets” was not found. Confirm that the expression in the Import declaration “C:\Program Files\dotnet\sdk\3.1.100\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets” is correct, and that the file exists on disk.
Version introduced
Using v3.1.100
Old behavior
Unknown
New behavior
- Create solution: dotnet new sln mysln
- Open Solution in Visual Studio IDE
- Add new Sql Server Database Project using IDE to solution
- Remove SQL Server Database Project from Solution
- Use dotnet cli command to add sqlproj back to solution
Recommended action
- Possible workarounds Add sqlproj using Visual Studio IDE
Category
- ASP.NET Core
- dotnet cli
Affected APIs
Issue metadata
- Issue type: breaking-change
Copied from original issue: dotnet/docs#16420
Issue Analytics
- State:
- Created 4 years ago
- Comments:11
Top Results From Across the Web
MSBuild.Sdk.SqlProj 2.6.1
Sdk.SqlProj supports referencing NuGet packages that contain .dacpac packages. These can be referenced by using the PackageReference format familiar to .NET ...
Read more >Use SDK-style projects with the SQL Database ...
Getting started using SDK-style SQL projects with the SQL Database Projects extension for Azure Data Studio or Visual Studio Code.
Read more >How to build .sqlproj projects using "dotnet" tool?
It supports build projects like C++, C#(.net core/standard/framework),VB.net, database project... while dotnet for now is more suitable for .net ...
Read more >Make your SQL Server Database project (.sqlproj) build ...
In this post, I will describe how a new Microsoft build SDK (currently in preview) allows you to do the same, while preserving...
Read more >Use MSBuild.Sdk.SqlProj to work with dacpacs cross-platform
In this dotnetFlix, Jonathan Mezach introduces and demonstrates MSBuild. Sdk. SqlProj. This is a MSBuild SDK that is capable of producing a ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @wli3 any update on this issue? @binte response does not seem to apply to the issue; maybe I’ve misunderstood.
I managed to avoid adding a SQL Server project to the solution by using an MSBuild SDK, capable of producing a SQL Server Data-Tier Application package (.dacpac) from the set of SQL scripts.
If it is important to keep using the SQL Server project, for example, to be able on Visual Studio to take advantage of linking the project to a live database through SQL Server Object Explorer, you can check this answer on SO for a suggestion.