Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

C# Code in AX2012 R3

Posted on by Microsoft Employee

Hi All,

I have developed a C# Project consuming many dlls (like PDF Sharp,AutoDesk Vault) and i added the ProjectName.dll to the References in the AOT , but when i call the Methods inside my Project does not respond anything.  What are the steps to make it work as like in the Visual C#

*This post is locked for comments

  • Martin Dráb Profile Picture
    Martin Dráb 230,214 Most Valuable Professional on at
    RE: C# Code in AX2012 R3

    How do you know that the problem is caused by an assembly built for 32-bit architecture? Have you made progress in isolating the problem? Or are you merely guessing?

    Also, the error you showed me isn't about AOS at all. It says that assembly loading failed on client (ax32.exe) because AutoDeskAttmt assembly can't be found. Looking at AOS won't solve the problem you have on client.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: C# Code in AX2012 R3

    Maybe if I found the referenced dll's that failed in Axserve.exe execution I can replace it with the x64 compatible DLLs and recreate the whole project and check if it works

    or else I have to replace all the dll's with the x64 compatible ones in the C# project

  • Martin Dráb Profile Picture
    Martin Dráb 230,214 Most Valuable Professional on at
    RE: C# Code in AX2012 R3

    It fails when AX is loading assemblies, not when its executing them. Do you mean which assemblies refers to AutoDeskAttmt? Why do you want to spend time finding it out? You can't change them to stop using AutoDeskAttmt anyway, so what's the point?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: C# Code in AX2012 R3

    Can we find in which referenced(AutoDesk) assemblies it fails ?

  • Martin Dráb Profile Picture
    Martin Dráb 230,214 Most Valuable Professional on at
    RE: C# Code in AX2012 R3

    The message is very clear - it says that AutoDeskAttmt couldn't be found.

    It also tells you which locations were tried (e.g. C:/Program Files (x86)/Microsoft Dynamics AX/60/Client/Bin/AutoDeskAttmt.DLL).

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: C# Code in AX2012 R3

    Here is the Log Created,

    *** Assembly Binder Log Entry  (11/9/2018 @ 6:36:29 PM) ***

    The operation failed.

    Bind result: hr = 0x80070002. The system cannot find the file specified.

    Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll

    Running under executable  C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin\Ax32.exe

    --- A detailed error log follows.

    === Pre-bind state information ===

    LOG: DisplayName = AutoDeskAttmt

    (Partial)

    WRN: Partial binding information was supplied for an assembly:

    WRN: Assembly Name: AutoDeskAttmt | Domain ID: 1

    WRN: A partial bind occurs when only part of the assembly display name is provided.

    WRN: This might result in the binder loading an incorrect assembly.

    WRN: It is recommended to provide a fully specified textual identity for the assembly,

    WRN: that consists of the simple name, version, culture, and public key token.

    WRN: See whitepaper go.microsoft.com/fwlink for more information and common solutions to this issue.

    LOG: Appbase = file:///C:/Program Files (x86)/Microsoft Dynamics AX/60/Client/Bin/

    LOG: Initial PrivatePath = NULL

    LOG: Dynamic Base = NULL

    LOG: Cache Base = NULL

    LOG: AppName = Ax32.exe

    Calling assembly : Microsoft.Dynamics.AX.ManagedInterop, Version=6.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.

    ===

    LOG: This bind starts in default load context.

    LOG: Using application configuration file: C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin\Ax32.exe.Config

    LOG: Using host configuration file:

    LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.

    LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).

    LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Dynamics AX/60/Client/Bin/AutoDeskAttmt.DLL.

    LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Dynamics AX/60/Client/Bin/AutoDeskAttmt/AutoDeskAttmt.DLL.

    LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Dynamics AX/60/Client/Bin/EditorComponents/AutoDeskAttmt.DLL.

    LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Dynamics AX/60/Client/Bin/EditorComponents/AutoDeskAttmt/AutoDeskAttmt.DLL.

    LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Dynamics AX/60/Client/Bin/AutoDeskAttmt.EXE.

    LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Dynamics AX/60/Client/Bin/AutoDeskAttmt/AutoDeskAttmt.EXE.

    LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Dynamics AX/60/Client/Bin/EditorComponents/AutoDeskAttmt.EXE.

    LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Dynamics AX/60/Client/Bin/EditorComponents/AutoDeskAttmt/AutoDeskAttmt.EXE.

    LOG: All probing URLs attempted and failed.

  • Martin Dráb Profile Picture
    Martin Dráb 230,214 Most Valuable Professional on at
    RE: C# Code in AX2012 R3

    How did you find "all of the required dll's"? Do you realize that if you use an Autodesk assemly, for instance, what's needed are also all assemblies referenced by the Autodesk assembly?

    You've also never addressed the potential problem of processor architecture. If any of these assemblies is built only for 32-bit processes, you can't load your DLL to AOS, because it's not a 32-bit process.

  • Martin Dráb Profile Picture
    Martin Dráb 230,214 Most Valuable Professional on at
    RE: C# Code in AX2012 R3

    If you're saying that the your DLL is listed as failed for ax32.exe (which looks strange to me, because you said it worked there), click the Log View button to learn more about the error.

    Also, make sure your read the To view details about a specific failure section of the documentation I gave you above.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: C# Code in AX2012 R3

    Hi Nikolaos,

    I have checked and all of the required dll's are already added.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: C# Code in AX2012 R3

    Hi Martin,

    In Assembly Binding Log Viewer , my dll is not listed under Ax32serv.exe but it is listed in Ax32.exe
    mar.PNG

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans