Compiling under VS2022
With Visual Studio 2013 becoming older and harder to obtain, using Microsoft's (as of writing) actively supported and updated Visual Studio 2022 becomes a no-brainer. As it is not a officially-supported Integrated development environment in eyes of the Source SDK, some work is required to get it all functioning.
This article is primarily based on these two GitHub repos
I'm starting from scratch!
If you don't want to deal with setting up the project, or if you have problems compiling the source code because of certain errors, you can clone this repo since it's based on the official repo and has minimal changes, just to make it run without problems. Please disregard any "compile process successful but file not found" warning as it is meaningless.
If you don't have an older version of Visual Studio on your computer, VPC will fail to run, as it can't find certain registry keys specific to older versions.
The best solution is to go grab an edit of VPC that works for modern versions of Visual Studio. Such as this one
Another solution would be to add the registry keys VPC is looking for. You can follow this fix.
Once running the VPC scripts will need to be modified to support the newer toolsets.
Once everything's compiling, you'll hit a snag with particles.lib. It defines the symbol _hypot, and in VS 2022, that symbol is already getting used up.
The best solution for this is to go grab an edit of particles.lib that's been fixed. (Like this one)
If you're not a fan of that idea, one alternative could be telling VPC to allow multiple symbols to exist for the client project. This is not a great practice though! Example
The main file that needs to be fixed for Source to work under VS 2022 is memoverride.cpp.
Do what this page asks you to do while ignoring any reference to Visual Studio 2013, fix the Registry keys problem with the fix from the same page, download particles.lib to
<mp or sp>\src\lib\public from this, and finally, replace memoverride.cpp located at
<mp or sp>\src\public\tier0 with this one. Have fun making Source mods with updated software ;)