Skip to main content

Notifications

Microsoft Dynamics AX (Archived)
Unanswered

AxBuild: Cannot add or remove static keyword for this method

Posted on by 230,030 Most Valuable Professional

I'm compiling AX 2012 R2 CU7 with (almost) latest kernel using AxBuild and it always finds the error ("Cannot add or remove static keyword for this method.") in a custom static method (in a custom class).

The code looks all right, nevertheless even icon in AOT and the tooltip looks like if the method wasn't static.

Recompiling the objects manually resolves the problem. Also running compilation through the startup command shows that there is no compilation error.

I start with a completely clean environment, import code from TFS and run the compilation, therefore it isn't a development environment where somebody might have recently changed the method to static.

Didn't you anybody see it before?

As I can reproduce it reliably, I'll report it to Microsoft if it's not a known issue.

*This post is locked for comments

  • Martin Dráb Profile Picture
    Martin Dráb 230,030 Most Valuable Professional on at
    RE: AxBuild: Cannot add or remove static keyword for this method

    Thank you for letting me know.

    I originally wanted to log it as a support request, but for some reasons it ended up on Connect.

  • PA-22040759-0 Profile Picture
    PA-22040759-0 6,194 on at
    RE: AxBuild: Cannot add or remove static keyword for this method

    Martin,

    We have seen the same issue before and we tried to report it to Microsoft, but we never succeeded to create a reliable repro.

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,030 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans