Search code examples
c#visual-studio-2013build

The given path's format is not supported "obj\Debug\C:\..." on build


I'm trying to build a project that wasn't created by me. VS gives me the error:

Could not write lines to file "obj\Debug\C:\...". The given path's format is not supported.

I've replaced the full path with "...". Note that the path is interrupted with "C:\...".

Does anyone know what VS uses to form this path and where I might be able to change it? The file type that it is trying to write is .csprojccrefgen.rsp.


Solution

  • It turns out it was due to an invalid installation of the Code Contracts for .NET plugin for VS. I had to install the latest version from here, which resolved the issue.