Solution Items being removed
-
2008년 8월 28일 목요일 오후 3:00
I have two developers who commonly have a problem with Solution Items being removed from the Solution we use for our product. We use solution folders to hold things like Dependencies/Reference assemblies, shared config files, shared content etc. This seems more commonly to occur to reference file (*.dll). The only way we seem to be able to avoid it is by reviewing our pending checkins files and doing a compare each time on the solution file. Obviously the checkout of the solution file is the first hint that something went awry, but these developers have not been able to notice a reoccurring pattern as to the cause of the that initial checkout of the solution.
If this rings a bell to anyone I would appreciate the help.
We are both running version 9.0.30729.1 SP
모든 응답
-
2008년 8월 29일 금요일 오후 1:20중재자So the solution contains a couple of solution folders with some config and DLL files. When you look at the solution before a checkin everything is fine. However when you then check the solution back out the entries are gone? Does this occur only when you do a clean checkout or even when you immediately check it back out? What CM system are you using? Does it wipe all files or just some of them? If you open the solution file in a text editor are the items still there?
Michael Taylor - 8/29/08
http://p3net.mvps.org -
2008년 8월 29일 금요일 오후 1:30We are using TFS 2008, but I believe the problem is a combination of TFS and the IDE. The items aren't actually being removed from Source Control, only removed from th solution folders. It normally is only one or two files that are removed from the solution. Doing a compare between the Sln file before and after the checkin show the item entries being removed.
I don't know that I can say with confidence that the items are there before checkin and removed as a part of the checkin or if they are removed at some point between checkout and checkin.
Sorry to be so vague. -
2008년 8월 29일 금요일 오후 2:08중재자
Ok so let's figure out if it is the IDE or TFS doing the damage. My hunch is that it is TFS but I couldn't find any known reports about it causing problems.
- Check the solution out of TFS and make sure everything is correct.
- Close VS.
- Look at the solution file in a text editor and confirm that everything is correct.
- Open VS again and close it.
- Look at the solution file again.
- Open VS and check the file into TFS.
- Open the solution file in a text editor (without closing VS) and see if things are correct.
- Close VS and check again.
- Open VS and get a fresh copy of the solution from TFS.
- Open the solution file in a text editor and see if thngs are correct.
A lot of steps but it should give you an idea of what is causing the issue. More importantly though is whether it is an issue with VS not displaying items it should (because they are in the file) or whether the entries are being removed. If the entries are being removed then it should also narrow down whether the IDE or TFS is doing it.
You mentioned you are running VS2008 SP1. Did you update TFS as well?
Michael Taylor - 8/29/08
http://p3net.mvps.org- 답변으로 표시됨 jack 321 2008년 9월 2일 화요일 오전 2:58
-
2008년 10월 21일 화요일 오후 12:53I have also experienced this problem. We are using TFS and Studio. Every now and then Studio checks out the solution file (.sln) and removes random solution items.
Since this only happens occasionally we can't prove where the problem lies using the steps suggested by you.
We have been seeing this problem for a long time now but it seems to be a rare problem since it is not reported much in the web.
Any help would be great.
-
2008년 10월 21일 화요일 오후 1:03중재자
I suspect this is a bug in the TFS client. However tracing this down enough so that MS can fix it might be a problem. Here are some things to check the next time it happens.
- Did you lose solution items or project items?
- Were the items that were removed all of the same type or from the same folder?
- Did the items happen to appear last in the solution file?
- Do the same (or similar) files get removed each time it happens?
- Have the items in question changed recently?
- Are you running VS2008 w/ Team Suite SP1?
- Is the TFS the same version as the client?
- Are the items still in the project file but just not showing up in VS?
- Did you notice a network lag during the time TFS was retrieving the files?
- Did the project file (that lost the items) recently change?
Michael Taylor - 10/21/08
http://p3net.mvps.org -
2009년 2월 1일 일요일 오후 6:33This does not seem to be a problem with TFS. We saw the exact same problem when we used VSS as we do now that we have moved to TFS. Also, I have seen it happen in both VS 2005 and VS 2008. Also, it seems to happen with only certain users, and with those users it is consistently the same files which get removed (and the number of files that get removed occasionally grows).
The problem always happen on a Get Latest for the whole solution. The .sln file is checked out as part of the Get Latest operation, and if you do a compare in source control, you will see that it has immediately removed some DLLs and/or PDBs. These files are external references which have been added to the solution and are used as references in some projects. The solution still compiles successfully because the files are not physically removed (and are still fine in source control and not even checked out), they are simply removed from the solution. This is only a problem because if somebody else comes along and does a fresh Get Latest on the solutioon because they will not get all of the necessary files to build the solution. It is also annoying because at any given time the solution file will be checked out by multiple users, requiring many unnecessary merges when projects or other solution files are added to the solution.
-
2009년 2월 1일 일요일 오후 6:36Since moving on from that client, it has been the only one where I've seen the problem. I really don't know why it happens and haven't been able to reproduce it since.Most of my clients are using TFS 2008 and VS 2008 SP1, so who knows. Hopefully it's been resolved though! Good luck to anyone who has the same problem.
-
2009년 2월 2일 월요일 오후 2:49중재자
No files should be checked out when you do a get. If a file is getting checked out automatically then you have an option enabled in CM to automatically check out files when they are changed. Furthermore this would seem to indicate that the solution file has been changed. This could happen if someone changes the configuration manager build settings for the solution or if you are using references that do not have standardized paths on the dev machines. Viewing the differences between the version on the client and the version in CM prior to checking it out would reveal the probably cause.
Michael Taylor - 2/2/09
http://p3net.mvps.org -
2009년 2월 2일 월요일 오후 3:00The differences when compared show that Solution Items have been removed, nothing else.Like I've said more recently, I am no longer seeing this issue with myself or my clients, but apparently some still do. I will do what I can to help though.
-
2009년 2월 2일 월요일 오후 3:06중재자Sorry Ryan, I was referring to the other poster rather than your last post.
Michael Taylor - 2/2/09
http://p3net.mvps.org -
2012년 8월 6일 월요일 오후 9:49This is happening to me in Visual Studio 2010 SP1 as well.. at first we thought it was developers accidentally deleting, but it seems to happen more when we branch or merge. The same fail gets dropped from solution items and it's the only change in the .sln and it happens when you open the item (because VS checks out the .sln for no reason at all..) I know it's no one else because now only I'm merging, and I can see during that process when I merge at certain random points it tries to check in the .sln file with that one item removed. That particular folder has two items in it, and if I let it remove the first solution item like it tried to every so often, eventually the second item in that folder will get removed in the same way as well.
-JD

