Setting Up a Development Environment using Visual Studio

From GTA Network Wiki
Jump to: navigation, search

Setting Up a Development Environment using Visual Studio


  • Basic C# programming knowledge

Installation process

The installation of Visual Studio 2017 is fairly simple, the installer by default does not install the required packages, so we're gonna do that on our own. Once we run the installer, we'll be prompted to choose our install options/packages, by default the Visual Studio installs the required files for the standard .NET development but not the new experimental one, so we'll make sure to install the experimental .NET Core development packages by clicking on it.


Setting Up The Project

Before you setup the project in Visual Studio Code, make sure you have an appropriate directory to place your projects in. Also be sure you have extracted the server files somewhere.

For this tutorial, my server files will be extracted to C:\RAGEMP\server-files as you can see in the screenshot bellow.

explorer 2018-04-30 18-18-46.png

Open the bridge folder (C:\RAGEMP\server-files\bridge), right click on settings.xml and Edit with a reliable text exitor (i.e: Notepad++)

explorer 2018-04-30 18-12-59.png

Considering this is a clean setup, right beneath <resource src="welcomemessages" /> add the following line: <resource src="myresourcename" />

notepad++ 2018-04-30 18-07-40.png

Save and close the Text editor window.

Now that we have our resources settings set up, we're now going to create the resource folder to where resources source files will reside in.

Which as you can see, under the C:\RAGEMP\server-files\bridge\resources directory, I have created my myresourcename folder.


Go back to C:\RAGEMP\server-files\ directory and launch the server.exe executable so it creates the resource template

explorer 2018-04-30 18-21-45.png

You should see the following yellow line in the console myresourcename: 'meta.xml' is missing, creating a default resource template.., this means you've got everything set up correctly so far.

server 2018-04-30 18-25-38.png

Setting up Visual Studio

Close the server, navigate to the server-files/bridge/resources where all your resources reside and open myresourcename folder.


You should see a .csproj file with your resource name on it (myresourcename.csproj), click twice on it and it should launch with Visual Studio


You should now be able to edit your resource code. once done so, you can save it and launch the server to see it working.

That's it, Happy programing!

Debugging (Breakpoints, Stack traces, etc..)