We have custom transportation rate engines that worked perfectly in AX2012.
We brought them over to D365. We cannot get it to work in D365.
The error I get when I step through the code is:
Message "Could not load file or assembly 'Dynamics.AX.ApplicationSuite.124.netmodule' or one of its dependencies. The system cannot find the file specified." string
Microsoft has provided this link on how to create transportation rate engines: https://docs.microsoft.com/en-us/dynamics365/unified-operations/supply-chain/transportation/create-new-transportation-management-engine#deploy-the-tms-engine-as-a-package
Nowhere in there does it mention anything special on the build or what version the project needs to be build in. Note that the rate engine project is a mixture between X++ and a C# class library.
When it builds, it generate warnings that I have ignored up till now, but searching for an answer on the error makes me think that I need to look closer at the warning messages.
Here are some:
*****
2>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "Dynamics.AX.ApplicationFoundation", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
2>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "Dynamics.AX.ApplicationPlatform", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
2>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "Dynamics.AX.ApplicationSuite, Version=0.0.0.0, Culture=neutral, processorArchitecture=AMD64", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
3> No way to resolve conflict between "Microsoft.Data.OData, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" and "Microsoft.Data.OData, Version=5.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35". Choosing "Microsoft.Data.OData, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" arbitrarily.
3> No way to resolve conflict between "Microsoft.Data.Edm, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" and "Microsoft.Data.Edm, Version=5.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35". Choosing "Microsoft.Data.Edm, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" arbitrarily.
3> No way to resolve conflict between "Microsoft.Data.Services.Client, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" and "Microsoft.Data.Services.Client, Version=5.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35". Choosing "Microsoft.Data.Services.Client, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" arbitrarily.
3> No way to resolve conflict between "System.Spatial, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" and "System.Spatial, Version=5.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35". Choosing "System.Spatial, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" arbitrarily.
3> No way to resolve conflict between "Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" and "Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed". Choosing "Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" arbitrarily.
3> Consider app.config remapping of assembly "Microsoft.Data.OData, Culture=neutral, PublicKeyToken=31bf3856ad364e35" from Version "5.6.0.0" [] to Version "5.6.4.0" [C:\Users\User5189d4976dc\Documents\Visual Studio 2015\Projects\TMC_3832_TmsSharedParcelEngineData\TMC.ThirdParty.Parcel\bin\Debug\Microsoft.Data.OData.dll] to solve conflict and get rid of warning.
3> Consider app.config remapping of assembly "Newtonsoft.Json, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" from Version "6.0.0.0" [] to Version "9.0.0.0" [C:\Users\User5189d4976dc\Documents\Visual Studio 2015\Projects\TMC_3832_TmsSharedParcelEngineData\TMC.ThirdParty.Parcel\bin\Debug\Newtonsoft.Json.dll] to solve conflict and get rid of warning.
3> Consider app.config remapping of assembly "Microsoft.Data.Services.Client, Culture=neutral, PublicKeyToken=31bf3856ad364e35" from Version "5.6.0.0" [] to Version "5.6.4.0" [C:\Users\User5189d4976dc\Documents\Visual Studio 2015\Projects\TMC_3832_TmsSharedParcelEngineData\TMC.ThirdParty.Parcel\bin\Debug\Microsoft.Data.Services.Client.dll] to solve conflict and get rid of warning.
3> Consider app.config remapping of assembly "System.Spatial, Culture=neutral, PublicKeyToken=31bf3856ad364e35" from Version "5.6.0.0" [] to Version "5.6.4.0" [C:\Users\User5189d4976dc\Documents\Visual Studio 2015\Projects\TMC_3832_TmsSharedParcelEngineData\TMC.ThirdParty.Parcel\bin\Debug\System.Spatial.dll] to solve conflict and get rid of warning.
3> Consider app.config remapping of assembly "Microsoft.Data.Edm, Culture=neutral, PublicKeyToken=31bf3856ad364e35" from Version "5.6.0.0" [] to Version "5.6.4.0" [C:\Users\User5189d4976dc\Documents\Visual Studio 2015\Projects\TMC_3832_TmsSharedParcelEngineData\TMC.ThirdParty.Parcel\bin\Debug\Microsoft.Data.Edm.dll] to solve conflict and get rid of warning.
3>C:\Program Files (x86)\MSBuild\Microsoft\Dynamics\AX\Microsoft.Dynamics.Framework.Tools.BuildTasks.targets(75,5): warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file: <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="Microsoft.Data.OData" culture="neutral" publicKeyToken="31bf3856ad364e35" /><bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" /><bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="Microsoft.Data.Services.Client" culture="neutral" publicKeyToken="31bf3856ad364e35" /><bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Spatial" culture="neutral" publicKeyToken="31bf3856ad364e35" /><bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="Microsoft.Data.Edm" culture="neutral" publicKeyToken="31bf3856ad364e35" /><bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0" /></dependentAssembly></assemblyBinding>
*****
What I read about these errors, is that it means that AX is on one version and that Visual Studio compile sit against another. It looks to me that AX is X86. By default the projects are compiled as Debug/Any CPU. It looks like I need to change it to Debug/X86. I did that but the build gave even more warnings. So I changed it to Debug/X64, but still the warning messages.
So I don't know if I am on the right track to fix my run time exception error.
Can anybody shed some light for me on this error ("Could not load file or assembly 'Dynamics.AX.ApplicationSuite.124.netmodule' or one of its dependencies. The system cannot find the file specified." ) please with a possible solution on how to fix it?