SharpPluginLoader.Core 0.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package SharpPluginLoader.Core --version 0.0.2                
NuGet\Install-Package SharpPluginLoader.Core -Version 0.0.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SharpPluginLoader.Core" Version="0.0.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SharpPluginLoader.Core --version 0.0.2                
#r "nuget: SharpPluginLoader.Core, 0.0.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SharpPluginLoader.Core as a Cake Addin
#addin nuget:?package=SharpPluginLoader.Core&version=0.0.2

// Install SharpPluginLoader.Core as a Cake Tool
#tool nuget:?package=SharpPluginLoader.Core&version=0.0.2                

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

  1. Install .NET 8.0 (Get the .NET Desktop Runtime 8.0.0)
  2. 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.

  1. Install the Visual Studio 2022 17.8 Preview 2 or later.
  2. Create a new .NET 8.0 class library project and add a reference to SharpPluginLoader.Core.dll.
  3. Create a class that implements the SharpPluginLoader.Core.IPlugin interface.
  4. Implement the required methods.
  5. Put the compiled assembly into nativePC/plugins/CSharp. Assemblies are also allowed to be in subdirectories.

Framework Development (with Visual Studio 2022)

  1. Clone the repository with submodules:
    1. git clone --recursive git@github.com:Fexty12573/SharpPluginLoader.git
  2. Setup vcpkg IDE integration if you haven't already done so:
    1. Open Developer PowerShell for Visual Studio
    2. Run vcpkg integrate install
  3. Generate cimgui VS project:
    1. Open Developer PowerShell for Visual Studio
    2. cd SharpPluginLoader\dependencies\cimgui\
    3. cmake -B . -G 'Visual Studio 17 2022'
  4. Open mhw-cs-plugin-loader.sln
  5. 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

  1. Make sure all projects are compiled in Debug mode.
  2. Open the mhw-cs-plugin-loader project properties, make sure the Debug configuration is selected and go to General > Debugging. Here set the Debugger Type to Mixed (.NET Core).
  3. In the Attach to Process dialog, make sure Managed (.NET Core, .NET 5+) and Native are selected.

Hosting Docs Locally

  1. python -m venv venv
  2. venv\Scripts\activate
  3. pip install -r requirements.txt
  4. mkdocs serve

Libraries Used

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
0.0.7 183 8/19/2024
0.0.6 227 4/3/2024
0.0.5 182 3/22/2024
0.0.4.1 141 3/12/2024
0.0.4 125 3/3/2024
0.0.3.1 126 2/8/2024
0.0.3 118 2/8/2024
0.0.2 153 1/15/2024