add optional Harmony reference to mod build package
This commit is contained in:
parent
a07e2de9a0
commit
a54db1b330
|
@ -49,6 +49,12 @@ non-mod projects like unit tests, you can set this property:
|
||||||
<CopyModReferencesToBuildOutput>true</CopyModReferencesToBuildOutput>
|
<CopyModReferencesToBuildOutput>true</CopyModReferencesToBuildOutput>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If your mod uses [Harmony](https://github.com/pardeike/Harmony) (not recommended for most mods),
|
||||||
|
the package can add a reference to SMAPI's Harmony DLL for you:
|
||||||
|
```xml
|
||||||
|
<EnableHarmony>true</EnableHarmony>
|
||||||
|
```
|
||||||
|
|
||||||
### Copy files into the `Mods` folder and create release zip
|
### Copy files into the `Mods` folder and create release zip
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Files considered part of your mod</dt>
|
<dt>Files considered part of your mod</dt>
|
||||||
|
@ -269,6 +275,7 @@ If you need to copy the referenced DLLs into your build output, add this too:
|
||||||
* added GAC to assembly search paths to fix references to XNA Framework.
|
* added GAC to assembly search paths to fix references to XNA Framework.
|
||||||
* Added option to disable game debugging config.
|
* Added option to disable game debugging config.
|
||||||
* Added `.pdb` files to builds by default (to enable line numbers in error stack traces).
|
* Added `.pdb` files to builds by default (to enable line numbers in error stack traces).
|
||||||
|
* Added optional Harmony reference.
|
||||||
* Fixed `Newtonsoft.Json.pdb` included in release zips when Json.NET is referenced directly.
|
* Fixed `Newtonsoft.Json.pdb` included in release zips when Json.NET is referenced directly.
|
||||||
* Fixed `<IgnoreModFilePatterns>` not working for `i18n` files.
|
* Fixed `<IgnoreModFilePatterns>` not working for `i18n` files.
|
||||||
* Dropped support for older versions of SMAPI and Visual Studio.
|
* Dropped support for older versions of SMAPI and Visual Studio.
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
<ModZipPath Condition="'$(ModZipPath)' == ''">$(TargetDir)</ModZipPath>
|
<ModZipPath Condition="'$(ModZipPath)' == ''">$(TargetDir)</ModZipPath>
|
||||||
<EnableModDeploy Condition="'$(EnableModDeploy)' == ''">true</EnableModDeploy>
|
<EnableModDeploy Condition="'$(EnableModDeploy)' == ''">true</EnableModDeploy>
|
||||||
<EnableModZip Condition="'$(EnableModZip)' == ''">true</EnableModZip>
|
<EnableModZip Condition="'$(EnableModZip)' == ''">true</EnableModZip>
|
||||||
|
<EnableHarmony Condition="'$(EnableModZip)' == ''">false</EnableHarmony>
|
||||||
<EnableGameDebugging Condition="$(EnableGameDebugging) == ''">true</EnableGameDebugging>
|
<EnableGameDebugging Condition="$(EnableGameDebugging) == ''">true</EnableGameDebugging>
|
||||||
<CopyModReferencesToBuildOutput Condition="'$(CopyModReferencesToBuildOutput)' == ''">false</CopyModReferencesToBuildOutput>
|
<CopyModReferencesToBuildOutput Condition="'$(CopyModReferencesToBuildOutput)' == ''">false</CopyModReferencesToBuildOutput>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
@ -32,6 +33,13 @@
|
||||||
<!--*********************************************
|
<!--*********************************************
|
||||||
** Inject the assembly references and debugging configuration
|
** Inject the assembly references and debugging configuration
|
||||||
**********************************************-->
|
**********************************************-->
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="0Harmony" Condition="'$(EnableHarmony)' == 'true'">
|
||||||
|
<HintPath>$(GamePath)\smapi-internal\0Harmony.dll</HintPath>
|
||||||
|
<Private>false</Private>
|
||||||
|
<Private Condition="$(CopyModReferencesToBuildOutput)">true</Private>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
<Choose>
|
<Choose>
|
||||||
<When Condition="$(OS) == 'Windows_NT'">
|
<When Condition="$(OS) == 'Windows_NT'">
|
||||||
<!-- references -->
|
<!-- references -->
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
- added GAC to assembly search paths to fix references to XNA Framework.
|
- added GAC to assembly search paths to fix references to XNA Framework.
|
||||||
- Added option to disable game debugging config.
|
- Added option to disable game debugging config.
|
||||||
- Added `.pdb` files to builds by default (to enable line numbers in error stack traces).
|
- Added `.pdb` files to builds by default (to enable line numbers in error stack traces).
|
||||||
|
- Added optional Harmony reference.
|
||||||
- Fixed `Newtonsoft.Json.pdb` included in release zips when Json.NET is referenced directly.
|
- Fixed `Newtonsoft.Json.pdb` included in release zips when Json.NET is referenced directly.
|
||||||
- Fixed `<IgnoreModFilePatterns>` not working for `i18n` files.
|
- Fixed `<IgnoreModFilePatterns>` not working for `i18n` files.
|
||||||
- Dropped support for older versions of SMAPI and Visual Studio.
|
- Dropped support for older versions of SMAPI and Visual Studio.
|
||||||
|
|
Loading…
Reference in New Issue