Skip to content

Handle self-contained application load#2036

Merged
kshyju merged 2 commits intomainfrom
shkr/fnh_self-contained
Nov 8, 2023
Merged

Handle self-contained application load#2036
kshyju merged 2 commits intomainfrom
shkr/fnh_self-contained

Conversation

@kshyju
Copy link
Copy Markdown
Member

@kshyju kshyju commented Nov 8, 2023

FunctionsNetHost changes to handle self contained apps.

The major change is how we are getting the hostfxr path. Previously we were preload hostfxr in placeholder mode. With this change, we find the hostfxr path and load during cold start.

  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes should not be added to the release notes for the next release
    • Otherwise: I've added my notes to release_notes.md
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • I have added all required tests (Unit tests, E2E tests)

@kshyju
Copy link
Copy Markdown
Member Author

kshyju commented Nov 8, 2023

@elinor-fung Could you please review this change?

@kshyju kshyju requested review from brettsam and fabiocav November 8, 2023 00:49
Comment thread host/src/FunctionsNetHost/AppLoader/AppLoader.cs Outdated
Comment thread host/src/FunctionsNetHost/AppLoader/AppLoader.cs
@kshyju kshyju merged commit 6b2e257 into main Nov 8, 2023
@kshyju kshyju deleted the shkr/fnh_self-contained branch November 8, 2023 19:05
#if OS_LINUX
return (char*)Marshal.StringToHGlobalAnsi(assemblyPath).ToPointer();
#else
return (char*)Marshal.StringToHGlobalUni(assemblyPath).ToPointer();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should be freed (Marshal.FreeHGlobal) after they are done being used.

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.

3 participants