Find assembly for a given type – in AX 7

Five years ago, I wrote a blog post called Assembly containing a given type, demonstrating how to find the assembly where a given type is defined. I needed the same thing in AX 7, but instead of using the same code, I decided to utilize the fact that I can now easily write parts of …

Continue reading ‘Find assembly for a given type – in AX 7’ »

Objects ignored by Code Upgrade Tool

When testing my new rule for code upgrade tool, I found that certain objects are skipped and rules are not checked for them. That makes the tool significantly less useful, because you can’t be sure that it found everything. This blog post explains why it happens, but unfortunately doesn’t provide any reasonable workaround, except making …

Continue reading ‘Objects ignored by Code Upgrade Tool’ »

Custom rules for Code Upgrade Tool

The Code Upgrade Tool allows you to detect patterns in X++ code and even to automatically change code. It’s especially useful for code upgrade, because you can easily upgrade legacy code. For example, CompanyInfo.CurrencyInfo field was replaced by CompanyInfo::standardCurrency() method in AX 2012. To upgrade your code, you would have to find and fix all …

Continue reading ‘Custom rules for Code Upgrade Tool’ »

Assembly containing a given type

When exploring Dynamics AX 2012, I sometimes meet situations when I would like to know more about some CLR type (particularly to decompile it in ILSpy) and I need to know in which assembly it is contained. It can be solved by the following X++ method, for instance: public static void showContainingAssembly(str _typeName) { System.AppDomain …

Continue reading ‘Assembly containing a given type’ »