Prevent AnyCPU builds on .NET Framework #150
Merged
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.
As discussed in SFML/SFML.Net#174, the Nuget CSFML package doesn't copy its native files correctly when building with AnyCPU on the .NET Framework.
Given that the .NET Framework is being deprecated soon, this PR adds an MSBuild file to the package that detects when AnyCPU is being used and instructs the user to either switch to .NET Core or change platforms to x86/x64, failing the build.
A property is provided to override this error in case the user wants to copy and load CSFML's files manually at runtime.
Additionally, the deprecated
PackageIconUrl
property was replaced withPackageIcon
pointing to a local PNG.This should fix #149 and SFML/SFML.Net#174