Assembly reference containing type is not referenced, Object 'CLRObject' could not be created
Problem Statement
I have RDP and an AX shortcut icon, I have a parameter form with a "Test Connection" button. Upon clicking this button, a DLL is invoked to authenticate the connection status. This DLL is placed in both the client and server directories: specifically, it is located in the Client Directory at C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin and in the Server Directory at C:\Program Files\Microsoft Dynamics AX\60\Server\<MachineName>\bin. Additionally, a reference to this DLL has been added to the Application Object Tree (AOT) to facilitate its functionality
When running the process from RDP, the "Test Connection" passes successfully. However, when using the AX shortcut icon, an error is encountered.
Solution
Add C# project into AOT, by right click on project and ADD <ProjectName> to AOT.
Open project and set the project property. Deploy to client YES and Deploy to server YES and Deploy the project.
After deployment of project dll is created in VSAssembly folder C:\Program Files\Microsoft Dynamics AX\60\Server\<MachineName>\bin\VSAssembly and C:\Users\<YourUserName>\AppData\Local\Microsoft\Dynamics AX\VSAssemblies\
- create a class with a new method and instantiate your dll in that method.
- Set the class to run on client.
- Create a job and run the method.
- Switch the class properties to run on server and perform the same test again.
- If no errors occur You are good to go
After performing above solution my Test connection button works on both, RDP and AX shortcut Icon.
Comments
Post a Comment