summaryrefslogtreecommitdiff
path: root/build/common.targets
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-12-04 15:55:16 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-12-04 15:55:16 -0500
commit711e17a4f99af29177fb250b24868b6e655dacb7 (patch)
tree5972a3ae3e2d5d1d03336d68bcd1fad3f4390177 /build/common.targets
parent1d7340f598436df705cf01c00ad1b33f70c60c72 (diff)
downloadSMAPI-711e17a4f99af29177fb250b24868b6e655dacb7.tar.gz
SMAPI-711e17a4f99af29177fb250b24868b6e655dacb7.tar.bz2
SMAPI-711e17a4f99af29177fb250b24868b6e655dacb7.zip
suppress non-applicable code warnings
Diffstat (limited to 'build/common.targets')
-rw-r--r--build/common.targets15
1 files changed, 15 insertions, 0 deletions
diff --git a/build/common.targets b/build/common.targets
index c9a54763..ed860eee 100644
--- a/build/common.targets
+++ b/build/common.targets
@@ -9,6 +9,21 @@
<!--set platform-->
<DefineConstants Condition="$(OS) == 'Windows_NT'">$(DefineConstants);SMAPI_FOR_WINDOWS</DefineConstants>
<CopyToGameFolder>true</CopyToGameFolder>
+
+ <!-- allow mods to be compiled as AnyCPU for compatibility with older platforms -->
+ <ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
+
+ <!--
+ suppress warnings that don't apply, so it's easier to spot actual issues.
+
+ warning | builds | summary | rationale
+ ┄┄┄┄┄┄┄ | ┄┄┄┄┄┄┄ | ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄ | ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
+ CS0436 | all | local type conflicts with imported type | SMAPI needs to use certain low-level code during very early compatibility checks, before it's safe to load any other DLLs.
+ CA1416 | all | platform code available on all platforms | Compiler doesn't recognize the #if constants used by SMAPI.
+ CS0809 | all | obsolete overload for non-onsolete member | This is deliberate to signal to mods that certain APIs are only implemented for the game and shouldn't be called by mods.
+ NU1701 | all | NuGet package targets older .NET version | All such packages are carefully tested to make sure they do work.
+ -->
+ <NoWarn>$(NoWarn);CS0436;CA1416;CS0809;NU1701</NoWarn>
</PropertyGroup>
<!--find game folder-->