Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Update the 'code map' in Visual Studio 2013 automatically?

I've started liking the "show on code map" that appears when you right click any class/method/field etc within Visual Studio 2013. However, I've noticed that it doesn't seem to be smart enough to 'redraw' (or be commanded to redraw) when the underlying classes change (kinda the purpose of a code map).

Currently I have to delete the class that's been modified and then re-add it to see the "new" dependency lines but this is an issue because with 15+ items I now have to track (paper+pen) which classes were changed in code so I remember to remove/add them. Otherwise the diagram still shows some stale dependencies which are confusing.

So, is there anyway to tell VS2013 "Would you be so kind as to refresh the dependency graph between all objects in the code map based on current build?"

like image 513
DeepSpace101 Avatar asked Mar 01 '14 01:03

DeepSpace101


2 Answers

In Visual Studio 2015:

Right click on your assembly. Select Group → Refetch Children

If the Refetch Children selection is not present, delete an item from the assembly first. Modification of assembly content sometimes triggers the visibility of the Refetch action.

The items in the assembly will refresh.

like image 120
chriswirz Avatar answered Nov 03 '22 03:11

chriswirz


There is not a way to automatically do this. The code map is currently viewed as a static analysis tool, so it does not dynamically/automatically update. When you change a class, you have to remember to update the map. No need for pen and paper. Or, you can view the date/times of your classes and update the ones newer than the map. You can make suggestions to Microsoft to improve their product. Here is one such method: Visual Studio feedback options: Make a suggestion

like image 28
clairestreb Avatar answered Nov 03 '22 03:11

clairestreb