4

I have a very strange issue with Visual Studio 2012.

On one of the branches in our SVN repository, some files appear duplicated in the Solution Explorer tab. The files do not cause problems and both entries in the tree seem to refer to the same file. It's just a little disconcerting.

I have tried a diff on the .csproj files and .sln file, but cannot see any difference that might cause this issue.

Screenshot showing duplicated file

Any ideas?

This is on 64bit Windows 7, Plugins installed: Visual SVN 3.0 and Resharper 7

3
  • 1
    Disable both of your plugins to verify that the problem is not caused by them. But my guess the reason its duplicated is because the entry for the file appears twice in the solution.
    – Ramhound
    Jan 17, 2013 at 16:41
  • Check your solution *.sln and project *.csproj files for duplicates. Looks likes a duplicate entry is the root cause.
    – bahrep
    Jan 17, 2013 at 17:01
  • 1
    You are correct, there were duplicates. Silly me, first one to add this as an answer gets an accept! Jan 18, 2013 at 16:17

2 Answers 2

3

I had the same problem and they were duplicated in the project file. I edited the file, found the dupes and removed them. I'm guessing it happened as part of a bad merge conflict by someone. My problem happened in VS 2010 incidentally.

1
  • Exactly what happened to me, accept git didn't tell me there was a merge conflict, it just "merged the files" and got on with stuff.
    – shawty
    May 4, 2017 at 9:41
0

Find YourProjectName.csproj file, search for the duplicate file name with the correct location, e.g. in my case

<Content Include="Views\Login\autologin.cshtml" />
<Content Include="Views\Login\autologin.cshtml" />

and remove one of the lines and save over the project Solution Explorer, select your project, right click, unload project and reload it again. It should resolve the issue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .