title: Visual Studios repeatedly has a PDB API call fail while building project
body: <p>so I have a project that was housed in another directory that I copyied and moved into another directory in order to dump it into a local git repo that was previously running an earlier version of the code( I know why am I doing this copying stuff well it is a long story and irrelevant). after attmepting to build the project in visual studios 2019 I get the following error during the build.</p>
  <pre><code>Severity    Code    Description Project File    Line    Suppression State
  Error   C1090   PDB API call failed, error code '3': C:\Users\chad.lahue\AppData\Local\Programs\Git\TOC\project\TOC\Debug_sim\vc142.pdb TOC C:\Users\chad.lahue\AppData\Local\Programs\Git\TOC\project\TOC\TOC.cpp  1   
  
  </code></pre>
  <p>so after looking up what causes this issue and trying the reboot sugestion to no avail or killing a second msbuild.exe process I have noticed in the task menu that about halfway through the build a second msbuild.exe comes up when building this project and does not on any project that builds successfully
  <a href="https://i.stack.imgur.com/0MC89.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0MC89.png" alt="enter image description here" /></a></p>
  <p>Also the code is the same as well as the project settings as far as I can see from the original directory that it was copied from which still builds just fine.</p>
  <p>My question is : 1 is this a code issue / project settings issue or is there some kind of directory or computer glitch?</p>
  <p>: 2 has anyone else experienced this type of compiler error and had to resolve it in a more complicated way than what is normally suggested for this error ie. restart computer or kill the second msbuild.exe ? better yet has anyone ever had a project that generates 2 msbuild.exe's during the build process which causes it to fail as it appears to be here?</p>
  <p>for others experiencing this issue despite updating their vs like I did the following project settings fixed the issue for me, I have also tried the /FS solution on another project that started experiencing the same issue</p>
  <p>For those getting the issue with vc142.pdb try setting &quot;Configuration Properties-&gt;C/C++-&gt;Output Files-&gt;Program Database File Name&quot; to &quot;$(TEMP)vc$(PlatformToolsetVersion).pdb&quot;</p>
  <p>It could also work for the other pdb's by setting &quot;Configuration Properties-&gt;Linker-&gt;Debugger-&gt;Generate Program Database File&quot; to &quot;$(TEMP)$(TargetName).pdb&quot;.</p>
  <p>My best guess is the files are being locked by mspdbsrv.exe due to parallel compilation.</p>