Skip to content

Dotnet build issue with system database reference. #83

@DavidWiseman

Description

@DavidWiseman
  • SqlPackage or DacFx Version:0.1.3-preview
  • .NET Framework (Windows-only) or .NET Core:.NET Core
  • Environment (local platform and source/target platforms): Windows

Steps to Reproduce:

  1. Create a new database project in Visual Studio
  2. Follow instructions in this blog to get build working with dotnet build. https://erikej.github.io/ssdt/dotnet/2022/03/07/ssdt-dacpac-netcore.html
  3. Build should work at this point. dotnet build /p:NetCoreBuild=true
  4. Add a reference to the "master" system database in Visual Studio. This creates the following XML:
<ItemGroup>
    <ArtifactReference Include="$(DacPacRootPath)\Extensions\Microsoft\SQLDB\Extensions\SqlServer\130\SqlSchemas\master.dacpac">
      <HintPath>$(DacPacRootPath)\Extensions\Microsoft\SQLDB\Extensions\SqlServer\130\SqlSchemas\master.dacpac</HintPath>
      <SuppressMissingDependenciesErrors>False</SuppressMissingDependenciesErrors>
      <DatabaseVariableLiteralValue>master</DatabaseVariableLiteralValue>
    </ArtifactReference>
  </ItemGroup>
  1. Build will now fail. dotnet build /p:NetCoreBuild=true

C:\Users\user1\.nuget\packages\microsoft.build.sql\0.1.3-preview\tools\netstandard2.1\Microsoft.Data.Tools.Schema.SqlTasks.targets(525,5): Build error SQL72027: File "C:\Users\user1\.nuget\packages\microsoft.build.sql\0.1.3-preview\tools\netstandard2.1\Extensions\Microsoft\SQLDB\Extensions\SqlServer\130\SqlSchemas\master.dacpac" does not exist. [c:\Git\TrimbleOSS\dba-dash\Database1\Database1.sqlproj]

Did this occur in prior versions? If not - which version(s) did it work in?

Not applicable to prior version

Metadata

Metadata

Assignees

Labels

area: build sdkRelated to Microsoft.Build.Sql SDKbugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions