Distinguish object types in Visual Studio
It often happens to me that I have to search for the correct tab in Visual Studio, especially when developing for Dynamics 365. Tables, forms, menu items … they can all have the same name. Fortunately, a plugin exists to distinguish these from each other.
Productivity Power Tools
This plugin has several uses, such as additional commands and sorting, but here I will talk about the Custom Document Well and more specifically the Color Coding.
We start with installing the plugin. This can be found on the market place for Visual Studio 2015 and for Visual Studio 2017 or directly in Visual Studio (Tools > Extensions and Updates > Online). Once installed we find the configuration under Tools > Options > Productivity Power Tools. We will ignore most of the configuration for now, but make sure that under Custom Document Well > General the options "Color tabs by project" is disabled and "Color tabs by regular expression" is enabled and under Custom Document Well > Advanced the option "Use full document path for regular expression matching" is enabled as well. Next, under Custom Document Well, open the Color Coding tab and add the colors per regular expression.
It is important to mention that the objects in Dynamics can be found physically in the folders K:\AosService\PackagesLocalDirectory\*. The regular expressions can therefor be kept simple, for instance .*\\AxForm\\.*
for all forms.
The setup above ensures that the tabs in Visual Studio have different colors for tables, forms and form extensions and thus makes a clear distinction between the different CustTable
objects.