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

Add hostfxr_resolve_frameworks_for_runtime_config for resolving runtime frameworks #101451

Merged
merged 8 commits into from
May 10, 2024

Conversation

elinor-fung
Copy link
Member

@elinor-fung elinor-fung commented Apr 23, 2024

Implement new hostfxr API per #99027

  • hostfxr_resolve_frameworks_for_runtime_config provides a way to run the host's runtime framework resolution in an isolated manner
    • Return code indicates basic success/failure and the optional callback can be used for additional information about what was or was not resolved
    • For framework-dependent, runs through framework resolution and propagates the result
      • Currently unresolved_count will always either be 0 or 1 - the host stops at the first failed resolution
    • For self-contained, any includedFrameworks per the runtime config are treated as resolved to the app's directory
  • Add tests to NativeHostApis tests and update HostApiInvokerApp test asset to exercise new API
    • Update tests to stop copying hostfxr next to the app - pass in the paths via runtime config and make the test app resolve the load via DllImportResolver

Resolves #99027

cc @dotnet/appmodel @vitek-karas

Copy link
Contributor

Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov
See info in area-owners.md if you want to be subscribed.

@elinor-fung elinor-fung marked this pull request as ready for review April 30, 2024 18:49
@elinor-fung elinor-fung added this to the 9.0.0 milestone Apr 30, 2024
@elinor-fung elinor-fung merged commit c93ee68 into dotnet:main May 10, 2024
148 checks passed
@elinor-fung elinor-fung deleted the resolveFrameworks-api branch May 10, 2024 04:43
Ruihan-Yin pushed a commit to Ruihan-Yin/runtime that referenced this pull request May 30, 2024
…time frameworks (dotnet#101451)

- `hostfxr_resolve_frameworks_for_runtime_config` provides a way to run the host's runtime framework resolution in an isolated manner
  - Return code indicates basic success/failure and the optional callback can be used for additional information about what was or was not resolved
  - For framework-dependent, runs through framework resolution and propagates the result
    - Currently `unresolved_count` will always either be 0 or 1 - the host stops at the first failed resolution
  - For self-contained, any `includedFrameworks` per the runtime config are treated as resolved to the app's directory
- Add tests to `NativeHostApis` tests and update `HostApiInvokerApp` test asset to exercise new API
  - Update tests to stop copying hostfxr next to the app - pass in the paths via runtime config and make the test app resolve the load via DllImportResolver
@github-actions github-actions bot locked and limited conversation to collaborators Jun 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide a hostfxr API for resolving runtime frameworks
2 participants