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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to open exe file in visual studio project.

(0) ShareShare
ReportReport
Posted on by

Hello everyone

I had try to create a C# form with .net business connector and i also added the C# project to AOT. The C# from is in exe format. Can anyone please tell me how to call the C# form out by menu item or button method? or is it AX2012 only allow us to run C# project in dll?

Thank You

Best Regards

Kuan Yi

*This post is locked for comments

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

    You can use an .exe file in the same way as a .dll, i.e. you can use public types defined there in your X++ code. You can even call your Main() method, if you want.

    Or you can run the .exe file as any other application, but then you don't technically need any reference in AOT. You can use WinAPI::shellExecute() or do it through the System.Diagnostics.Process class.

    If it's a WinForm ot WPF form, you could also add it to an AX form through the ManagedHost control (see .NET Controls).

    Also, get rid of Business Connector if possible - your other options are proxy classes, LINQ and WCF (depending on what you're exactly doing).

  • Community Member Profile Picture
    on at

    Hi Martin

    Thank you for your advice, but now i got another questing, i successfully open an exe file with WinAPI::shellExecute(), the file was created by C#. Is it possible for me to pass a parameter from AX to C#? If yes can you please advice me how to make it.

    Thank You

    Best Regards

    Kuan Yi

  • Verified answer
    Martin Dráb Profile Picture
    239,029 Most Valuable Professional on at

    By shellExecute(), you're running the compiled application - it may have been written  in C++, Basic or whatever and you can't access its types. But you can pass command line parameters and handle them in your application (see Main() and Command-Line Arguments).

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans