RFC - Add support for .NetFramework AnyCPU - #64
Open
deAtog wants to merge 7 commits into
Open
Conversation
added 7 commits
July 21, 2026 14:07
…p.config to support ANYCPU target.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds support for the AnyCPU target in .Net Framework.
The following changes have been made:
As a result of these changes, the Mime package now conditionally depends on the Magic.NetFramework package and the Magic.NetStandard packages depending on the target framework of the project. The Magic.NetFramework packages includes transformations to apply to the application's app.config file to load the appropriate version of the Magic library from the appropriate subfolder. These transformations are applied regardless of the platform target when a project targets the .Net Framework to allow side by side installation of native .Net executables and to support the AnyCPU target. The app.config transformations depend on SlowCheetah 2.5.48 which is bundled into the Magic.NetFramework package as a tool. The Magic.NetStandard package does not contain transformations as only Windows supports AnyCPU applications.
I have tested these changes on Windows with .Net Framework only. Additional tests are required to ensure these packages work as expected on other platforms.
Note: The app.config transforms contain the public key signature of the signed libraries. The signature in these files must match the one used to sign the files. If you build release versions of these packages with a custom key.snk then you will need to adjust the signature in these files appropriately. The current signature in these files should match the one currently used by hey-red when publishing the current Mime nuget package.