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)

adding dll to AOT-resource fails

(0) ShareShare
ReportReport
Posted on by 625

Hi I cannot add a dll into the AOT-resource in my Axapta4.0 installation.

I get the ClrObject static method invocation error when system call the GetAssemblyName method

Any suggestions or ideas

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    237,976 Most Valuable Professional on at

    What can you tell us about the DLL? For example, it's is a .NET assembly at all? For which version of .NET framework? For which processor architecture?

    How are you using the file? Where and why are you calling GetAssemblyName()?

  • CRSW Profile Picture
    625 on at

    it's a .net assembly (messagingtoolkit.QrCode) Version I am not sure.

    I do not use the file because it fails to add it as reference in AX. The GetAssemblyName is called when adding it to the reference and it fails. Thats why I cannot add it (exception thrown)

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

    All right, please find out the missing information. It's likely that you're trying to import an incompatible assembly. Don't forget that AX 4.0 is thirteen years old; it uses .NET Framework 2.0. You can simply put modern assemblies there and expect that AX 4.0 will know how to work with them.

  • CRSW Profile Picture
    625 on at

    you are right its from 2012 and uses .net 3.5

    So I have to find another way to create QR Code from AX4

  • CRSW Profile Picture
    625 on at

    short question.

    I found a .net copiled QRCode DLL.

    I can add it to the AOT-resource but later (trying to initialize it in the code) I get an error that it cannot be loaded

    Error loading Assembly ThoughtWorks.QRCode, Version=1.0.2774.19990, Culture=neutral, PublicKeyToken=null

    Do I have to add all used libraries in the QRCode as well?

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

    Yes, it the assembly requires other assemblies that aren't installed in the system, its loading will fail. It can't work without assemblies it depends on.

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