microsoft / azuredatastudio

Azure Data Studio is a data management and development tool with connectivity to popular cloud and on-premises databases. Azure Data Studio supports Windows, macOS, and Linux, with immediate capability to connect to Azure SQL and SQL Server. Browse the extension library for more database support options including MySQL, PostgreSQL, and MongoDB.
https://learn.microsoft.com/sql/azure-data-studio
MIT License
7.56k stars 898 forks source link

Won't parse SqlCmdVariable "<DefaultValue />" generated by SSDT build #20189

Closed alexbousquet closed 1 year ago

alexbousquet commented 2 years ago

Issue Type: Bug

  1. Add following section to a sqlproj file that is currently refreshing without any errors:

    <ItemGroup>
    <SqlCmdVariable Include="DataLakeAccessKey">
      <DefaultValue></DefaultValue>
      <Value>$(SqlCmdVar__3)</Value>
    </SqlCmdVariable>
    </ItemGroup>
  2. Save sqlproj file

  3. Refresh to confirm no errors have been introduced

  4. Change<DefaultValue></DefaultValue> to <DefaultValue />

    • This was changed by building the project in SSDT
  5. Refresh project again

    • Expected: Same result as step 2 (no notifications/errors)
    • Actual: SQLCMD error reported via notification

Extension version: 0.17.2 Azure Data Studio version: azuredatastudio 1.37.0 (d904740d93d7df76a0ba361f20e4351813b57645, 2022-06-14T01:05:12.352Z) OS version: Windows_NT x64 10.0.19044 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz (16 x 2304)| |GPU Status|2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|undefined| |Memory (System)|31.73GB (13.95GB free)| |Process Argv|| |Screen Reader|no| |VM|0%|
kisantia commented 1 year ago

This should be fixed by the work to move the sql project xml parsing to DacFx, which will leverage Microsoft.Build libraries to do the reading and writing to the .sqlproj. Have to verify this is fixed when the code move is done in the next couple months

kisantia commented 1 year ago

This is fixed in insiders (sql database projects version 0.23.0) and will be included in the April release!