Version Control file extension exclusion
I currently use Perforce for version control.
When I work, only editing versionned .h files and .cpp files, Rider will often put .pdb files (and other binairies) in my current changelist.
I tried to find a way to exclude .pdb files from being added to my current changelist but I could not find it or any other way to prevent this behavior.
Please sign in to leave a comment.
Hello,
Have you tried to configure P4IGNORE? You can find the manual here.
Hello Dmitry,
I have a p4ignore file but there are few times where I need to submit .pdb and .dll files. I really only expect Rider to checkout the files I have actively working on at the moment.
Would you mind sharing your p4ignore file with us and describing your use-case in more detail, so we could check if there is a compatible solution?
I should of mentionned this earlier but I am using Rider for Unreal and working on an Unreal project.
I am not allowed to share any files from my work so I cannot share the p4ignore file.
I have a p4ignore file but I do not want to ignore .dll and .pdb files because there are rare occasions where I do want to submit such files.
The list below is all the files that were added to my current changelist and marked for add while I was working. My changelist initially only contained 3 .cpp/.h modified files and 2 new .cpp/.h files. This means a changelist of 5 files became a changelist of 338 files.
It does not seem like I can suggest a suitable solution for such a workflow but only a workaround. The problem is that once some */Binaries/* are committed, they become read-only in the workspace-related folder. That is how perforce works. In that case, any code change in the appropriate sources will lead to build failure due to locked `.dll/.pdb/.modules` files, as they need to be edited.
For example you modified some .h/.cpp under `/Plugins/Slate/SlateInsights/Source/` folder - the build will fail unless you checkout the files under `/Plugins/Slate/SlateInsights/Binaries/` folder explicitly before build. The same is applicable to any module/plugin you will be changing, same as for the game module as well. I assume you did not encounter this problem since the files you mentioned are only `Marked for Add` (as you mentioned, not for `Edit`), so they are not submitted yet.
The possible workaround I can suggest is to create a separate changelist, let it be `Binaries`, and move the annoying .dll/.pdb/.modules files there. You can fold this changelist on `Perforce | Commit` tab (so they will not annoy you) and commit them once you desire. Here you can find the details on how to deal with changelists
In addition, in order not to checkout these files manually every time after submitting them, I suggest writing a custom script, which will do this for you. Here is a sample:
A similar script allows to checkout the appropriate Binaries and places them to the separate changelist `Binaries`.
Note: Even the ignored files are able to be added to VCS. It is possible via command `p4 add -I .\someFolder\* (either path to specific file)`
If it does not suit you, would you mind clarifying how you were dealing with such a workflow earlier?
I am sorry I did not paste the link for changelists management. Here it is.
Hi Dmitry,
I already use the solution you mentionned in my workflow: I have a separate "buffer" changelist where I put all the binaries.
However there is a problem with this solution when I start working on a new issue and let Rider choose the changelist: Rider will sometime chose the buffer changelist as the . By the time I realize what is going on my 3 source files are in a changelist of 5986 files !

Apologies for not responding earlier.
When you tell Rider not to show the pop-up on file checkout, it starts checkouting the files you edit to an active changelist. Outwardly, such changelist is bolded in `Perforce` view and positioned at the top of the list of changelists.
It seems, you have selected the `Binaries` changelist to be active and started working on the next issue, so the files get checked out to the `Binaries` changelist.
I suggest ensuring the `Binaries` changelist is not active whenever you start working on the next issue or edit the code.
Hope it helps.