-
Notifications
You must be signed in to change notification settings - Fork 110
Add support for DacDeployOption from a publish profile #729
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
Conversation
There was a problem hiding this 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. |
src/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects/SqlProjectResource.cs
Show resolved
Hide resolved
src/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects/SqlPackageResource.cs
Show resolved
Hide resolved
tests/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects.Tests/AddSqlPackageTests.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
fixes #694
Closes #694
Adds a ne WithDacDeployOptions method that takes a path to a publish xml profile
PR Checklist