When I full compile the module, I got this problem which located in C:\AOSService\PackagesLocalDirectory\ApplicationSuite\Foundation\AxClass\BudgetDimensionFocusInitializeBalance.xml.
I have restarted the computer and closed all VS instance instead of this one. When I sync and compile the module without the references, there is nothing wrong but can't create the depolyment package either.
Abnormal termination with unhandled exception. Exception key: 887f4a01-28ed-4366-a620-3d945d521312. Microsoft.Dynamics.AX.Metadata.XppCompiler.AssertionFailedException: Assertion failed: Attempted to emit a ret instruction with an incorrect number of elements on the stack: 2 at Microsoft.Dynamics.AX.Metadata.XppCompiler.AssertHelper.Panic[T](String failDescription, Object[] args) at Microsoft.Dynamics.AX.Metadata.XppCompiler.AssertHelper.Requires(Boolean requirement, String failDescription) at Microsoft.Dynamics.AX.Framework.Xlnt.ILGenerator.ILGeneratorSweeper.VisitMethod(Object payload, Method method) at Microsoft.Dynamics.AX.Metadata.XppCompiler.AstVisitor`2.VisitMethodOrDelegate(TPayload payload, MethodOrDelegate methodOrDelegate) at Microsoft.Dynamics.AX.Metadata.XppCompiler.AstVisitorWithDiagnostics`2.VisitMethodOrDelegate(TPayload payload, MethodOrDelegate methodOrDelegate) at Microsoft.Dynamics.AX.Framework.Xlnt.ILGenerator.ILGeneratorSweeper.VisitMethodOrDelegate(Object payload, MethodOrDelegate methodOrDelegate) at Microsoft.Dynamics.AX.Metadata.XppCompiler.AstVisitor`2.VisitMethods(TPayload payload, IEnumerable`1 methodOrDelegates) at Microsoft.Dynamics.AX.Framework.Xlnt.ILGenerator.ILGeneratorSweeper.VisitMethods(Object payload, IEnumerable`1 methods) at Microsoft.Dynamics.AX.Metadata.XppCompiler.AstVisitor`2.VisitMethods(TPayload payload, IDictionary`2 dictionary) at Microsoft.Dynamics.AX.Framework.Xlnt.ILGenerator.ILGeneratorSweeper.VisitClass(Object payload, Class classInstance) at Microsoft.Dynamics.AX.Metadata.XppCompiler.AstVisitor`2.VisitClassOrInterface(TPayload payload, ClassOrInterface classOrInterface) at Microsoft.Dynamics.AX.Metadata.XppCompiler.AstVisitorWithDiagnostics`2.VisitClassOrInterface(TPayload payload, ClassOrInterface classOrInterface) at Microsoft.Dynamics.AX.Metadata.XppCompiler.AstVisitor`2.VisitModelElement(TPayload payload, ModelElement modelElement) at Microsoft.Dynamics.AX.Framework.Xlnt.ILGenerator.ILGeneratorSweeper.VisitModelElement(Object payload, ModelElement modelElement) at Microsoft.Dynamics.AX.Metadata.XppCompiler.AstVisitor`2.VisitCompilationUnit(TPayload payload, CompilationUnit compilationUnit) at Microsoft.Dynamics.AX.Metadata.XppCompiler.AstVisitorWithDiagnostics`2.VisitCompilationUnit(TPayload payload, CompilationUnit compilationUnit) at Microsoft.Dynamics.AX.Framework.Xlnt.ILGenerator.ILGeneratorPass3Worker.GenerateBodiesInNetmodule(Parameters generatorparameters, String netmoduleName, IXppcMetadataProvider metadataProvider, IDiagnosticSink diagnosticsHandler, NetModuleNameByTypeName netModules, ICrossReferenceProvider xRefProvider) at Microsoft.Dynamics.AX.Framework.Xlnt.ILGenerator.ILGeneratorPass3Worker.GenerateBodiesInNetmodule(Parameters parameters, String netmoduleName, IXppcMetadataProvider metadataProvider, NetModuleNameByTypeName netModules, FileRollbackHandler fileRollbackHandler, IDiagnosticSink diagnosticsHandler, ICrossReferenceProvider xRefProvider) at Microsoft.Dynamics.AX.Framework.Xlnt.ILGenerator.ILGeneratorPass3Worker.InvokeInNetmodule(Parameters parameters, String netmoduleName, IXppcMetadataProvider metadataProvider, NetModuleNameByTypeName netModules, FileRollbackHandler fileRollbackHandler, IDiagnosticSink diagnosticsHandler, ICrossReferenceProvider xRefProvider) at Microsoft.Dynamics.AX.Framework.Xlnt.ILGenerator.ILGeneratorMain.<>c__DisplayClass8_3.<GenerateILImplementation>b__4(String moduleName) at Microsoft.Dynamics.AX.Metadata.XppCompiler.ParallelCrashDumpUtil.<>c__DisplayClass1_0`1.<ForEach>b__2(T t) at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1() at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object ).