web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Is it possible to use CIL of AX classes to create AX in C# without using reflection?

(0) ShareShare
ReportReport
Posted on by

I am working on the task where I am moving a lot of variables (100 000+) from C# to AX. Everything I tried yet fail on performance. (Calling C# in X++, Receiving C# array in X++, calling static method in C# trought recursion, Creating X++ object in C# trough reflection - business connector, receiving string from C# and parsing it in X++, receiving string and parsing it in X++ using C# call) 

I need to find some trick how to fast transfer those variables or how to make some X++ data-storing object in C# 

One thing that comes to my mind is creating X++ object directly in C# suing CIL call in C#. Did anyone tried this? Will it be fast?

It should be possible the classes in AX are translated to CIL and http://stackoverflow.com/questions/3328901/how-to-insert-cil-code-to-c-sharp 

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    I already gave you the answer in your previous thread. Don't run your X++ code directly; generate CIL from it and run the logic in CIL. Then the whole solution will run in CLR (without switching between AX runtime and CLR) and CLR types will be called directly. For CLR, CIL generated from X++ and CIL generated from C# are indistinguishable.

    Haven't you ever heard of the out-of-the-box feature in AX 2012 generating CIL from X++?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans