Skip to content

Conversation

@StephenCWills
Copy link
Member

C# 14 defines a field keyword, so this code fails in the newest version of the language. I saw these errors pop up on the CodeQL job.

  D:\a\gsf\gsf\Source\Libraries\GSF.Core\Data\Schema.cs(1915,17): error CS9273: In language version 14.0, 'field' is a keyword within a property accessor. Rename the variable or use the identifier '@field' instead. [D:\a\gsf\gsf\Source\Libraries\GSF.Core\GSF.Core.csproj]
  D:\a\gsf\gsf\Source\Libraries\GSF.Core\Data\Schema.cs(1917,31): error CS1061: 'int' does not contain a definition for 'IsPrimaryKey' and no accessible extension method 'IsPrimaryKey' accepting a first argument of type 'int' could be found (are you missing a using directive or an assembly reference?) [D:\a\gsf\gsf\Source\Libraries\GSF.Core\GSF.Core.csproj]
  D:\a\gsf\gsf\Source\Libraries\GSF.Core\Data\Schema.cs(1932,17): error CS9273: In language version 14.0, 'field' is a keyword within a property accessor. Rename the variable or use the identifier '@field' instead. [D:\a\gsf\gsf\Source\Libraries\GSF.Core\GSF.Core.csproj]
  D:\a\gsf\gsf\Source\Libraries\GSF.Core\Data\Schema.cs(1934,31): error CS1061: 'bool' does not contain a definition for 'IsPrimaryKey' and no accessible extension method 'IsPrimaryKey' accepting a first argument of type 'bool' could be found (are you missing a using directive or an assembly reference?) [D:\a\gsf\gsf\Source\Libraries\GSF.Core\GSF.Core.csproj]
  D:\a\gsf\gsf\Source\Libraries\GSF.Core\Data\Schema.cs(1934,53): error CS1061: 'bool' does not contain a definition for 'ForeignKeys' and no accessible extension method 'ForeignKeys' accepting a first argument of type 'bool' could be found (are you missing a using directive or an assembly reference?) [D:\a\gsf\gsf\Source\Libraries\GSF.Core\GSF.Core.csproj]
  D:\a\gsf\gsf\Source\Libraries\GSF.Core\Data\Schema.cs(1948,17): error CS9273: In language version 14.0, 'field' is a keyword within a property accessor. Rename the variable or use the identifier '@field' instead. [D:\a\gsf\gsf\Source\Libraries\GSF.Core\GSF.Core.csproj]
  D:\a\gsf\gsf\Source\Libraries\GSF.Core\Data\Schema.cs(1950,31): error CS1061: 'bool' does not contain a definition for 'IsForeignKey' and no accessible extension method 'IsForeignKey' accepting a first argument of type 'bool' could be found (are you missing a using directive or an assembly reference?) [D:\a\gsf\gsf\Source\Libraries\GSF.Core\GSF.Core.csproj]
  D:\a\gsf\gsf\Source\Libraries\GSF.Core\Data\Schema.cs(1975,17): error CS9273: In language version 14.0, 'field' is a keyword within a property accessor. Rename the variable or use the identifier '@field' instead. [D:\a\gsf\gsf\Source\Libraries\GSF.Core\GSF.Core.csproj]

@ritchiecarroll ritchiecarroll merged commit dd7d167 into master Dec 4, 2025
3 checks passed
@ritchiecarroll ritchiecarroll deleted the c-sharp-14-field-keyword branch December 4, 2025 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants