Example Plugin, C#
The C# version of the vMenu Enhanced example plugin.
What is it
The C# version of the example plugin. Resource name vMenu.ExamplePlugin.CSharp.
Where do I look
| File | Contains |
|---|---|
client/Main.cs | The menu, translations and gates |
server/Main.cs | Permissions and settings |
fxmanifest.lua | The manifest. Every client DLL is listed under files |
Directory.Build.props | The resource name and output folders |
Directory.Packages.props | The plugin API version |
API docs: C# setup.
Building this example
- Install the .NET 10 SDK.
- Run
dotnet build -c Releasein this folder. - Copy
build/vMenu.ExamplePlugin.CSharp/into your server'sresourcesfolder andensureit.
Making your own plugin
- Create two class library projects targeting
net10.0, one for the client and one for the server. - Add the NuGet packages at the vMenu Enhanced version your server runs:
dotnet add Client package vMenu.Enhanced.ClientAPI --version <your vMenu version> dotnet add Server package vMenu.Enhanced.ServerAPI --version <your vMenu version> - Build each into its own folder,
client/andserver/, withCopyLocalLockFileAssemblieson.Directory.Build.propsshows how. - Write an
fxmanifest.luathat lists every client DLL underfiles, thenensurethe resource. The C# setup page has the full manifest.