Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fabric Data Warehouse Build Error: 'DwUnified.0.0' is not a valid version string. after adding master db reference to SDK Style Project #26171

Open
jasonhorner opened this issue Jan 23, 2025 · 9 comments

Comments

@jasonhorner
Copy link

jasonhorner commented Jan 23, 2025

Type: Bug

after adding a reference to the master database I receive the following error when building a Synapse Data Warehouse in Fabric database project

for reference here is my project file.

 <PackageReference Include="Microsoft.SqlServer.Dacpacs.Master">
     <Version>DwUnified.0.0</Version>
     <GeneratePathProperty>True</GeneratePathProperty>
     <DatabaseVariableLiteralValue>master</DatabaseVariableLiteralValue>
   </PackageReference>

Changing this to an artifact reference causes a similar error:

Build error SQL72027: File "c:\Users\FUBAR.azuredatastudio\extensions\microsoft.sql-database-projects-1.4.5\BuildDirectory\SystemDacpacs\DwUnified\master.dacpac" does not exist.

I verified I am using the latest version of sql package.

The error also occurs in the latest version of VS code. which leads me to believe this maybe an issue with DACFX.
FWIW I tried both

<Sdk Name="Microsoft.Build.Sql" Version="1.0.0-rc1" />

and

<Sdk Name="Microsoft.Build.Sql" Version="0.2.0-preview" />

to repo this just create a new empty Fabric Data Warehouse (Not Synapse Data Warehouse or Serverless Pool) SDK style project and add a reference to the master database.

Extension version: 1.4.5
Azure Data Studio version: azuredatastudio 1.50.0 (49c73a8, 2024-11-17T22:41:05.327Z)
OS version: Windows_NT x64 10.0.19045
Restricted Mode: No
Preview Features: Enabled
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz (8 x 1498)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 31.60GB (8.39GB free)
Process Argv
Screen Reader no
VM 0%
@dzsquared
Copy link
Contributor

Use https://www.nuget.org/packages/Microsoft.SqlServer.Dacpacs.Synapse.Master instead, no version attribute.

@dzsquared dzsquared transferred this issue from microsoft/azuredatastudio Jan 28, 2025
@ErikEJ
Copy link

ErikEJ commented Jan 28, 2025

Should it not just be:

<PackageReference Include="Microsoft.SqlServer.Dacpacs.SynapseServerless.Master" Version="160.2.2" />

or

<PackageReference Include="Microsoft.SqlServer.Dacpacs.Synapse.Master" Version="130.2.4" />

as documented on NuGet.org

@dzsquared
Copy link
Contributor

Yep - @jasonhorner if I have a sample out there that has the extended form or contradictory details please let me know so I can fix it

@jasonhorner
Copy link
Author

@dzsquared I did not create the project file manually. This occurs in the latest build of both Azure Data Studio and VSCode. I provided repro steps in the bug report. Are you unable to replicate my issue? note this is for a fabric data warehouse not a synapse serverless or a synapse Datawarehouse. I'll try the references above and see if they work thanks @ErikEJ

@dzsquared
Copy link
Contributor

@jasonhorner - ah thank you for pointing me to the obvious. this'll have to get transferred back to the Azure Data Studio repo since its a bug in the SQL projects extension.
In the meantime, you can manually edit the reference and should be able to proceed

@dzsquared dzsquared transferred this issue from microsoft/DacFx Jan 28, 2025
@jasonhorner
Copy link
Author

@dzsquared ok after removing the version attribute I now get this error: warning NU1604: Project dependency Microsoft.SqlServer.Dacpacs.Master does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results. it is not a build error but still a warning thanks for the help

Original (Causes Error Message)

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build">
  <Sdk Name="Microsoft.Build.Sql" Version="0.2.0-preview" />
  <PropertyGroup>
    <Name>Test</Name>
    <ProjectGuid>{6B14CFC3-8E1F-4B61-A989-17FB932C806C}</ProjectGuid>
    <DSP>Microsoft.Data.Tools.Schema.Sql.SqlDwUnifiedDatabaseSchemaProvider</DSP>
    <ModelCollation>1033, CI</ModelCollation>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.SqlServer.Dacpacs.Master">
      <Version>DwUnified.0.0</Version>
      <GeneratePathProperty>True</GeneratePathProperty>
      <DatabaseVariableLiteralValue>master</DatabaseVariableLiteralValue>
    </PackageReference>
  </ItemGroup>
  <Target Name="BeforeBuild">
    <Delete Files="$(BaseIntermediateOutputPath)\project.assets.json" />
  </Target>
</Project>

Edited (Causing Warning):

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build">
  <Sdk Name="Microsoft.Build.Sql" Version="0.2.0-preview"/>
  <PropertyGroup>
    <Name>Test</Name>
    <ProjectGuid>{6B14CFC3-8E1F-4B61-A989-17FB932C806C}</ProjectGuid>
    <DSP>Microsoft.Data.Tools.Schema.Sql.SqlDwUnifiedDatabaseSchemaProvider</DSP>
    <ModelCollation>1033, CI</ModelCollation>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.SqlServer.Dacpacs.Master">
      <GeneratePathProperty>True</GeneratePathProperty>
      <DatabaseVariableLiteralValue>master</DatabaseVariableLiteralValue>
    </PackageReference>
  </ItemGroup>
  <Target Name="BeforeBuild">
    <Delete Files="$(BaseIntermediateOutputPath)\project.assets.json" />
  </Target>
</Project>

@ErikEJ
Copy link

ErikEJ commented Jan 28, 2025

@jasonhorner You should include a version number and it look like the wrong package.

@dzsquared
Copy link
Contributor

suggested:

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build">
  <Sdk Name="Microsoft.Build.Sql" Version="0.2.0-preview"/>
  <PropertyGroup>
    <Name>Test</Name>
    <ProjectGuid>{6B14CFC3-8E1F-4B61-A989-17FB932C806C}</ProjectGuid>
    <DSP>Microsoft.Data.Tools.Schema.Sql.SqlDwUnifiedDatabaseSchemaProvider</DSP>
    <ModelCollation>1033, CI</ModelCollation>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.SqlServer.Dacpacs.Synapse.Master" Version="130.2.4" />
  </ItemGroup>
  <Target Name="BeforeBuild">
    <Delete Files="$(BaseIntermediateOutputPath)\project.assets.json" />
  </Target>
</Project>

@jasonhorner
Copy link
Author

@dzsquared this seems to work. Thanks for the help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants