Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[xabt] fix missing.nupkg output fordotnet pack#10270

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
grendello merged 2 commits intomainfromdev/peppers/fix-dotnet-pack
Jul 10, 2025

Conversation

@jonathanpeppers
Copy link
Member

Fixes:#9974

After updating theDotnetPack test to use:

proj.OtherBuildItems.Add (new AndroidItem.AndroidMavenLibrary ("org.jetbrains.kotlinx:kotlinx-serialization-json-jvm") {    MetadataValues = "Version=1.3.3;Bind=false",    BinaryContent = () => [],});

And then seeing the.jar files inside:

using var aarStream = new MemoryStream ();var aarEntry = nupkg.ReadEntry (aarPath);aarEntry.Extract (aarStream);aarStream.Seek (0, SeekOrigin.Begin);using var aar = ZipArchive.Open (aarStream);int count = aar.Count (e =>    e.FullName.StartsWith ("libs/", StringComparison.OrdinalIgnoreCase) &&    e.FullName.EndsWith (".jar", StringComparison.OrdinalIgnoreCase));

There were originally 0 files, when thereshould be 2!

Reviewing the.binlog,dotnet pack has an inner/outer build going on during it:

  • _WalkEachTargetPerFramework target

  • Runs<MSBuild/>, the_GetFrameworkAssemblyReferences target

  • Which calls our_CreateAar target.

If_CreateAar can be called in this scenario, it needs to depend on_CategorizeAndroidLibraries, so none of its inputs are missing.

With this change, the test now asserts that 2 "hashed".jar files are present in the.nupkg output.

Fixes:#9974After updating the `DotnetPack` test to use:    proj.OtherBuildItems.Add (new AndroidItem.AndroidMavenLibrary ("org.jetbrains.kotlinx:kotlinx-serialization-json-jvm") {        MetadataValues = "Version=1.3.3;Bind=false",        BinaryContent = () => [],    });And then seeing the `.jar` files inside:    using var aarStream = new MemoryStream ();    var aarEntry = nupkg.ReadEntry (aarPath);    aarEntry.Extract (aarStream);    aarStream.Seek (0, SeekOrigin.Begin);    using var aar = ZipArchive.Open (aarStream);    int count = aar.Count (e =>        e.FullName.StartsWith ("libs/", StringComparison.OrdinalIgnoreCase) &&        e.FullName.EndsWith (".jar", StringComparison.OrdinalIgnoreCase));There were originally 0 files, when there *should* be 2!Reviewing the `.binlog`, `dotnet pack` has an inner/outer build goingon during it:* `_WalkEachTargetPerFramework` target* Runs `<MSBuild/>`, the `_GetFrameworkAssemblyReferences` target* Which calls our `_CreateAar` target.If `_CreateAar` can be called in this scenario, it needs to depend on`_CategorizeAndroidLibraries`, so none of its inputs are missing.With this change, the test now asserts that 2 "hashed `.jar` files arepresent in the `.nupkg` output.
@jonathanpeppersjonathanpeppers marked this pull request as ready for reviewJuly 9, 2025 18:02
@grendellogrendello merged commit6c2ac38 intomainJul 10, 2025
59 checks passed
@grendellogrendello deleted the dev/peppers/fix-dotnet-pack branchJuly 10, 2025 08:30
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsAug 9, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@grendellogrendellogrendello approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

MAUI incorrectly packs JAR dependencies into.nupkg

3 participants

@jonathanpeppers@grendello

[8]ページ先頭

©2009-2025 Movatter.jp