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

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

Open
DanielLoth opened this issue Nov 20, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@DanielLoth
Copy link

  • 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
-----------------------------------
@DanielLoth DanielLoth added the bug Something isn't working label Nov 20, 2024
@t0bbz0n
Copy link

t0bbz0n commented Jan 18, 2025

@DanielLoth trying this with version DacFx 162.5.57 but cannot get this to work.

Some more context:
microsoft/DACExtensions#25
microsoft/DACExtensions#41

By looking at those, I would suggest that it worked in DacFX 18.3.1, atleast (the version where it was introduced).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants