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)

How to deploy managed code in AX 2012?

(0) ShareShare
ReportReport
Posted on by 2,550

In Visual Studio 2010 I created a classlibrary, followed all steps as described at http://msdn.microsoft.com/en-us/library/gg889192.aspx and http://msdn.microsoft.com/en-us/library/gg889192.aspx, but AX2012 (RTM CU1) cannot find the library when I want to use it in a simple x++ job.

I already restarted the client and server, but no luck. Hot-swapping of assemblies for each development session is enabled.

According to the documentation, my classlibrary should be available and there should be no need to manually add it to the references, but it just doesn't seem to work.

Ideas anyone?

*This post is locked for comments

I have the same question (0)
  • Xander Vink Profile Picture
    2,550 on at

    I figured it out, so for everyone who runs into the same problem, here the solution:

    - First create your classlibrary in VS2010

    - Build it

    - Add it to the AOT

    - Set your deploy options in the properties of the project

    - Save your solution

    - Close your solution

    - Open your solution from the Application Explorer !!

    - Right click your project and select deploy.

    - If you have an open AX client, restart it.

    - Now your classlibrary is available in X++.

  • Verified answer
    Joris dG Profile Picture
    17,775 on at

    Hi Xander,

    deploying from Visual Studio works, as you have mentioned. However, in your list of steps there is no need to open the solution from the application explorer. Add to AOT and setting deploy settings is the only thing that needs to be done of course. Other than that, just building the code and restarting the AX client is enough. You can select deploy from visual studio to force it in case you have trouble. Of course for server side code you will need to enable hotswapping and restart your client to get into a new appdomain, or restart the AOS.

    I have blogged about this a few weeks ago, you can find that here: daxmusings.blogspot.com/.../ax-2012-net-assembly-deployment.html

  • Xander Vink Profile Picture
    2,550 on at

    Hi Joris,

    thanks for your reply, but, at least in my setup, the standard steps don't seem to be enough. I've tried the steps as described by Microsoft, over and over again, but the assemblies just won't deploy. Even forcing it in VS doesn't work.

    Only reopening the VS project from the application explorer window enables me to deploy them.

    I think there is something wrong in my setup, but I don't know what....

  • Joris dG Profile Picture
    17,775 on at

    Are you deploying to client or server?

  • Xander Vink Profile Picture
    2,550 on at

    I'm deploying to both client and server. The server has the option 'hot-swapping of assemblies for each development session' enabled. As I mentioned above, I also tried restarting the server (and client), but no go...

  • Joris dG Profile Picture
    17,775 on at

    I have had some issues with server side deployment that I would like to figure out, for the most part that has worked for me. As far as client-side, I have never had issues with the RTM and CU1 versions, and all of my blog posts about managed code have not had these issues either (at least not for me). Do you have a specific project you're working on or have you tried an easy example from scratch?

  • Xander Vink Profile Picture
    2,550 on at

    I only tried (very) easy projects from scratch. No complicated stuff yet.

  • Xander Vink Profile Picture
    2,550 on at

    This morning I wanted to see if I could figure out why the standard way of deployment doesn't work in my setup. I created a project in VS, build it, added it to the AOT, set the deployment options, deployed the project..... And what about that.... The assembly was available in AX. Just as it should be. As far as I know nothing has changed since yesterday and I did everything exactly the same, but now it works, and yesterday it didn't.

    If someone else would tell me this, I would say "yeh right; you did everything the same and it now magically works; sure". But I'm really absolutely sure that I did exactly the same steps as yesterday, but then it didn't work and now it does.

    Thanks for the help and your answer is the verified answer (for today that is :P ).

  • Joris dG Profile Picture
    17,775 on at

    "Don't worry be happy" I guess? :-)

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