Patch DLL in AX 2012












1















We have a customer that has an old version of some software installed.
There is a problem and we have a fix for it. Only we can't deploy it at the customer.



I'm not an AX guy myself, but I don't understand the problem either.
We have decompiled the "old" dll, made a small change, recompiled it again with the same version numbers etcetera and signed the dll with the same key.
If I open both versions with dotPeek I see they have the exact same assembly name.



Then when I replace the "old" dll with the "new" dll and run the AX code I get following errors:




  • "Assembly containing type 'namespace.type' is not referenced."

  • "Object 'CLRObject' could not be created."

  • "A critical error has occurred in function [nameOfAxFunction]."


So why does it not take the new dll?
Does AX do a check on the hash of each dll that it load and therefore block my new version?
Do we need to recompile the AX code ... ?



Also in the AX function it fails when creating a new instance of a type that is in our modified assembly. So it's not even that we access another dll that fails to load our new dll, we go directly from AX to the new version of the dll.



Ps:




  • I have double checked and the type is still in the assembly.

  • Assemblies replaced in:
    "Program Files (x86)Microsoft Dynamics AX60ClientBin" &
    "Program FilesMicrosoft Dynamics AX60Server[env-name]bin"











share|improve this question























  • I also found an article about the AOS which would explain the behavior if it would not take my new dll, and keep executing the old code. But since I get an error after replacing the dll I assume it actually tries to load the new version... (Also I do restart the AX client.)

    – Frederick Grumieaux
    Nov 14 '18 at 14:03






  • 1





    Have you tried adding it in the AOT? You may be the older version in the AOT

    – Alex Kwitny
    Nov 14 '18 at 16:27






  • 1





    Under References in the AOT, right click and Add Reference and try that. Do in a Dev environment and make sure you know what you're doing.

    – Alex Kwitny
    Nov 14 '18 at 17:31
















1















We have a customer that has an old version of some software installed.
There is a problem and we have a fix for it. Only we can't deploy it at the customer.



I'm not an AX guy myself, but I don't understand the problem either.
We have decompiled the "old" dll, made a small change, recompiled it again with the same version numbers etcetera and signed the dll with the same key.
If I open both versions with dotPeek I see they have the exact same assembly name.



Then when I replace the "old" dll with the "new" dll and run the AX code I get following errors:




  • "Assembly containing type 'namespace.type' is not referenced."

  • "Object 'CLRObject' could not be created."

  • "A critical error has occurred in function [nameOfAxFunction]."


So why does it not take the new dll?
Does AX do a check on the hash of each dll that it load and therefore block my new version?
Do we need to recompile the AX code ... ?



Also in the AX function it fails when creating a new instance of a type that is in our modified assembly. So it's not even that we access another dll that fails to load our new dll, we go directly from AX to the new version of the dll.



Ps:




  • I have double checked and the type is still in the assembly.

  • Assemblies replaced in:
    "Program Files (x86)Microsoft Dynamics AX60ClientBin" &
    "Program FilesMicrosoft Dynamics AX60Server[env-name]bin"











share|improve this question























  • I also found an article about the AOS which would explain the behavior if it would not take my new dll, and keep executing the old code. But since I get an error after replacing the dll I assume it actually tries to load the new version... (Also I do restart the AX client.)

    – Frederick Grumieaux
    Nov 14 '18 at 14:03






  • 1





    Have you tried adding it in the AOT? You may be the older version in the AOT

    – Alex Kwitny
    Nov 14 '18 at 16:27






  • 1





    Under References in the AOT, right click and Add Reference and try that. Do in a Dev environment and make sure you know what you're doing.

    – Alex Kwitny
    Nov 14 '18 at 17:31














1












1








1








We have a customer that has an old version of some software installed.
There is a problem and we have a fix for it. Only we can't deploy it at the customer.



I'm not an AX guy myself, but I don't understand the problem either.
We have decompiled the "old" dll, made a small change, recompiled it again with the same version numbers etcetera and signed the dll with the same key.
If I open both versions with dotPeek I see they have the exact same assembly name.



Then when I replace the "old" dll with the "new" dll and run the AX code I get following errors:




  • "Assembly containing type 'namespace.type' is not referenced."

  • "Object 'CLRObject' could not be created."

  • "A critical error has occurred in function [nameOfAxFunction]."


So why does it not take the new dll?
Does AX do a check on the hash of each dll that it load and therefore block my new version?
Do we need to recompile the AX code ... ?



Also in the AX function it fails when creating a new instance of a type that is in our modified assembly. So it's not even that we access another dll that fails to load our new dll, we go directly from AX to the new version of the dll.



Ps:




  • I have double checked and the type is still in the assembly.

  • Assemblies replaced in:
    "Program Files (x86)Microsoft Dynamics AX60ClientBin" &
    "Program FilesMicrosoft Dynamics AX60Server[env-name]bin"











share|improve this question














We have a customer that has an old version of some software installed.
There is a problem and we have a fix for it. Only we can't deploy it at the customer.



I'm not an AX guy myself, but I don't understand the problem either.
We have decompiled the "old" dll, made a small change, recompiled it again with the same version numbers etcetera and signed the dll with the same key.
If I open both versions with dotPeek I see they have the exact same assembly name.



Then when I replace the "old" dll with the "new" dll and run the AX code I get following errors:




  • "Assembly containing type 'namespace.type' is not referenced."

  • "Object 'CLRObject' could not be created."

  • "A critical error has occurred in function [nameOfAxFunction]."


So why does it not take the new dll?
Does AX do a check on the hash of each dll that it load and therefore block my new version?
Do we need to recompile the AX code ... ?



Also in the AX function it fails when creating a new instance of a type that is in our modified assembly. So it's not even that we access another dll that fails to load our new dll, we go directly from AX to the new version of the dll.



Ps:




  • I have double checked and the type is still in the assembly.

  • Assemblies replaced in:
    "Program Files (x86)Microsoft Dynamics AX60ClientBin" &
    "Program FilesMicrosoft Dynamics AX60Server[env-name]bin"








dynamics-ax-2012






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 14 '18 at 12:29









Frederick GrumieauxFrederick Grumieaux

309214




309214













  • I also found an article about the AOS which would explain the behavior if it would not take my new dll, and keep executing the old code. But since I get an error after replacing the dll I assume it actually tries to load the new version... (Also I do restart the AX client.)

    – Frederick Grumieaux
    Nov 14 '18 at 14:03






  • 1





    Have you tried adding it in the AOT? You may be the older version in the AOT

    – Alex Kwitny
    Nov 14 '18 at 16:27






  • 1





    Under References in the AOT, right click and Add Reference and try that. Do in a Dev environment and make sure you know what you're doing.

    – Alex Kwitny
    Nov 14 '18 at 17:31



















  • I also found an article about the AOS which would explain the behavior if it would not take my new dll, and keep executing the old code. But since I get an error after replacing the dll I assume it actually tries to load the new version... (Also I do restart the AX client.)

    – Frederick Grumieaux
    Nov 14 '18 at 14:03






  • 1





    Have you tried adding it in the AOT? You may be the older version in the AOT

    – Alex Kwitny
    Nov 14 '18 at 16:27






  • 1





    Under References in the AOT, right click and Add Reference and try that. Do in a Dev environment and make sure you know what you're doing.

    – Alex Kwitny
    Nov 14 '18 at 17:31

















I also found an article about the AOS which would explain the behavior if it would not take my new dll, and keep executing the old code. But since I get an error after replacing the dll I assume it actually tries to load the new version... (Also I do restart the AX client.)

– Frederick Grumieaux
Nov 14 '18 at 14:03





I also found an article about the AOS which would explain the behavior if it would not take my new dll, and keep executing the old code. But since I get an error after replacing the dll I assume it actually tries to load the new version... (Also I do restart the AX client.)

– Frederick Grumieaux
Nov 14 '18 at 14:03




1




1





Have you tried adding it in the AOT? You may be the older version in the AOT

– Alex Kwitny
Nov 14 '18 at 16:27





Have you tried adding it in the AOT? You may be the older version in the AOT

– Alex Kwitny
Nov 14 '18 at 16:27




1




1





Under References in the AOT, right click and Add Reference and try that. Do in a Dev environment and make sure you know what you're doing.

– Alex Kwitny
Nov 14 '18 at 17:31





Under References in the AOT, right click and Add Reference and try that. Do in a Dev environment and make sure you know what you're doing.

– Alex Kwitny
Nov 14 '18 at 17:31












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53300287%2fpatch-dll-in-ax-2012%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53300287%2fpatch-dll-in-ax-2012%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Xamarin.iOS Cant Deploy on Iphone

Glorious Revolution

Dulmage-Mendelsohn matrix decomposition in Python