(SOLVED) Can't build code in visual studio while connected to perforce.

Compiling in visual studio works when I’m not connected to version control. When I connect to perforce I get errors, I am using the p4vs extension.

How did you solve this? For a while now VS will not work unless I manually check out relevant files before attempting to build.