Skip to content

Conversation

@ErikEJ
Copy link
Contributor

@ErikEJ ErikEJ commented Jun 15, 2025

fixes #694

Closes #694

Adds a ne WithDacDeployOptions method that takes a path to a publish xml profile

PR Checklist

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • PR doesn't include merge commits (always rebase on top of our main, if needed)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Contains NO breaking changes
  • Every new API (including internal ones) has full XML docs
  • Code follows all style conventions

@ErikEJ ErikEJ requested a review from jmezach as a code owner June 15, 2025 10:30
@ErikEJ ErikEJ requested review from Alirexaa, aaronpowell, Copilot and jmezach and removed request for jmezach June 15, 2025 10:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for configuring dacpac deployment options from a publish profile by introducing a new WithDacDeployOptions extension method and related annotations.

  • Adds a new WithDacDeployOptions method for both SQL projects and packages.
  • Introduces corresponding annotations and tests to validate deployment option loading.
  • Updates project and example files to include the publish profile.

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects.Tests/Database.publish.xml Added a new XML publish profile for testing.
tests/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects.Tests/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects.Tests.csproj Updated project file to copy the publish profile to the output directory.
tests/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects.Tests/AddSqlProjectTests.cs Added tests verifying behavior when using a valid and a non-existing publish profile.
tests/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects.Tests/AddSqlPackageTests.cs Added tests for SQL package resources using the new deployment options.
src/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects/SqlProjectResource.cs Updated SqlProjectResource to load deployment options from the publish profile.
src/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects/SqlProjectBuilderExtensions.cs Introduced extension methods for WithDacDeployOptions on SQL projects and packages.
src/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects/SqlPackageResource.cs Updated SqlPackageResource to load deployment options from the publish profile.
src/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects/DacDeployOptionsAnnotation.cs Added the new annotation type for dacpac deployment options.
examples/sql-database-projects/SdkProject/Database.publish.xml Provided an example publish profile to demonstrate the new functionality.

@ErikEJ ErikEJ changed the title Add support for DacDeployOtion from a publish profile Add support for DacDeployOption from a publish profile Jun 15, 2025
Copy link
Contributor

@jmezach jmezach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aaronpowell aaronpowell added this to the 9.6 milestone Jun 18, 2025
@ErikEJ ErikEJ merged commit 9072de4 into CommunityToolkit:main Jun 18, 2025
96 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for existing publish profiles

3 participants