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

Announcements

News and Announcements icon
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
    239,680 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 21

#2
dserp Profile Picture

dserp 4

#2
dekion Profile Picture

dekion 4

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans