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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

CultureInfo.InvariantCulture does not exist

(2) ShareShare
ReportReport
Posted on by 4
Hello all, I'm trying to test some code in X++ to see if we need to go from declaring a de-de CultureInfo to the InvariantCulture in order to preserve a date's integrity.
The line I'm using is
System.Globalization.CultureInfo provider = System.Globalization.CultureInfo.InvariantCulture;
But I'm getting 4 error messages saying
The qualifier 'System.Globalization.CultureInfo' is not valid for field 'InvariantCulture'.
The qualifier 'System.Globalization' is not valid for field 'CultureInfo'.
The qualifier 'System' is not valid for field 'Globalization'.
'System' is not declared.
 
Which is strange since there's no issues with having
System.Globalization.CultureInfo provider;
by itself.

I've created a runnable class where this is the only code inside the main method so I don't beleive it's anything blocking it. It works in my C# project but not in the X++ project so I think it has something to do with it being X++ specifically but I can't find anything saying why I can use CultureInfo but not the InvariantCulture part of it.
 
I've tried on Visual Studios 2022, my project is in .Net Framework 4.7.2 and that framework says it's still being supported.
Categories:
I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    239,040 Most Valuable Professional on at
    InvariantCulture is a static property, therefore the correct syntax in X++ is System.Globalization.CultureInfo::InvariantCulture instead of System.Globalization.CultureInfo.InvariantCulture.
     
    Moved from Integration, Dataverse, and general topics forum to Finance | Project Operations, Human Resources, AX, GP, SL forum.

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 616

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 460 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 331 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans