question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support .sqlproj in the .NET SDK

See original GitHub issue

From @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

  1. Create solution: dotnet new sln mysln
  2. Open Solution in Visual Studio IDE
  3. Add new Sql Server Database Project using IDE to solution
  4. Remove SQL Server Database Project from Solution
  5. 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

dotnet sln cli


Issue metadata

  • Issue type: breaking-change

Copied from original issue: dotnet/docs#16420

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
whibdevcommented, Jun 17, 2020

Hi @wli3 any update on this issue? @binte response does not seem to apply to the issue; maybe I’ve misunderstood.

1reaction
bintecommented, Apr 18, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found