web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Event handler initializer exception when deploying software deploy package to T1 environment

(1) ShareShare
ReportReport
Posted on by 8
Hi all,

  I have a question regarding an error that we are receiving when trying to deploy a software deployable package on a particular environment.

  We have two Tier 1 environments called Gold and Test.  Both environments are on 10.0.34 PU58.  Whenever we try to apply a software deployable package on Test via a release pipeline, we are getting the error below in MyCustomModel during database sync.
 
Inner Exception: An exception was encountered while initializing event handler initializer 'InitMethod' on type 'Dynamics.AX.Application.EventHandler.EventHandlersInitializeClass, Dynamics.AX.MyCustomModel, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
Inner Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Dynamics.AX.MyCustomModel.0.netmodule' or one of its dependencies. The system cannot find the file specified.
File name: 'Dynamics.AX.MyCustomModel.0.netmodule' --- System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
   at Dynamics.AX.Application.EventHandler.EventHandlersInitializeClass.InitMethod()
   at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.  c. InitializeMetadataEventHandler b__87_0(MethodInfo eventHandler) in MyPath - cmd - b - Source - Kernel - xppil - XppSupport - ReflectionCallHelper.cs:line 965
 
 
  I want to point out the following observations:
 
1) We never get any such errors when we try to build and synchronize on our local DEV boxes.  Compilation and database synchronization is always successful on our dev boxes.  The dev boxes are on the same application and platform release as the Test environment.
 
2) If we try to resume the failing deployment, we keep getting the error.
 
3) On two occasions, the deployment succeeded when we aborted the failing deployment and started a new deployment via LCS using the exact package (see 2 screenshots at the end).
 
4) If we do a deployment using the exact package on Gold environment via LCS, the deployment succeeds.
 
5) We have once had a deployment succeed first time to Test via the release pipeline by first RDPing to Test, deleting the custom packages in PackagesLocalDirectory and then starting the release pipeline.

Has anyone ever come across such an issue before?  It seems strange that we get no error whatsoever for MyCustomModel when building and synchronizing on our dev boxes but then get this strange error when trying to deploy via release pipeline.
 
//
 
//
 
---------------------------------
 
@Martin Drab Apologies but I can't seem to reply to your post, don't have the option to reply for some reason or another.
I have the same question (0)
  • Martin Dráb Profile Picture
    238,745 Most Valuable Professional on at
    Unfortunately I don't see the error.
  • Rich Profile Picture
    351 on at
    Colleague & I are both having issues with the input form, tying to put error text in as text rather than screenshot, by removing chevrons (aka angle brackets) and path separators (replaced with hyphens)
     
    Inner Exception: An exception was encountered while initializing event handler initializer 'InitMethod' on type 'Dynamics.AX.Application.EventHandler.EventHandlersInitializeClass, Dynamics.AX.MyCustomModel, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
    Inner Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Dynamics.AX.MyCustomModel.0.netmodule' or one of its dependencies. The system cannot find the file specified.
    File name: 'Dynamics.AX.MyCustomModel.0.netmodule' --- System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
       at Dynamics.AX.Application.EventHandler.EventHandlersInitializeClass.InitMethod()
       at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.  c. InitializeMetadataEventHandler b__87_0(MethodInfo eventHandler) in MyPath - cmd - b - Source - Kernel - xppil - XppSupport - ReflectionCallHelper.cs:line 965

     
  • André Arnaud de Calavon Profile Picture
    303,139 Super User 2026 Season 1 on at
    Hi Antonio,
     
    Is the name of the model you try to deploy the same as the one is giving the error? Or this is the model mentioned in the error referenced by the model you want to deploy?
  • Antonio A Profile Picture
    8 on at
    @Andre Arnaud
     
    Hi Andre,
     
      The model that is giving me the error is the model that I am trying to deploy, amongst a list of other models.
  • André Arnaud de Calavon Profile Picture
    303,139 Super User 2026 Season 1 on at
    Hi Antonio,
     
    Have you checked the details of the package if the files are indeed in it? In case the deployment succeeded after abortion, was the software really updated? I have seen issues where indeed an actual file was missing in the deployable package, but not where it fails and gets deployed after an abortion.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 576 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 366

#3
Adis Profile Picture

Adis 256 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans