Skip to content

DacPackage.Unpack throws DacServiceException when trying to unpack dacpac with database reference #343

@k0zi

Description

@k0zi
  • DacFx Version 162.0.52:
  • .NET Framework (Windows-only) or .NET Core: net7.0
  • Environment (local platform and source/target platforms): Windows 11

Steps to Reproduce:

  1. Create multiple Sql projects with database reference (same database)
  2. Load the dacpac which references other dacpac with var dacpac = DacPackage.Load("MyPath\\MyDacpac.dacpac");
  3. Call Unpack method on dacpac dacpac.Unpack($@"working\{dacpac.Name}.tmp");

It throws:

Microsoft.SqlServer.Dac.DacServicesException: 'Could not unpack the package.'

Inner exception:

KeyNotFoundException: The given key 'C:\Dev\Sources\MyPath\BASEINFRASTRUCTURE.DACPAC' was not present in the dictionary.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions