SharpPluginLoader.Core
0.0.3
See the version list below for details.
dotnet add package SharpPluginLoader.Core --version 0.0.3
NuGet\Install-Package SharpPluginLoader.Core -Version 0.0.3
<PackageReference Include="SharpPluginLoader.Core" Version="0.0.3" />
<PackageVersion Include="SharpPluginLoader.Core" Version="0.0.3" />
<PackageReference Include="SharpPluginLoader.Core" />
paket add SharpPluginLoader.Core --version 0.0.3
#r "nuget: SharpPluginLoader.Core, 0.0.3"
#:package SharpPluginLoader.Core@0.0.3
#addin nuget:?package=SharpPluginLoader.Core&version=0.0.3
#tool nuget:?package=SharpPluginLoader.Core&version=0.0.3
SharpPluginLoader
A C# plugin loader for Monster Hunter World based on .NET 8.0.
For more detailed documentation and tutorials, visit the wiki.
How to use
- Install .NET 8.0 (Get the .NET Desktop Runtime 8.0.0)
- Download the latest release from the releases page and extract it into your Monster Hunter World directory.
Plugin Development
For more detailed instructions visit the wiki.
- Install the Visual Studio 2022 17.8 Preview 2 or later.
- Create a new .NET 8.0 class library project and add a reference to
SharpPluginLoader.Core.dll. - Create a class that implements the
SharpPluginLoader.Core.IPlugininterface. - Implement the required methods.
- Put the compiled assembly into
nativePC/plugins/CSharp. Assemblies are also allowed to be in subdirectories.
Framework Development (with Visual Studio 2022)
- Clone the repository with submodules:
git clone --recursive git@github.com:Fexty12573/SharpPluginLoader.git
- Setup vcpkg IDE integration if you haven't already done so:
- Open
Developer PowerShell for Visual Studio - Run
vcpkg integrate install
- Open
- Generate cimgui VS project:
- Open
Developer PowerShell for Visual Studio cd SharpPluginLoader\dependencies\cimgui\cmake -B . -G 'Visual Studio 17 2022'
- Open
- Open
mhw-cs-plugin-loader.sln - Build solution
Build -> Build Solution
Dependency Resolution
The native host (SharpPluginLoader.Native.dll) loads the Bootstrapper assembly (SharpPluginLoader.Bootstrapper.dll)
into the default AssemblyLoadContext (ALC). The Bootstrapper then loads the core assembly into a custom ALC (CoreLoadContext).
The CoreLoadContext resolves all dependencies either from the current directory, or via the Default ALC.
The core assembly then loads all plugins into a custom ALC (PluginLoadContext) and resolves all dependencies from the CoreLoadContext. Each plugin is loaded into a separate ALC.
Enabling C# Debugging
- Make sure all projects are compiled in Debug mode.
- Open the
mhw-cs-plugin-loaderproject properties, make sure the Debug configuration is selected and go to General > Debugging. Here set the Debugger Type to Mixed (.NET Core). - In the Attach to Process dialog, make sure Managed (.NET Core, .NET 5+) and Native are selected.
Hosting Docs Locally
python -m venv venvvenv\Scripts\activatepip install -r requirements.txtmkdocs serve
Libraries Used
- safetyhook - Native hooking library
- Reloaded.Hooks - Managed hooking library
- cimgui - C wrapper for Dear ImGui
- Dear ImGui - GUI library
- ImGui.NET - C# wrapper for Dear ImGui
- tinyobjloader - Wavefront OBJ loader
- nlohmann-json - C++ JSON library
- zlib - Compression library
- DirectXMath - DirectX Math library
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- ImGui.NET (>= 1.89.9.3)
- Reloaded.Hooks (>= 4.3.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.