Chartreugz
Chartreugz

Reputation: 313

TFS/VS falsely flagging file as having changes?

When I update my EDMX file from the database using "Update Model From Database" or by refreshing the tables, a couple files are flagged in the Team Explorer > Pending Changes as having changes. These files, when compared with latest, show no difference from the source control file and I've tried checking them in to see if maybe some invisible characters were the culprit (ie, \r\n vs \n on the ends of lines) but the files consistently show up in pending changes.

In particular, the files are C# (.cs) files under the MyDatabase.tt structure in Visual Studio Solution Explorer. There are also many similar files under the same structure that are not similarly affected.

1) So what makes these files special?

2) Why do they consistently show up as having pending changes despite already being checked in and having no visible changes? (Rob Epstein has answered this portion of the question)

3) What can I do, if anything, to stop them from showing up on the pending changes list?

TO CLARIFY : I want to know why two files are being flagged for showing up in Pending Changes while the rest are not. If you can answer #1, I will award the Answer to you because that's the crux of the question.

PS: I'm using VS 2013 and I believe TFS 2010.

Edit I can't switch from TFS to an alternative source control, so I'd like to resolve this using what I have (VS 2013/TFS 2010).

Upvotes: 1

Views: 276

Answers (1)

Rob Epstein
Rob Epstein

Reputation: 1500

The template process regenerates the file every time an EDMX change is made. The source control logic is not comparing content of the file to determine changes, but is roughly checking the last modified timestamp of the file. As far as I know there is no way to circumvent this process.

Hope that helps, Rob

Upvotes: 4

Related Questions