Announcements
Hi Experts,
Whenever, i do Full CIL i recieve this error
"Error When loading the method. type : companyimage, method :insertImage
System.collections.Generic.KeyNotFounException:The given key was not present in the dictionary.
at System.ThrowHelper.ThrowkeyNotFoundException()
at System.collections.Generic.Dictionary 2.get_Item(Tkey Key)
at Microsoft Dynamics.Ax.Xpp.ILGenerator.buildArgTypes(Int32 parmCount, Int32 OptionalParmCount, Boolean insInstance)
at Microsoft.Dynamics.Ax.Xpp.O;Generator.BuildMethod(TypeBuilder TypeBuilder, XmlNode methodNode)
at Microsoft.Dynamics.Ax.Xpp.O;Generator.LoadMethods(XmlNode classNode TypeBuilder TypeBuilder)
at Microsoft.Dynamics.Ax.Xpp.O;Generator.GenerateXppModule()
The CIL generator found Errors and could not save the new assembly."
Best Regards,
Shabir Ahmad
Hi Martin Dráb,
Thanks for your reply, that was all information which i shared in the above information while compilation i recieved "Microsoft .netframwork error " as i continued then i recieved that 3 error and warning in the log.
Best Regards,
Shabir ahmad
The screenshot shows just the places, but not what the errors are. The the button "19 warnings" to get rid of warnings and focus on errors. For each error, read the error message then look at the code (or properties) to see details. If you need our help, share all this information with us.
Hi both,
while making full compile i receive these errors as shown in the image please check and as i clicked on details button of that error i found this message after details click button:
"See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.ComponentModel.Win32Exception (0x80004005): The handle is invalid
at System.Drawing.Graphics.CopyFromScreen(Int32 sourceX, Int32 sourceY, Int32 destinationX, Int32 destinationY, Size blockRegionSize, CopyPixelOperation copyPixelOperation)
at System.Drawing.Graphics.CopyFromScreen(Point upperLeftSource, Point upperLeftDestination, Size blockRegionSize)
at Microsoft.Dynamics.Framework.UI.WinForms.Controls.Toast.get_BackgroundTransparentImage()
at Microsoft.Dynamics.Framework.UI.WinForms.Controls.Toast.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.UserControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0"
Best Regards,
Shabir Ahmad
Hi Both,
After compiling full application i received an error list please check in the image. All the errors list is as shown in above image, there is no cross mark error(x) with red lines. If i want to remove these error how could i??
Best Regards,
Shabir Ahmad
Hi Blue Wang,
Thanks for your reply this is error as shown below and i posted as well let me follow "Martin Dráb" suggestion first full application compile then the result will come out. What the issue is!!
Finished pass 1 at 15/09/2020 10:20:37 PM
Error when loading the method. Type: CompanyImage, Method: InsertImage
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Microsoft.Dynamics.Ax.Xpp.ILGenerator.buildArgTypes(Int32 parmCount, Int32 optionalParmCount, Boolean isInstance)
at Microsoft.Dynamics.Ax.Xpp.ILGenerator.BuildMethod(TypeBuilder typeBuilder, XmlNode methodNode)
at Microsoft.Dynamics.Ax.Xpp.ILGenerator.LoadMethods(XmlNode classNode, TypeBuilder typeBuilder)
at Microsoft.Dynamics.Ax.Xpp.ILGenerator.GenerateXppModule()
The CIL generator found errors and could not save the new assembly.
Errors: 1
Warnings: 0
Best Regards,
Shabir Ahmad
Hi Shabir,
Check your CIL log file .It should be in C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin\XppIL folder.
Find object then compile it separately ,perform a full CIL generation.
You didn't mention compiling X++, therefore you probably didn't do it and it may be the problem. Please compile the whole application before generating CIL.
If you plan to generate full CIL, there is no reason to generate incremental first.
Hi ievgen Miroshnikov,
First I did "Incremental CIL generation from X++" after that i did "Full CIL Generation from X++" so i recieve the above post Error please check the image as well to clear you doubts or if you want more details.
Best Regards,
Shabir Ahmad
Did you do full compile before that? Are there any compile errors?
André Arnaud de Cal...
294,033
Super User 2025 Season 1
Martin Dráb
232,854
Most Valuable Professional
nmaenpaa
101,158
Moderator