From e48f2301423f5177ec875308348fd4a83a071c3b Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 21 Mar 2018 00:19:12 -0400 Subject: add unit test mode to mod build config package --- docs/mod-build-config.md | 13 +++++++++++++ src/SMAPI.ModBuildConfig/build/smapi.targets | 17 +++++++++++++++++ src/SMAPI.ModBuildConfig/package.nuspec | 3 ++- 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/docs/mod-build-config.md b/docs/mod-build-config.md index ca750c86..2616d8a5 100644 --- a/docs/mod-build-config.md +++ b/docs/mod-build-config.md @@ -120,6 +120,19 @@ or you have multiple installs, you can specify the path yourself. There's two wa The configuration will check your custom path first, then fall back to the default paths (so it'll still compile on a different computer). +### Unit test projects +**(upcoming in 2.0.3)** + +You can use the package in unit test projects too. Its optional unit test mode... + +1. disables deploying the project as a mod; +2. disables creating a release zip; +2. and copies the referenced DLLs into the build output for unit test frameworks. + +To enable it, add this above the first `` in your `.csproj`: +```xml +True +``` ## Troubleshoot ### "Failed to find the game install path" diff --git a/src/SMAPI.ModBuildConfig/build/smapi.targets b/src/SMAPI.ModBuildConfig/build/smapi.targets index 7e8bbfc3..e27fc2c7 100644 --- a/src/SMAPI.ModBuildConfig/build/smapi.targets +++ b/src/SMAPI.ModBuildConfig/build/smapi.targets @@ -19,9 +19,14 @@ $(MSBuildProjectName) + True $(TargetDir) True True + + + False + False @@ -57,32 +62,40 @@ false + true false + true false + true false + true $(GamePath)\Netcode.dll False + true $(GamePath)\Stardew Valley.exe false + true $(GamePath)\StardewModdingAPI.exe false + true $(GamePath)\xTile.dll false False + true @@ -100,18 +113,22 @@ $(GamePath)\MonoGame.Framework.dll false False + true $(GamePath)\StardewValley.exe false + true $(GamePath)\StardewModdingAPI.exe false + true $(GamePath)\xTile.dll false + true diff --git a/src/SMAPI.ModBuildConfig/package.nuspec b/src/SMAPI.ModBuildConfig/package.nuspec index 8393ab61..6af8fefe 100644 --- a/src/SMAPI.ModBuildConfig/package.nuspec +++ b/src/SMAPI.ModBuildConfig/package.nuspec @@ -2,7 +2,7 @@ Pathoschild.Stardew.ModBuildConfig - 2.0.3-alpha20180307 + 2.0.3-alpha20180321 Build package for SMAPI mods Pathoschild Pathoschild @@ -29,6 +29,7 @@ 2.0.3: - Added support for Stardew Valley 1.3. + - Added support for unit test projects. -- cgit