Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
806 views
in Technique[技术] by (71.8m points)

visual studio 2010 - There appears to be a discrepancy between the solution's source control information about some project(s) and the information in the project file(s)

I get this error message in a Reporting Services solution in Visual Studio 2010 [we're using TFS for source control]:

There appears to be a discrepancy between the solution's source control information about some project(s) and the information in the project file(s).

To resolve this discrepancy it will be necessary to check out the project file(s) and update them. If the check out fails, however, and the solution is closed without saving, you will see this warning again the next time you open the solution.

Only some projects get checked out but others seem OK. So here is what I tried:

  1. I tried to compare what might be different between the project files that work and don't work but nothing catches my eye.
  2. I looked around and tried a number of proposed solutions like "adding a file, checking in and then removing it and checking in". No luck.
  3. I tried to look for "Scc" tags in project files but I don't see any in there. I also don't see them in projects that work fine. Looking at my solution the Scc entries look reasonable.

Help!! What am I missing?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Using Visual Studio you can solve this problem by unbinding and binding the solution and/or projects. Try this:

  1. Open the problem solution in VS (did this in VS2013 just now)
  2. Undo all pending changes to all the projects in that solution and the solution itself
  3. Go to File -> Source Control -> Advanced -> Change Source Control
  4. Select the problem projects and click "Unbind"
  5. Click OK and close the window (THIS IS IMPORTANT - if you don't click OK VS doesn't update the solution properly)
  6. Go to File -> Source Control -> Advanced -> Change Source Control
  7. Select all the projects you unbound in #4 and click "Bind"
  8. Click OK and close the window
  9. Check In Your Changes
  10. Close the solution and open it back up and everything should be fine now

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...