4.22 Recompile fails using Perforce

I am setting up Perforce Version Control for my UE 4.22 project. Recompiling is not working, I get the following error:

error CS0042: Unexpected error creating debug information file ‘X\Workspace\Intermediate\Build\BuildRules\ProjectNameModuleRules.PDB’ – 'X\Workspace\Intermediate\Build\BuildRules\ProjectNameModuleRules.pdb: Access is denied.

I have setup the [typemap][1]. When I run command prompt and do the p4 -P YourPassword typemap, my notepad opens with the typemaps filled already.

Am I missing something?

Thank you

Also tried changing the “//depot/” to “//mydepotname//”. Didn’t work.