Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Unanswered

Error after full CIL

Posted on by 3,024

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

  • Shabir Ahmad Profile Picture
    Shabir Ahmad 3,024 on at
    RE: Error after full CIL

    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

  • Martin Dráb Profile Picture
    Martin Dráb 230,214 Most Valuable Professional on at
    RE: Error after full CIL

    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.

  • Shabir Ahmad Profile Picture
    Shabir Ahmad 3,024 on at
    RE: Error after full CIL

    3566.Capture.PNG

    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

  • Shabir Ahmad Profile Picture
    Shabir Ahmad 3,024 on at
    RE: Error after full CIL

    8255.Errorlist.PNG

    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

  • Shabir Ahmad Profile Picture
    Shabir Ahmad 3,024 on at
    RE: Error after full CIL

    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

  • Blue Wang Profile Picture
    Blue Wang on at
    RE: Error after full CIL

    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.

  • Martin Dráb Profile Picture
    Martin Dráb 230,214 Most Valuable Professional on at
    RE: Error after full CIL

    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.

  • Shabir Ahmad Profile Picture
    Shabir Ahmad 3,024 on at
    RE: Error after full CIL

    3377.DeployError.png

    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

  • Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: Error after full CIL

    Did you do full compile before that? Are there any compile errors?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans