kad81
kad81

Reputation: 10950

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.

Upvotes: 0

Views: 158

Answers (2)

kad81
kad81

Reputation: 10950

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.

Upvotes: 0

adjan
adjan

Reputation: 13652

This is not a valid path, the : must not occur as a folder name. Check what is set as the output directory:

To change the build output directory:

  1. On the menu bar, choose Project, Appname Properties.

  2. Choose the Build tab.

  3. Choose the Browse button next to the Output path box and specify a new build output directory.

https://msdn.microsoft.com/en-us/library/ms165410.aspx

Upvotes: 1

Related Questions