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

Move generation of SuggestedBindingRedirects.targets to inner build #112379

Merged

Conversation

ericstj
Copy link
Member

@ericstj ericstj commented Feb 10, 2025

Fixes #111892

These targets depend on the AssemblyVersion of the library which is specific to the inner-build of the library. Generate them in the inner-build.

I tried including in the package as part of the inner-build as well but we also have other infrastructure in the outer build that observes targets added to the package, but can only do so if they're added in the outer build.

<_PackageBuildFile Include="@(None->Metadata('PackagePath'));
@(Content->Metadata('PackagePath'))" />

I can't make that work so long as it runs in the outer build - since NuGet passes items out from inner-build only in a private item (_PackageFiles). Probably I could refactor that to be part of the inner-build but it would be a larger change.

These targets depend on the AssemblyVersion of the library which is
specific to the inner-build of the library.  Generate them in the inner-build.
@ericstj ericstj requested a review from ViktorHofer February 10, 2025 22:50
@ericstj ericstj self-assigned this Feb 10, 2025
@ericstj ericstj marked this pull request as ready for review February 10, 2025 22:51
@ericstj
Copy link
Member Author

ericstj commented Feb 10, 2025

We should backport this to servicing as well.

@ericstj ericstj merged commit 70a577c into dotnet:main Feb 12, 2025
80 of 85 checks passed
@ericstj
Copy link
Member Author

ericstj commented Feb 12, 2025

/backport to release/9.0-staging

Copy link
Contributor

Started backporting to release/9.0-staging: https://github.com/dotnet/runtime/actions/runs/13290017456

@ericstj
Copy link
Member Author

ericstj commented Feb 12, 2025

/backport to release/8.0-staging

Copy link
Contributor

Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/13290022508

Copy link
Contributor

@ericstj backporting to "release/8.0-staging" failed, the patch most likely resulted in conflicts:

$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch

Applying: Move generation of SuggestedBindingRedirects.targets to inner build
Using index info to reconstruct a base tree...
M	src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj
Falling back to patching base and 3-way merge...
Auto-merging src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj
CONFLICT (content): Merge conflict in src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Move generation of SuggestedBindingRedirects.targets to inner build
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

ericstj added a commit to ericstj/runtime that referenced this pull request Feb 12, 2025
…otnet#112379)

* Move generation of SuggestedBindingRedirects.targets to inner build

These targets depend on the AssemblyVersion of the library which is
specific to the inner-build of the library.  Generate them in the inner-build.

* Update src/libraries/System.Resources.Extensions/src/System.Resources.Extensions.csproj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

System.Resources.Extensions 9.0.1 NuGet addresses wrong version in targets file
2 participants