Skip to content

[net11.0] bundle DynamicLibrary publish items added after _ComputePublishLocation#25581

Closed
kotlarmilos wants to merge 1 commit into
dotnet:net11.0from
kotlarmilos:dev/kotlarmilos/fix-late-dynamiclibrary-publishfoldertype
Closed

[net11.0] bundle DynamicLibrary publish items added after _ComputePublishLocation#25581
kotlarmilos wants to merge 1 commit into
dotnet:net11.0from
kotlarmilos:dev/kotlarmilos/fix-late-dynamiclibrary-publishfoldertype

Conversation

@kotlarmilos
Copy link
Copy Markdown
Member

_ComputePublishLocation resolves the final RelativePath for DynamicLibrary / PluginLibrary items in ResolvedFileToPublish, but on iOS, tvOS, and Mac Catalyst it runs early as a dependency of _CreateRuntimeConfiguration. Any item added later by an extension hooking the documented BeforeTargets="ComputeFilesToPublish" extension point keeps its raw RelativePath and lands in bin/.../publish/ instead of the signed .app bundle, because the second _ComputePublishLocation invocation is cached and skipped. This breaks the VS Code MAUI extension's CoreCLR remote-debugger flow: libvsdbgremotecoreclrtarget.dylib never reaches the bundle, CORECLR_PROFILER_PATH cannot load the profiler on launch, and every user breakpoint reports "failed to bind". Fix: add _BundleLateDynamicLibrariesToPublish to CreateAppBundleDependsOn, between _ComputePublishLocation and _ComputeCodesignItems. It re-routes any DynamicLibrary / PluginLibrary item whose RelativePath does not already point inside _RelativeAppBundlePath so the rest of the iOS SDK pipeline (codesign, layout, mlaunch deploy) treats it like any other native dependency. Validated on a .NET 11 MAUI iOS Simulator app under VS Code: the dylib is now signed into SampleMAUI.app/, the CoreCLR remote debugger attaches, and breakpoints fire.

…lishLocation

_ComputePublishLocation resolves the final RelativePath for DynamicLibrary
and PluginLibrary items in ResolvedFileToPublish, but on iOS, tvOS, and
Mac Catalyst it runs early as a dependency of _CreateRuntimeConfiguration.
Any item added later by an extension hooking the documented
BeforeTargets="ComputeFilesToPublish" extension point keeps its raw
RelativePath and lands in bin/.../publish/ instead of the signed .app
bundle, because the second _ComputePublishLocation invocation is cached
and skipped. This breaks the VS Code MAUI extension's CoreCLR
remote-debugger flow: libvsdbgremotecoreclrtarget.dylib never reaches the
bundle, CORECLR_PROFILER_PATH cannot load the profiler on launch, and
every user breakpoint reports "failed to bind".

Add _BundleLateDynamicLibrariesToPublish to CreateAppBundleDependsOn,
between _ComputePublishLocation and _ComputeCodesignItems. It re-routes
any DynamicLibrary or PluginLibrary item whose RelativePath does not
already point inside _RelativeAppBundlePath so the rest of the iOS SDK
pipeline (codesign, layout, mlaunch deploy) treats it like any other
native dependency.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 29, 2026 13:26
@kotlarmilos
Copy link
Copy Markdown
Member Author

Reopening from origin branch (dev/...) per convention.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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.

2 participants