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

POC - Refactor .NET 8 detection to eliminate FUNCTIONS_INPROC_NET8_ENABLED DLL approach #4249

Closed
wants to merge 1 commit into from

Conversation

saadalia
Copy link

@saadalia saadalia commented Feb 3, 2025

Update target framework detection and add new method

Refactor the way .NET 8 projects are detected by removing the IsInProcDotNet8Enabled method and introducing DotnetHelpers.IsDotNet8.

The IsDotNet8 method uses the main DLL file to determine the target framework. Additionally, a new method GetScriptFilePath has been added to ExtensionsHelper.cs to retrieve the script file path, but it is currently incomplete and requires further implementation.

Issue describing the changes in this PR

resolves #issue_for_this_pr

Pull request checklist

  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • 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)

Removed IsInProcDotNet8Enabled from StartHostAction.cs and updated methods to use DotnetHelpers.IsDotNet8() for .NET 8 detection. Added IsDotNet8 and GetTargetFramework methods to DotnetHelpers.cs for framework inspection. Introduced GetScriptFilePath in ExtensionsHelper.cs to extract script file paths from function.json. Updated ValidateHostRuntimeAsync_MatchesExpectedResults test to pass boolean directly.
@mattchenderson
Copy link
Contributor

Hi - the setting is a by-design requirement. It's use for local development intentionally mirrors the requirement in the hosting platform. Some publishing tools will rely upon this to get hosted configuration right, and it reinforces the requirement for users in general. We do not intend to remove this.

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