Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TFS automatically checks out a windows form when the form is opened in VS2010

I have a VS2010 Winforms project with several forms and user controls, all integrated with TFS. Every time I open one of the forms in the designer, it checks itself out and acts like changes have been made, even though none have. This happens for everyone working with this project, and only happens with this one particular form. Anyone have any idea what could be causing this?

like image 451
AJ. Avatar asked May 11 '11 12:05

AJ.


2 Answers

I think the WinForms designer regenerates the form.designer.cs file whenever you open it, thus causing a checkout. Of course the file doesn't end up with any different code, but it got rewritten again.

Also, if you have code in your constructor, this DOES get run by the designer. Maybe that code is is setting a property on a control (but not to a new value) which causes the designer to want to regenerate the file.

like image 134
Andy Avatar answered Oct 22 '22 07:10

Andy


Could it be changing the encoding? Locate the file in the Pending Changes window and see if the Change is listed as "type,edit".

like image 31
Tom Robinson Avatar answered Oct 22 '22 07:10

Tom Robinson