Add build error for AnyCPU on .NET Framework

This commit is contained in:
Davipb authored and Lukas Dürrenberger committed 2021-03-01 15:19:41 +01:00
1 parent 99cea94aaf
commit 063923308f
3 files changed
+15

No files matched your search

+1
View File
@@ -34,6 +34,7 @@
<ItemGroup>
<None Pack="True" Include="runtimes/**" PackagePath="runtimes" />
<None Pack="True" Include="build/**" PackagePath="build" />
</ItemGroup>
</Project>
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CSFMLIgnoreAnyCPU>false</CSFMLIgnoreAnyCPU>
</PropertyGroup>
</Project>
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="CSFMLAnyCPUError" Condition="$(CSFMLIgnoreAnyCPU) != true and $(Platform) == 'AnyCPU'" BeforeTargets="Build">
<Error Text="CSFML doesn't support 'Any CPU' on the .NET Framework. Consider switching to .NET Core. If this is not possible, change your platform to x64 or x86, or set the MSBuild property 'CSFMLIgnoreAnyCPU' to true and manually load the appropriate native library at runtime." />
</Target>
</Project>