diff --git a/.github/skills/article-metadata-update/SKILL.md b/.github/skills/article-metadata-update/SKILL.md new file mode 100644 index 0000000000000..094a4ce3dd124 --- /dev/null +++ b/.github/skills/article-metadata-update/SKILL.md @@ -0,0 +1,136 @@ +--- +name: article-metadata-update +description: Finds articles that meet user-defined criteria, presents evidence for approval, and applies narrowly scoped frontmatter updates. Use for bulk article metadata changes with a discover-then-approve workflow. +argument-hint: 'Provide the article criteria, exclusions, search scope, metadata key, and desired string value; or identify a previously approved manifest and groups or paths' +--- + +# Update article metadata + +Use this skill to select articles by their actual scope and update one frontmatter key. Keep eligibility decisions separate from the script that applies the edits. + +## Required inputs + +Confirm the following details before discovery: + +- The selection criteria and exclusions. +- The repository-relative search directories. +- The metadata key and desired string value. + +Reuse details that the user already supplied. Don't assume that a version number, release cutoff, metadata key, or value from a previous task applies to a new task. + +## Discover mode + +Discovery doesn't authorize article edits. + +1. Read the applicable repository instructions and inspect existing workspace changes. Keep the user's branch, commits, and unrelated edits intact. +1. Use fast, scoped searches to collect candidates from paths, titles, frontmatter, and relevant article text. Read enough context to establish each candidate's scope. Don't repeatedly scan every line of every article. +1. Classify each entry as `candidate`, `review`, or `excluded`. Record a reason and evidence with a repository-relative path, line number, and short quotation. +1. Verify time-sensitive eligibility facts against current authoritative sources when the criteria depend on support status or release dates. +1. Create a JSON manifest in the session artifacts directory, outside the repository. Use the schema below. Give groups stable, descriptive IDs. +1. Run the script in `Preview` mode. The script records current values, content hashes, expected result hashes, and completion status. It also writes a CSV beside the manifest. +1. Present the grouped list, reasons, uncertainties, exclusions, and already-correct counts. Attach the report when the list is too large for chat. **Stop and wait for explicit approval.** + +### Eligibility rules + +Apply the user's filter, not a hard-coded documentation retirement policy. + +- A text match or old SDK example doesn't establish that an article is obsolete. +- A feature introduced in an earlier release can remain relevant to current releases. +- Historical release summaries and breaking-change records can qualify as stable, release-specific content even when their features or migration advice remain useful. +- A diagnostic or feature that the tools no longer produce differs from an API that merely became obsolete. +- Don't equate versions of .NET, .NET Framework, language compilers, or independent tools. +- Treat mixed-version articles and uncertain scope as `review` unless the user's criteria resolve the uncertainty. +- Exclude shared includes and general reference pages unless the user explicitly includes them. + +### Manifest schema + +The initial manifest contains selection decisions, not approval flags: + +```json +{ + "schemaVersion": 1, + "metadata": { + "key": "ms.update-cycle", + "value": "3650-days" + }, + "articles": [ + { + "path": "docs\\core\\compatibility\\9.0.md", + "group": "breaking-change-indexes", + "classification": "candidate", + "reason": "The introduction scopes the list to migration to .NET 9.", + "evidence": "docs\\core\\compatibility\\9.0.md:10: If you're migrating an app to .NET 9..." + } + ] +} +``` + +The example illustrates the format, not a default filter or permission to edit that file. Include `review` and `excluded` entries in the manifest so the report explains the selection boundaries. + +Run commands from the repository root, or pass `-RepositoryRoot` explicitly: + +```powershell +.\.github\skills\article-metadata-update\scripts\update-frontmatter.ps1 ` + -Mode Preview ` + -ManifestPath "\article-metadata-manifest.json" +``` + +Don't manually edit the snapshot hashes, preview metadata, or completion status. After the target key, value, or article contents change, run a new preview and obtain approval for the revised proposal. + +## Apply mode + +The user can approve the full candidate list, specific groups, or individual paths. Translate that approval into explicit arguments; never infer approval from the manifest's existence. + +1. Identify exactly which groups or paths the user approved. A group selects only `candidate` entries. A `review` entry requires explicit path approval; the script never selects an `excluded` entry. +1. Run `Apply` against the previewed manifest. Don't rediscover a broader set of files or use wildcard approvals. +1. If the script reports stale content, stop. Reinspect the affected articles, create a fresh preview, and obtain approval for any materially changed proposal. Don't replace hashes to bypass the check. +1. Verify the diff against the approved scope. Confirm that only the target frontmatter field changed and that article text, other metadata, encoding, and line endings remain intact. +1. Report changed, already-correct, and remaining counts. Leave edits local and uncommitted unless the user requests a Git operation. + +```powershell +.\.github\skills\article-metadata-update\scripts\update-frontmatter.ps1 ` + -Mode Apply ` + -ManifestPath "\article-metadata-manifest.json" ` + -ApprovedGroups "breaking-change-indexes" +``` + +```powershell +.\.github\skills\article-metadata-update\scripts\update-frontmatter.ps1 ` + -Mode Apply ` + -ManifestPath "\article-metadata-manifest.json" ` + -ApprovedPaths "docs\core\compatibility\9.0.md" +``` + +## Script contract + +Location: `.\scripts\update-frontmatter.ps1`. Requires PowerShell 7.2 or later; no additional packages. + +| Parameter | Purpose | +| --- | --- | +| `Mode` | `Preview` records the proposal without article edits. `Apply` edits explicitly selected entries. | +| `ManifestPath` | Identifies the JSON manifest. The derived CSV uses the same basename. Keep both outside the repository. | +| `RepositoryRoot` | Selects the article repository root. Defaults to the current directory. Apply must use the root recorded by preview. | +| `ApprovedGroups` | Selects named groups of `candidate` entries in Apply mode. | +| `ApprovedPaths` | Selects individual `candidate` or `review` entries in Apply mode. | + +The script supports unquoted top-level keys and single-line printable string values, including plain strings, YAML single-quoted strings, and JSON-compatible double-quoted strings. It quotes new values when plain YAML could change their meaning. It rejects multiline or structured target values, duplicate top-level keys, merge keys, quoted frontmatter keys, unsupported encodings, and linked paths rather than guess. + +UTF-8 files retain their BOM, if present, and existing line endings. Existing inline comments on the target field remain intact. New fields appear after `ms.date`, or immediately before the closing frontmatter delimiter when `ms.date` is absent. The script doesn't update `ms.date`, `ai-usage`, or any other field unless that field is the explicitly requested target. + +All selected files pass stale-content checks before any article write. The script also checks each file immediately before its write and verifies the resulting bytes. If a later operation fails, earlier edits can remain; inspect the surfaced error and manifest rather than assume an atomic batch. Repeating an approved apply verifies and skips completed results. + +For CRLF files, use a command-scoped whitespace check that recognizes carriage returns without changing Git configuration: + +```powershell +git -c core.whitespace=blank-at-eol,blank-at-eof,space-before-tab,cr-at-eol diff --check +``` + +## Regression checks + +Run the standalone fixture checks after you change the script: + +```powershell +.\.github\skills\article-metadata-update\scripts\update-frontmatter.Tests.ps1 +``` + +The checks use temporary articles and manifests, require no test framework, and remove their fixtures when they finish. They cover approval boundaries, stale-file preflight, already-correct values, ambiguous frontmatter, safe YAML string values, comments, encoding, and line endings. diff --git a/.github/skills/article-metadata-update/scripts/update-frontmatter.Tests.ps1 b/.github/skills/article-metadata-update/scripts/update-frontmatter.Tests.ps1 new file mode 100644 index 0000000000000..22897428f18db --- /dev/null +++ b/.github/skills/article-metadata-update/scripts/update-frontmatter.Tests.ps1 @@ -0,0 +1,192 @@ +#Requires -Version 7.2 +$ErrorActionPreference = 'Stop' +$script = Join-Path $PSScriptRoot 'update-frontmatter.ps1' +$testRoot = Join-Path ([IO.Path]::GetTempPath()) ('article-metadata-fixtures-' + [guid]::NewGuid().ToString('N')) +$fixtureRoot = Join-Path $testRoot 'articles' +$utf8 = [Text.UTF8Encoding]::new($false, $true) +[void](New-Item -ItemType Directory -Path $fixtureRoot) +$assertions = 0 + +function Assert { + param([bool]$Condition, [string]$Message) + if (!$Condition) { throw $Message } + $script:assertions++ +} +function Expect-Error { + param([scriptblock]$Action, [string]$Pattern) + try { & $Action } + catch { + Assert ($_.Exception.Message -like "*$Pattern*") "Unexpected error: $_" + return + } + throw "Expected an error containing: $Pattern" +} +function Write-Fixture { + param([string]$Name, [string]$Text, [bool]$Bom = $false) + [byte[]]$bytes = $utf8.GetBytes($Text) + if ($Bom) { $bytes = [byte[]](@(0xEF, 0xBB, 0xBF) + $bytes) } + [IO.File]::WriteAllBytes((Join-Path $fixtureRoot $Name), $bytes) +} +function Snapshot { + param([string]$Name) + [Convert]::ToBase64String([IO.File]::ReadAllBytes((Join-Path $fixtureRoot $Name))) +} +function Make-Manifest { + param([string]$Name, [object[]]$Entries, [string]$Value = '3650-days', [string]$Key = 'ms.update-cycle') + $path = Join-Path $testRoot "$Name.json" + $rows = foreach ($entry in $Entries) { + if ($entry -is [string]) { $entry = @{ path = $entry; classification = 'candidate' } } + @{ + path = $entry.path + group = 'batch' + classification = $entry.classification + reason = 'Fixture scope' + evidence = "$($entry.path):1: Fixture evidence" + } + } + @{ + schemaVersion = 1 + metadata = @{ key = $Key; value = $Value } + articles = @($rows) + } | ConvertTo-Json -Depth 10 | Set-Content -LiteralPath $path -Encoding utf8 + $path +} +function Preview { + param([string]$Manifest) + $null = & $script -Mode Preview -RepositoryRoot $fixtureRoot -ManifestPath $Manifest +} +function Apply { + param([string]$Manifest) + & $script -Mode Apply -RepositoryRoot $fixtureRoot -ManifestPath $Manifest -ApprovedGroups batch +} + +try { + $tokens = $null + $errors = $null + [void][Management.Automation.Language.Parser]::ParseFile($script, [ref]$tokens, [ref]$errors) + Assert ($errors.Count -eq 0) "Script parse errors: $errors" + + $body = "# Fixture`n`nms.update-cycle: unchanged body example`n" + $base = "---`ntitle: Fixture`nms.date: 01/01/2020`n---`n$body" + Write-Fixture 'lf.md' $base + Write-Fixture 'bom.md' ($base.Replace("`n", "`r`n")) $true + Write-Fixture 'old.md' ($base.Replace("ms.date: 01/01/2020`n", "ms.date: 01/01/2020`nms.update-cycle: '30-days' # preserve comment`n")) + Write-Fixture 'plain.md' ($base.Replace("ms.date: 01/01/2020`n", "ms.date: 01/01/2020`nms.update-cycle: 3650-days`n")) + Write-Fixture 'single.md' ($base.Replace("ms.date: 01/01/2020`n", "ms.date: 01/01/2020`nms.update-cycle: '3650-days' # retain quoting`n")) + Write-Fixture 'double.md' ($base.Replace("ms.date: 01/01/2020`n", "ms.date: 01/01/2020`nms.update-cycle: `"3650-days`"`n")) + Write-Fixture 'review.md' $base + Write-Fixture 'excluded.md' $base + $entries = @('lf.md', 'bom.md', 'old.md', 'plain.md', 'single.md', 'double.md', + @{ path = 'review.md'; classification = 'review' }, @{ path = 'excluded.md'; classification = 'excluded' }) + $manifest = Make-Manifest main $entries + $before = @{} + foreach ($name in 'lf.md', 'bom.md', 'old.md', 'plain.md', 'single.md', 'double.md', 'review.md', 'excluded.md') { + $before[$name] = Snapshot $name + } + Preview $manifest + foreach ($name in $before.Keys) { Assert ((Snapshot $name) -ceq $before[$name]) "Preview edited $name" } + Assert (Test-Path ([IO.Path]::ChangeExtension($manifest, '.csv'))) 'Preview omitted the report' + Expect-Error { & $script -Mode Apply -RepositoryRoot $fixtureRoot -ManifestPath $manifest } 'explicit Approved' + $result = Apply $manifest + Assert ($result.Changed -eq 3 -and $result.Selected -eq 6 -and $result.AlreadyAtDesiredResult -eq 3) 'Incorrect group-selection counts' + $expected = $base.Replace("ms.date: 01/01/2020`n", "ms.date: 01/01/2020`nms.update-cycle: 3650-days`n") + Assert ([IO.File]::ReadAllText((Join-Path $fixtureRoot 'lf.md')) -ceq $expected) 'LF content changed outside the field' + [byte[]]$expectedBom = @(0xEF, 0xBB, 0xBF) + $utf8.GetBytes($expected.Replace("`n", "`r`n")) + Assert ((Snapshot 'bom.md') -ceq [Convert]::ToBase64String($expectedBom)) 'BOM or CRLF changed' + Assert ([IO.File]::ReadAllText((Join-Path $fixtureRoot 'old.md')) -ceq $expected.Replace("ms.update-cycle: 3650-days`n", "ms.update-cycle: 3650-days # preserve comment`n")) 'Inline comment was lost' + foreach ($name in 'plain.md', 'single.md', 'double.md', 'review.md', 'excluded.md') { + Assert ((Snapshot $name) -ceq $before[$name]) "Unselected or correct article changed: $name" + } + $result = Apply $manifest + Assert ($result.Changed -eq 0 -and $result.AlreadyAtDesiredResult -eq 6) 'Repeated apply was not idempotent' + $result = & $script -Mode Apply -RepositoryRoot $fixtureRoot -ManifestPath $manifest -ApprovedPaths review.md + Assert ($result.Changed -eq 1) 'Explicit review approval did not apply' + Expect-Error { & $script -Mode Apply -RepositoryRoot $fixtureRoot -ManifestPath $manifest -ApprovedPaths excluded.md } 'Excluded article' + Expect-Error { & $script -Mode Apply -RepositoryRoot $fixtureRoot -ManifestPath $manifest -ApprovedGroups missing } 'no candidate entries' + $saved = Get-Content $manifest -Raw | ConvertFrom-Json + Assert (@($saved.articles | Where-Object status -eq applied).Count -eq 4) 'Manifest did not record completion' + + Write-Fixture 'first.md' $base + Write-Fixture 'stale.md' $base + $manifest = Make-Manifest stale @('first.md', 'stale.md') + Preview $manifest + $firstBefore = Snapshot 'first.md' + Write-Fixture 'stale.md' ($base + 'External edit') + Expect-Error { Apply $manifest } 'Stale article' + Assert ((Snapshot 'first.md') -ceq $firstBefore) 'Stale batch partly wrote articles' + $data = Get-Content $manifest -Raw | ConvertFrom-Json -AsHashtable + $data.metadata.value = 'different' + $data | ConvertTo-Json -Depth 10 | Set-Content $manifest -Encoding utf8 + Expect-Error { Apply $manifest } 'proposed metadata changed' + + $badCases = @{ + 'duplicate.md' = @{ Text = "---`ntitle: Fixture`nms.update-cycle: old`nms.update-cycle: older`n---`nBody"; Error = 'Duplicate frontmatter key' } + 'quoted-key.md' = @{ Text = "---`ntitle: Fixture`n'ms.update-cycle': old`n---`nBody"; Error = 'quoted frontmatter keys' } + 'merge.md' = @{ Text = "---`ntitle: Fixture`n<<: *defaults`n---`nBody"; Error = 'YAML merge keys' } + 'block.md' = @{ Text = "---`nms.update-cycle: |`n old`n---`nBody"; Error = 'ambiguous target scalar' } + 'folded.md' = @{ Text = "---`nms.update-cycle: old`n continuation`n---`nBody"; Error = 'Multiline or structured' } + 'indentless-list.md' = @{ Text = "---`nms.update-cycle:`n- old`n---`nBody"; Error = 'Multiline or structured' } + 'indentless-list-comments.md' = @{ Text = "---`r`nms.update-cycle: # list`r`n`r`n# comment`r`n- old`r`n---`r`nBody"; Error = 'Multiline or structured' } + 'indentless-list-empty-item.md' = @{ Text = "---`nms.update-cycle:`n-`n---`nBody"; Error = 'Multiline or structured' } + 'list.md' = @{ Text = "---`nms.update-cycle: [old, older]`n---`nBody"; Error = 'ambiguous target scalar' } + 'missing.md' = @{ Text = 'No frontmatter'; Error = 'opening YAML frontmatter delimiters' } + 'spaced-duplicate.md' = @{ Text = "---`nms.update-cycle: old`nms.update-cycle : older`n---`nBody"; Error = 'Duplicate frontmatter key' } + 'indented.md' = @{ Text = "---`n ms.update-cycle: old`n---`nBody"; Error = 'unindented mapping keys' } + 'flow.md' = @{ Text = "---`n{ms.update-cycle: old}`n---`nBody"; Error = 'unindented mapping keys' } + } + foreach ($name in $badCases.Keys) { + Write-Fixture $name $badCases[$name].Text + $manifest = Make-Manifest invalid @($name) + $beforeBad = Snapshot $name + Expect-Error { Preview $manifest } $badCases[$name].Error + Assert ((Snapshot $name) -ceq $beforeBad) "Invalid article changed: $name" + } + $manifest = Make-Manifest traversal @('..\outside.md') + Expect-Error { Preview $manifest } 'without traversal' + [void](New-Item -ItemType Directory (Join-Path $fixtureRoot 'directory.md')) + $manifest = Make-Manifest directory @('directory.md') + Expect-Error { Preview $manifest } 'Expected an article file' + [IO.File]::WriteAllText((Join-Path $fixtureRoot 'utf16.md'), $base, [Text.Encoding]::Unicode) + $manifest = Make-Manifest utf16 @('utf16.md') + Expect-Error { Preview $manifest } 'not valid UTF-8' + $manifest = Make-Manifest duplicated @('lf.md', '.\lf.md') + Expect-Error { Preview $manifest } 'Duplicate article path' + + foreach ($value in @('yes', '123', '2026-11-25', 'a: b # c', "it's fine", '')) { + Write-Fixture 'scalar.md' "---`ntitle: Fixture`n---`nBody without final newline" + $manifest = Make-Manifest scalar @('scalar.md') $value 'custom.key' + Preview $manifest + $null = Apply $manifest + $expectedScalar = "'" + $value.Replace("'", "''") + "'" + $expectedText = "---`ntitle: Fixture`ncustom.key: $expectedScalar`n---`nBody without final newline" + Assert ([IO.File]::ReadAllText((Join-Path $fixtureRoot 'scalar.md')) -ceq $expectedText) "Unsafe YAML string output: $value" + Preview $manifest + $result = Apply $manifest + Assert ($result.Changed -eq 0) "Quoted scalar was not idempotent: $value" + } + Write-Fixture 'comment.md' "---`ncustom.key: # empty value`n---`nBody" + $manifest = Make-Manifest comment @('comment.md') '# empty value' 'custom.key' + Preview $manifest + $null = Apply $manifest + Assert ([IO.File]::ReadAllText((Join-Path $fixtureRoot 'comment.md')) -ceq "---`ncustom.key: '# empty value' # empty value`n---`nBody") 'Empty comment-only value was treated as a string' + Write-Fixture 'numeric.md' "---`ncustom.key: .01`n---`nBody" + $manifest = Make-Manifest numeric @('numeric.md') '.01' 'custom.key' + Preview $manifest + $result = Apply $manifest + Assert ($result.Changed -eq 1) 'A numeric YAML scalar was mistaken for an already-correct string' + Assert ([IO.File]::ReadAllText((Join-Path $fixtureRoot 'numeric.md')) -ceq "---`ncustom.key: '.01'`n---`nBody") 'Numeric string was not quoted' + Write-Fixture 'spaced.md' "---`ncustom.key : old # keep spacing`n---`nBody" + $manifest = Make-Manifest spaced @('spaced.md') 'new-value' 'custom.key' + Preview $manifest + $null = Apply $manifest + Assert ([IO.File]::ReadAllText((Join-Path $fixtureRoot 'spaced.md')) -ceq "---`ncustom.key : new-value # keep spacing`n---`nBody") 'Existing key spacing was lost or a duplicate key was added' + Write-Fixture 'unrelated-list.md' "---`nms.update-cycle: old`nkeywords:`n- stable`n---`nBody" + $manifest = Make-Manifest unrelated-list @('unrelated-list.md') + Preview $manifest + $null = Apply $manifest + Assert ([IO.File]::ReadAllText((Join-Path $fixtureRoot 'unrelated-list.md')) -ceq "---`nms.update-cycle: 3650-days`nkeywords:`n- stable`n---`nBody") 'An unrelated indentless sequence prevented or changed the scalar edit' + "Passed $assertions assertions." +} +finally { + Remove-Item -LiteralPath $testRoot -Recurse -Force +} diff --git a/.github/skills/article-metadata-update/scripts/update-frontmatter.ps1 b/.github/skills/article-metadata-update/scripts/update-frontmatter.ps1 new file mode 100644 index 0000000000000..f20fa89d02b29 --- /dev/null +++ b/.github/skills/article-metadata-update/scripts/update-frontmatter.ps1 @@ -0,0 +1,306 @@ +#Requires -Version 7.2 +<# +.SYNOPSIS + Previews or applies approved, metadata-only article edits from a JSON manifest. +.EXAMPLE + .\update-frontmatter.ps1 -Mode Preview -ManifestPath C:\temp\articles.json +.EXAMPLE + .\update-frontmatter.ps1 -Mode Apply -ManifestPath C:\temp\articles.json -ApprovedGroups release-notes +#> +[CmdletBinding()] +param( + [Parameter(Mandatory = $true)] + [ValidateSet('Preview', 'Apply')] + [string]$Mode, + + [Parameter(Mandatory = $true)] + [string]$ManifestPath, + + [string]$RepositoryRoot = (Get-Location).Path, + [string[]]$ApprovedGroups = @(), + [string[]]$ApprovedPaths = @() +) + +$ErrorActionPreference = 'Stop' +Set-StrictMode -Version Latest +$utf8 = [Text.UTF8Encoding]::new($false, $true) +$rootItem = Get-Item -LiteralPath $RepositoryRoot +if ($rootItem -isnot [IO.DirectoryInfo]) { + throw 'RepositoryRoot must identify a directory' +} +$root = $rootItem.FullName +$manifestFile = [IO.Path]::GetFullPath($ManifestPath) +$pathComparer = $(if ($IsWindows) { [StringComparer]::OrdinalIgnoreCase } else { [StringComparer]::Ordinal }) +if ([IO.Path]::GetExtension($manifestFile) -ine '.json') { + throw 'ManifestPath must identify a JSON file' +} +$relativeManifest = [IO.Path]::GetRelativePath($root, $manifestFile) +if (![IO.Path]::IsPathRooted($relativeManifest) -and ($relativeManifest -split '[\\/]')[0] -ne '..') { + throw 'Keep the manifest and report outside the article repository' +} + +function Get-Hash { + param([byte[]]$Bytes) + [Convert]::ToHexString([Security.Cryptography.SHA256]::HashData($Bytes)).ToLowerInvariant() +} + +function Resolve-ArticlePath { + param([string]$Path) + $relative = $Path.Replace('\', [IO.Path]::DirectorySeparatorChar).Replace('/', [IO.Path]::DirectorySeparatorChar) + if ([IO.Path]::IsPathRooted($relative) -or $relative -split '[\\/]' -contains '..' -or [IO.Path]::GetExtension($relative) -cne '.md') { + throw "Expected a repository-relative Markdown path without traversal: $Path" + } + $fullPath = [IO.Path]::GetFullPath((Join-Path $root $relative)) + $current = $root + foreach ($part in $relative -split '[\\/]') { + $current = Join-Path $current $part + if ((Get-Item -LiteralPath $current).Attributes -band [IO.FileAttributes]::ReparsePoint) { + throw "Linked article paths are not supported: $Path" + } + } + if ((Get-Item -LiteralPath $fullPath) -isnot [IO.FileInfo]) { + throw "Expected an article file: $Path" + } + $fullPath +} + +function Read-Article { + param([string]$Path) + $bytes = [IO.File]::ReadAllBytes($Path) + $bom = $bytes.Length -ge 3 -and $bytes[0] -eq 0xEF -and $bytes[1] -eq 0xBB -and $bytes[2] -eq 0xBF + $offset = $(if ($bom) { 3 } else { 0 }) + try { + $text = $utf8.GetString($bytes, $offset, $bytes.Length - $offset) + } + catch [Text.DecoderFallbackException] { + throw "Article is not valid UTF-8; encoding was not changed: $Path" + } + [pscustomobject]@{ + Path = $Path + Bytes = $bytes + Text = $text + Bom = $bom + Hash = Get-Hash $bytes + } +} + +function ConvertTo-Scalar { + param([string]$Value) + if ($Value -cmatch '^(?:[A-Za-z][A-Za-z0-9_.-]*|[0-9]+-[A-Za-z][A-Za-z0-9_.-]*)$' -and + $Value -notmatch '^(true|false|yes|no|on|off|null)$') { + return $Value + } + "'" + $Value.Replace("'", "''") + "'" +} + +function Read-Scalar { + param([string]$Raw, [string]$Path) + if ($Raw.StartsWith('#')) { + return @{ Value = $null; Suffix = ' ' + $Raw; IsString = $false } + } + if ($Raw -match "^'(?(?:[^']|'')*)'(?[ `t]*(?:#.*)?)$") { + return @{ Value = $Matches.value.Replace("''", "'"); Suffix = $Matches.suffix; IsString = $true } + } + if ($Raw -match '^"(?(?:[^"\\]|\\.)*)"(?[ \t]*(?:#.*)?)$') { + return @{ Value = ('"' + $Matches.value + '"' | ConvertFrom-Json); Suffix = $Matches.suffix; IsString = $true } + } + if ($Raw -match '^[ \t]*[|>\[{\&*!''"]' -or $Raw -match ':[ \t]|[ \t][\&*!]') { + throw "Unsupported or ambiguous target scalar in ${Path}: $Raw" + } + $match = [regex]::Match($Raw, '^(?.*?)(?[ \t]+#.*)?$') + $value = $match.Groups['value'].Value.TrimEnd() + $suffix = $Raw.Substring($value.Length) + $number = '[-+]?(?:[0-9][0-9_]*(?:\.[0-9_]*)?|\.[0-9_]+)(?:[eE][-+]?[0-9_]+)?' + $typed = $value -match "^$|^(true|false|yes|no|on|off|null|~|$number|0[xob][0-9a-f]+|[-+]?\.(inf|nan)|[0-9]{4}-[0-9]{2}-[0-9]{2}([Tt ].*)?)$" + @{ Value = $value; Suffix = $suffix; IsString = !$typed } +} + +function Get-Edit { + param($Article, [string]$Key, [string]$Value) + $frontmatter = [regex]::Match($Article.Text, '\A---\r?\n(?.*?)^(?---[ \t]*)(?:\r?\n|$)', 'Singleline,Multiline') + if (!$frontmatter.Success) { + throw "Expected opening YAML frontmatter delimiters: $($Article.Path)" + } + $body = $frontmatter.Groups['body'].Value + $firstContent = @($body -split '\r?\n' | Where-Object { $_.Trim() -and !$_.TrimStart().StartsWith('#') }) | Select-Object -First 1 + if ($firstContent -and $firstContent -cnotmatch '^[A-Za-z_][A-Za-z0-9_.-]*[ \t]*:') { + throw "Expected unindented mapping keys in frontmatter: $($Article.Path)" + } + $keys = [regex]::Matches($body, '(?m)^(?[A-Za-z_][A-Za-z0-9_.-]*)[ \t]*:') + $seen = [Collections.Generic.HashSet[string]]::new([StringComparer]::Ordinal) + foreach ($entry in $keys) { + if (!$seen.Add($entry.Groups['key'].Value)) { + throw "Duplicate frontmatter key '$($entry.Groups['key'].Value)': $($Article.Path)" + } + } + $escapedKey = [regex]::Escape($Key) + if ($body -match '(?m)^<<[ \t]*:' -or $body -match '(?m)^[''"][^\r\n]*[''"][ \t]*:') { + throw "YAML merge keys and quoted frontmatter keys are not supported: $($Article.Path)" + } + $field = [regex]::Match($body, "(?m)^(?${escapedKey}[ `t]*:[ `t]*)(?[^\r\n]*)(?\r?\n|$)") + $currentValue = $null + $scalar = ConvertTo-Scalar $Value + if ($field.Success) { + $parsed = Read-Scalar $field.Groups['raw'].Value $Article.Path + if ($body.Substring($field.Index + $field.Length) -match '\A(?:[ \t]*(?:#[^\r\n]*)?\r?\n)*(?:[ \t]+[^#\s]|-(?=[ \t]|\r?\n|$))') { + throw "Multiline or structured target values are not supported: $($Article.Path)" + } + $currentValue = $parsed.Value + if ($parsed.IsString -and $currentValue -ceq $Value) { + return @{ Bytes = $Article.Bytes; CurrentValue = $currentValue } + } + $replacement = $field.Groups['prefix'].Value + $scalar + $parsed.Suffix + $field.Groups['newline'].Value + $updatedBody = $body.Substring(0, $field.Index) + $replacement + $body.Substring($field.Index + $field.Length) + } + else { + $newline = [regex]::Match($frontmatter.Value, '\r?\n').Value + $date = [regex]::Match($body, '(?m)^ms\.date[ \t]*:[^\r\n]*(?:\r?\n|$)') + $position = $(if ($date.Success) { $date.Index + $date.Length } else { $body.Length }) + $updatedBody = $body.Insert($position, "${Key}: $scalar$newline") + } + $bodyOffset = $frontmatter.Groups['body'].Index + $updatedText = $Article.Text.Substring(0, $bodyOffset) + $updatedBody + $Article.Text.Substring($bodyOffset + $body.Length) + [byte[]]$updatedBytes = $utf8.GetBytes($updatedText) + if ($Article.Bom) { + $updatedBytes = [byte[]](@(0xEF, 0xBB, 0xBF) + $updatedBytes) + } + @{ Bytes = $updatedBytes; CurrentValue = $currentValue } +} + +function Save-Manifest { + $temporary = Join-Path (Split-Path $manifestFile -Parent) ([IO.Path]::GetRandomFileName()) + try { + [IO.File]::WriteAllText($temporary, ($manifest | ConvertTo-Json -Depth 20) + "`n", $utf8) + [IO.File]::Move($temporary, $manifestFile, $true) + } + finally { + if (Test-Path -LiteralPath $temporary) { + Remove-Item -LiteralPath $temporary + } + } + $manifest.articles | Select-Object path, group, classification, status, currentValue, + @{Name = 'proposedValue'; Expression = { $manifest.metadata.value }}, reason, evidence | + Export-Csv -LiteralPath ([IO.Path]::ChangeExtension($manifestFile, '.csv')) -NoTypeInformation -Encoding utf8 +} + +$manifest = Get-Content -LiteralPath $manifestFile -Raw | ConvertFrom-Json -AsHashtable +if ($manifest.schemaVersion -ne 1 -or $manifest.metadata.key -isnot [string] -or + $manifest.metadata.key -cnotmatch '^[A-Za-z_][A-Za-z0-9_.-]*$' -or $manifest.metadata.value -isnot [string] -or + $manifest.metadata.value -match '[\x00-\x1F\x7F]' -or $manifest.articles -isnot [array] -or !$manifest.articles.Count) { + throw 'Expected schemaVersion 1, a top-level metadata key, a single-line string value, and an articles array' +} +$paths = [Collections.Generic.HashSet[string]]::new($pathComparer) +$resolved = [Collections.Generic.Dictionary[string, string]]::new($pathComparer) +foreach ($entry in $manifest.articles) { + if ($entry.path -isnot [string] -or !$entry.path -or $entry.group -isnot [string] -or $entry.group -cnotmatch '^[a-z0-9][a-z0-9-]*$' -or + $entry.classification -cnotin @('candidate', 'review', 'excluded') -or + $entry.reason -isnot [string] -or !$entry.reason.Trim() -or $entry.evidence -isnot [string] -or !$entry.evidence.Trim()) { + throw 'Each article needs a path, group ID, classification, reason, and evidence' + } + $path = Resolve-ArticlePath $entry.path + if (!$paths.Add($path)) { + throw "Duplicate article path: $($entry.path)" + } + $resolved[$entry.path] = $path +} + +if ($Mode -eq 'Preview') { + if ($ApprovedGroups.Count -or $ApprovedPaths.Count) { + throw 'Approval arguments are valid only in Apply mode' + } + foreach ($entry in $manifest.articles) { + if ($entry.classification -eq 'excluded') { + $entry.currentValue = $null + $entry.sha256 = Get-Hash ([IO.File]::ReadAllBytes($resolved[$entry.path])) + $entry.expectedSha256 = $entry.sha256 + $entry.status = 'excluded' + continue + } + $article = Read-Article $resolved[$entry.path] + $edit = Get-Edit $article $manifest.metadata.key $manifest.metadata.value + $entry.currentValue = $edit.CurrentValue + $entry.sha256 = $article.Hash + $entry.expectedSha256 = Get-Hash $edit.Bytes + $entry.status = $(if ($entry.sha256 -ceq $entry.expectedSha256) { 'already-correct' } else { 'pending' }) + } + $manifest.repositoryRoot = $root + $manifest.previewMetadata = @{ key = $manifest.metadata.key; value = $manifest.metadata.value } + Save-Manifest + $manifest.articles | Select-Object path, group, classification, status, currentValue + return +} + +if (!$ApprovedGroups.Count -and !$ApprovedPaths.Count) { + throw 'Apply requires explicit ApprovedGroups or ApprovedPaths' +} +if (!$pathComparer.Equals($manifest.repositoryRoot, $root) -or + $manifest.previewMetadata.key -cne $manifest.metadata.key -or $manifest.previewMetadata.value -cne $manifest.metadata.value) { + throw 'Repository or proposed metadata changed; create a fresh preview' +} +$explicitPaths = [Collections.Generic.HashSet[string]]::new($pathComparer) +foreach ($path in $ApprovedPaths) { + $fullPath = Resolve-ArticlePath $path + if (!$paths.Contains($fullPath)) { + throw "Approved path is not in the manifest: $path" + } + [void]$explicitPaths.Add($fullPath) +} +foreach ($group in $ApprovedGroups) { + if (!@($manifest.articles | Where-Object { $_.group -ceq $group -and $_.classification -eq 'candidate' }).Count) { + throw "Approved group has no candidate entries: $group" + } +} +$selected = @($manifest.articles | Where-Object { + $explicitPaths.Contains($resolved[$_.path]) -or ($_.classification -eq 'candidate' -and $_.group -cin $ApprovedGroups) +}) +$plans = foreach ($entry in $selected) { + if ($entry.classification -eq 'excluded') { + throw "Excluded article cannot be approved: $($entry.path)" + } + $article = Read-Article $resolved[$entry.path] + if ($entry.sha256 -cnotmatch '^[0-9a-f]{64}$' -or $entry.expectedSha256 -cnotmatch '^[0-9a-f]{64}$') { + throw "Missing or invalid preview snapshot: $($entry.path)" + } + if ($article.Hash -cne $entry.sha256 -and $article.Hash -cne $entry.expectedSha256) { + throw "Stale article; recheck scope and preview again: $($entry.path)" + } + $edit = Get-Edit $article $manifest.metadata.key $manifest.metadata.value + if ((Get-Hash $edit.Bytes) -cne $entry.expectedSha256) { + throw "Previewed result changed: $($entry.path)" + } + [pscustomobject]@{ Entry = $entry; Path = $resolved[$entry.path]; OriginalHash = $article.Hash; Bytes = $edit.Bytes } +} +$changed = 0 +$skipped = 0 +try { + foreach ($plan in $plans) { + [void](Resolve-ArticlePath $plan.Entry.path) + if ((Get-Hash ([IO.File]::ReadAllBytes($plan.Path))) -cne $plan.OriginalHash) { + throw "Article changed during apply: $($plan.Entry.path)" + } + if ($plan.OriginalHash -cne $plan.Entry.expectedSha256) { + [IO.File]::WriteAllBytes($plan.Path, $plan.Bytes) + if ((Get-Hash ([IO.File]::ReadAllBytes($plan.Path))) -cne $plan.Entry.expectedSha256) { + throw "Article write did not match the preview: $($plan.Entry.path)" + } + $changed++ + } + else { + $skipped++ + } + if ($plan.Entry.sha256 -cne $plan.Entry.expectedSha256) { + $plan.Entry.status = 'applied' + } + } +} +finally { + Save-Manifest +} +[pscustomobject]@{ + Selected = $selected.Count + Changed = $changed + AlreadyAtDesiredResult = $skipped + Remaining = @($manifest.articles | Where-Object { $_.classification -ne 'excluded' -and $_.status -eq 'pending' }).Count + ManifestPath = $manifestFile + ReportPath = [IO.Path]::ChangeExtension($manifestFile, '.csv') +} diff --git a/.github/skills/consolidate-docfx-metadata/SKILL.md b/.github/skills/consolidate-docfx-metadata/SKILL.md new file mode 100644 index 0000000000000..5516b927fa9bc --- /dev/null +++ b/.github/skills/consolidate-docfx-metadata/SKILL.md @@ -0,0 +1,116 @@ +--- +name: consolidate-docfx-metadata +description: Moves uniform article metadata into DocFX folder rules and promotes identical child rules to their common parent without changing effective metadata. Use to deduplicate frontmatter or simplify fileMetadata in any DocFX repository. Never move or modify ms.date. +argument-hint: 'Provide the DocFX configuration, scope or PR, optional metadata keys, and whether to preview or apply' +--- + +# Consolidate DocFX metadata + +Replace repeated article metadata with the narrowest sufficient shared configuration, then promote uniform subtrees to their highest safe parent. Preserve the effective metadata of every existing build input, not just the articles with edits. + +The workflow is repository-neutral. Discover paths, metadata keys, values, content mappings, and build tooling from the current repository. Don't hard-code a product, directory structure, release, or metadata value. **Always exclude `ms.date`**, even when every date matches. Leave existing date defaults and article dates unchanged. + +## Establish scope + +- Read applicable instructions, inspect workspace changes, and locate the owning `docfx.json`. Don't assume that the repository root contains the only docset. +- Accept optional keys and a directory or PR scope. With a PR scope, use its changed metadata keys and article directories as seeds; inspect unchanged neighboring articles before any folder promotion. Don't consolidate unrelated keys across the repository. +- If no keys are specified for a directory-wide request, examine all metadata keys except `ms.date`. Evaluate each key independently. +- Establish the highest directory and docset the user authorized. Don't cross that boundary or consolidate into another configuration. +- Default to a proposal when the user requests analysis. When the user explicitly requests application, proceed within that scope without another approval gate. Ask only about ambiguous scope or changes to effective values. +- Keep all work on the user's existing branch. Don't stage, commit, push, or reply to a PR without the corresponding authorization. + +## Determine actual inheritance + +Read `build.content`, `build.globalMetadata`, `build.fileMetadata`, referenced metadata files, and other metadata sources supported by the repository's publishing system. Account for nested configurations and content mappings with `src`, `dest`, exclusions, or external dependencies. + +Resolve source paths relative to the owning configuration, not published URLs or output destinations. Use the publishing system's glob semantics, including zero-depth matches, exclusions, case behavior, and overlapping rule precedence. PowerShell wildcards and ad hoc regular expressions are not substitutes for a DocFX glob implementation. + +For conceptual articles, frontmatter normally overrides file metadata, which overrides global metadata. **Verify the repository's actual builder and merge rules** before you rely on that hierarchy. Overlapping globs aren't necessarily resolved by the longest path. Preserve their order unless verified semantics require a change. YAML pages and TOCs can use different metadata structures and precedence from conceptual Markdown. + +Read the current engine's documentation, use repository tooling, or run a minimal fixture with the actual publishing engine to resolve uncertainty. Don't substitute a different DocFX version for the repository's publisher and claim equivalence. If an affected value or precedence rule remains unknown, leave that candidate untouched and report the blocker. + +References: + +- [DocFX configuration](https://dotnet.github.io/docfx/reference/docfx-json-reference.html). +- [Metadata configuration and precedence](https://github.com/dotnet/docfx/blob/main/docs/docs/config.md). +- [Microsoft Learn metadata](https://learn.microsoft.com/contribute/content/metadata). + +## Inventory effective values + +Create a before-state inventory in the session artifacts directory, outside the repository. Record: + +- Every affected source path and content type, including unchanged siblings and parent-level articles. +- Each candidate key's presence, typed effective value, explicit value, inherited value, and originating rule. +- The exact match set of each proposed rule, including any affected nonarticle inputs. +- Article and configuration hashes, article bodies, dates, and metadata not selected for consolidation. +- Unknown inputs, exclusions, nested docsets, and unavailable external content. + +Use a YAML parser for semantic comparisons. Keep a separate source representation for precise edits; don't round-trip whole articles through a serializer. Distinguish an absent key from an explicit null, an empty string, `false`, zero, and an empty collection. Compare strings case-sensitively, preserve array order and element types, and compare objects structurally rather than by their serialized property order. Follow engine-specific merge semantics for collection values. + +Don't infer equality from matching text lines or count only files that explicitly declare the key. An article without frontmatter can inherit a value; an article with neither an explicit value nor a default blocks promotion of a present value. A folder with no eligible articles supplies no evidence of uniformity. + +If a value can't be parsed or safely represented in DocFX JSON, report it instead of flattening it into a string. Stop on duplicate or ambiguous keys. Relative paths, links, expressions, and document-identity metadata also require proof that a change of declaration location preserves their meaning. + +## Consolidate bottom-up + +Repeat these steps independently for each key other than `ms.date`. + +### Remove metadata already supplied by inheritance + +For each article in scope, simulate removal of its explicit key. If the inherited result is exactly equal to its original typed effective value, remove the redundant article field without adding a rule. The inherited value must remain equal after the rest of the proposed consolidation. + +Keep genuine overrides. Don't change an exception's value merely to make a folder uniform. + +### Move common article values to a folder + +1. Evaluate all articles directly in the folder, not only changed articles or search hits. +1. If every direct article has the same present effective value, propose a nonrecursive folder rule for the relevant article type. +1. Use a recursive rule only if every affected descendant article and other matched input also has that value. A child folder that lacks the key or has a different value prevents a recursive rule. +1. If an ancestor already supplies the exact value, reuse it rather than add another rule. +1. Simulate the resulting inheritance and remove only the article fields and narrower rules that become redundant. + +For example, `content/guide/*.md` covers direct Markdown children, while `content/guide/**/*.md` can cover the entire subtree. These are illustrative DocFX patterns, not repository paths or a substitute for engine-specific match verification. Use forward slashes inside JSON glob strings even on Windows. Use normal platform paths for filesystem operations. + +Don't widen an article-only rule to all extensions. Include YAML content only after its effective metadata has been inspected, and don't impose article defaults on TOCs, includes, snippets, or resources by accident. + +### Promote common child rules to their parent + +1. Examine every child subtree and all articles directly in the parent folder. +1. Require one identical present effective value for every input the proposed parent rule matches. Matching child rules alone aren't enough: a sibling without a rule might inherit a different value or no value. +1. If all affected inputs agree, replace the equivalent child rules with one parent rule. Remove redundant direct-article declarations too. +1. Repeat at the next parent until a mismatch, unknown input, docset boundary, or authorized scope boundary prevents promotion. + +A parent with no direct articles can qualify through its nonempty child subtrees. Empty directories don't establish a value. Don't manufacture article overrides to conceal a broader rule that changes the default for a mixed subtree. + +### Consider a global value + +Use `build.globalMetadata` only when the entire authorized docset, including other content mappings and affected non-Markdown inputs, supports the same value without new exceptions or changed effective metadata. A uniform `docs` subtree doesn't establish that external API or specification content agrees. + +Otherwise, stop at the highest safe folder. Don't overwrite a different global value just because one subtree agrees. + +## Apply precise edits + +Present or record the proposed rules, covered article counts, redundant fields or rules to remove, and blocked promotions. If execution was authorized, apply the proposal as one coherent scoped change. + +- Add or update entries under `build.fileMetadata[key]`, or reuse an identical existing rule. Preserve JSON value types, indentation, unrelated properties, and meaningful rule order. +- Remove a child rule only after the remaining rules reproduce its effective value for its complete match set. Narrower rules can affect unchanged files outside the original candidate list. +- Remove only the complete approved frontmatter field and its value. Handle multiline values, mappings, and indented or indentless sequences as complete YAML nodes. Don't leave orphaned list items or delete neighboring metadata. +- If the available editor can't safely remove a structured value, leave it and report it. The `article-metadata-update` companion script sets single-line values; it doesn't remove fields or edit DocFX rules. Don't misuse it for this task. +- Preserve article bodies, comments with independent meaning, encoding, BOMs, newline conventions, `ms.date`, and all other effective metadata. Don't add or change `ai-usage` for a metadata-only relocation. +- Before writes, recheck content hashes, rule match sets, and the folder inventory. Reassess externally changed files or newly added siblings instead of applying a stale proposal. + +## Verify the result + +Use the smallest available repository checks that establish the following invariants: + +- The configuration parses, has no duplicate keys or patterns for a key, and uses the existing schema. +- Every existing build input affected by old or new rules retains the exact presence and typed effective value of each consolidated key. +- No input outside the intended match sets gains or loses metadata, and unrelated keys, dates, and article bodies remain unchanged. +- Removed article declarations and child rules are genuinely redundant after all promotions; no safe in-scope promotion remains. +- A second analysis proposes no further changes. Don't create broader rules on each run or repeatedly reorder configuration. + +Validate with the actual publishing engine or a resolver whose relevant semantics have been verified against it. Test direct and nested articles, parent articles, missing values, mixed siblings, existing inherited defaults, overlapping rules, typed values, structured frontmatter, and excluded inputs. Verify dates never move. A parse check or equal count of removed lines alone doesn't establish metadata equivalence. + +If a full publishing build isn't available, report that limitation and distinguish verified cases from unresolved ones. Don't claim a clean publishing build based on a different local tool. + +Summarize the highest folder or global rules retained, article fields and child rules removed, exceptions left in place, and any blocked promotions. Leave changes local and uncommitted unless the user requested otherwise. diff --git a/docfx.json b/docfx.json index 8462c461d6e9d..e52187c46f278 100644 --- a/docfx.json +++ b/docfx.json @@ -716,6 +716,7 @@ "docs/ai/**/**.{md,yml}": "180-days", "docs/core/compatibility/**/**.{md,yml}": "3650-days", "docs/core/porting/github-copilot-upgrade/**/**.{md,yml}": "180-days", + "docs/core/whats-new/**/*.md": "3650-days", "docs/csharp/advanced-topics/interop/**/**.{md,yml}": "1825-days", "docs/csharp/advanced-topics/reflection-and-attributes/**/**.{md,yml}": "1825-days", "docs/csharp/fundamentals/exceptions/**/**.{md,yml}": "1825-days", diff --git a/docs/core/deploying/trimming/trim-warnings/il2053.md b/docs/core/deploying/trimming/trim-warnings/il2053.md index 0e7d53eefc0a2..b675a3ee10ed3 100644 --- a/docs/core/deploying/trimming/trim-warnings/il2053.md +++ b/docs/core/deploying/trimming/trim-warnings/il2053.md @@ -2,6 +2,7 @@ title: "IL2053: Invalid value used in property element in custom attribute annotations file" description: "Learn about trim warning IL2053: CustomAttributeAnnotationsPropertyInvalidValue" ms.date: 08/25/2021 +ms.update-cycle: 3650-days author: mateoatr f1_keywords: - "IL2053" diff --git a/docs/core/deploying/trimming/trim-warnings/il2054.md b/docs/core/deploying/trimming/trim-warnings/il2054.md index e9bbcc997f64c..75ccbc69fcb93 100644 --- a/docs/core/deploying/trimming/trim-warnings/il2054.md +++ b/docs/core/deploying/trimming/trim-warnings/il2054.md @@ -2,6 +2,7 @@ title: "IL2054: Invalid argument value in custom attribute annotations file" description: "Learn about trim warning IL2054: CustomAttributeAnnotationsInvalidArgument" ms.date: 08/25/2021 +ms.update-cycle: 3650-days author: mateoatr f1_keywords: - "IL2054" diff --git a/docs/core/whats-new/dotnet-10/libraries.md b/docs/core/whats-new/dotnet-10/libraries.md index f57401c843387..50bdd226575bb 100644 --- a/docs/core/whats-new/dotnet-10/libraries.md +++ b/docs/core/whats-new/dotnet-10/libraries.md @@ -4,7 +4,6 @@ description: Learn about the updates to the .NET libraries for .NET 10. titleSuffix: "" ms.date: 11/07/2025 ai-usage: ai-assisted -ms.update-cycle: 3650-days --- # What's new in .NET libraries for .NET 10 diff --git a/docs/core/whats-new/dotnet-10/overview.md b/docs/core/whats-new/dotnet-10/overview.md index ee1675427767d..e2a958da428a2 100644 --- a/docs/core/whats-new/dotnet-10/overview.md +++ b/docs/core/whats-new/dotnet-10/overview.md @@ -4,7 +4,6 @@ description: Learn about the new features introduced in .NET 10 for the runtime, titleSuffix: "" ms.date: 11/07/2025 ai-usage: ai-assisted -ms.update-cycle: 3650-days --- # What's new in .NET 10 diff --git a/docs/core/whats-new/dotnet-10/runtime.md b/docs/core/whats-new/dotnet-10/runtime.md index cb3046c90ecd6..3d1536cab7892 100644 --- a/docs/core/whats-new/dotnet-10/runtime.md +++ b/docs/core/whats-new/dotnet-10/runtime.md @@ -4,7 +4,6 @@ description: Learn about the new features introduced in the .NET 10 runtime. titleSuffix: "" ms.date: 11/07/2025 ai-usage: ai-assisted -ms.update-cycle: 3650-days --- # What's new in the .NET 10 runtime diff --git a/docs/core/whats-new/dotnet-10/sdk.md b/docs/core/whats-new/dotnet-10/sdk.md index 48249bb24d890..d8e11e5452b04 100644 --- a/docs/core/whats-new/dotnet-10/sdk.md +++ b/docs/core/whats-new/dotnet-10/sdk.md @@ -4,7 +4,6 @@ description: Learn about the new .NET SDK features introduced in .NET 10. titleSuffix: "" ms.date: 11/07/2025 ai-usage: ai-assisted -ms.update-cycle: 3650-days --- # What's new in the SDK and tooling for .NET 10 diff --git a/docs/core/whats-new/dotnet-11/libraries.md b/docs/core/whats-new/dotnet-11/libraries.md index 74095a288a6c7..5409e6c767e9a 100644 --- a/docs/core/whats-new/dotnet-11/libraries.md +++ b/docs/core/whats-new/dotnet-11/libraries.md @@ -4,7 +4,6 @@ description: Learn about the updates to the .NET libraries for .NET 11. titleSuffix: "" ms.date: 11/10/2026 ai-usage: ai-assisted -ms.update-cycle: 3650-days --- # What's new in .NET libraries for .NET 11 diff --git a/docs/core/whats-new/dotnet-11/overview.md b/docs/core/whats-new/dotnet-11/overview.md index 2dfb8cd50ab96..7891d0ed2f94e 100644 --- a/docs/core/whats-new/dotnet-11/overview.md +++ b/docs/core/whats-new/dotnet-11/overview.md @@ -4,7 +4,6 @@ description: Learn about the new features introduced in .NET 11 for the runtime, titleSuffix: "" ms.date: 11/10/2026 ai-usage: ai-assisted -ms.update-cycle: 3650-days --- # What's new in .NET 11 diff --git a/docs/core/whats-new/dotnet-11/runtime.md b/docs/core/whats-new/dotnet-11/runtime.md index 9270ad8cf5281..06b832ce0188d 100644 --- a/docs/core/whats-new/dotnet-11/runtime.md +++ b/docs/core/whats-new/dotnet-11/runtime.md @@ -4,7 +4,6 @@ description: Learn about the new features introduced in the .NET 11 runtime. titleSuffix: "" ms.date: 11/10/2026 ai-usage: ai-assisted -ms.update-cycle: 3650-days --- # What's new in the .NET 11 runtime diff --git a/docs/core/whats-new/dotnet-11/sdk.md b/docs/core/whats-new/dotnet-11/sdk.md index e82708bd79dad..f34b08b4f36a5 100644 --- a/docs/core/whats-new/dotnet-11/sdk.md +++ b/docs/core/whats-new/dotnet-11/sdk.md @@ -4,7 +4,6 @@ description: Learn about the new .NET SDK features introduced in .NET 11. titleSuffix: "" ms.date: 11/10/2026 ai-usage: ai-assisted -ms.update-cycle: 3650-days --- # What's new in the SDK and tooling for .NET 11 diff --git a/docs/core/whats-new/dotnet-5.md b/docs/core/whats-new/dotnet-5.md index f3508c9c21f65..0a445bcabd21b 100644 --- a/docs/core/whats-new/dotnet-5.md +++ b/docs/core/whats-new/dotnet-5.md @@ -2,7 +2,6 @@ title: What's new in .NET 5 description: Learn about .NET 5, a cross-platform and open-source development platform that is the next evolution of .NET Core. ms.date: 07/26/2022 -ms.update-cycle: 3650-days --- # What's new in .NET 5 diff --git a/docs/core/whats-new/dotnet-6.md b/docs/core/whats-new/dotnet-6.md index 03baaa5a364d8..4fa8c359a434d 100644 --- a/docs/core/whats-new/dotnet-6.md +++ b/docs/core/whats-new/dotnet-6.md @@ -2,7 +2,6 @@ title: What's new in .NET 6 description: Learn about the new features introduced in .NET 6. ms.date: 11/08/2021 -ms.update-cycle: 3650-days --- # What's new in .NET 6 diff --git a/docs/core/whats-new/dotnet-7.md b/docs/core/whats-new/dotnet-7.md index ca79ae7cda299..6b346db344d76 100644 --- a/docs/core/whats-new/dotnet-7.md +++ b/docs/core/whats-new/dotnet-7.md @@ -2,7 +2,6 @@ title: What's new in .NET 7 description: Learn about the new features introduced in .NET 7. ms.date: 11/08/2022 -ms.update-cycle: 3650-days --- # What's new in .NET 7 diff --git a/docs/core/whats-new/dotnet-8/containers.md b/docs/core/whats-new/dotnet-8/containers.md index 9f83d872e9c32..33e933c853bd4 100644 --- a/docs/core/whats-new/dotnet-8/containers.md +++ b/docs/core/whats-new/dotnet-8/containers.md @@ -4,7 +4,6 @@ description: Learn about the new containers features introduced in .NET 8. titleSuffix: "" ms.date: 11/14/2023 ms.custom: linux-related-content -ms.update-cycle: 3650-days --- # What's new in containers for .NET 8 diff --git a/docs/core/whats-new/dotnet-8/overview.md b/docs/core/whats-new/dotnet-8/overview.md index 4eefcc2d9a8a9..f6c1e1c2386de 100644 --- a/docs/core/whats-new/dotnet-8/overview.md +++ b/docs/core/whats-new/dotnet-8/overview.md @@ -3,7 +3,6 @@ title: What's new in .NET 8 description: Learn about the new .NET features introduced in .NET 8. titleSuffix: "" ms.date: 11/14/2023 -ms.update-cycle: 3650-days --- # What's new in .NET 8 diff --git a/docs/core/whats-new/dotnet-8/runtime.md b/docs/core/whats-new/dotnet-8/runtime.md index 621cf1f1ebfdf..a1e566394f35c 100644 --- a/docs/core/whats-new/dotnet-8/runtime.md +++ b/docs/core/whats-new/dotnet-8/runtime.md @@ -3,7 +3,6 @@ title: What's new in .NET 8 runtime description: Learn about the new .NET features introduced in the .NET 8 runtime. titleSuffix: "" ms.date: 11/14/2023 -ms.update-cycle: 3650-days --- # What's new in the .NET 8 runtime diff --git a/docs/core/whats-new/dotnet-8/sdk.md b/docs/core/whats-new/dotnet-8/sdk.md index 744c4cf537875..037a9472833ed 100644 --- a/docs/core/whats-new/dotnet-8/sdk.md +++ b/docs/core/whats-new/dotnet-8/sdk.md @@ -4,7 +4,6 @@ description: Learn about the new .NET SDK and tooling features introduced in .NE titleSuffix: "" ms.date: 11/14/2023 ms.custom: linux-related-content -ms.update-cycle: 3650-days --- # What's new in the SDK and tooling for .NET 8 diff --git a/docs/core/whats-new/dotnet-9/libraries.md b/docs/core/whats-new/dotnet-9/libraries.md index c7cbbcee848dd..4ad7808031943 100644 --- a/docs/core/whats-new/dotnet-9/libraries.md +++ b/docs/core/whats-new/dotnet-9/libraries.md @@ -3,7 +3,6 @@ title: What's new in .NET libraries for .NET 9 description: Learn about the new .NET libraries features introduced in .NET 9. titleSuffix: "" ms.date: 11/11/2024 -ms.update-cycle: 3650-days --- # What's new in .NET libraries for .NET 9 diff --git a/docs/core/whats-new/dotnet-9/overview.md b/docs/core/whats-new/dotnet-9/overview.md index ee13a0ef0773b..e6c1073db3e34 100644 --- a/docs/core/whats-new/dotnet-9/overview.md +++ b/docs/core/whats-new/dotnet-9/overview.md @@ -3,7 +3,6 @@ title: What's new in .NET 9 description: Learn about the new .NET features introduced in .NET 9 for the runtime, libraries, and SDK. Also find links to what's new in other areas, such as ASP.NET Core. titleSuffix: "" ms.date: 08/26/2025 -ms.update-cycle: 3650-days --- # What's new in .NET 9 diff --git a/docs/core/whats-new/dotnet-9/runtime.md b/docs/core/whats-new/dotnet-9/runtime.md index 840592a9199b6..60218885948bc 100644 --- a/docs/core/whats-new/dotnet-9/runtime.md +++ b/docs/core/whats-new/dotnet-9/runtime.md @@ -3,7 +3,6 @@ title: What's new in .NET 9 runtime description: Learn about the new .NET features introduced in the .NET 9 runtime. titleSuffix: "" ms.date: 11/11/2024 -ms.update-cycle: 3650-days --- # What's new in the .NET 9 runtime diff --git a/docs/core/whats-new/dotnet-9/sdk.md b/docs/core/whats-new/dotnet-9/sdk.md index 12c8aff503c0e..6f71bb3a3001a 100644 --- a/docs/core/whats-new/dotnet-9/sdk.md +++ b/docs/core/whats-new/dotnet-9/sdk.md @@ -3,7 +3,6 @@ title: What's new in the SDK and tooling for .NET 9 description: Learn about the new .NET SDK features introduced in .NET 9, including for unit testing, Terminal Logger, tool roll-forward, and build script analyzers. titleSuffix: "" ms.date: 11/11/2024 -ms.update-cycle: 3650-days --- # What's new in the SDK and tooling for .NET 9 diff --git a/docs/core/whats-new/dotnet-core-2-0.md b/docs/core/whats-new/dotnet-core-2-0.md index 85d6b2fde0200..8ccf6ff535da7 100644 --- a/docs/core/whats-new/dotnet-core-2-0.md +++ b/docs/core/whats-new/dotnet-core-2-0.md @@ -2,7 +2,6 @@ title: What's new in .NET Core 2.0 description: Learn about the new features found in .NET Core. ms.date: 08/13/2017 -ms.update-cycle: 3650-days --- # What's new in .NET Core 2.0 diff --git a/docs/core/whats-new/dotnet-core-2-1.md b/docs/core/whats-new/dotnet-core-2-1.md index ea002d8afc6a1..86228bf3b7443 100644 --- a/docs/core/whats-new/dotnet-core-2-1.md +++ b/docs/core/whats-new/dotnet-core-2-1.md @@ -5,7 +5,6 @@ ms.date: 10/10/2018 dev_langs: - "csharp" - "vb" -ms.update-cycle: 3650-days --- # What's new in .NET Core 2.1 diff --git a/docs/core/whats-new/dotnet-core-2-2.md b/docs/core/whats-new/dotnet-core-2-2.md index 314962f31e2f8..e1a2a6f1c461e 100644 --- a/docs/core/whats-new/dotnet-core-2-2.md +++ b/docs/core/whats-new/dotnet-core-2-2.md @@ -4,7 +4,6 @@ description: Learn about the new features found in .NET Core 2.2. ms.date: 12/04/2018 dev_langs: - "csharp" -ms.update-cycle: 3650-days --- # What's new in .NET Core 2.2 diff --git a/docs/core/whats-new/dotnet-core-3-0.md b/docs/core/whats-new/dotnet-core-3-0.md index ca6fab4676dab..6cb1f63a6adf9 100644 --- a/docs/core/whats-new/dotnet-core-3-0.md +++ b/docs/core/whats-new/dotnet-core-3-0.md @@ -7,7 +7,6 @@ ms.author: adegeo dev_langs: - "csharp" ms.custom: linux-related-content -ms.update-cycle: 3650-days --- # What's new in .NET Core 3.0 diff --git a/docs/core/whats-new/dotnet-core-3-1.md b/docs/core/whats-new/dotnet-core-3-1.md index 9d5f88de28aa1..d8f1cdb911b48 100644 --- a/docs/core/whats-new/dotnet-core-3-1.md +++ b/docs/core/whats-new/dotnet-core-3-1.md @@ -6,7 +6,6 @@ author: adegeo ms.author: adegeo dev_langs: - "csharp" -ms.update-cycle: 3650-days --- # What's new in .NET Core 3.1 diff --git a/docs/csharp/language-reference/compiler-messages/assembly-references.md b/docs/csharp/language-reference/compiler-messages/assembly-references.md index aa66e8b42f8f4..ed8c3b94abebc 100644 --- a/docs/csharp/language-reference/compiler-messages/assembly-references.md +++ b/docs/csharp/language-reference/compiler-messages/assembly-references.md @@ -31,6 +31,9 @@ f1_keywords: - "CS8006" - "CS8007" - "CS8008" + - "CS8010" + - "CS8011" + - "CS8012" - "CS8014" - "CS8015" - "CS8090" @@ -68,6 +71,9 @@ helpviewer_keywords: - "CS8006" - "CS8007" - "CS8008" + - "CS8010" + - "CS8011" + - "CS8012" - "CS8014" - "CS8015" - "CS8090" @@ -75,7 +81,7 @@ helpviewer_keywords: - "CS8206" - "CS8356" - "CS9286" -ms.date: 11/18/2026 +ms.date: 11/24/2026 ai-usage: ai-assisted --- # Resolve errors and warnings related to assembly references @@ -111,6 +117,9 @@ That's by design. The text closely matches the text of the compiler error or war - [**CS8006**](#type-forwarding): *Forwarded type 'type name' conflicts with type declared in primary module of this assembly.* - [**CS8007**](#type-forwarding): *Type 'first type name' forwarded to assembly 'first assembly name' conflicts with type 'second type name' forwarded to assembly 'second assembly name'.* - [**CS8008**](#type-forwarding): *Type 'forwarded type name' forwarded to assembly 'assembly name' conflicts with type 'exported type name' exported from module 'module name'.* +- [**CS8010**](#processor-target-compatibility): *Agnostic assembly cannot have a processor specific module 'module name'.* +- [**CS8011**](#processor-target-compatibility): *Assembly and module 'module name' cannot target different processors.* +- [**CS8012**](#processor-target-compatibility): *Referenced assembly 'assembly name' targets a different processor.* - [**CS8014**](#invalid-assembly-reference): *Reference to 'module name' netmodule missing.* - [**CS8015**](#duplicate-references): *Module 'module name' is already defined in this assembly. Each module must have a unique filename.* - [**CS8090**](#invalid-assembly-reference): *There is an error in a referenced assembly 'assembly name'.* @@ -322,3 +331,58 @@ Correct unresolved type ownership in the input metadata: include the intended ty Choose a nonreserved assembly name for an interactive-session reference (**CS7008**). Correct malformed assembly identities (**CS7071**) or the output assembly name described by the diagnostic (**CS8203**). When you create a Roslyn compilation, supply a valid assembly name rather than a path. Check spelling and the actual referenced files rather than changing only source-level aliases. Read the errors reported for the referenced assembly, then rebuild or replace that dependency (**CS8090**). Adding another reference doesn't correct errors already present in the dependency. + +## Processor-target compatibility + +- **CS8010**: *Agnostic assembly cannot have a processor specific module 'module name'.* +- **CS8011**: *Assembly and module 'module name' cannot target different processors.* +- **CS8012**: *Referenced assembly 'assembly name' targets a different processor.* + +Select the output processor through [**PlatformTarget**](../compiler-options/output.md#platformtarget). For example, set `x64` in the project's `PropertyGroup`, or pass `/platform:x64` directly to the compiler. Changing the consumer's setting doesn't retarget an existing `.dll` or `.netmodule`; rebuild the affected input. + +- For processor-agnostic output, such as `AnyCPU`, use processor-agnostic added modules (**CS8010**, error). If a module requires a specific processor, select a compatible specific output target instead. +- Match the output and added module's specific processor targets (**CS8011**, error). Rebuild the module for the intended output target, or change the output target if the deployment supports that choice. A processor-agnostic module also works with a processor-specific output. +- Reference an assembly built for a compatible target (**CS8012**, level-1 warning). Rebuild or replace an incompatible dependency, or select a compatible consumer target. A processor-agnostic dependency works with either neutral or specific output targets. An `AnyCPU` consumer can omit this warning for a processor-specific dependency; that absence doesn't guarantee compatibility with the eventual runtime process. + +These diagnostics concern the compilation as a whole. **CS8012** appears during output generation, so build the project rather than relying on editor diagnostics. + +For the following compilation-only examples, use a Roslyn C# compiler with your target framework's reference assemblies configured. Multi-module runtime support depends on the target environment. Save these declarations as `Sensor.cs` and `Reader.cs`, respectively: + +```csharp +public class Sensor { } +``` + +```csharp +public class Reader { public Sensor Read() => new Sensor(); } +``` + +Create an x86 module, then attempt to include it in neutral and x64 outputs: + +```console +csc /target:module /platform:x86 /out:Sensor.netmodule Sensor.cs +csc /target:library /platform:anycpu /addmodule:Sensor.netmodule /out:Reader.dll Reader.cs +csc /target:library /platform:x64 /addmodule:Sensor.netmodule /out:Reader.dll Reader.cs +``` + +The second command reports **CS8010**; the third reports **CS8011**. To produce an x64 assembly, rebuild the module for x64, then compile the consumer again: + +```console +csc /target:module /platform:x64 /out:Sensor.netmodule Sensor.cs +csc /target:library /platform:x64 /addmodule:Sensor.netmodule /out:Reader.dll Reader.cs +``` + +For the referenced-assembly case, the following commands report **CS8012**, not a module error: + +```console +csc /target:library /platform:x86 /out:Sensor.dll Sensor.cs +csc /target:library /platform:x64 /reference:Sensor.dll /out:Reader.dll Reader.cs +``` + +To keep the x64 consumer, rebuild the dependency for x64 and recompile: + +```console +csc /target:library /platform:x64 /out:Sensor.dll Sensor.cs +csc /target:library /platform:x64 /reference:Sensor.dll /out:Reader.dll Reader.cs +``` + +Both corrections remove the intended diagnostics without suppression. Choose neutral targets only when the inputs and intended deployment support them. diff --git a/docs/csharp/language-reference/toc.yml b/docs/csharp/language-reference/toc.yml index 6258248b58828..5e036521f6298 100644 --- a/docs/csharp/language-reference/toc.yml +++ b/docs/csharp/language-reference/toc.yml @@ -518,8 +518,8 @@ items: displayName: > CS0012, CS0234, CS0246, CS0400, CS0731, CS1068, CS1069, CS1070, CS1509, CS1542, CS1683, CS1704, CS1714, CS1760, CS7008, CS7041, CS7061, CS7068, CS7069, CS7071, - CS7079, CS7086, CS7087, CS7098, CS8004, CS8005, CS8006, CS8007, CS8008, CS8014, - CS8015, CS8090, CS8203, CS8206, CS8356, CS9286 + CS7079, CS7086, CS7087, CS7098, CS8004, CS8005, CS8006, CS8007, CS8008, CS8010, + CS8011, CS8012, CS8014, CS8015, CS8090, CS8203, CS8206, CS8356, CS9286 - name: Assembly signing href: ./compiler-messages/assembly-signing-errors.md displayName: > diff --git a/docs/csharp/misc/sorry-we-don-t-have-specifics-on-this-csharp-error.md b/docs/csharp/misc/sorry-we-don-t-have-specifics-on-this-csharp-error.md index 89773196234d5..41772b31d749a 100644 --- a/docs/csharp/misc/sorry-we-don-t-have-specifics-on-this-csharp-error.md +++ b/docs/csharp/misc/sorry-we-don-t-have-specifics-on-this-csharp-error.md @@ -76,9 +76,6 @@ f1_keywords: - "CS7101" # build only diagnostic - "CS7103" - "CS8009" - - "CS8010" # build only diagnostic - - "CS8011" # build only diagnostic - - "CS8012" - "CS8013" # build only diagnostic - "CS8016" - "CS8017" diff --git a/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst.Test/MakeConst.Test.csproj b/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst.Test/MakeConst.Test.csproj index 007ecb78cd003..99759c8751138 100644 --- a/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst.Test/MakeConst.Test.csproj +++ b/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst.Test/MakeConst.Test.csproj @@ -1,7 +1,7 @@ - + - netcoreapp3.1 + net11.0 true true diff --git a/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst/MakeConst.csproj b/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst/MakeConst.csproj index 135f5ccaa4011..aae3116c5e0c8 100644 --- a/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst/MakeConst.csproj +++ b/docs/csharp/roslyn-sdk/tutorials/snippets/how-to-write-csharp-analyzer-code-fix/MakeConst/MakeConst/MakeConst.csproj @@ -6,6 +6,7 @@ *$(MSBuildProjectFile)* + true diff --git a/docs/csharp/whats-new/csharp-13.md b/docs/csharp/whats-new/csharp-13.md index e63f693a3ab87..ad0b8119c87ee 100644 --- a/docs/csharp/whats-new/csharp-13.md +++ b/docs/csharp/whats-new/csharp-13.md @@ -2,6 +2,7 @@ title: What's new in C# 13 description: "Discover what's new in C# 13, including params collections, a new lock object, ref struct interfaces, partial properties, and more. Try examples in your code." ms.date: 11/18/2025 +ms.update-cycle: 3650-days ms.topic: whats-new --- # What's new in C# 13 diff --git a/docs/fsharp/whats-new/fsharp-45.md b/docs/fsharp/whats-new/fsharp-45.md index a81226aa1d5d2..61f75c245bc6b 100644 --- a/docs/fsharp/whats-new/fsharp-45.md +++ b/docs/fsharp/whats-new/fsharp-45.md @@ -2,6 +2,7 @@ title: What's new in F# 4.5 - F# Guide description: Get an overview of the new features available in F# 4.5. ms.date: 11/27/2019 +ms.update-cycle: 3650-days ms.topic: whats-new --- # What's new in F# 4.5 diff --git a/docs/fsharp/whats-new/fsharp-46.md b/docs/fsharp/whats-new/fsharp-46.md index e52796f8d1fc1..75aca73561190 100644 --- a/docs/fsharp/whats-new/fsharp-46.md +++ b/docs/fsharp/whats-new/fsharp-46.md @@ -2,6 +2,7 @@ title: What's new in F# 4.6 - F# Guide description: Get an overview of the new features available in F# 4.6. ms.date: 11/27/2019 +ms.update-cycle: 3650-days ms.topic: whats-new --- # What's new in F# 4.6 diff --git a/docs/fsharp/whats-new/fsharp-47.md b/docs/fsharp/whats-new/fsharp-47.md index 6d191ca5c1182..0b1cc8264fc66 100644 --- a/docs/fsharp/whats-new/fsharp-47.md +++ b/docs/fsharp/whats-new/fsharp-47.md @@ -2,6 +2,7 @@ title: What's new in F# 4.7 - F# Guide description: Get an overview of the new features available in F# 4.7. ms.date: 11/27/2019 +ms.update-cycle: 3650-days ms.topic: whats-new --- # What's new in F# 4.7 diff --git a/docs/fsharp/whats-new/fsharp-50.md b/docs/fsharp/whats-new/fsharp-50.md index 2154d9ca392de..bbd1de03e4fea 100644 --- a/docs/fsharp/whats-new/fsharp-50.md +++ b/docs/fsharp/whats-new/fsharp-50.md @@ -2,6 +2,7 @@ title: What's new in F# 5 - F# Guide description: Get an overview of the new features available in F# 5. ms.date: 11/04/2021 +ms.update-cycle: 3650-days ms.topic: whats-new --- # What's new in F# 5 diff --git a/docs/fsharp/whats-new/fsharp-6.md b/docs/fsharp/whats-new/fsharp-6.md index 7ce43de85b8ee..22a9c6b6c3f82 100644 --- a/docs/fsharp/whats-new/fsharp-6.md +++ b/docs/fsharp/whats-new/fsharp-6.md @@ -2,6 +2,7 @@ title: What's new in F# 6 - F# Guide description: Get an overview of the new features available in F# 6. ms.date: 10/13/2021 +ms.update-cycle: 3650-days ms.topic: whats-new --- # What's new in F# 6 diff --git a/docs/fsharp/whats-new/fsharp-7.md b/docs/fsharp/whats-new/fsharp-7.md index 5fb6274d55a00..244b65756400e 100644 --- a/docs/fsharp/whats-new/fsharp-7.md +++ b/docs/fsharp/whats-new/fsharp-7.md @@ -2,6 +2,7 @@ title: What's new in F# 7 - F# Guide description: Find information on the new features available in F# 7. ms.date: 11/17/2023 +ms.update-cycle: 3650-days ms.topic: whats-new ai-usage: ai-assisted --- diff --git a/docs/fsharp/whats-new/fsharp-8.md b/docs/fsharp/whats-new/fsharp-8.md index 159af693fccae..fdcbe71df8bfa 100644 --- a/docs/fsharp/whats-new/fsharp-8.md +++ b/docs/fsharp/whats-new/fsharp-8.md @@ -2,6 +2,7 @@ title: What's new in F# 8 - F# Guide description: Find information on the new features available in F# 8. ms.date: 11/17/2023 +ms.update-cycle: 3650-days ms.topic: whats-new ai-usage: ai-assisted --- diff --git a/docs/fsharp/whats-new/fsharp-9.md b/docs/fsharp/whats-new/fsharp-9.md index 061bf597b6550..1b3cd639e8425 100644 --- a/docs/fsharp/whats-new/fsharp-9.md +++ b/docs/fsharp/whats-new/fsharp-9.md @@ -2,6 +2,7 @@ title: What's new in F# 9 - F# Guide description: Find information on the new features available in F# 9. ms.date: 11/12/2024 +ms.update-cycle: 3650-days ms.topic: whats-new --- diff --git a/samples/snippets/csharp/roslyn-sdk/SyntaxTransformationQuickStart/ConstructionCS/ConstructionCS.csproj b/samples/snippets/csharp/roslyn-sdk/SyntaxTransformationQuickStart/ConstructionCS/ConstructionCS.csproj index 0dead52bed950..b918a908fcc90 100644 --- a/samples/snippets/csharp/roslyn-sdk/SyntaxTransformationQuickStart/ConstructionCS/ConstructionCS.csproj +++ b/samples/snippets/csharp/roslyn-sdk/SyntaxTransformationQuickStart/ConstructionCS/ConstructionCS.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.1 + net11.0 diff --git a/samples/snippets/csharp/roslyn-sdk/SyntaxTransformationQuickStart/TransformationCS/TransformationCS.csproj b/samples/snippets/csharp/roslyn-sdk/SyntaxTransformationQuickStart/TransformationCS/TransformationCS.csproj index 3d772ece027e9..dd0b522258f5c 100644 --- a/samples/snippets/csharp/roslyn-sdk/SyntaxTransformationQuickStart/TransformationCS/TransformationCS.csproj +++ b/samples/snippets/csharp/roslyn-sdk/SyntaxTransformationQuickStart/TransformationCS/TransformationCS.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.1 + net11.0