A Garry's Mod C# abstraction layer.
- Download voidsharp and put it to your addons folder. Name it
voidsharp
. VoidSharp is already pre-compiled, you don't need to transpile it - Create a new folder and follow this template: https://github.com/m0uka/voidsharp-example , basically you need to create a Lua loader that executes your addon and a .csproj where you will be writing C# code, the devenv folder contains the CSharp.lua compiler.
- Copy compile.bat from https://github.com/VoidTeam1/voidcsharp/blob/master/src/compile.bat and put it into your src folder
- Compile VoidSharp as a dll, or if you are lazy download it from here: https://github.com/VoidTeam1/voidcsharp/blob/master/src/bin/Debug/netcoreapp3.1/VoidSharp.dll, note you will need to update/compile everytime VoidSharp changes
- In your project, add a reference to the DLL (this is how it's done in Rider - https://m0uka.dev/u/HMvAgj.png)
- Your project should now have no errors, the VoidSharp library should be available.
- If you have no errors in your project, you can transpile the code by running compile.bat
- Restart your server and your code should be working