EnvDTE.SourceControl CheckOutItem checks out several files
-
Thursday, March 01, 2012 10:49 AM
Hi NG
I have Problem with function CheckOutItem from EnvDTE.SourceControl to check out Files from TFS.
I use the following Code to checkout one File:public static bool CheckOutFile(string fileName, EnvDTE.Project Pro, bool AskCheckOut) { bool result = false; EnvDTE.SourceControl sourceControl = Pro.DTE.SourceControl; if (sourceControl.IsItemUnderSCC(fileName)) { result = sourceControl.IsItemCheckedOut(fileName); if (!result) result = sourceControl.CheckOutItem(fileName); } else return true; return result; }But "some times" this checks out several files. Even files from another Project in the Solution
that has nothing to do with the checkout I what to do. Some of my colleagues
think that he check's out all files there where in contact since the last check
in or since the have opened the studio.
Does anyone have an idea what this can be?THX Michael
MK
All Replies
-
Friday, March 02, 2012 2:53 AMModerator
Hi Michael,
Based on above code, I don't think there is any issue, it should be works as expected.
I suggest you find some steps which always repro the problem and debug the code to see the exact error. Maybe, some extra fuction call above to obtain more files.
Moreover, the parameter ItemName requires the full path to the file to check out. You may also double check if the path is fine for your files.
Regards,
yi
Yi Feng Li [MSFT]
MSDN Community Support | Feedback to us
-
Wednesday, March 07, 2012 6:55 AMModerator
Hi,
I am writing to check the status of the issue on your side. Would you mind letting us know the result of the suggestions?
Yi
Yi Feng Li [MSFT]
MSDN Community Support | Feedback to us

