Visual Studio: The Operation could not be completed. The parameter is incorrect
Solution 1:
Dan (the original poster) mentioned in a comment above that running Visual Stuio as admin solved this for him.
Solution 2:
This answer helped me: https://stackoverflow.com/a/9130257/6524796 It says to try deleting the .suo file. To find this file open the directory for your solution in File Explorer, make sure you can see "Hidden Items", and search for ".suo". Select and delete the one for the solution giving you issues building. Close Visual Studio and reopen solution.
Solution 3:
Try checking your project references. I had this same problem and found that one of the reference was missing.
Look under: Debug > ProjectName Properties > References