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

Facing Compilation Error on Solution Build

(0) ShareShare
ReportReport
Posted on by
I have created one project in D365 F&O Visual Studio 2022 .When I compile that project getting the error below , I have tried adding all the Custom Enum and Extended Enum From previous Customization in to my solution to find out which Enum is causing issue , but I am not getting exact path from where this error is getting reflected.
 
As the Error is showing Enum Type Generator , I thought Enum will be creating the issue, still the error is not getting resolved I have also tried full module build and sync.
 
Below is the error..

X++ compiler exited unexpectedly with failure code -1.
Compilation failed.
Abnormal termination with unhandled exception. Exception key: b2ba2b34-ec2e-4057-90a1-ad3edafc69ea. System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Dynamics.AX.Framework.Xlnt.ILGenerator.EnumTypeGenerator.GenerateType(ModuleBuilder moduleBuilder, String name)
at Microsoft.Dynamics.AX.Framework.Xlnt.ILGenerator.EnumTypeGenerator.GenerateTypes(NetModuleNameByTypeName netModules, IEnumerable`1 enumList)
at Microsoft.Dynamics.AX.Framework.Xlnt.ILGenerator.ILGeneratorPass1Worker.<>c__DisplayClass5_0.<GenerateEnumsAsync>b__0()
at System.Threading.Tasks.Task.Execute().
 
 
Can any one please guide me on this.
 
Thank you,
 
Regards,
Drasti 
 
Categories:
I have the same question (0)
  • Mansi Soni Profile Picture
    9,019 Super User 2026 Season 1 on at
    Moving this question from Dynamics 365 General forum to Finance and Operations forum for better reach.

    Regards,
    Mansi Soni
  • Subramani Sivan Profile Picture
    270 on at
    Hi 

    Can you please try to build full custom model build instead of solution Build and check whether you are getting the same error message or different one.

    Please make sure you have added all the necessary references for your custom model.
     
    Thanks,
    Subra

    If this helped, please mark it as "Verified" for others facing the same issue
  • DrastiS_D365 Profile Picture
    on at
     
    Thanks for reply ,
    I had tried to build the custom model and tried to sync also but getting same error.
     
    Thanks ,
    Regards,
    Drasti

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 635

#2
André Arnaud de Calavon Profile Picture

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

#3
CP04-islander Profile Picture

CP04-islander 356

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans