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.

dotnet core3.1/dotnet5.0 build sqlproj

See original GitHub issue

Similar to https://github.com/dotnet/sdk/issues/10441 & https://github.com/dotnet/sdk/issues/8546

All .sqlproj files are msbuild project type ie: <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">

As opposed to the new style SDK ie: <Project Sdk="Microsoft.NET.Sdk">

–> A dotnet core 3.x, C# code application, is not able to build a sqlproj msbuild project. Example:

Project p = new Project("C:\\Users\<myself>\\my-cool-sql-app.sqlproj");
p.Build();

–> Results in: Microsoft.Build.Exceptions.InvalidProjectFileException: 'The imported project "C:\Program Files\dotnet\sdk\2.1.522\Microsoft\VisualStudio\v15.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk

Can I otherwise instruct a dotnet application to use msbuild located elsewhere? Will SQL Server Database projects become an SDK type project? Or will dotnet be able to build non-SDK type projects?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:5
  • Comments:17 (3 by maintainers)

github_iconTop GitHub Comments

9reactions
rajeshaz09commented, Sep 28, 2021

.NET 5 released 6 months back and .NET 6 is going to release in 6 months, but no support of SQLPROJ?

7reactions
marcpopMSFTcommented, Apr 7, 2021

And to your other questions, there are not plans for SDK support for sqlproj files in the short term.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to build .sqlproj projects using "dotnet" tool?
It's by design that dotnet cli can't build the Database Project with ... Studio\2019\VSEditon\MSBuild\Microsoft\VisualStudio\v16.0\SSDT .
Read more >
dotnet build should either build or ignore sqlproj SQL ...
Have a visual studio solution with two projects, one asp.net core project ( *.csproj ) and the other a SQL project ( *.sqlproj...
Read more >
Make your SQL Server Database project (.sqlproj) build ...
A couple of years ago I blogged about a great community project that enables you to build a .dacpac using dotnet build, even...
Read more >
Building sqlproj projects in Visual Studio Code with dotnet
We have come a long way, when it comes to developing .NET applications regardless of operating system. A major player on this journey...
Read more >
Build a Project from the Command Line - Azure Data Studio
To build an SDK-style SQL project from the command line on Windows, macOS, or Linux, use the following command: Bash Copy. dotnet build...
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