Setup guide
Half the horror stories on modding forums are not coding problems. They are setup problems wearing a fake crash report. My first serious session ended at 2 a.m. on a script that never loaded, and the code was fine: Windows was hiding the file extension and Defender had quietly quarantined a hook. This guide gets your workshop right the first time, so you never lose that night.
Do the steps in order, and validate each link before adding the next. That single habit makes every later problem easy to locate.
Prepare Windows
Two Explorer settings, before anything else. Turn on "Show hidden files, folders, and drives", and turn off "Hide extensions for known file types". Without them you cannot tell a real MyScript.cs from a fake MyScript.cs.txt, and you cannot see the log files everyone will tell you to read.
Then deal with the antivirus. Modding works by injecting code into the game, which looks exactly like malware to Windows Defender. At best it locks a file while you compile. At worst it quarantines a hook file in the background without telling you, leaving you wondering why your scripts never load. Add your game folder and your projects folder to the exclusions, in an Administrator PowerShell:
Add-MpPreference -ExclusionPath "C:\Program Files (x86)\Steam\steamapps\common\Grand Theft Auto V"
Add-MpPreference -ExclusionPath "C:\Dev\GTAProjects"
Know your game folder
Everything installs relative to the GTA V root, the folder that holds GTA5.exe. The loader and hooks live directly here, next to the executable. If they land anywhere else, the game boots vanilla and nothing loads.
Grand Theft Auto V/
GTA5.exe the game
dinput8.dll the loader (intercepts startup)
ScriptHookV.dll the native hook
ScriptHookVDotNet.asi the .NET bridge
ScriptHookVDotNet3.dll the C# API your mods reference
scripts/ your compiled mods live here
One warning about permissions: if the game is under Program Files (x86), Windows protects that folder, and your IDE may fail to copy a freshly built DLL into scripts/. If you hit that, grant write permission on the scripts folder, or install the game on a drive without that protection.
Install the loader chain, link by link
Never install everything at once. Add one link, prove it works, then add the next.
- Install ScriptHookV: place
ScriptHookV.dllanddinput8.dllin the game root, along with the bundledNativeTrainer.asi. Launch the game and press F4. If the trainer menu appears, the native hook works. - Install ScriptHookVDotNet: place
ScriptHookVDotNet.asiandScriptHookVDotNet3.dllin the game root. Launch, then press Insert. If a small reload message flashes, the .NET bridge is alive. - Create the
scripts/folder if it does not exist. This is where your own compiled mods go.
If a link fails, you know exactly which one, because you tested them in isolation.
Install the IDE and the framework
Install Visual Studio 2022 Community, and make sure you have .NET Framework 4.8. This matters: ScriptHookVDotNet targets .NET Framework, not .NET Core or .NET 8. Building against the wrong framework is one of the most common reasons a DLL compiles but never loads.
Visual Studio gives you three things a text editor cannot: IntelliSense so you discover the API as you type, live compiler diagnostics so mistakes surface immediately, and a debugger you can attach to the running GTA5.exe to see exactly which line froze the game.
The clean revert trick
Keep one recovery move in your pocket: renaming or removing dinput8.dll disables the entire mod chain and boots the game clean in seconds. Whenever you are unsure whether a bug is yours or the setup's, revert to vanilla, confirm the game is fine, then add your layer back. That two-second test has saved me more evenings than any debugger.
You are ready
If the trainer opened, the reload message flashed, and Visual Studio builds against .NET Framework 4.8, your workshop is real. The next guide helps you finish the setup of your workbench: your editor, and whether and how to add an AI assistant to your workflow. After that, P0 puts this setup to the test.