Compiling FiveM server on Windows

I am trying to compile the FiveM source code on my windows machine but I get errors when I get to visual studio.

Here’s the steps I’ve taken so far:
Installed Visual Studio 2022 & the components needed
Installed Python 3.13.2
Installed Powershell 7
Installed MSYS2
Installed NodeJS & Yarn

Ran these commands:
git clone GitHub - citizenfx/fivem: The source code for the Cfx.re modification frameworks, such as FiveM, RedM and LibertyM, as well as FXServer. -c core.symlinks=true
cd fivem
git submodule update --jobs=16 --init
pip install setuptools
fxd get-chrome
prebuild
fxd gen -game server
fxd vs -game server

I just want to compile citizen-server-impl.dll but here’s the errors I get:

Take a look at this, it might be your issue

Going to recompile today, will update.


This seems to have fixed most of the errors, I still get these errors though.

Edit: I managed to get it to work by restarting my computer and compiling again.