File Drag & Drop ability in Visual Studio - visual-studio

I was wondering if any one knew of a plug-in or a way to:
I would like to be able to drag files from Solution Explorer to a Windows Explorer window and have the file copied to the location in Explorer.
Currently using VS2005

See VS Explorer - an addin which adds a file and folder browsing window to Visual Studio. It allows you to drag-drop files from Solution Explorer to external folders, vice versa and more.

Related

How can the Solution Explorer in Visual Studio Community 2019 be refreshed?

I have a basic c++ project in Visual Studio Community 2019. It contains three files: main.cpp, log.cpp, and log.h. I created a fourth file called Source.cpp and then deleted this file from the file explorer in Windows 10 to see how Visual Studio would adapt to external changes to files. Source.cpp is still visible in the solution explorer in Visual Studio.
I have tried unloading the project and reloading it but it still appears in the solution explorer. I assume it's best practice to delete files from within Visual Studio's solution explorer but there must be a way to refresh the solution explorer to reflect changes made outside of Visual Studio. Similarly, if I create a new file in the project directory (same directory as the other files in the project), it doesn't appear in the solution explorer. If I unload the project and reload the project, the new files is still not visible.
How can I refresh the solution explorer? My intention here is to better understand how Visual Studio organizes files in the solution explorer and how the organization relates to the actual file/directory structure in Windows.
After playing around with it for some time I realized that you can select the "Show All Files" button on the bar at the top of the Solution Explorer. This has a refresh button that works as expected (updates the Solution Explorer with the current state of the directory folder). It seems that files can be managed from this window and added/removed from the project in Visual Studio's default organization structure.

How to open project folder from Visual Studio in Windows Explorer?

I'd like to have easy access to my project's folder from within Visual Studio. What do I do to open its folder in Windows Explorer?
Open the Solution Explorer >> right-click your project >> select Open Folder in Windows Explorer.
This has been tested on Visual Studio 2010. It will probably work in any other Visual Studio with a Solution Explorer.
See screenshots:
You can open some of Soluion Explorer's items (folders, projects, solutions) in File Explorer by it's right click menus subitem "Open Folder in File Explorer".
Also you can open opened documents containing folder by right click opened documents tab and "Open Containing Folder".
The easiest way...
I map a key chord to the command
Unfortunately, this only works when a project node is selected, probably because solution folders aren't actually folders and therefore it cannot be guaranteed that they actually match a folder in the file system.
Additionally to the answer opening the solution folder, there is an easy way in adding an open with for single files in the "Solution explorer". Just right click on a file, select Open With..., then Add a new entry:
As arguments you can type /select,%1 which opens the explorer with the current file selected.

Is there a way to open a file from solution explorer when drag and drop in code editor. VS 2010/2012

I really would like to be able to open files while dragging and dropping it from "Solution Explorer" to Code Editor(main) Window in visual studio.
Is there a way to do that ? Can't believe Microsoft didn't think of that !
Visual Studio instead of opening the file creates a link to that file using its path. This is useless knowing that I can do the same just copy pasting the file into the Code editor.
It is possible though to open the files directly while dragging from Windows Explorer to Code Editor Window. I want the same with "Solution Explorer" !!!

How to adapt Drag&Drop in VS Solution Explorer to correctly move in TFS

I'm looking to enhance the Visual Studio Solution Explorer. The problem I have is the following:
When I drag & drop a file in Solution Explorer it copies this file instead of moving it and in TFS this file is added instead of moved (rename)
Is it possible to intercept or add to the drag & drop functionality of the Visual Studio Solution Explorer so that I can call the required tf commands myself?
If the solution is already configured for integrated source control then the drag and drop functionality pends a rename operation in VS 2010 / TFS 2010.

Sync Visual Studio folder/filename structure with file system structure/filenames

I've made a lot of changes (a.k.a refactoring) to my (big) visual studio solution and it appears now that vs solution structure is very different in visual studio from what it is on the disk and TFS.
Is there a way to make file system (and TFS) have the same folder names and file names as in visual studio solution with some tool or script/program/helper add-in?
This is the list of main issues:
- when I rename project visual studio does not rename folder where this project is located
- if I move project, file to different vs folder, it just happens in visual studio, but not on the disk
You can switch between logical or physical folders in the solution by clicking the "Show all files" icon (2nd top left icon in the solution pane). When not activated, you are viewing logical folders in the solution, drag and drop simply re arrange files virtually. When activated, you are viewing physical folders, drag and drop moves files on disk, using the source controller.
No there are no tools that can help you do this automatically.
There is a two step approach to solve it, made easier by installing two add-ons. I prefer to use the Team Foundation Power Tools and the Source Control Explorer Extensions.
From the Source Control Window inside Visual Studio:
Close the open solution in Visual Studio
open the Source Control window in TFS
Move the folders around to match the structure you prefer, with the mentioned add-ons you should be able to drag/drop and rename them more easily
Alternatively, do the changes on file system with the Team Foundation Power Tools explorer extensions installed:
Close the solution in Visual Studio
navigate to your workspace folder using Windows Explorer
use the TFS context menu on the folders to check-out/rename/move the items ans folders
Then re-load the solution in Visual Studio and:
Open the solution and see that a lot of projects don't load.
Highlight a project that couldn't be found
On the project properties window (ctrl-w, p) find the file path item and click the little [...] button to navigate to the new project file location for each project.
Rightclick the projects you've updated this way in the solution explorer and reload them
Rebuild your solution to verify all changes went as expected
Check-in your changes

Resources