Remora.Resonite.Sdk 1.3.3-prerelease5

Prefix Reserved
This is a prerelease version of Remora.Resonite.Sdk.
There is a newer version of this package available.
See the version list below for details.
<Sdk Name="Remora.Resonite.Sdk" Version="1.3.3-prerelease5" />                
For projects that support Sdk, copy this XML node into the project file to reference the package.

Remora.Resonite.Sdk

Remora.Resonite.Sdk is an MSBuild SDK made to simplify development of Resonite plugins

Feature Highlights

  • Supports both plugins and mods (via ResoniteModLoader)
  • Supports the main and headless clients
  • Does not require Resonite to be installed
  • dotnet publish generates a pre-formatted .zip file, ready for release
  • dotnet build optionally installs the artifacts to Resonite
  • Easily debug right from your IDE!

Usage

The SDK is made available via NuGet, and usage is as simple as using it in place of the standard .NET SDK. You can also configure the project type and the target version of Resonite you want to build content for.

<Project Sdk="Remora.Resonite.Sdk/1.0.0">
    <PropertyGroup>
        <ResoniteProjectType>mod</ResoniteProjectType>
        <ResoniteTarget>client</ResoniteTarget>
    </PropertyGroup>
</Project>

Note that you do not need to define the target framework(s); the SDK defaults to the target framework that the chosen version of Resonite uses.

Feature Breakdown

The following sections dive into each feature category that the SDK handles. Generally, the SDK defines or implements features within each category in an overridable or non-overridable way; non-overridable features are defined after user definitions, and overwrite any value you set.

Properties marked with an asterisk (*) are defined by Remora.Resonite.Sdk and are not part of the standard set of properties exposed by MSBuild or Microsoft.NET.Sdk.

Targeting

The following properties are defined by the SDK.

Property Value Overridable
TargetFramework net462 Yes
ResoniteProjectType* mod Yes
ResoniteTarget* client Yes

ResoniteProjectType can be set to plugin, mod, libraryor standalone. In the case of mods, a reference to ResoniteModLoader will be automatically added as well.

ResoniteTarget can be set to either client or headless. The latter is for the server version of Resonite which does not have any graphics, while the former is the normal version.

standalone projects build freestanding executables instead of additions to the official Resonite clients - this can be used to build tools and utilities that work with the Resonite ecosystem outside of direct client interaction.

Building

The following properties are defined by the SDK.

Property Value Overridable
ResonitePath* $(MSBuildProjectDirectory)/Resonite Yes
ResoniteInstallOnBuild* false Yes
ResoniteReferencePath* (internal) Yes
ResoniteForceReferenceAssemblies* false Yes

ResonitePath defaults to looking for a live installation of Resonite in the project directory, and then proceeds to check common system installation paths. If you have installed Resonite in a non-standard location, you can use this property to configure it. It is not required for ResonitePath to point to a real installation; the SDK will work just fine without one.

If ResoniteInstallOnBuild is set to true, the produced build artifacts will be copied to your Resonite installation directory whenever the project is built or published. This can be combined with an IDE and a debugger to quickly and easily test your mod without having to go through the steps of manually moving things over whenever you've made modifications.

Remora.Resonite.Sdk bundles Resonite's API in the form of reference assemblies, which enable installation-free compilation for all four supported project variants. You can control the location where these assemblies are loaded from with ResoniteReferencePath if you don't want to use the ones bundled with the SDK.

If you do have Resonite installed, the real assemblies from the installation directory will be preferentially chosen. If you don't want this, you can set ResoniteForceReferenceAssemblies to true in order to disable that behaviour and always use the reference assemblies in ResoniteReferencePath.

References

Remora.Resonite.Sdk extends the normal msbuild PackageReference and ProjectReference items with a third option: ResoniteReference. This reference type can be used to add references to assemblies either available through the reference assemblies or directly in Resonite's installation directory. For example, to add a reference to BaseX, you would simply add this to your project file.

<ItemGroup>
    <ResoniteReference Include="BaseX"/>
</ItemGroup>

PackageReference items are also fully supported, meaning you can use any compatible library on nuget when developing your project. The required assemblies will be copied to the appropriate directory depending on your project type.

Compile-time Constants

The SDK also defines a set of compile-time constants which you can use if your project needs to know certain information about the target environment it's being compiled for.

Name Description
RESONITE_MOD defined if '$(ResoniteProjectType)' == 'mod'
RESONITE_PLUGIN defined if '$(ResoniteProjectType)' == 'plugin'
RESONITE_LIBRARY defined if '$(ResoniteProjectType)' == 'library'
RESONITE_STANDALONE defined if '$(ResoniteProjectType)' == 'standalone'
RESONITE_CLIENT defined if '$(ResoniteTarget)' == 'client'
RESONITE_HEADLESS defined if '$(ResoniteTarget)' == 'headless'

These can be useful if you want to support both the headless and the normal client but need to use specialized API surfaces in either target.

Assembly Attributes

Since knowing the Resonite version something was built against can be useful in several instances, the version is embedded into your assemblies as an assembly attribute.

No matter your project type, the following attributes are always defined.

Name Parameters
AssemblyMetadata Key = "ResoniteVersion", Value = "$CURRENT_VERSION"

Publishing

The following properties are defined by the SDK.

Property Value Overridable
ResoniteGenerateReleaseArchive '$(Configuration)' == 'Release' Yes

dotnet publish has been extended to both generate a proper directory structure in the output directory, but also to create a .zip file suitable for direct unpacking into a Resonite installation. The archive can be uploaded as part of a github release or other distribution process.

You can disable this behaviour by setting ResoniteGenerateReleaseArchive to false.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.3.14 172 9/4/2024
1.3.13 134 8/13/2024
1.3.12 101 7/27/2024
1.3.11 101 7/23/2024
1.3.10 83 7/20/2024
1.3.9 97 7/20/2024
1.3.8 70 7/19/2024
1.3.7 88 7/18/2024
1.3.6 80 7/16/2024
1.3.5 85 7/15/2024
1.3.4 87 7/13/2024
1.3.3 91 7/12/2024
1.3.3-prerelease5 107 7/11/2024
1.3.3-prerelease4 70 7/10/2024
1.3.3-prerelease3 81 7/9/2024
1.3.3-prerelease2 80 7/9/2024
1.3.3-prerelease1 87 7/8/2024
1.3.2 87 7/5/2024
1.3.1 113 6/26/2024
1.3.0 109 6/11/2024
1.2.33 96 6/11/2024
1.2.32 105 6/5/2024
1.2.31 174 5/31/2024
1.2.30 99 5/30/2024
1.2.29 110 5/29/2024
1.2.28 98 5/28/2024
1.2.27 126 5/24/2024
1.2.26 112 5/24/2024
1.2.25 93 5/23/2024
1.2.24 147 5/7/2024
1.2.23 126 5/4/2024
1.2.22 119 4/27/2024
1.2.21 133 4/20/2024
1.2.20 142 4/3/2024
1.2.19 148 3/12/2024
1.2.18 178 3/12/2024
1.2.17 138 3/3/2024
1.2.16 170 2/13/2024
1.2.15 127 2/5/2024
1.2.14 117 2/3/2024
1.2.13 132 1/28/2024
1.2.12 142 1/27/2024
1.2.11 120 1/25/2024
1.2.10 146 1/19/2024
1.2.9 114 1/18/2024
1.2.8 131 1/14/2024
1.2.7 167 1/5/2024
1.2.6 166 1/3/2024
1.2.5 151 12/31/2023
1.2.4 145 12/21/2023
1.2.3 186 12/13/2023
1.2.2 154 12/11/2023
1.2.1 198 11/25/2023
1.2.0 165 11/25/2023
1.1.9 189 11/25/2023
1.1.8 146 11/18/2023
1.1.7 170 11/15/2023
1.1.6 127 11/14/2023
1.1.5 104 11/12/2023
1.1.4 160 11/7/2023
1.1.3 263 10/20/2023
1.1.2 230 10/18/2023
1.1.1 237 10/17/2023
1.1.0 271 10/15/2023
1.0.2 216 10/13/2023
1.0.1 223 10/11/2023
1.0.0 248 10/6/2023

Update reference assemblies to Resonite 2024.7.11.377.