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)

Update dll created in C#

(0) ShareShare
ReportReport
Posted on by

Hi,

I've created dll library in VS and added project to ax2012 AOT. In Ax i can use this dll and it works fine, now i've added few methods in this dll, rebuild project and deployed to AX. In Morphix inteli sense i can see my new methods but when i try to use them i've got an error with message that my new method can't by found in assembly. Can someone tell me how to refresh assemblies in AX?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Bashir Ahmad Profile Picture
    5,248 on at

    You may need to run incremental CIL

  • Suggested answer
    Koen Roks Profile Picture
    on at

    Hi Pawcio,

    I suspect that the wrong version of the dll is attached to the AOS.

    First try and restart the AOS so it can pick up the changes in the dll.

    The next step would be to check the appData folder for your account to see if you dll is in the vsAssemblies folder (AppData\Local\Microsoft\Dynamics AX\VSAssemblies, depending on which CU you are working a guid will be use in the VSAssemblies folder name)

    Last make sure your new dll is used as it is deployed Client side, Server side or both.

    Koen

  • Community Member Profile Picture
    on at

    I run incemental cil and get this error " Object reference not set to an instance of an object.".  I stop aos, remove all files from C:\Program Files\Microsoft Dynamics AX\60\Server\JDAXTEST_DEV\bin\XppIL I start aos and run full cil and there was no errors, then i try to use my dll and it still didnt see my changes, I try to run once again incremental cil and I got the same error like the first time. I checked folder appData  and my dll was there.

  • Martin Dráb Profile Picture
    237,976 Most Valuable Professional on at

    Does the code throwing it runtime exception run on server or on client?

    A possible explanation is that your assembly has been deployed to client but not to AOS. Therefore compilation on client succeeds but execution on server fails.

    Also, generating CIL can help if the failing code runs in CIL. If it runs in X++, don't waste time with regenerating CIL.

  • Community Member Profile Picture
    on at

    In VS i have deploy options set up to server and client and I use functions from my DLL i class which is setup to run on server. I've tried to delete this DLL from folders in my computer and also removed it from AOS from folder C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX_PM\bin\VSAssemblies then I try to deploy my DLL once again but it still cant see my changes.

  • Martin Dráb Profile Picture
    237,976 Most Valuable Professional on at

    Please make sure that you restart the AOS before running your code on server.

    If it doesn't help, you library probably can't be loaded by AOS, because it depends on another assembly missing from AOS, the DLL is for x86 processes only, or so. The Assembly Binding Log Viewer will tell you more.

  • Community Member Profile Picture
    on at

    Thanks Martin for link to that tool but I couldn't figure out fast how to use it. I resolve my problem by saving my library on other name and then deploy it to AX.

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