Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I force Visual Studio 2010 to reload files and projects that have changed on disk?

I often use command line tools to do source control updates of files and projects that I have loaded into Visual Studio 2010. With previous releases when I did this I could force Visual Studio to notice and load the changes by doing a Save All. This doesn't seem to work in Visual Studio 2010.

I do have 'Detect when a file is changed outside the environment' checked in the Options window, but if I sit and wait it takes minutes or longer for the changes to be noticed.

How can I force 2010 to notice the changes in loaded source files and projects?

like image 208
David Norman Avatar asked Sep 09 '10 17:09

David Norman


People also ask

How do I reload all files in Visual Studio?

In Solution Explorer, select the projects you want to load (press Ctrl while clicking to select more than one project), and then right-click on the project and choose Reload Project. Visual Studio will remember which projects are loaded the next time you open the solution locally.

How do I update Visual Studio files?

There is a refresh option on the bottom of 'view' tab. click on your project in the solutions explorer(not the solution itself, but the project), then click on the view tab on the tab list on top of the visual studio. tabs go: file, edit, view, project... on the bottom of view tab refresh option will appear.

How do I load an unloaded project in Visual Studio?

Visual Studio 2019 has a new concept called "Solution Filter Files". You can right click on a solution after you've unloaded what you want and do "Save as solution filter". It creates a file which is a list of projects to INCLUDE in opening.

What are solution items?

Solution items can be any type of file. They are linked to the solution, rather than a project. The files can be stored anywhere but it is commonplace to place them within the solution's folder structure, making it easier to add them to repositories of revision control systems.


1 Answers

You can reforce reloading a project by unloading and loading the project.

Right-click the project and select Unload Project, then, when the project is unloaded right-click again and select Reload Project.

Note that this requires that all modified files in the project either be saved or the changes in the file be discarded.

like image 195
Dirk Vollmar Avatar answered Sep 27 '22 22:09

Dirk Vollmar