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.54k stars 899 forks source link

Dacpac built in NET Core contains the primary DLL's DDL #10486

Closed udeeshagautam closed 4 years ago

udeeshagautam commented 4 years ago

Steps to Reproduce:

  1. build dacpac in ADS
  2. open and inspect model.xml
  3. DDL for the primary DLL is generated.

There is a setting for the same in SSDT/DacFx which seems to be switched differently in SSDT vs NET core path. Need a fix in DacFx

udeeshagautam commented 4 years ago

@Benjin lets sync on this I might have a probable fix.

Benjin commented 4 years ago

Sources to trace:

  1. \DacFx_Preview_SqlProj\Product\Source\SchemaSql\SchemaModel\SqlModelBuilder.cs line 492 function AddAssemblyReference(CustomSchemaData customData)
  2. consts : skipCreationIfEmpty and generateSqlClrDdl
  3. set in DacFx_Preview_SqlProj\Product\Source\SqlTasks\SchemaToolsSql\Build\SqlTaskHost.cs line 780
Benjin commented 4 years ago

Changes checked into DacFx, but waiting some additional related changes before porting a new version of DacFx over to SqlToolsService.