Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)
Unanswered

AxBuild: Cannot add or remove static keyword for this method

(0) ShareShare
ReportReport
Posted on by 230,445 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,445 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!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans