In Visual Studio 2012 and TFS, how do I remove a project from a solution without adding a "delete of csproj file" to pending change list. I do simply want to remove the reference from this solution, but the project should still exist since its used in other solutions. If I simply delete it from the solution and then commit the change, then it will remove the csproj file!
What is the proper way to remove a project from a solution without TFS removing the csproj file?
you should go to the folder that project is inside that, you can do that with right click on the name of project in toolbar VS Code and select the Reveal the explorer and go directly to the root of the project. then you can delete the project.
To delete a project, first load the project in the source editor by choosing the project from the file manager tree. Click on the File menu on the Editor tab above the source editor. In the File menu, select Delete Project. All project source code and data will be deleted after you confirm the deletion.
To remove a folder: If your project is not already open, click File > Open Project or click Open Project > Open Project on the basic workflow bar. Select a project, then click Open. In the Project Explorer, click the Files tab, right-click a folder and select Remove Folder to delete it from the Project Explorer.
I stumbled on this today as well. After scouring the options I succeeded by:
1) Unloading the project I wanted to remove
2) Right-clicking the project and selecting "Remove"
I can't fathom why MS removed the Remove option but I can only assume it had to do with the UI 'refactor' in 2012. I wonder if there's a hotkey in the 'loaded' state to avoid having to first unload the project...
Not to rant about the VS IDE context menus but IMHO it's still far too cluttered. While I'm not a fan of submenus they're drastically needed in this case. This is compounded by my biggest complaint which is that the relative order and even hierarchy of options across contexts can be drastically different for the same options. While I can understand the options themselves would need to be different and therefore have varying priority in the given context if you're going to share options between two contexts have them in at least close relative proximity. The best example is for 'Source Control' in VS2013. From the file editor context it's at the bottom of the list but from the solution contexts it's in the middle and has some SC options in the top menu rather than the submenu. Since many are not as likely to perform SC ops from the file editor (though I do a lot) move it to the bottom of the list so it matches the relative location from the solution context.
Anyway enough of my rant...
Remove should just remove it from the solution file. if it still wants to delete it, undo the pending delete against the project but commit the solution file change. this should leave the project file under source but remove it from the solution
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With