views:

1078

answers:

4

Hello, I've got a Visual Studio C# project which is under version control (SVN). I've always commited and updated the project without any problems. But a couple of hours ago Visual Studio throws the following error when I try to launch/rebuild the project:

Files has invalid value "<<<<<<< .mine". Illegal characters in path.

I don't know how to fix this problem. What should I do?

+10  A: 

Remove the code that shouldn't be in the file throwing the error and remove the the three files with extensions .mine, .<somerevision> and .<some_other_revision>. svn updated files that now contain 'conflicts' and you need to resolve these conflicts by hand. Usually this means you edited a file, someone else edited the same file and checked in changes and you didn't pay attention when checking out the changed file.

Confusion
Perhaps a stupid question; but where can I find the .mine files? I can't seem to find them. Also, no file is in conflict and when I search through all files for "mine", nothing is found...
MysticEarth
Right next to the source file that doesn't compile anymore (because of the conflict markers). Check for files with the same basename, but different extensions.
Benjamin Podszun
Well, Visual Studio doesn't give any filename, just the error above. And I don't see any conflict markers...
MysticEarth
It will either be in the .csproj (or .vcproj or whatever) file or the .sln file. You can use the appropriately titled 'blame' function of svn to see who committed the offending lines. Whoever that is has resolved a conflict incorrectly.
Pike65
Forget Visual Studio for a moment and navigate to the file in the filesystem. You'll find the mentioned files there. You can resolve the conflict from your IDE though (edit the file).Evil train of thoughts: Maybe some of your co-workers managed to check that file in with conflict markers inside..?
Benjamin Podszun
Thanks all. Found the problem by viewing differences with my working copy, it seemed to be a file in the Debug folder (which I exluded from SVN today). One of my co-workers resolved things while not being resolved..
MysticEarth
+20  A: 

That happens when svn encounters a conflict: You changed a file, the file on the server was changed and it cannot (easily) be merged automatically. You need to decide what is the correct solution now.

Subversion just adds the diff into your source file (and creates files next to it, called OriginalName.mine (unchanged) and OriginalName.rsomething (unchanged, server version)).

Fix the conflict and tell subversion that this is resolved.

Benjamin Podszun
Where can I find the .mine files? On my computer locally or on the SVN server (sorry, I'm new to this...).
MysticEarth
Thanks all. Found the problem by viewing differences with my working copy, it seemed to be a file in the Debug folder (which I exluded from SVN today). One of my co-workers resolved things while not being resolved..
MysticEarth
+1  A: 

Please read the Basic Usage chapter in the subversion book. It has a section about Merging conflicts by hand which explains the conflict markers you're seeing.

Wim Coenen
currently i was writing an example of my own, but like always the svnbook has a far more comprehensive one and if you're using Tortoise take a look into http://tortoisesvn.net/docs/release/TortoiseSVN_en/index.html (especially into chapter 4 Daily Usage Guide)
Oliver
+1  A: 

If you have AnkhSVN or VisualSVN installed resolving this is most likely as easy as right clicking the file in the solution explorer and selecting edit conflict.

This will open the changed file in your merge editor. (See Tools->Options->Source Control->Subversion User tools for AnkhSVN). With a good merge tool like the free to use SourceGear DiffMerge or TortoiseMerge, resolving the conflict is just a few mouseclicks away.

Bert Huijben