Condividi tramite


What is the code index SDK?

The Dependency Graphs in Visual Studio Ultimate are much more scalable …

In Visual Studio 2010, we released the Dependency diagrams, which enabled you to visualize the dependencies between assemblies, namespaces, types or members through directed graphs. In Visual Studio 11 Ultimate, the experience around these architecture diagrams has improved a lot. There are many goodies, among which a fantastic incremental layout, and the possibility to do some diagram touch-up ; we’ll discuss the features in details in the next coming days/weeks. But what you will probably immediately notice is that now, when you use Architecture | Generate Dependency Graphs | For solution, you’ll be able to generate a dependency diagram for really huge Visual Studio solutions. We have considerably improved the performance and even more importantly the scalability of the Dependency graphs. However, that’s probably not the only way you’ll want to understand existing code : you will also want to start from a particular code element you are interested in. This is why we also enabled you to create diagrams from a selection in the solution explorer (we added a drop-down button in the solution explorer toolbar that show-up when you select code elements to “graph” those), and then ask questions from the representations of the code elements in the diagram (using the Show | contextual menu on the nodes of the graph), or pivots in the solution explorer.

… because they are queried from the code index

At the heart of these scalability and performance improvements, is the code index. Each time a diagram representing code elements is built, the corresponding assemblies are indexed in the code index (if they need to be). The code index is then used as a cache to query all the needed information. In the Architecture diagrams, the information which is indexed is limited to what is in the solution, but it is also possible to pre-populate the cache using build tasks that we released part of the VsVmSdk. It is also possible to leverage the information which is in the cache, as well as to create new contextual queries.

The code index SDK

The code index SDK gives you the opportunity to control the indexing, and to access the data which is in the cache. In the next few days, I’ll explain more about code index SDK.

Meanwhile, have fun with Visual Studio 11 Beta, and stay tuned !