-
Notifications
You must be signed in to change notification settings - Fork 3
Usage with Visual Studio 2022
sneakyevil edited this page Feb 25, 2025
·
1 revision
- Visual Studio 2022 with C++
- Cloned repository of the SDK.
- Download the template for Visual Studio 2022.
- Place template zip file in to the folder that's located at:
%USERPROFILE%\Documents\Visual Studio 2022\Templates\ProjectTemplates\Visual C++.- If you're having an issue getting the template working check this page.
- Open Visual Studio 2022
- Click on Create a new project
- Search for template called:
SDModding SDK. - Then just create the project.
- Inside the project select menu option at top called
Projectand thenProperties. - Inside properties you have configuration property called
VC++ Directories, select that. - Now you will need to modify
Include DirectoriesandLibrary Directoriesto the folder that contains current SDK folder from this repository. - You will need to do this for both
DebugandReleaseconfiguration.
- After you did everything above, you should be ready to be compile the example dllmain.cc
- When it compiles and you load it to the game you should have in top-left corner debug text as shown below:

- Same as before in
VC++ Directoriesyou will open the Project Properties. - Select
Debuggingproperty. - Modify
Commandto the game executable path and also modifyWorking Directoryto the game folder. - Now you simply can run the game from visual studio debugger.
- You can use program such as
Process Hacker 2to inject DLL directly to the game, but you will need to do that each game launch. - Best way is to use ASI Loader and then just moving compiled dll to the game folder or plugins folder and having your compiled dll automatically loaded on the game launch.
- If you want your compiled DLL be automatically moved to the game folder as .asi file you can use Build Events inside Project Properties and using Post-Build event that for example executes batch script as:
echo f | xcopy /y "$(TargetPath)" "C:\Program Files (x86)\Steam\steamapps\common\SleepingDogsDefinitiveEdition\MyProject.asi"
- If you want your compiled DLL be automatically moved to the game folder as .asi file you can use Build Events inside Project Properties and using Post-Build event that for example executes batch script as: