Skip to main content
Post a question

Notifications

Community site session details

Community site session details

Session Id : uzkGlcW4kS9b0LKaCuLSvS

Netmodule File Missing Error in 10.0.31

alexmeyer.itguy Profile Picture alexmeyer.itguy 648

If you are partner, ISV, or anyone delivering custom code to end users in D365FO, there is a change in 10.0.31 that you need to know about.

Issue

If you have a customer that upgrades to 10.0.31 and the next time they try to check in a deployable package to their source control build pipeline and they get an error similar to ‘Netmodule file missing: Dynamics.AX.<module>.<number>.netmodule’ like the one below:

And you are confused because the same deployable package was working in earlier versions of D365FO, I did some digging to find out why this was happening!

In 10.0.31, Microsoft added some additional logic to the CreatePackage.psm1 file (located in your AosService\PackagesLocalDirectory\bin folder), as the screenshot below is showing the difference in the files between a 10.0.30 version of the file and a 10.0.31 version:

This logic is basically checking for ‘orphaned’ netmodule files within your solution.

A netmodule file is ‘orphaned’ if a netmodule type file does not have a corresponding netmodule base file. For example, in the screenshot below we can see that we have a base netmodule file of Dynamics.AX.<module>.0.netmodule (green box) file but looking through the other netmodule types we can see that there is a Dynamcis.AX.<module>.Queries.1.netmodule file (red box).

In this case the Dynamics.AX.<module>.Queries.1.netmodule file is ‘orphaned’ as there is no corresponding Dynamics.AX.<module>.1.netmodule file and will generate the error above.

Root Cause

So how does something like this happen? This this somewhat tough as there are a couple contributing factors to this:

  • The process of installing a new deployable package is additive which means that if the file existed previously but doesn’t anymore, it does not get removed from the bin folder
    • This can potentially happen if a customer checks in files from the bin folder of the solution
  •  An ISV has building the solution from Visual Studio instead of a build server
  • Potentially other scenarios, if you know of one please add it to the comments

Fixing the Issue

In my particular case, the issue resided not within the deployable package itself but in the build server of the customer having additional netmodule files within the bin directory. Once those were removed the customer was able to successfully execute the build pipeline.

If there are other solutions others have used for this please feel free to leave a comment below.

Microsoft Response

This issue actually caused enough of a stir that Microsoft put out a short issue resolution page on LCS:

 

The post Netmodule File Missing Error in 10.0.31 appeared first on Alex Meyer.


This was originally posted here.

Comments

*This post is locked for comments