“Discrepancy” error from Visual Studio/TFS 2008/2010
I originally wrote about this issue in 2010, I continue to see it from time to time, after something “disturbs” Visual Studio. It starts with an alert something like this appearing upon opening Visual Studio or BIDS:
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 this solution.
OK, fine. The check out did not fail. I saved the solution before closing it. And the warning continued to pop up every time I opened the solution again.
I noticed that some or all of the project files in the solution were indeed being checked out, and I surmised that there was something in those project files that needed to be updated. I also noticed that when I checked them back in, TFS reported that nothing had changed and proceeded to simply undo the changes.
That would be OK if no changes were needed, but changes were needed. The way I finally resolved it was to identify each project that was being checked out, right click the project name, change something (anything! — almost) in the project properties so as to “dirty” it, change that property right back to what it was again, and then close the properties dialog, save, and check in the project.
The trick is to change a property that is actually stored in the project file. Some properties go there, while others are stored by Visual Studio. If you change one of the latter, it will not fix the problem. Some experimentation may be required.
Once the project properties were dirtied, Visual Studio fixed whatever it was bothering it and the annoying alert box no longer appeared; nor did any automatic checkouts occur.
Update 5/19/12:
I found another way to get rid of this popup, although I don’t know if it would work in every case. I noticed that the projects that were being automatically checked out after the popup message appeared all had outdated configurations associated with them, in addition to the configurations they were supposed to have. When I deleted the all the project configurations that were no longer used, the popup did not return!
Comments
“Discrepancy” error from Visual Studio/TFS 2008/2010 — No Comments
HTML tags allowed in your comment: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>