web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)
Unanswered

AxBuild: Cannot add or remove static keyword for this method

(0) ShareShare
ReportReport
Posted on by 238,624 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

I have the same question (0)
  • PA-22040759-0 Profile Picture
    6,194 on at

    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.

  • Martin Dráb Profile Picture
    238,624 Most Valuable Professional on at

    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.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans