Skip to content

Merging internal commits for release/8.0 #116498

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

Merged

Conversation

vseanreesermsft
Copy link

No description provided.

elinor-fung and others added 7 commits May 1, 2025 19:02
…rios (COM, C++/CLI, custom component host) could try to load coreclr from CWD

There is a fallback for apps with no .deps.json where the host will consider the app directory for loading coreclr. In component hosting scenarios, we do not have an app path / directory. We were incorrectly going down the path of looking for coreclr next to the empty app directory, which resulted in looking in the current directory.

This change skips that path for libhost scenarios. It also adds checks that the paths we determine for loading coreclr, hostpolicy, and hostfxr are absolute.
@Copilot Copilot AI review requested due to automatic review settings June 10, 2025 20:12
Copy link
Contributor

@Copilot 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.

Pull Request Overview

This PR merges internal commits for release/8.0 and introduces explicit checks to ensure that core libraries (coreclr, hostfxr, hostpolicy) are loaded from absolute paths. Key changes include:

  • Adding absolute path validations in multiple native host components.
  • Adjusting deps_resolver logic to account for libhost scenarios.
  • Introducing new tests that verify hosting components in the working directory are ignored.

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/native/corehost/hostpolicy/standalone/coreclr_resolver.cpp Added an absolute path check for the coreclr DLL.
src/native/corehost/hostpolicy/deps_resolver.cpp Modified logic to add known paths only for non-libhost cases and added an assertion on the application directory.
src/native/corehost/fxr_resolver.h Introduced an absolute path check for hostfxr.
src/native/corehost/fxr/standalone/hostpolicy_resolver.cpp Added an absolute path check for hostpolicy.
src/native/corehost/apphost/standalone/hostfxr_resolver.cpp Added an absolute path check for hostfxr and updated the status code when the check fails.
src/installer/tests/TestUtils/TestArtifact.cs Added a factory method to create test artifacts with associated deletion paths.
src/installer/tests/HostActivation.Tests/NativeHosting/NativeHostingResultExtensions.cs Renamed the extension class and added new methods for resolving hostfxr, hostpolicy, and coreclr.
src/installer/tests/HostActivation.Tests/NativeHosting/LoadAssemblyAndGetFunctionPointer.cs Added a test to ensure that hosting binaries in the working directory are ignored.
src/installer/tests/HostActivation.Tests/NativeHosting/Ijwhost.cs Added a test to validate that components in the working directory are not used.
src/installer/tests/HostActivation.Tests/NativeHosting/Comhost.cs Added a test to verify that hosting binaries from the working directory are not used during activation.

@hoyosjs hoyosjs added the Servicing-approved Approved for servicing release label Jun 11, 2025
@rbhanda rbhanda merged commit 5b9ae97 into dotnet:release/8.0 Jun 11, 2025
181 of 182 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants