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

  • Community Member Profile Picture
    on at
    RE: Update dll created in C#

    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.

  • Martin Dráb Profile Picture
    231,923 Most Valuable Professional on at
    RE: Update dll created in C#

    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
    RE: Update dll created in C#

    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
    231,923 Most Valuable Professional on at
    RE: Update dll created in C#

    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
    RE: Update dll created in C#

    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.

  • Suggested answer
    Koen Roks Profile Picture
    on at
    RE: Update dll created in C#

    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

  • Suggested answer
    Bashir Ahmad Profile Picture
    5,248 on at
    RE: Update dll created in C#

    You may need to run incremental CIL

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,202 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,923 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans