Home Dashboard Directory Help
Search

Exclude From Project should not delete files in source control by Carl Daniel


Status: 

Closed
 as Fixed Help for as Fixed


7
0
Sign in
to vote
Type: Bug
ID: 715038
Opened: 12/21/2011 8:55:33 AM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
0
Workaround(s)
view
2
User(s) can reproduce this bug

Description

Currently (VS 2010, TFS 2010), when working with a C# project, choosing the "Exclude from project" results in two actions: the file is removed from the project, AND a delete is pended on the file in TFS. Undoing the delete in TFS also undoes the Exclude from project.

This coupling is undesirable. VS should NEVER pend a delete to TFS unless I chose an option clearly named "Delete".

The real-world scenario where I run into this is refactoring which involves moving files from one project to another. If I simply drag the file in the solution explorer, VS copies the item and pends an Add at the new location. This break the link with the history at the old location, plus requires me to separately delete the file from the old location.

Instead, I'm forced to use a rather clumsy process:
1. Exclude the file(s) from their current location.
2. Close the solution.
3. Undo all the unwanted deletes that have been pended to TFS.
4. Move the files one by one to the new location
5. Re-open the solution
6. Add the items to the new location with Add Existing Item or Show All Files|Include in Project.

On a related note, the MOVE operation in TFS needs to support moving more than one item at a time, but I'll submit that as a separate connect item.
Details
Sign in to post a comment.
Posted by Microsoft on 12/28/2011 at 3:27 PM
Hello Carl Daniel,

I apologize for the confusion. Both scenarios are fixed. I mistakenly mentioned the project one because it's the one we hear the most often. When you exclude a file, we will also only pend an edit to the project and NOT pend the delete to the file itself.
Posted by Carl Daniel on 12/27/2011 at 9:30 PM
Sounds great! But you also did not describe the situation described in this connect item. You mention removing a project from a solution, while I'm talking about removing code files from a project. Similar, but not the same scenario.
Posted by Microsoft on 12/27/2011 at 8:16 AM
Hello Carl Daniel,

Thank you for reporting this problem. I'm happy to say that we fixed the problem and it won't exist in the next version of Visual Studio. When removing projects from a solution, you will see that only the solution file will be edited, and no delete will be pended anywhere in the project itself.
Posted by MS-Moderator10 [Feedback Moderator] on 12/21/2011 at 7:31 PM
Thank you for submitting feedback on Visual Studio 2010 and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by MS-Moderator01 on 12/21/2011 at 9:45 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.