175

When I open my solution, I get a dialog with this warning. The solution (one web app, one class project) builds without errors.

How can I determine what properties are causing the problem, and resolve the error?

16 Answers 16

298

I just fixed a similar issue with a VS2010 solution with 35 projects... The cause was a duplicated

GlobalSection(TeamFoundationVersionControl)

section in the solution file. I closed the solution, removed the duplicate GlobalSection(TeamFoundationVersionControl) config and reloaded the solution and the warning message was gone.

If this is not the issue for you, considering you only have 2 projects I would ditch the busted solution file, create a fresh solution and re-add your two projects...

19
  • 6
    Had the same problem with VS2012, this solution worked. Thanks! Commented Jan 10, 2013 at 17:20
  • 4
    Is it safe to assume that the GlobalSection(TeamFoundationVersionControl) that should be deleted is the bottom one?
    – frostshoxx
    Commented Jun 12, 2013 at 13:53
  • 4
    I had the same problem and I just removed the bottom one. It solved the problem. It seems that merging sometimes causes this.
    – MaiOM
    Commented Mar 3, 2014 at 14:35
  • 12
    It was the bottom one for me (it was clearly out of date). I suspect VS uses the first one it finds. In my case this was caused by a TFS merge. Commented Mar 25, 2014 at 3:43
  • 3
    7 years later, VS 2019, same problem. :( Surely by now we could get a more helpful error msg. Thanks for the solution! Commented May 31, 2019 at 18:03
55

The best solution is to force the VS to regenerate the configs. To do this:

  1. Open the sln file with a text editor.
  2. Scroll down till you reach the last "EndProject" element.
  3. Delete everything after that.
  4. Save, Close and rebuild the solution and everything will be regenerated.
6
  • This solution was perfect for my situation. I was getting two similar errors: The following property is missing or has incorrect value: SccLocalPath63 and The following property is missing or has incorrect value: SccLocalPath64
    – tinonetic
    Commented Jul 29, 2018 at 16:05
  • 2
    This solution worked for me in VS 2017. It actually regenerates that when sln file is opened. Note that EndProject is one word. Commented Dec 9, 2018 at 7:06
  • This was the fix for me. The only difference in the solution file was the SolutionGuid.
    – ADH
    Commented Jan 27, 2019 at 14:00
  • 3
    This worked for me in VS 2017. the only thing I have to add is...if youre using Solution Folders...youre going to have to drop your projects back into the correct "slots" Commented Sep 17, 2019 at 16:06
  • 1
    This worked for me in VS 2019. I had duplicate sections as mentioned in other solutions, but when I would remove them, they would come back. This was the only one that worked.
    – fehays
    Commented Dec 13, 2019 at 17:34
38

Seems like there is a number of reasons for this warning. I was getting it because my solution file SccNumberOfProjects = 4 when there was only 3.

0
8

I just fixed a similar issue in VS2012 with 44 projects.

The cause was a combination of a duplicated GlobalSection(TeamFoundationVersionControl) section (a la Boycs' answer), but I also had several projects duplicated--as well as a few references to projects which had been recently removed--within the GlobalSection(TeamFoundationVersionControl) section that I kept.

Once I had ensured that all of the referenced projects corresponded 1:1 with actual projects in my solution, the warning went away.

Aside: I suspect that the majority of these issues could have been avoided with closer attention paid to the .sln during branch and commit merges, but who knows what VS is thinking sometimes...

0
6

I had a multitude of the errors above. I renamed the project, saved closed, reopened changed the name back. This recreates the .sln file and in my case took out all the extra items.

3
  • Easiest fix here. Don't bother digging through the .sln looking for the errors. Commented Jun 26, 2015 at 13:13
  • Could you expand upon that a bit more. Some users might not understand. Do you mean to rename it in explorer or Visual studio or in the actual file?
    – iTechy
    Commented Sep 11, 2015 at 18:38
  • 1
    Do this within Visual Studio, You will right click the project, change the name to anything, then save and quit. Reopen and change back to the original, save and quit. reopen the solution and the error should be gone.
    – CThin
    Commented Jan 26, 2016 at 17:27
4

The other answers already explain how to fix the problem. Maybe I can help to not get the problem again:

How I got the problem Our solution file got mixed up when I added a new project to it, while another developer also added a new project and committed his changes (which I didn't got at my local system). When I started to commit my changes, I had to merge the .sln file, where I obviously messed up :-)

What I learned

Solution files are awful to merge. If you add a project do the following: 1. Get latest Version 2. Add your project 3. Commit

If you see your solution file under pending changes, but you don't see a change in the compare mode, you have to press 'Save All'. While adding your new project, VisualStudio also altered the solution. However, this is an unsaved change at the moment.

3

Resolved an identical error message in VS2012 by following Boycs's lead. For me, the problem was two extraneous GlobalSection(SolutionConfigurationPlatforms) = preSolution blocks at the bottom of my SLN file.

3

For me the problem was empty spaces (due to copy-paste) at the end of each line. By removing them I didn't get the error again.

2

In VS 2015, I had two of these sections "GlobalSection(TeamFoundationVersionControl) = preSolution"

The first one included the latest project added to the solution, the second one (near the end of the solution file) did not. After deleting the second one, the solution opened in VS 2015 without any errors.

2

Check your SccNumberOfProjects in your .sln file it may be differs from your actual project number.

0

i fixed similar problem in vs2012.

in my case the problem was that the SccProjectName0 property value inside GlobalSection in the MySolutionName.sln file was empty.

i solved it by setting SccProjectName0 value with copy of this string value from another solution, and replacing the name of the project in the string to the current one (BTW - if your project name as space in it (' '), it need to replace with '\u0020').

*

in my case the problem begin after i mistakenly opened solution controlled by TFS with old MySolutionName.sln file of the same solution from time that this solution was controlled by VSS.

0

VS2015 Update 3. [GlobalSection(TeamFoundationVersionControl) = preSolution] was duplicated in solution file. The bottom duplicate contained a project that has previously removed... so removing that duplicate fixed the issue. I think the duplication was caused by a previous merging problem.

0

I can add one more possible solution - A dodgy merge meant that one of the SccProjectUniqueName/SccProjectName/SccLocalPath stanzas inside the GlobalSection(TeamFoundationVersionControl) section had numbers that weren't unique, even though the SccNumberOfProjects was correct. Fixed up the numbering, error message went away.

0

VS 2019 - I was opening a VS 2017 project for the first time in VS 2019. In the Output window, click the "Show output from:" DDL and review your options because you may see additional error information.

In my case, the solution was to just re-configure my source control mappings for 2019.

  • Go into Team Explorer
  • Click the Manage Connections button (plug)
  • Click Manage Connections link and Connect to a Project...
  • ...
0

For my case, it was the order of projects, make sure following tags with number at end are consistent and sequential.

  1. SccProjectUniqueName
  2. SccProjectTopLevelParentUniqueName
  3. SccProjectName
  4. SccLocalPath
-1

I had the same problem, and my solution is:

  1. Open the solution in VS
  2. Set the Solution Platform to Default
  3. Save it
  4. Close the VS
  5. Open the .sln file in Notepad++ (or any other editor)
  6. Delete all of the other Solution Platform item from everywhere
  7. (for example:{73E03C8F-1F76-45E2-9D45-FA040A63F0AA}.Release|Any CPU.Build.0 = Release|Any CPU)
  8. Save it, and reopen the solution.

This works for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.