Skip to content

Conversation

@GrabYourPitchforks
Copy link
Member

Resolves #32941.

The *.runtimeconfig.json files are being picked up from the shared framework builds and included as part of the .NET 8 installers. Since the shared framework is itself not a WinForms or WPF application, it results in "explicitly disable BF" being hardcoded into the config file, which is then distributed to customers' machines via the installer. This is resulting in BF disablement for all project types starting with Preview 5, even though that was not our intent.

The proposed fix here special-cases WinForms and WPF within the .targets file where we made the initial change, and it forces those project types to re-enable BF if the developer has not set a different value in the .csproj. One downside of this change is that if a WinForms or WPF application is published against .NET 8, the "enable BF" policy will be carried within that app's runtimeconfig.json file, which means that if the app is rolled forward it won't honor the .NET 9 "disabled absolutely everywhere" default setting once that change is checked in. But after talking with some folks here, that seems like an acceptable risk to unblock this scenario.

@ghost ghost added Area-ILLink untriaged Request triage from a team member labels Jun 1, 2023
@GrabYourPitchforks GrabYourPitchforks added this to the .NET 8.0 milestone Jun 1, 2023
@GrabYourPitchforks
Copy link
Member Author

GrabYourPitchforks commented Jun 1, 2023

The root cause of the BF issue seems to be #32969. This PR can still serve to unblock #32941 temporarily.

@GrabYourPitchforks GrabYourPitchforks force-pushed the GrabYourPitchforks-patch-1 branch from 5447f4e to aeda468 Compare June 1, 2023 19:21
@GrabYourPitchforks GrabYourPitchforks changed the base branch from main to release/8.0.1xx-preview5 June 1, 2023 19:22
@GrabYourPitchforks
Copy link
Member Author

I've retargeted the PR into the Preview5 branch, per Chet's request.

@marcpopMSFT marcpopMSFT enabled auto-merge June 1, 2023 20:36
@marcpopMSFT marcpopMSFT merged commit 52b590c into release/8.0.1xx-preview5 Jun 1, 2023
@marcpopMSFT marcpopMSFT deleted the GrabYourPitchforks-patch-1 branch June 1, 2023 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-NetSDK untriaged Request triage from a team member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BinaryFormatter is disabled in WinForms or WPF projects in preview6

5 participants