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)

Assembly containing type [MyAssembly] is not referenced.

(0) ShareShare
ReportReport
Posted on by

Today I've come across something rather frustrating. Running AX2012R3 CU9.

I've built up a library of c# code from a legacy .net application to help run older code in AX for various purposes.  Calling [static] methods in the new dll works fine when run on the AX Client.  However, when running server-side I get the "Assembly containing type MyAssembly is not referenced." error. Everything I know and read says an AOS restart/full CIL should fix it... but it isn't working.

  • The project PlatformTarget is AnyCPU since I am deploying to client AND server.
  • Running code against the dll from client works fine, but in an SSRS report or Batch job (server side) it fails with the error.
  • I've tried adding FullControl permissions to the DLL for the AOS account (in fact to the whole VSAssemblies folder)
  • Restarted AOS service, cleared XppIL folder, ran full CIL... tried pretty much everything.

Any ideas why I would still be getting the error?  I can't seem to figure out why the dll isn't taking...

*This post is locked for comments

I have the same question (0)
  • Joris dG Profile Picture
    17,775 on at

    Where is your DLL stored on the server side? What folder, that is.

  • MASAndy Profile Picture
    on at

    I am deploying straight out of VS, which for client goes to the user's AppData\Local\Microsoft\Dynamics Ax\VSAssemblies{GUID} folder.

    For the server that goes into the C:\Program Files\Microsoft Dynamics AX\60\Server\[Server]\bin\VSAssemblies folder

    I have not added the DLL anywhere else.  I have not added the reference to the AOT.  

  • Verified answer
    MASAndy Profile Picture
    on at

    Found it.  Turns out that several of the referenced dlls in the C# project were for .NET controls which were part of what was brought over.  Those dlls were added to AOT References node, which apparently only counts for the client, not the AOS server side.  Since we obviously don't care about user controls on server side, I just split all that into its own controls project and deployed it to client, while taking the remaining code and deploying to server & client.  Works like a charm

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