50
votes

I just deployed an asp.net mvc 3 web application to AppHarbor but it failed:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(3932,5): error MSB3541: Files has invalid value "<<<<<<< HEAD". Illegal characters in path. [D:\temp\q5cmde4m.uk1\input\MyProject\MyProject.csproj]

This happened after I opened the project with Visual Studio 2012 (the application was created with VS2010).

4
Just FYI; this looks like the annotations git leaves from an incomplete merge. <<<<<<<< HEAD indicates the section where the current file's differing content is.bright-star

4 Answers

127
votes

Try to search the entire solution for the value and remove it from where it occurs, and then delete the obj folder from your project. When you build again it should work.

The obj folders are hidden in Visual Studio. You can see them with a file explorer.

52
votes

Delete the obj folder within your project and it will fix the issue.

5
votes

though it is very old question but I would like to add an answer here. when you work with multiple developer in visual studio you should git ignore obj folder, .suo,.sln etc which is only holding the visual studio information user based.

refer to this SO question

0
votes

Delete both obj and bin folder it will fix the issue, which in my cas its been done and it was causing when create pull request from remote repository !!