Reputation: 208
Is it possible to delete the active file in visual studio from the editor itself with a keyboard shortcut without searching it in the solution explorer and deleting with the mouse?
This can be useful when refactoring, for example if I have
namespace Test
{
public static class Class
{
}
}
resharper will suggest to remove the unused class but the file can't be deleted
Upvotes: 4
Views: 1266
Reputation: 3609
In Tools->Options->Projects and Solutions->General
, check Track Active Item in Solution Explorer
.
This will highlight the file in Solution Explorer, when the file is opened in the editor.
Use solution explorer shortcut key Ctrl+Alt+L, then use Delete
or Shift+Del key to delete the file.
Upvotes: 8