microsoft/DacFx

AdditionalDeploymentContributorPaths is not honoured / does not seem to work as expected

Opened this issue · 0 comments

  • SqlPackage or DacFx Version: 162.4.92.3 (latest as at 20 November 2024)
  • .NET Framework (Windows-only) or .NET Core:
    • Dotnet version: 9.0.100
    • MSBuild version: MSBuild version 17.12.6+db5f6012c for .NET Framework 17.12.6.51805
  • Environment (local platform and source/target platforms): Windows 11

Steps to Reproduce:

  1. Run the .\repro.ps1 script within the following bug reproduction repository: https://github.com/DanielLoth/sqlpackage-bug-repro-1

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

  • I do not think it has worked in previous versions.

(DacFx/SqlPackage/SSMS/Azure Data Studio)

Output from the repro script linked above:

----------------------------
Cleanup up running processes
----------------------------

ERROR: The process "dotnet.exe" not found.
ERROR: The process "vbcscompiler.exe" not found.
ERROR: The process "vctip.exe" not found.
ERROR: The process "msbuild.exe" not found.
ERROR: The process "sqlpackage.exe" not found.

-----------------------------------
DONE: Cleaning up running processes
-----------------------------------


------------------------------
REPRO SCRIPT EXECUTION DETAILS

MSBuild version: MSBuild version 17.12.6+db5f6012c for .NET Framework 17.12.6.51805
SqlPackage version: 162.4.92.3
Dotnet version: 9.0.100

PATH environment variable:
C:\windows\system32;C:\Personal\sqlpackage-bug-repro-1\dotnet;C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64;C:\Personal\sqlpackage-bug-repro-1\sqlpackage;
------------------------------

Restore complete (0.2s)
  MyContributor succeeded (0.2s) → MyContributor\bin\Release\netstandard2.1\MyContributor.dll

Build succeeded in 0.8s
Restore complete (0.2s)
  MyContributor succeeded (0.2s) → MyContributor\bin\Debug\netstandard2.1\publish\

Build succeeded in 0.7s

  Creating a model to represent the project...
  Loading project references...
  Loading project files...
  Building the project model and resolving object interdependencies...
  Validating the project model...
  Writing model to C:\Personal\sqlpackage-bug-repro-1\ReproDB\obj\Release\Model.xml...
  ReproDB -> C:\Personal\sqlpackage-bug-repro-1\ReproDB\bin\Release\ReproDB.dll
  ReproDB -> C:\Personal\sqlpackage-bug-repro-1\ReproDB\bin\Release\ReproDB.dacpac

-----------------------------
Expect this execution to FAIL
-----------------------------

Generating publish script for database 'MyDB'.
*** An error occurred during deployment plan generation. Deployment cannot continue.
Error SQL0: Required contributor with id 'MyDeploymentContributor' could not be loaded.

Contributor initialization error.
Time elapsed 0:00:01.43

------------------------
END OF FAILING EXECUTION
------------------------


-------------------------------------------------------------------
Expect this execution to PASS
(Expect to see 'Hello world') written to console by the contributor
-------------------------------------------------------------------

Generating publish script for database 'MyDB'.
Hello world
Successfully generated script to file C:\Personal\sqlpackage-bug-repro-1\out\Script.sql.
Successfully generated report to file C:\Personal\sqlpackage-bug-repro-1\out\Report.xml.
Changes to connection setting default values were incorporated in a recent release.  More information is available at https://aka.ms/dacfx-connection
Time elapsed 0:00:01.61

------------------------
END OF PASSING EXECUTION
------------------------


----------------------------
Cleanup up running processes
----------------------------

ERROR: The process "dotnet.exe" not found.
SUCCESS: The process with PID 18060 (child process of PID 27380) has been terminated.
SUCCESS: The process with PID 27380 (child process of PID 26892) has been terminated.
ERROR: The process "vctip.exe" not found.
ERROR: The process "msbuild.exe" not found.
ERROR: The process "sqlpackage.exe" not found.

-----------------------------------
DONE: Cleaning up running processes
-----------------------------------