Visual Studio with Perforce


I have perforce working. I have visual studio working. I have all the plugins installed and all that good stuff. How should I use Visual Studio and Perforce together?

The only way to effectively get everything to work so far is to have the person working on the C++ side to check out the entire repository. Other than that things won’t build.

What am I missing?

Is there an easier way? It hasn’t caused many collaboration issues, but there has to be something missing.

You shouldn’t need to checkout the whole repo to build…what errors are you getting?

Check out the stuff in the Binaries folder and whatever code files you need to change. Intermediate and Saved folder and the .sln should not be in the repo.

You can use P4VS but a word of warning: it’s slow as hell and will lock up Visual Studio a lot if you have a solution file with the engine code in it.

For how your depot should be set up, consult the documentation. Your entire project folder should be kept in Perforce minus the build, ddc, intermediate and saved directories, if you are using your own editor build (ie. it’s from GitHub, Epic’s licensee Perforce or you have custom middleware integrations) then you should also include the engine files in your depot.

I’d useNifty Perforce rather than P4VS, Nifty is super performant and easy to use. Only check out the files you edit, binaries, and consult the documentation that sswires linked. Also make sure you “Revert Unchanged Files” before doing a submit so you aren’t checking in unnecessary files.

We use the standalone P4V to be honest. We have more than just code files to manage anyway, no need for a VS plugin.

We have all the proper ignores setup so the binaries and such are not in the files. Visual studio always complains about needing to put intellisense somewhere else. Even after you do that there are regular random build errors with the inability to delete temporary files and other things.

It just seems completely ridiculous. It would be great to edit a text file without all the horrifying baggage that comes along whenever a microsoft product is in use. Of course since they made the blueprints binary files you can’t use git without horrible consequences.

I’m running with the example typemap from the docs and the P4V standalone client without any issues Using Perforce as Source Control | Unreal Engine Documentation

One thing that typemap does miss is PDB files, so if you store those in source control then you may want to make that extension writeable. Any other build errors about unwriteable files will be from files that don’t need to be in source control.