I hope you are doing good. Today I’m gonna share you very intresting thing, Don’t scare by looking this title but solution is very simple.
I was trying to install my Model File to new environment. But It throws an error
For this issue solution is very Simple. Even it took some time to figure out the reason.
The reason behind the error is you may Export Model using Microsoft Dynamics AX 2012 Management Shell on Windows Server 2012 or Windows Server 2012 R2 and then you try to install this model file in Windows Server 2008.
The Axutil and Powershell for MSDAX of dll was built by using the Microsoft .NET Framework version 2.0
When I looked into the New Environment same way I found CLR version as 2.0
Same Way when I looked it ,where I Exported this Model, I found CLR version as 4.0
So what I have to do now ? I have to Update the CLR Version as 4.0. I have created three configuration files
<?xml version="1.0" encoding="utf-8" ?> <configuration> <startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0.30319" /> <supportedRuntime version="v3.5" /> <supportedRuntime version="v2.0.50727"/> </startup> </configuration>
Each File should contain the above code and it should be saved in AOS Altbin location, you can find it from Microsoft Dynamics Ax 2012 Server Configuration.
So everything is done. Now you try to import the model again.
Problem Solved 🙂