microsoft / microsoft/DacFx

Builds NEWER than 1.0.0-rc1 cause error when building on localhost

Open
#714 10 comments 0 reactions 0 assignees View on GitHub
area: ssdt bug
Dominant language
C#
Stars
460
Forks
29
Avg merge
4d 9h
Merged PRs (30d)
7

Description

- SqlPackage or DacFx Version:
- .NET Framework (Windows-only) or .NET Core: .Net standard 2.1
- Environment (local platform and source/target platforms): localhost using Vs2022

**Steps to Reproduce:**

1. Create a new database project using NEWER than 1.0.0-rc1 - this is the latest version, where dotnet restore works
2. Then you'll see these errors ( we have 4 db projects in this particular solution ):
3. The only way to make **newer** versions than 1.0.0-rc1 work, is to do dotnet restore on the commandline! It will not work building the solution inside Vs2022 because of this error. 1.0.0-rc1 is the only version that supports SDK style db projects and build inside Vs2022. Later versions need you to enter commandline/powershell and do dotnet restore there!

Image

3. Both these versions break it:

and

**Did this occur in prior versions? If not - which version(s) did it work in?**
It works with 1.0.0-rc1 since that does dotnet restore

here's an example of the db project file:



net9.0
IsIT.Identity.XXXXXXX.Database
{346efe49-50cd-4887-bd47-03ede534d875}


Microsoft.Data.Tools.Schema.Sql.Sql150DatabaseSchemaProvider

1039,CI
Icelandic_CI_AS
Data1
BySchemaAndSchemaType

true
true
true


false

false
Database



Always


















PreserveNewest

(DacFx/SqlPackage/SSMS/Azure Data Studio)

Contributor guide

Open the contributing guide

Research direction

Start with the example SDK-style database project file and compare building it in Visual Studio 2022 with running dotnet restore from the command line. Reproduce the failure using Microsoft.Build.Sql/2.0.0 or 2.0.0-preview.4, then verify that a later version restores and builds inside Visual Studio without a manual command-line restore.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, sql
Domain
build-system, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.