-
Notifications
You must be signed in to change notification settings - Fork 879
Open
Description
Describe the bug
'error CS8652: The feature 'field keyword' is currently in Preview and unsupported. To use Preview features, use the 'preview' language version.'
Is triggered during metadata generation for any use of the "field" keyword even though the CSPROJ file targets the .NET 10 framework or has <LangVersion>14</LangVersion>
To Reproduce
Steps to reproduce the behavior:
- Add
<LangVersion>14</LangVersion>to the CSPROJ - Add a valid use of the new C# 14 'field' keyword
Example:
private int SomeProperty
{
get
{
ObjectDisposedException.ThrowIf( value < 0, this );
return field;
}
set;
}Expected behavior
Docs are generated without errors
Context (please complete the following information):
- OS: Windows 11 25H2
- Docfx version: 2.78.4+ba9dfcbb96a4ceed2ac6d3ba93e12e16550b3e2a
Additional context
Occurs even if Global.json is set to use .NET 10
{
"sdk": {
"version": "10.0.100",
"rollForward": "latestMinor",
"allowPrerelease": false
}
}Bykiev
Metadata
Metadata
Assignees
Labels
No labels