Skip to content

Add packaged trimmed-publish regression coverage for F# async execution #7533

Closed

Description

@thomhurst

Summary

The packaged F# async preservation path has focused manual regression coverage but no automated trimmed-publish smoke test. A future SDK target or package-layout change could remove preservation and let an async test finish without executing its body. Add a packaged-app regression test to catch that failure in CI.

Reproduction

At e4c4769f6d, _TUnitPreserveFSharpAsync depends on the SDK-private _ComputeManagedAssemblyToLink target and loads a linker descriptor next to the packaged targets file. PR #7526 records manual positive and negative controls, including a runtime-only FSharp.Core dependency with ExcludeAssets="compile"; its automated package tests do not exercise this trimmed execution path.

Proposal

Add a CI smoke test consuming the produced NuGet packages. Publish a trimmed, non-AOT app with FSharp.Core and verify that an F# async side effect executes and an async exception propagates. Include the runtime-only FSharp.Core case and assert that the descriptor is shipped beside the targets in both build and buildTransitive layouts. Keep a C# publish without FSharp.Core warning-free. Demonstrate that disabling preservation makes the execution assertion fail.

Environment

Manual validation in #7526 used .NET SDK 10.0.403, macOS arm64. FSharp.Core IL2040 resource warnings are tracked separately upstream.

Please add this automated coverage for the packaged trimming path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low: cleanup, minor enhancement, or rare edge caseenhancementNew feature or requestin-progressWork is in progress

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions