Friday, May 19, 2017

Use tags to find related bits and pieces in your code base

A lot of elements, if not all, in Dynamics 365 for Operations (D365FO) has a property called "Tags".

With this property you can link all sorts of different otherwise unrelated elements. You could for example use this as part of a bigger change you need to do to your code base, marking all the bits you need to modify.

Adding a tag is as simple as just using it:

For Visual Studio to find places where the tag is used, you need to do a  build with the "Build cross reference data" option checked:

And here is where you search for tags:

And here is the result:

This ought to work for code to. The editor knows about the tags and has intellisense for them:

But the "Find tag references" tool doesn't pick them up. I wonder if that is a bug or not.

And in my opinion you should try to not go overboard tagging away all day long.

No comments: