In an ASP.NET project, whenever I edit an .aspx
(or .ascx
) file, TFS automatically checks out all the corresponding .aspx.cs
and aspx.designer.cs
.
I understand that changes to server-side tags on the .aspx
can affect the server-side files as well, but as long as I don't actually change anything in them, shouldn't the .cs
s wait with the checkout?
Environment: VS2013, TFS2010.
Note: The only real negative affect here is that before checking in, I need to go over each .cs
file and make sure I haven't made any accidental changes.
TFS will never check in any file that is unchanged. But if you want to make sure you didn't accidentally change a file, you can use the "undo unchanged" feature. Depending on your visual studio version an whether you've installed the power tools, there might be a button for this on the Pending Changes window. If you were using TFS 2012 or later, you could have used the Local Workspace feature, which will actually verify that the file has really changed.
In Visual Studio 2010 there is an extension that adds it to the Pending Changes Window.
The same extension exists for Visual Studio 2013 and 2012, but there, due to changes in the way Team Explorer works, it is added to the Source Control Explorer:
If you have the Team foundation Server Power Tools for VS 2013 installed, you can use the tfpt.exe uu
command to undo your unchanged files.
If you want to, you can add this to the Tools Menu as a workaround.