Suggested improvements

Aug 12, 2009 at 7:13 AM

Good stuff! Had tried that, and have some suggestions:

1) The configuration is very un-intuitive - I needed to resort to reading PDF to make some sense out of what I can change there and what is the result expected.

2) Another thing (not as easy to fix) is that if you have multiple files open in VS, after the checkin VS will display the dialog that the files were changed externally (since policy changes them right before checkin). The only way to handle it I can think of is to integrate into VS (though am not sure there is easy way to tweak the dialog off).

3) If the policy is evaluated, but check in does not happen (e.g. on clicks on policy tab in pending checkins window), keywords line will get added. Not sure how you can handle that better from the policy - that may be the limitation of the mechanism itself

Again, thanks for releasing this.


Aug 12, 2009 at 7:30 AM
Edited Aug 12, 2009 at 7:32 AM

Thanks for your suggestions!

1.: Do you have a suggestion, how it should look like?

2.: You just need to press "Yes to All" ;)   serious: I do not know how to prevent this dialog

3. This is a limitation of the TFS; see in the documentation the section "Restrictions / Multiple inserted comments"


Thanks again for your comments! I am happy, that you did not find any bugs ;)

Aug 12, 2009 at 8:03 AM

1. It is easier to criticize than provide an answer :) Let me think about it a bit

2. Yeah, I know. I will try and find out if there is something easily tweakable in VSX. However, there is Tools->Options, Environment->Documents "Auto-load changes if saved" checkbox that makes the dialog go away. You might want to recommend it in your manual

3. I understand that - but it still sucks. There should have been something in API to handle the scenario.

Though I just test driven it a bit, I blogged about it so may be there will be more beta testers that might bring in bugs :)



Aug 12, 2009 at 8:43 AM

Thanks for your great blog entry about this project!

Dec 7, 2009 at 9:11 AM


I have another suggestion: adding a couple of File.GetLastWriteTime/File.SetLastWriteTime in your FillCommentInSourceFile() to prevent a rebuild after a checkin...

public void FillCommentInSourceFile(string comment, string fileName, PendingChange pc)
  if (System.IO.File.Exists(fileName) == false) return;
  DateTime dtFile = File.GetLastWriteTime(fileName);

if (bFileMustBeSaved == true)
  // Und schreibe die Datei ab dieser Stelle wieder raus
  fs.Seek(saveStartPos, SeekOrigin.Begin);
  fs.Write(_Buffer, saveStartPos, len - saveStartPos);
  File.SetLastWriteTime(fileName, dtFile); // don't change lastWrite to prevent rebuild