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

Publish appsettingsjson #438

Merged
merged 18 commits into from
May 2, 2024
Merged

Conversation

mkempers
Copy link
Contributor

@mkempers mkempers commented Apr 26, 2024

When publishing a .NET application using MSBuild, the appsettings.json file is included in the root directory of the published output. However, this behavior is not observed when using the csharp_binary and publish_binary rules.

This inconsistency can be confusing for developers accustomed to MSBuild's behavior. This PR add this behavior to rules_dotnet. Both appsettings.json and environment specific app settings files can be configured for a csharp_binary.

Closes #434

Copy link

google-cla bot commented Apr 26, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@mkempers mkempers changed the title Appsettingsjson Publish appsettingsjson Apr 26, 2024
@mkempers mkempers marked this pull request as ready for review April 26, 2024 14:35
@mkempers mkempers requested a review from purkhusid as a code owner April 26, 2024 14:35
Copy link
Collaborator

@purkhusid purkhusid left a comment

Choose a reason for hiding this comment

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

Thanks for you contribution, I've got a few comments but otherwise it looks great!

dotnet/private/rules/common/attrs.bzl Outdated Show resolved Hide resolved
dotnet/private/rules/csharp/actions/csharp_assembly.bzl Outdated Show resolved Hide resolved
dotnet/private/rules/csharp/actions/csharp_assembly.bzl Outdated Show resolved Hide resolved
dotnet/private/rules/fsharp/actions/fsharp_assembly.bzl Outdated Show resolved Hide resolved
@mkempers mkempers requested a review from purkhusid May 1, 2024 16:51
Copy link
Collaborator

@purkhusid purkhusid left a comment

Choose a reason for hiding this comment

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

Did some cleanup and changed the tests. LGTM now.

@purkhusid purkhusid merged commit 416a67a into bazel-contrib:master May 2, 2024
1 of 2 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.

Inconsistent appsettings.json handling during publish
2 participants