Add InternalAPI tracking to all projects with PublicAPI - #9752

Merged
Amaury Levé (Evangelink) merged 7 commits into
mainfrom
dev/add-internalapi-tracking
Jul 9, 2026
Merged

Add InternalAPI tracking to all projects with PublicAPI#9752
Amaury Levé (Evangelink) merged 7 commits into
mainfrom
dev/add-internalapi-tracking

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Summary

Adds InternalAPI tracking to every source project that already tracks a public API surface, so the Roslyn public/internal API analyzers (RS0051–RS0061) validate the internal surface too — mirroring how PublicAPI.Shipped.txt / PublicAPI.Unshipped.txt work today.

What changed

  • New InternalAPI files for all 25 projects with a PublicAPI folder, mirroring the exact layout — including framework-specific subfolders (net/, net9.0/, net462/, net8.0-windows*, uwp/, uap10.0.16299/, …) and root-level files for the two projects (MSBuild, VSTestBridge) that keep API files at project root.
  • Wired into each .csproj as AdditionalFiles, with the same Condition expressions as the corresponding PublicAPI entries.
  • Baselined the current internal API surface into InternalAPI.Shipped.txt (leaving Unshipped empty), matching the repo's post-release PublicAPI state. Entries were generated with the analyzer's own code fix (dotnet format analyzers --diagnostics RS0051 --include-generated), which also captures RESX-generated resource classes and compiler-emitted attributes.
  • eng/mark-shipped.ps1 now processes InternalAPI files in addition to PublicAPI (parameterized prefix; also fixes a PublicApiPublicAPI glob casing bug).
  • .editorconfig enables the internal-API analyzer diagnostics (RS0051–RS0061), which is what makes this tracking active.

Verification

Authoritative --no-incremental / /t:Rebuild builds across all reachable TFMs (netstandard2.0, net8.0, net9.0, net462, net8.0-windows, net9.0-windows) for all 25 projects report 0 RS0051. PublicAPI files are untouched.

Note

The uap10.0.16299 TFM cannot be compiled in every environment (needs the UWP/Windows XAML workload); its internal deltas were populated from build output and verified not to regress the shared-folder ModernUwp (net9.0-windows) leg.

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

Introduce InternalAPI.Shipped.txt / InternalAPI.Unshipped.txt files (mirroring
the existing PublicAPI folder layout, including framework-specific subfolders)
for every source project that already tracks its public API surface, and wire
them into each project as AdditionalFiles so the Roslyn public/internal API
analyzers (RS0051-RS0061) validate the internal surface too.
- Baseline the current internal API surface into InternalAPI.Shipped.txt
(Unshipped left empty), matching the repo's post-release PublicAPI state.
- Update eng/mark-shipped.ps1 to also process InternalAPI files.
- .editorconfig enables the internal-API analyzer diagnostics (RS0051-RS0061).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 19:33
CopilotAI reviewed Jul 8, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

🤖 Automated review by GitHub Copilot. Generated by the Expert Code Review workflow. To request a follow-up action, reply by tagging @copilot directly.

Review Summary

Clean, well-structured infrastructure PR. All 22 review dimensions assessed — no blocking issues found.

Key Findings

DimensionAssessment
Completeness✅ All 25 projects with PublicAPI tracking now have matching InternalAPI tracking. Folder structures (TFM subfolders, root-level files) mirror exactly.
.editorconfig✅ RS0051–RS0061 correctly enabled. RS0057 (oblivious types) reasonably suppressed for polyfill/compiler-generated code.
eng/mark-shipped.ps1✅ Correctly parameterized via $Prefix. The PublicApiPublicAPI casing fix resolves a latent bug on case-sensitive filesystems (Linux + PowerShell 7). The regex '\.Shipped\.txt$' correctly extracts the prefix.
.csproj wiringAdditionalFiles entries use the same Condition expressions as their corresponding PublicAPI entries. MSBuild/VSTestBridge correctly reference root-level files; other projects use InternalAPI/ subfolders.
InternalAPI content✅ Shipped files are populated; Unshipped files all contain only #nullable enable. TPEXP/MSTESTEXP prefixed entries are correctly placed for internal (not public) members. Compiler-emitted polyfill types (EmbeddedAttribute, CompilerLoweringPreserveAttribute, etc.) are expected per the analyzer's code-fix output.
Backward Compatibility✅ No public API surface changes. New analyzer warnings (RS0051+) are additive and enforcement-only for maintainers.

Notes

  • The Write-Host "Processing $shippedFilePath" improvement gives better diagnostic output (shows full path including prefix) — nice QoL improvement.
  • The Get-ChildItem -Include array pattern ("PublicAPI.Shipped.txt", "InternalAPI.Shipped.txt") correctly invokes Set-AsShipped once per matching file with the right prefix.
  • No issues with cross-TFM correctness, naming conventions, or scope creep.

@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 431.7 AIC · ⌖ 8.36 AIC · ⊞ 7.3K ·

Comment threadsrc/Platform/Microsoft.Testing.Platform/InternalAPI/InternalAPI.Shipped.txt Outdated
Comment thread.editorconfig
CI surfaced RS0051 failures because generated code was baked into the
InternalAPI files: BuildInfo version constants embed the build version
(e.g. "1.0.0-ci" on CI vs "2.4.0-dev" locally), plus RESX-generated resource
accessors and *.g.cs content-file sources.
- .editorconfig: disable the internal API analyzers (RS0051-RS0061) for
generated code (*.g.cs and artifacts/obj/**/*.cs).
- Regenerate InternalAPI baselines without the version-stamped / generated
symbols, while keeping real auto-generated-marked API (Polyfills attributes).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 20:29

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 97/99 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 221.4 AIC · ⌖ 7.47 AIC · ⊞ 7.3K ·

Comment thread.editorconfig
…TestBridge
The regenerated InternalAPI.Shipped.txt baselines for these three extensions were missing the shared polyfill symbols (EmbeddedAttribute, CompilerLoweringPreserveAttribute, Polyfills.Polyfill OS helpers, HashHelpers), causing RS0051 build failures. Added them in canonical sorted order to match the other tracked projects.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 20:52

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 97/99 changed files
  • Comments generated: 0 new
  • Review effort level: Low

@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 136.9 AIC · ⌖ 7.15 AIC · ⊞ 7.3K ·

Comment threadsrc/Platform/Microsoft.Testing.Platform/InternalAPI/InternalAPI.Shipped.txt Outdated
…nal API
ProtocolVersion = PlatformVersion.Version inlines the build-time version stamp, which differs by environment (2.4.0-dev locally vs 2.4.0-ci on CI). Tracking its literal value in InternalAPI.Shipped.txt made the internal API analyzer non-deterministic and failed CI (Linux Debug) with RS0051. Suppress RS0051 at the declaration and drop the version-valued baseline entry, consistent with the PR's exclusion of version-stamped constants.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 21:24

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 98/100 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 335.7 AIC · ⌖ 7.69 AIC · ⊞ 7.3K ·

Comment threadsrc/Platform/Microsoft.Testing.Platform/InternalAPI/InternalAPI.Shipped.txt Outdated
…onst
The raw string literal const embeds the source file's line endings (CRLF on Windows where the baseline was generated, LF on Linux CI), so its compile-time value is non-deterministic across platforms and failed CI (Linux Debug) with RS0051. Suppress RS0051 at the declaration and drop the CRLF-valued baseline entry, matching the ProtocolVersion fix.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 21:55

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 99/101 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Build Failure Analysis

Summary — All 151 build errors are RS0051 (Internal API analyzer: "Symbol is not part of the declared API") in MSTest.TestAdapter.csproj, caused by a merge conflict with main — the PR's InternalAPI.Shipped.txt baseline was generated from an older main that didn't yet contain the Native MTP integration types.

Root cause: PR branch is stale — missing new TestingPlatformAdapter symbols from main

The PR was branched from commit 1300ae0 (Jul 8, 14:52). After branching, several PRs landed on main that added new internal types to src/Adapter/MSTest.TestAdapter/TestingPlatformAdapter/:

PRCommitAdded
#974318c741fPhases 3–5: MSTestFilterContext, MSTestRunContext, MSTestDiscoveryContext, MSTestFilterContextBase
#9748279d3b8Phase 6a: MSTestFrameworkHandle, MSTestRunSettings, MSTestRunSettingsConfigurationProvider, MSTestRunSettingsEnvironmentVariableProvider, MSTestRunSettingsCommandLineOptionsProvider, MSTestTestRunParametersCommandLineOptionsProvider, MSTestTestCaseFilterCommandLineOptionsProvider, IMSTestTrxReportCapability, MSTestTestFramework
#9749cf0dea9Follow-up simplification to the above

When CI merges the PR head (d2d9f5f) into latest main (52192c9), the merged code includes both:

  1. ✅ The InternalAPI tracking infrastructure (from this PR)
  2. ❌ The new TestingPlatformAdapter symbols (from main) — which are not declared in InternalAPI.Shipped.txt or InternalAPI.Unshipped.txt

This triggers 151 RS0051 errors for undeclared internal API symbols.

Affected types (12 types + their members = 151 errors total):

  • IMSTestTrxReportCapability
  • MSTestFilterContextBase
  • MSTestRunContext
  • MSTestDiscoveryContext
  • MSTestFrameworkHandle
  • MSTestRunSettings
  • MSTestRunSettingsConfigurationProvider
  • MSTestRunSettingsEnvironmentVariableProvider
  • MSTestRunSettingsCommandLineOptionsProvider
  • MSTestTestCaseFilterCommandLineOptionsProvider
  • MSTestTestRunParametersCommandLineOptionsProvider
  • MSTestTestFramework

Proposed fix

Rebase the PR onto current main and regenerate the baseline:

git fetch origin main
git rebase origin/main
# Regenerate the InternalAPI baseline for the TestAdapter
dotnet format analyzers --diagnostics RS0051 --include-generated \
--project src/Adapter/MSTest.TestAdapter/MSTest.TestAdapter.csproj

This will add the newly-introduced symbols to src/Adapter/MSTest.TestAdapter/InternalAPI/InternalAPI.Shipped.txt (since the intent is to baseline the current surface).

Note: The same rebase should be verified against the UWP-specific InternalAPI/uwp/InternalAPI.Shipped.txt if those TFMs include the new TestingPlatformAdapter types.


Build overview
  • Build status: FAILED
  • Duration: 200.1s
  • MSBuild: 18.8.0-preview-26302-115
  • Projects: 49 total; 3 failed (Build.proj, NonWindowsTests.slnf, MSTest.TestAdapter.csproj)
  • Errors: 151 (all RS0051)
  • Warnings: 0
  • Configuration: Debug, Linux (non-Windows TFMs only)
  • Failed target:CoreCompile (Csc task) in MSTest.TestAdapter.csproj
All MSBuild errors (151 — all RS0051)
CodeFileLineSymbol (abbreviated)
RS0051IMSTestTrxReportCapability.cs14IMSTestTrxReportCapability
RS0051IMSTestTrxReportCapability.cs16IMSTestTrxReportCapability.IsTrxEnabled
RS0051MSTestFilterContext.cs27MSTestFilterContextBase
RS0051MSTestFilterContext.cs32MSTestFilterContextBase..ctor(...)
RS0051MSTestFilterContext.cs51MSTestFilterContextBase.RunSettings
RS0051MSTestFilterContext.cs72MSTestFilterContextBase.GetTestCaseFilter(...)
RS0051MSTestFilterContext.cs192MSTestRunContext
RS0051MSTestFilterContext.cs194MSTestRunContext..ctor(...)
RS0051MSTestFilterContext.cs201–211MSTestRunContext properties
RS0051MSTestFilterContext.cs218–220MSTestDiscoveryContext
RS0051MSTestFrameworkHandle.cs20–33MSTestFrameworkHandle + members
RS0051MSTestRunSettings.cs25–60MSTestRunSettings + members
RS0051MSTestRunSettingsConfigurationProvider.cs19–35MSTestRunSettingsConfigurationProvider + members
RS0051MSTestRunSettingsEnvironmentVariableProvider.cs21–103MSTestRunSettingsEnvironmentVariableProvider + members
RS0051MSTestRunSettingsCommandLineOptionsProvider.cs21–31MSTestRunSettingsCommandLineOptionsProvider + members
RS0051MSTestTestCaseFilterCommandLineOptionsProvider.cs17–21MSTestTestCaseFilterCommandLineOptionsProvider + members
RS0051MSTestTestRunParametersCommandLineOptionsProvider.cs18–27MSTestTestRunParametersCommandLineOptionsProvider + members
RS0051MSTestTestFramework.cs41MSTestTestFramework

All files are under src/Adapter/MSTest.TestAdapter/TestingPlatformAdapter/ — these exist in main but not in the PR branch.


🤖 Generated by the Build Failure Analysis workflow using (a href="(dev.azure.com/redacted) · commit d2d9f5f

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 321.4 AIC · ⌖ 7.02 AIC · ⊞ 7.3K · [◷]( · )

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 321.4 AIC · ⌖ 7.02 AIC · ⊞ 7.3K ·

CopilotAI added 2 commits July 9, 2026 00:48
Merging current main brought in the Phase 6a native MTP adapter (dotnet/testfx#9748) TestingPlatformAdapter types, whose internal API was not in the baseline, causing 75 RS0051 errors per TFM in the PR merge build. Added the 75 entries to MSTest.TestAdapter's InternalAPI.Shipped.txt in canonical sorted order.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 22:55

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 99/101 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@Evangelink
Amaury Levé (Evangelink) enabled auto-merge (squash) July 9, 2026 09:20
@Evangelink
Amaury Levé (Evangelink) enabled auto-merge (squash) July 9, 2026 09:20
@Evangelink
Amaury Levé (Evangelink) merged commit 1e92d89 into mainJul 9, 2026
89 checks passed
@Evangelink
Amaury Levé (Evangelink) deleted the dev/add-internalapi-tracking branch July 9, 2026 09:21
Amaury Levé (Evangelink) added a commit that referenced this pull request Jul 9, 2026
…RS0051
Microsoft.Testing.Platform's BaseSerializer.ReadFields and WriteListPayload<T>
(added by #9774) were never added to InternalAPI.Unshipped.txt, so once #9752
enabled RS0051 internal-API enforcement both landed on main and left main red.
This foundational project's failure cascades and blocks the whole build, so
track the two methods in the base InternalAPI.Unshipped.txt (the diagnostic
fires on netstandard2.0 too, so it belongs in the base file, not net/).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Amaury Levé (Evangelink) added a commit that referenced this pull request Jul 9, 2026
…ternalAPI
With Microsoft.Testing.Platform now building, MSTest.TestAdapter compiles and surfaces its own RS0051 failures for the internal PlatformServicesConfigurationAdapter type (added while InternalAPI tracking was being rolled out in #9752). Declare the type, its constructor and indexer in the non-UWP InternalAPI.Unshipped.txt so the adapter builds.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Amaury Levé (Evangelink) added a commit that referenced this pull request Jul 28, 2026
- Bump System.Threading.Tasks.Extensions 4.5.4 -> 4.6.3. Microsoft.ApplicationInsights
3.1.2 -> Azure.Monitor.OpenTelemetry.Exporter -> Azure.Core 1.54.0 requires >= 4.6.3,
which made every .NETFramework project referencing MSTest.TestAdapter fail restore with
NU1605 (Windows-only, because the Linux/macOS legs skip the net462 targets).
- Declare the new/changed internal APIs (LocalFileTelemetryClient,
AppInsightTelemetryClientFactory ctor, AppInsightsProvider.LocalExportPathEnvVar,
TelemetryProperties.VersionValue = "21") in the InternalAPI.Unshipped.txt baselines
introduced by #9752, which landed on main after this PR was opened.
- Add the required UTF-8 BOM to LocalFileTelemetryClient.cs and
LocalFileTelemetryClientTests.cs.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e947c36-e52a-4ba8-8185-cd338ae24060
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state/needs-reviewAwaiting review from the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@Evangelink@0101
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Add InternalAPI tracking to all projects with PublicAPI - #9752

Merged
Amaury Levé (Evangelink) merged 7 commits into
mainfrom
dev/add-internalapi-tracking
Jul 9, 2026
Merged

Add InternalAPI tracking to all projects with PublicAPI#9752
Amaury Levé (Evangelink) merged 7 commits into
mainfrom
dev/add-internalapi-tracking

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Summary

Adds InternalAPI tracking to every source project that already tracks a public API surface, so the Roslyn public/internal API analyzers (RS0051–RS0061) validate the internal surface too — mirroring how PublicAPI.Shipped.txt / PublicAPI.Unshipped.txt work today.

What changed

  • New InternalAPI files for all 25 projects with a PublicAPI folder, mirroring the exact layout — including framework-specific subfolders (net/, net9.0/, net462/, net8.0-windows*, uwp/, uap10.0.16299/, …) and root-level files for the two projects (MSBuild, VSTestBridge) that keep API files at project root.
  • Wired into each .csproj as AdditionalFiles, with the same Condition expressions as the corresponding PublicAPI entries.
  • Baselined the current internal API surface into InternalAPI.Shipped.txt (leaving Unshipped empty), matching the repo's post-release PublicAPI state. Entries were generated with the analyzer's own code fix (dotnet format analyzers --diagnostics RS0051 --include-generated), which also captures RESX-generated resource classes and compiler-emitted attributes.
  • eng/mark-shipped.ps1 now processes InternalAPI files in addition to PublicAPI (parameterized prefix; also fixes a PublicApiPublicAPI glob casing bug).
  • .editorconfig enables the internal-API analyzer diagnostics (RS0051–RS0061), which is what makes this tracking active.

Verification

Authoritative --no-incremental / /t:Rebuild builds across all reachable TFMs (netstandard2.0, net8.0, net9.0, net462, net8.0-windows, net9.0-windows) for all 25 projects report 0 RS0051. PublicAPI files are untouched.

Note

The uap10.0.16299 TFM cannot be compiled in every environment (needs the UWP/Windows XAML workload); its internal deltas were populated from build output and verified not to regress the shared-folder ModernUwp (net9.0-windows) leg.

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

Introduce InternalAPI.Shipped.txt / InternalAPI.Unshipped.txt files (mirroring
the existing PublicAPI folder layout, including framework-specific subfolders)
for every source project that already tracks its public API surface, and wire
them into each project as AdditionalFiles so the Roslyn public/internal API
analyzers (RS0051-RS0061) validate the internal surface too.
- Baseline the current internal API surface into InternalAPI.Shipped.txt
(Unshipped left empty), matching the repo's post-release PublicAPI state.
- Update eng/mark-shipped.ps1 to also process InternalAPI files.
- .editorconfig enables the internal-API analyzer diagnostics (RS0051-RS0061).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 19:33
CopilotAI reviewed Jul 8, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

🤖 Automated review by GitHub Copilot. Generated by the Expert Code Review workflow. To request a follow-up action, reply by tagging @copilot directly.

Review Summary

Clean, well-structured infrastructure PR. All 22 review dimensions assessed — no blocking issues found.

Key Findings

DimensionAssessment
Completeness✅ All 25 projects with PublicAPI tracking now have matching InternalAPI tracking. Folder structures (TFM subfolders, root-level files) mirror exactly.
.editorconfig✅ RS0051–RS0061 correctly enabled. RS0057 (oblivious types) reasonably suppressed for polyfill/compiler-generated code.
eng/mark-shipped.ps1✅ Correctly parameterized via $Prefix. The PublicApiPublicAPI casing fix resolves a latent bug on case-sensitive filesystems (Linux + PowerShell 7). The regex '\.Shipped\.txt$' correctly extracts the prefix.
.csproj wiringAdditionalFiles entries use the same Condition expressions as their corresponding PublicAPI entries. MSBuild/VSTestBridge correctly reference root-level files; other projects use InternalAPI/ subfolders.
InternalAPI content✅ Shipped files are populated; Unshipped files all contain only #nullable enable. TPEXP/MSTESTEXP prefixed entries are correctly placed for internal (not public) members. Compiler-emitted polyfill types (EmbeddedAttribute, CompilerLoweringPreserveAttribute, etc.) are expected per the analyzer's code-fix output.
Backward Compatibility✅ No public API surface changes. New analyzer warnings (RS0051+) are additive and enforcement-only for maintainers.

Notes

  • The Write-Host "Processing $shippedFilePath" improvement gives better diagnostic output (shows full path including prefix) — nice QoL improvement.
  • The Get-ChildItem -Include array pattern ("PublicAPI.Shipped.txt", "InternalAPI.Shipped.txt") correctly invokes Set-AsShipped once per matching file with the right prefix.
  • No issues with cross-TFM correctness, naming conventions, or scope creep.

@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 431.7 AIC · ⌖ 8.36 AIC · ⊞ 7.3K ·

Comment threadsrc/Platform/Microsoft.Testing.Platform/InternalAPI/InternalAPI.Shipped.txt Outdated
Comment thread.editorconfig
CI surfaced RS0051 failures because generated code was baked into the
InternalAPI files: BuildInfo version constants embed the build version
(e.g. "1.0.0-ci" on CI vs "2.4.0-dev" locally), plus RESX-generated resource
accessors and *.g.cs content-file sources.
- .editorconfig: disable the internal API analyzers (RS0051-RS0061) for
generated code (*.g.cs and artifacts/obj/**/*.cs).
- Regenerate InternalAPI baselines without the version-stamped / generated
symbols, while keeping real auto-generated-marked API (Polyfills attributes).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 20:29

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 97/99 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 221.4 AIC · ⌖ 7.47 AIC · ⊞ 7.3K ·

Comment thread.editorconfig
…TestBridge
The regenerated InternalAPI.Shipped.txt baselines for these three extensions were missing the shared polyfill symbols (EmbeddedAttribute, CompilerLoweringPreserveAttribute, Polyfills.Polyfill OS helpers, HashHelpers), causing RS0051 build failures. Added them in canonical sorted order to match the other tracked projects.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 20:52

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 97/99 changed files
  • Comments generated: 0 new
  • Review effort level: Low

@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 136.9 AIC · ⌖ 7.15 AIC · ⊞ 7.3K ·

Comment threadsrc/Platform/Microsoft.Testing.Platform/InternalAPI/InternalAPI.Shipped.txt Outdated
…nal API
ProtocolVersion = PlatformVersion.Version inlines the build-time version stamp, which differs by environment (2.4.0-dev locally vs 2.4.0-ci on CI). Tracking its literal value in InternalAPI.Shipped.txt made the internal API analyzer non-deterministic and failed CI (Linux Debug) with RS0051. Suppress RS0051 at the declaration and drop the version-valued baseline entry, consistent with the PR's exclusion of version-stamped constants.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 21:24

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 98/100 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 335.7 AIC · ⌖ 7.69 AIC · ⊞ 7.3K ·

Comment threadsrc/Platform/Microsoft.Testing.Platform/InternalAPI/InternalAPI.Shipped.txt Outdated
…onst
The raw string literal const embeds the source file's line endings (CRLF on Windows where the baseline was generated, LF on Linux CI), so its compile-time value is non-deterministic across platforms and failed CI (Linux Debug) with RS0051. Suppress RS0051 at the declaration and drop the CRLF-valued baseline entry, matching the ProtocolVersion fix.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 21:55

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 99/101 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Build Failure Analysis

Summary — All 151 build errors are RS0051 (Internal API analyzer: "Symbol is not part of the declared API") in MSTest.TestAdapter.csproj, caused by a merge conflict with main — the PR's InternalAPI.Shipped.txt baseline was generated from an older main that didn't yet contain the Native MTP integration types.

Root cause: PR branch is stale — missing new TestingPlatformAdapter symbols from main

The PR was branched from commit 1300ae0 (Jul 8, 14:52). After branching, several PRs landed on main that added new internal types to src/Adapter/MSTest.TestAdapter/TestingPlatformAdapter/:

PRCommitAdded
#974318c741fPhases 3–5: MSTestFilterContext, MSTestRunContext, MSTestDiscoveryContext, MSTestFilterContextBase
#9748279d3b8Phase 6a: MSTestFrameworkHandle, MSTestRunSettings, MSTestRunSettingsConfigurationProvider, MSTestRunSettingsEnvironmentVariableProvider, MSTestRunSettingsCommandLineOptionsProvider, MSTestTestRunParametersCommandLineOptionsProvider, MSTestTestCaseFilterCommandLineOptionsProvider, IMSTestTrxReportCapability, MSTestTestFramework
#9749cf0dea9Follow-up simplification to the above

When CI merges the PR head (d2d9f5f) into latest main (52192c9), the merged code includes both:

  1. ✅ The InternalAPI tracking infrastructure (from this PR)
  2. ❌ The new TestingPlatformAdapter symbols (from main) — which are not declared in InternalAPI.Shipped.txt or InternalAPI.Unshipped.txt

This triggers 151 RS0051 errors for undeclared internal API symbols.

Affected types (12 types + their members = 151 errors total):

  • IMSTestTrxReportCapability
  • MSTestFilterContextBase
  • MSTestRunContext
  • MSTestDiscoveryContext
  • MSTestFrameworkHandle
  • MSTestRunSettings
  • MSTestRunSettingsConfigurationProvider
  • MSTestRunSettingsEnvironmentVariableProvider
  • MSTestRunSettingsCommandLineOptionsProvider
  • MSTestTestCaseFilterCommandLineOptionsProvider
  • MSTestTestRunParametersCommandLineOptionsProvider
  • MSTestTestFramework

Proposed fix

Rebase the PR onto current main and regenerate the baseline:

git fetch origin main
git rebase origin/main
# Regenerate the InternalAPI baseline for the TestAdapter
dotnet format analyzers --diagnostics RS0051 --include-generated \
--project src/Adapter/MSTest.TestAdapter/MSTest.TestAdapter.csproj

This will add the newly-introduced symbols to src/Adapter/MSTest.TestAdapter/InternalAPI/InternalAPI.Shipped.txt (since the intent is to baseline the current surface).

Note: The same rebase should be verified against the UWP-specific InternalAPI/uwp/InternalAPI.Shipped.txt if those TFMs include the new TestingPlatformAdapter types.


Build overview
  • Build status: FAILED
  • Duration: 200.1s
  • MSBuild: 18.8.0-preview-26302-115
  • Projects: 49 total; 3 failed (Build.proj, NonWindowsTests.slnf, MSTest.TestAdapter.csproj)
  • Errors: 151 (all RS0051)
  • Warnings: 0
  • Configuration: Debug, Linux (non-Windows TFMs only)
  • Failed target:CoreCompile (Csc task) in MSTest.TestAdapter.csproj
All MSBuild errors (151 — all RS0051)
CodeFileLineSymbol (abbreviated)
RS0051IMSTestTrxReportCapability.cs14IMSTestTrxReportCapability
RS0051IMSTestTrxReportCapability.cs16IMSTestTrxReportCapability.IsTrxEnabled
RS0051MSTestFilterContext.cs27MSTestFilterContextBase
RS0051MSTestFilterContext.cs32MSTestFilterContextBase..ctor(...)
RS0051MSTestFilterContext.cs51MSTestFilterContextBase.RunSettings
RS0051MSTestFilterContext.cs72MSTestFilterContextBase.GetTestCaseFilter(...)
RS0051MSTestFilterContext.cs192MSTestRunContext
RS0051MSTestFilterContext.cs194MSTestRunContext..ctor(...)
RS0051MSTestFilterContext.cs201–211MSTestRunContext properties
RS0051MSTestFilterContext.cs218–220MSTestDiscoveryContext
RS0051MSTestFrameworkHandle.cs20–33MSTestFrameworkHandle + members
RS0051MSTestRunSettings.cs25–60MSTestRunSettings + members
RS0051MSTestRunSettingsConfigurationProvider.cs19–35MSTestRunSettingsConfigurationProvider + members
RS0051MSTestRunSettingsEnvironmentVariableProvider.cs21–103MSTestRunSettingsEnvironmentVariableProvider + members
RS0051MSTestRunSettingsCommandLineOptionsProvider.cs21–31MSTestRunSettingsCommandLineOptionsProvider + members
RS0051MSTestTestCaseFilterCommandLineOptionsProvider.cs17–21MSTestTestCaseFilterCommandLineOptionsProvider + members
RS0051MSTestTestRunParametersCommandLineOptionsProvider.cs18–27MSTestTestRunParametersCommandLineOptionsProvider + members
RS0051MSTestTestFramework.cs41MSTestTestFramework

All files are under src/Adapter/MSTest.TestAdapter/TestingPlatformAdapter/ — these exist in main but not in the PR branch.


🤖 Generated by the Build Failure Analysis workflow using (a href="(dev.azure.com/redacted) · commit d2d9f5f

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 321.4 AIC · ⌖ 7.02 AIC · ⊞ 7.3K · [◷]( · )

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 321.4 AIC · ⌖ 7.02 AIC · ⊞ 7.3K ·

CopilotAI added 2 commits July 9, 2026 00:48
Merging current main brought in the Phase 6a native MTP adapter (dotnet/testfx#9748) TestingPlatformAdapter types, whose internal API was not in the baseline, causing 75 RS0051 errors per TFM in the PR merge build. Added the 75 entries to MSTest.TestAdapter's InternalAPI.Shipped.txt in canonical sorted order.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 22:55

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 99/101 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@Evangelink
Amaury Levé (Evangelink) enabled auto-merge (squash) July 9, 2026 09:20
@Evangelink
Amaury Levé (Evangelink) enabled auto-merge (squash) July 9, 2026 09:20
@Evangelink
Amaury Levé (Evangelink) merged commit 1e92d89 into mainJul 9, 2026
89 checks passed
@Evangelink
Amaury Levé (Evangelink) deleted the dev/add-internalapi-tracking branch July 9, 2026 09:21
Amaury Levé (Evangelink) added a commit that referenced this pull request Jul 9, 2026
…RS0051
Microsoft.Testing.Platform's BaseSerializer.ReadFields and WriteListPayload<T>
(added by #9774) were never added to InternalAPI.Unshipped.txt, so once #9752
enabled RS0051 internal-API enforcement both landed on main and left main red.
This foundational project's failure cascades and blocks the whole build, so
track the two methods in the base InternalAPI.Unshipped.txt (the diagnostic
fires on netstandard2.0 too, so it belongs in the base file, not net/).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Amaury Levé (Evangelink) added a commit that referenced this pull request Jul 9, 2026
…ternalAPI
With Microsoft.Testing.Platform now building, MSTest.TestAdapter compiles and surfaces its own RS0051 failures for the internal PlatformServicesConfigurationAdapter type (added while InternalAPI tracking was being rolled out in #9752). Declare the type, its constructor and indexer in the non-UWP InternalAPI.Unshipped.txt so the adapter builds.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Amaury Levé (Evangelink) added a commit that referenced this pull request Jul 28, 2026
- Bump System.Threading.Tasks.Extensions 4.5.4 -> 4.6.3. Microsoft.ApplicationInsights
3.1.2 -> Azure.Monitor.OpenTelemetry.Exporter -> Azure.Core 1.54.0 requires >= 4.6.3,
which made every .NETFramework project referencing MSTest.TestAdapter fail restore with
NU1605 (Windows-only, because the Linux/macOS legs skip the net462 targets).
- Declare the new/changed internal APIs (LocalFileTelemetryClient,
AppInsightTelemetryClientFactory ctor, AppInsightsProvider.LocalExportPathEnvVar,
TelemetryProperties.VersionValue = "21") in the InternalAPI.Unshipped.txt baselines
introduced by #9752, which landed on main after this PR was opened.
- Add the required UTF-8 BOM to LocalFileTelemetryClient.cs and
LocalFileTelemetryClientTests.cs.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e947c36-e52a-4ba8-8185-cd338ae24060
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state/needs-reviewAwaiting review from the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@Evangelink@0101
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Add InternalAPI tracking to all projects with PublicAPI - #9752

Merged
Amaury Levé (Evangelink) merged 7 commits into
mainfrom
dev/add-internalapi-tracking
Jul 9, 2026
Merged

Add InternalAPI tracking to all projects with PublicAPI#9752
Amaury Levé (Evangelink) merged 7 commits into
mainfrom
dev/add-internalapi-tracking

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Summary

Adds InternalAPI tracking to every source project that already tracks a public API surface, so the Roslyn public/internal API analyzers (RS0051–RS0061) validate the internal surface too — mirroring how PublicAPI.Shipped.txt / PublicAPI.Unshipped.txt work today.

What changed

  • New InternalAPI files for all 25 projects with a PublicAPI folder, mirroring the exact layout — including framework-specific subfolders (net/, net9.0/, net462/, net8.0-windows*, uwp/, uap10.0.16299/, …) and root-level files for the two projects (MSBuild, VSTestBridge) that keep API files at project root.
  • Wired into each .csproj as AdditionalFiles, with the same Condition expressions as the corresponding PublicAPI entries.
  • Baselined the current internal API surface into InternalAPI.Shipped.txt (leaving Unshipped empty), matching the repo's post-release PublicAPI state. Entries were generated with the analyzer's own code fix (dotnet format analyzers --diagnostics RS0051 --include-generated), which also captures RESX-generated resource classes and compiler-emitted attributes.
  • eng/mark-shipped.ps1 now processes InternalAPI files in addition to PublicAPI (parameterized prefix; also fixes a PublicApiPublicAPI glob casing bug).
  • .editorconfig enables the internal-API analyzer diagnostics (RS0051–RS0061), which is what makes this tracking active.

Verification

Authoritative --no-incremental / /t:Rebuild builds across all reachable TFMs (netstandard2.0, net8.0, net9.0, net462, net8.0-windows, net9.0-windows) for all 25 projects report 0 RS0051. PublicAPI files are untouched.

Note

The uap10.0.16299 TFM cannot be compiled in every environment (needs the UWP/Windows XAML workload); its internal deltas were populated from build output and verified not to regress the shared-folder ModernUwp (net9.0-windows) leg.

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

Introduce InternalAPI.Shipped.txt / InternalAPI.Unshipped.txt files (mirroring
the existing PublicAPI folder layout, including framework-specific subfolders)
for every source project that already tracks its public API surface, and wire
them into each project as AdditionalFiles so the Roslyn public/internal API
analyzers (RS0051-RS0061) validate the internal surface too.
- Baseline the current internal API surface into InternalAPI.Shipped.txt
(Unshipped left empty), matching the repo's post-release PublicAPI state.
- Update eng/mark-shipped.ps1 to also process InternalAPI files.
- .editorconfig enables the internal-API analyzer diagnostics (RS0051-RS0061).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 19:33
CopilotAI reviewed Jul 8, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

🤖 Automated review by GitHub Copilot. Generated by the Expert Code Review workflow. To request a follow-up action, reply by tagging @copilot directly.

Review Summary

Clean, well-structured infrastructure PR. All 22 review dimensions assessed — no blocking issues found.

Key Findings

DimensionAssessment
Completeness✅ All 25 projects with PublicAPI tracking now have matching InternalAPI tracking. Folder structures (TFM subfolders, root-level files) mirror exactly.
.editorconfig✅ RS0051–RS0061 correctly enabled. RS0057 (oblivious types) reasonably suppressed for polyfill/compiler-generated code.
eng/mark-shipped.ps1✅ Correctly parameterized via $Prefix. The PublicApiPublicAPI casing fix resolves a latent bug on case-sensitive filesystems (Linux + PowerShell 7). The regex '\.Shipped\.txt$' correctly extracts the prefix.
.csproj wiringAdditionalFiles entries use the same Condition expressions as their corresponding PublicAPI entries. MSBuild/VSTestBridge correctly reference root-level files; other projects use InternalAPI/ subfolders.
InternalAPI content✅ Shipped files are populated; Unshipped files all contain only #nullable enable. TPEXP/MSTESTEXP prefixed entries are correctly placed for internal (not public) members. Compiler-emitted polyfill types (EmbeddedAttribute, CompilerLoweringPreserveAttribute, etc.) are expected per the analyzer's code-fix output.
Backward Compatibility✅ No public API surface changes. New analyzer warnings (RS0051+) are additive and enforcement-only for maintainers.

Notes

  • The Write-Host "Processing $shippedFilePath" improvement gives better diagnostic output (shows full path including prefix) — nice QoL improvement.
  • The Get-ChildItem -Include array pattern ("PublicAPI.Shipped.txt", "InternalAPI.Shipped.txt") correctly invokes Set-AsShipped once per matching file with the right prefix.
  • No issues with cross-TFM correctness, naming conventions, or scope creep.

@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 431.7 AIC · ⌖ 8.36 AIC · ⊞ 7.3K ·

Comment threadsrc/Platform/Microsoft.Testing.Platform/InternalAPI/InternalAPI.Shipped.txt Outdated
Comment thread.editorconfig
CI surfaced RS0051 failures because generated code was baked into the
InternalAPI files: BuildInfo version constants embed the build version
(e.g. "1.0.0-ci" on CI vs "2.4.0-dev" locally), plus RESX-generated resource
accessors and *.g.cs content-file sources.
- .editorconfig: disable the internal API analyzers (RS0051-RS0061) for
generated code (*.g.cs and artifacts/obj/**/*.cs).
- Regenerate InternalAPI baselines without the version-stamped / generated
symbols, while keeping real auto-generated-marked API (Polyfills attributes).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 20:29

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 97/99 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 221.4 AIC · ⌖ 7.47 AIC · ⊞ 7.3K ·

Comment thread.editorconfig
…TestBridge
The regenerated InternalAPI.Shipped.txt baselines for these three extensions were missing the shared polyfill symbols (EmbeddedAttribute, CompilerLoweringPreserveAttribute, Polyfills.Polyfill OS helpers, HashHelpers), causing RS0051 build failures. Added them in canonical sorted order to match the other tracked projects.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 20:52

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 97/99 changed files
  • Comments generated: 0 new
  • Review effort level: Low

@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 136.9 AIC · ⌖ 7.15 AIC · ⊞ 7.3K ·

Comment threadsrc/Platform/Microsoft.Testing.Platform/InternalAPI/InternalAPI.Shipped.txt Outdated
…nal API
ProtocolVersion = PlatformVersion.Version inlines the build-time version stamp, which differs by environment (2.4.0-dev locally vs 2.4.0-ci on CI). Tracking its literal value in InternalAPI.Shipped.txt made the internal API analyzer non-deterministic and failed CI (Linux Debug) with RS0051. Suppress RS0051 at the declaration and drop the version-valued baseline entry, consistent with the PR's exclusion of version-stamped constants.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 21:24

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 98/100 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 335.7 AIC · ⌖ 7.69 AIC · ⊞ 7.3K ·

Comment threadsrc/Platform/Microsoft.Testing.Platform/InternalAPI/InternalAPI.Shipped.txt Outdated
…onst
The raw string literal const embeds the source file's line endings (CRLF on Windows where the baseline was generated, LF on Linux CI), so its compile-time value is non-deterministic across platforms and failed CI (Linux Debug) with RS0051. Suppress RS0051 at the declaration and drop the CRLF-valued baseline entry, matching the ProtocolVersion fix.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 21:55

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 99/101 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Build Failure Analysis

Summary — All 151 build errors are RS0051 (Internal API analyzer: "Symbol is not part of the declared API") in MSTest.TestAdapter.csproj, caused by a merge conflict with main — the PR's InternalAPI.Shipped.txt baseline was generated from an older main that didn't yet contain the Native MTP integration types.

Root cause: PR branch is stale — missing new TestingPlatformAdapter symbols from main

The PR was branched from commit 1300ae0 (Jul 8, 14:52). After branching, several PRs landed on main that added new internal types to src/Adapter/MSTest.TestAdapter/TestingPlatformAdapter/:

PRCommitAdded
#974318c741fPhases 3–5: MSTestFilterContext, MSTestRunContext, MSTestDiscoveryContext, MSTestFilterContextBase
#9748279d3b8Phase 6a: MSTestFrameworkHandle, MSTestRunSettings, MSTestRunSettingsConfigurationProvider, MSTestRunSettingsEnvironmentVariableProvider, MSTestRunSettingsCommandLineOptionsProvider, MSTestTestRunParametersCommandLineOptionsProvider, MSTestTestCaseFilterCommandLineOptionsProvider, IMSTestTrxReportCapability, MSTestTestFramework
#9749cf0dea9Follow-up simplification to the above

When CI merges the PR head (d2d9f5f) into latest main (52192c9), the merged code includes both:

  1. ✅ The InternalAPI tracking infrastructure (from this PR)
  2. ❌ The new TestingPlatformAdapter symbols (from main) — which are not declared in InternalAPI.Shipped.txt or InternalAPI.Unshipped.txt

This triggers 151 RS0051 errors for undeclared internal API symbols.

Affected types (12 types + their members = 151 errors total):

  • IMSTestTrxReportCapability
  • MSTestFilterContextBase
  • MSTestRunContext
  • MSTestDiscoveryContext
  • MSTestFrameworkHandle
  • MSTestRunSettings
  • MSTestRunSettingsConfigurationProvider
  • MSTestRunSettingsEnvironmentVariableProvider
  • MSTestRunSettingsCommandLineOptionsProvider
  • MSTestTestCaseFilterCommandLineOptionsProvider
  • MSTestTestRunParametersCommandLineOptionsProvider
  • MSTestTestFramework

Proposed fix

Rebase the PR onto current main and regenerate the baseline:

git fetch origin main
git rebase origin/main
# Regenerate the InternalAPI baseline for the TestAdapter
dotnet format analyzers --diagnostics RS0051 --include-generated \
--project src/Adapter/MSTest.TestAdapter/MSTest.TestAdapter.csproj

This will add the newly-introduced symbols to src/Adapter/MSTest.TestAdapter/InternalAPI/InternalAPI.Shipped.txt (since the intent is to baseline the current surface).

Note: The same rebase should be verified against the UWP-specific InternalAPI/uwp/InternalAPI.Shipped.txt if those TFMs include the new TestingPlatformAdapter types.


Build overview
  • Build status: FAILED
  • Duration: 200.1s
  • MSBuild: 18.8.0-preview-26302-115
  • Projects: 49 total; 3 failed (Build.proj, NonWindowsTests.slnf, MSTest.TestAdapter.csproj)
  • Errors: 151 (all RS0051)
  • Warnings: 0
  • Configuration: Debug, Linux (non-Windows TFMs only)
  • Failed target:CoreCompile (Csc task) in MSTest.TestAdapter.csproj
All MSBuild errors (151 — all RS0051)
CodeFileLineSymbol (abbreviated)
RS0051IMSTestTrxReportCapability.cs14IMSTestTrxReportCapability
RS0051IMSTestTrxReportCapability.cs16IMSTestTrxReportCapability.IsTrxEnabled
RS0051MSTestFilterContext.cs27MSTestFilterContextBase
RS0051MSTestFilterContext.cs32MSTestFilterContextBase..ctor(...)
RS0051MSTestFilterContext.cs51MSTestFilterContextBase.RunSettings
RS0051MSTestFilterContext.cs72MSTestFilterContextBase.GetTestCaseFilter(...)
RS0051MSTestFilterContext.cs192MSTestRunContext
RS0051MSTestFilterContext.cs194MSTestRunContext..ctor(...)
RS0051MSTestFilterContext.cs201–211MSTestRunContext properties
RS0051MSTestFilterContext.cs218–220MSTestDiscoveryContext
RS0051MSTestFrameworkHandle.cs20–33MSTestFrameworkHandle + members
RS0051MSTestRunSettings.cs25–60MSTestRunSettings + members
RS0051MSTestRunSettingsConfigurationProvider.cs19–35MSTestRunSettingsConfigurationProvider + members
RS0051MSTestRunSettingsEnvironmentVariableProvider.cs21–103MSTestRunSettingsEnvironmentVariableProvider + members
RS0051MSTestRunSettingsCommandLineOptionsProvider.cs21–31MSTestRunSettingsCommandLineOptionsProvider + members
RS0051MSTestTestCaseFilterCommandLineOptionsProvider.cs17–21MSTestTestCaseFilterCommandLineOptionsProvider + members
RS0051MSTestTestRunParametersCommandLineOptionsProvider.cs18–27MSTestTestRunParametersCommandLineOptionsProvider + members
RS0051MSTestTestFramework.cs41MSTestTestFramework

All files are under src/Adapter/MSTest.TestAdapter/TestingPlatformAdapter/ — these exist in main but not in the PR branch.


🤖 Generated by the Build Failure Analysis workflow using (a href="(dev.azure.com/redacted) · commit d2d9f5f

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 321.4 AIC · ⌖ 7.02 AIC · ⊞ 7.3K · [◷]( · )

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 321.4 AIC · ⌖ 7.02 AIC · ⊞ 7.3K ·

CopilotAI added 2 commits July 9, 2026 00:48
Merging current main brought in the Phase 6a native MTP adapter (dotnet/testfx#9748) TestingPlatformAdapter types, whose internal API was not in the baseline, causing 75 RS0051 errors per TFM in the PR merge build. Added the 75 entries to MSTest.TestAdapter's InternalAPI.Shipped.txt in canonical sorted order.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 22:55

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 99/101 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@Evangelink
Amaury Levé (Evangelink) enabled auto-merge (squash) July 9, 2026 09:20
@Evangelink
Amaury Levé (Evangelink) enabled auto-merge (squash) July 9, 2026 09:20
@Evangelink
Amaury Levé (Evangelink) merged commit 1e92d89 into mainJul 9, 2026
89 checks passed
@Evangelink
Amaury Levé (Evangelink) deleted the dev/add-internalapi-tracking branch July 9, 2026 09:21
Amaury Levé (Evangelink) added a commit that referenced this pull request Jul 9, 2026
…RS0051
Microsoft.Testing.Platform's BaseSerializer.ReadFields and WriteListPayload<T>
(added by #9774) were never added to InternalAPI.Unshipped.txt, so once #9752
enabled RS0051 internal-API enforcement both landed on main and left main red.
This foundational project's failure cascades and blocks the whole build, so
track the two methods in the base InternalAPI.Unshipped.txt (the diagnostic
fires on netstandard2.0 too, so it belongs in the base file, not net/).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Amaury Levé (Evangelink) added a commit that referenced this pull request Jul 9, 2026
…ternalAPI
With Microsoft.Testing.Platform now building, MSTest.TestAdapter compiles and surfaces its own RS0051 failures for the internal PlatformServicesConfigurationAdapter type (added while InternalAPI tracking was being rolled out in #9752). Declare the type, its constructor and indexer in the non-UWP InternalAPI.Unshipped.txt so the adapter builds.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Amaury Levé (Evangelink) added a commit that referenced this pull request Jul 28, 2026
- Bump System.Threading.Tasks.Extensions 4.5.4 -> 4.6.3. Microsoft.ApplicationInsights
3.1.2 -> Azure.Monitor.OpenTelemetry.Exporter -> Azure.Core 1.54.0 requires >= 4.6.3,
which made every .NETFramework project referencing MSTest.TestAdapter fail restore with
NU1605 (Windows-only, because the Linux/macOS legs skip the net462 targets).
- Declare the new/changed internal APIs (LocalFileTelemetryClient,
AppInsightTelemetryClientFactory ctor, AppInsightsProvider.LocalExportPathEnvVar,
TelemetryProperties.VersionValue = "21") in the InternalAPI.Unshipped.txt baselines
introduced by #9752, which landed on main after this PR was opened.
- Add the required UTF-8 BOM to LocalFileTelemetryClient.cs and
LocalFileTelemetryClientTests.cs.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e947c36-e52a-4ba8-8185-cd338ae24060
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state/needs-reviewAwaiting review from the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@Evangelink@0101
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Add InternalAPI tracking to all projects with PublicAPI - #9752

Merged
Amaury Levé (Evangelink) merged 7 commits into
mainfrom
dev/add-internalapi-tracking
Jul 9, 2026
Merged

Add InternalAPI tracking to all projects with PublicAPI#9752
Amaury Levé (Evangelink) merged 7 commits into
mainfrom
dev/add-internalapi-tracking

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Summary

Adds InternalAPI tracking to every source project that already tracks a public API surface, so the Roslyn public/internal API analyzers (RS0051–RS0061) validate the internal surface too — mirroring how PublicAPI.Shipped.txt / PublicAPI.Unshipped.txt work today.

What changed

  • New InternalAPI files for all 25 projects with a PublicAPI folder, mirroring the exact layout — including framework-specific subfolders (net/, net9.0/, net462/, net8.0-windows*, uwp/, uap10.0.16299/, …) and root-level files for the two projects (MSBuild, VSTestBridge) that keep API files at project root.
  • Wired into each .csproj as AdditionalFiles, with the same Condition expressions as the corresponding PublicAPI entries.
  • Baselined the current internal API surface into InternalAPI.Shipped.txt (leaving Unshipped empty), matching the repo's post-release PublicAPI state. Entries were generated with the analyzer's own code fix (dotnet format analyzers --diagnostics RS0051 --include-generated), which also captures RESX-generated resource classes and compiler-emitted attributes.
  • eng/mark-shipped.ps1 now processes InternalAPI files in addition to PublicAPI (parameterized prefix; also fixes a PublicApiPublicAPI glob casing bug).
  • .editorconfig enables the internal-API analyzer diagnostics (RS0051–RS0061), which is what makes this tracking active.

Verification

Authoritative --no-incremental / /t:Rebuild builds across all reachable TFMs (netstandard2.0, net8.0, net9.0, net462, net8.0-windows, net9.0-windows) for all 25 projects report 0 RS0051. PublicAPI files are untouched.

Note

The uap10.0.16299 TFM cannot be compiled in every environment (needs the UWP/Windows XAML workload); its internal deltas were populated from build output and verified not to regress the shared-folder ModernUwp (net9.0-windows) leg.

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

Introduce InternalAPI.Shipped.txt / InternalAPI.Unshipped.txt files (mirroring
the existing PublicAPI folder layout, including framework-specific subfolders)
for every source project that already tracks its public API surface, and wire
them into each project as AdditionalFiles so the Roslyn public/internal API
analyzers (RS0051-RS0061) validate the internal surface too.
- Baseline the current internal API surface into InternalAPI.Shipped.txt
(Unshipped left empty), matching the repo's post-release PublicAPI state.
- Update eng/mark-shipped.ps1 to also process InternalAPI files.
- .editorconfig enables the internal-API analyzer diagnostics (RS0051-RS0061).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 19:33
CopilotAI reviewed Jul 8, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

🤖 Automated review by GitHub Copilot. Generated by the Expert Code Review workflow. To request a follow-up action, reply by tagging @copilot directly.

Review Summary

Clean, well-structured infrastructure PR. All 22 review dimensions assessed — no blocking issues found.

Key Findings

DimensionAssessment
Completeness✅ All 25 projects with PublicAPI tracking now have matching InternalAPI tracking. Folder structures (TFM subfolders, root-level files) mirror exactly.
.editorconfig✅ RS0051–RS0061 correctly enabled. RS0057 (oblivious types) reasonably suppressed for polyfill/compiler-generated code.
eng/mark-shipped.ps1✅ Correctly parameterized via $Prefix. The PublicApiPublicAPI casing fix resolves a latent bug on case-sensitive filesystems (Linux + PowerShell 7). The regex '\.Shipped\.txt$' correctly extracts the prefix.
.csproj wiringAdditionalFiles entries use the same Condition expressions as their corresponding PublicAPI entries. MSBuild/VSTestBridge correctly reference root-level files; other projects use InternalAPI/ subfolders.
InternalAPI content✅ Shipped files are populated; Unshipped files all contain only #nullable enable. TPEXP/MSTESTEXP prefixed entries are correctly placed for internal (not public) members. Compiler-emitted polyfill types (EmbeddedAttribute, CompilerLoweringPreserveAttribute, etc.) are expected per the analyzer's code-fix output.
Backward Compatibility✅ No public API surface changes. New analyzer warnings (RS0051+) are additive and enforcement-only for maintainers.

Notes

  • The Write-Host "Processing $shippedFilePath" improvement gives better diagnostic output (shows full path including prefix) — nice QoL improvement.
  • The Get-ChildItem -Include array pattern ("PublicAPI.Shipped.txt", "InternalAPI.Shipped.txt") correctly invokes Set-AsShipped once per matching file with the right prefix.
  • No issues with cross-TFM correctness, naming conventions, or scope creep.

@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 431.7 AIC · ⌖ 8.36 AIC · ⊞ 7.3K ·

Comment threadsrc/Platform/Microsoft.Testing.Platform/InternalAPI/InternalAPI.Shipped.txt Outdated
Comment thread.editorconfig
CI surfaced RS0051 failures because generated code was baked into the
InternalAPI files: BuildInfo version constants embed the build version
(e.g. "1.0.0-ci" on CI vs "2.4.0-dev" locally), plus RESX-generated resource
accessors and *.g.cs content-file sources.
- .editorconfig: disable the internal API analyzers (RS0051-RS0061) for
generated code (*.g.cs and artifacts/obj/**/*.cs).
- Regenerate InternalAPI baselines without the version-stamped / generated
symbols, while keeping real auto-generated-marked API (Polyfills attributes).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 20:29

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 97/99 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 221.4 AIC · ⌖ 7.47 AIC · ⊞ 7.3K ·

Comment thread.editorconfig
…TestBridge
The regenerated InternalAPI.Shipped.txt baselines for these three extensions were missing the shared polyfill symbols (EmbeddedAttribute, CompilerLoweringPreserveAttribute, Polyfills.Polyfill OS helpers, HashHelpers), causing RS0051 build failures. Added them in canonical sorted order to match the other tracked projects.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 20:52

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 97/99 changed files
  • Comments generated: 0 new
  • Review effort level: Low

@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 136.9 AIC · ⌖ 7.15 AIC · ⊞ 7.3K ·

Comment threadsrc/Platform/Microsoft.Testing.Platform/InternalAPI/InternalAPI.Shipped.txt Outdated
…nal API
ProtocolVersion = PlatformVersion.Version inlines the build-time version stamp, which differs by environment (2.4.0-dev locally vs 2.4.0-ci on CI). Tracking its literal value in InternalAPI.Shipped.txt made the internal API analyzer non-deterministic and failed CI (Linux Debug) with RS0051. Suppress RS0051 at the declaration and drop the version-valued baseline entry, consistent with the PR's exclusion of version-stamped constants.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 21:24

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 98/100 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 335.7 AIC · ⌖ 7.69 AIC · ⊞ 7.3K ·

Comment threadsrc/Platform/Microsoft.Testing.Platform/InternalAPI/InternalAPI.Shipped.txt Outdated
…onst
The raw string literal const embeds the source file's line endings (CRLF on Windows where the baseline was generated, LF on Linux CI), so its compile-time value is non-deterministic across platforms and failed CI (Linux Debug) with RS0051. Suppress RS0051 at the declaration and drop the CRLF-valued baseline entry, matching the ProtocolVersion fix.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 21:55

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 99/101 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Build Failure Analysis

Summary — All 151 build errors are RS0051 (Internal API analyzer: "Symbol is not part of the declared API") in MSTest.TestAdapter.csproj, caused by a merge conflict with main — the PR's InternalAPI.Shipped.txt baseline was generated from an older main that didn't yet contain the Native MTP integration types.

Root cause: PR branch is stale — missing new TestingPlatformAdapter symbols from main

The PR was branched from commit 1300ae0 (Jul 8, 14:52). After branching, several PRs landed on main that added new internal types to src/Adapter/MSTest.TestAdapter/TestingPlatformAdapter/:

PRCommitAdded
#974318c741fPhases 3–5: MSTestFilterContext, MSTestRunContext, MSTestDiscoveryContext, MSTestFilterContextBase
#9748279d3b8Phase 6a: MSTestFrameworkHandle, MSTestRunSettings, MSTestRunSettingsConfigurationProvider, MSTestRunSettingsEnvironmentVariableProvider, MSTestRunSettingsCommandLineOptionsProvider, MSTestTestRunParametersCommandLineOptionsProvider, MSTestTestCaseFilterCommandLineOptionsProvider, IMSTestTrxReportCapability, MSTestTestFramework
#9749cf0dea9Follow-up simplification to the above

When CI merges the PR head (d2d9f5f) into latest main (52192c9), the merged code includes both:

  1. ✅ The InternalAPI tracking infrastructure (from this PR)
  2. ❌ The new TestingPlatformAdapter symbols (from main) — which are not declared in InternalAPI.Shipped.txt or InternalAPI.Unshipped.txt

This triggers 151 RS0051 errors for undeclared internal API symbols.

Affected types (12 types + their members = 151 errors total):

  • IMSTestTrxReportCapability
  • MSTestFilterContextBase
  • MSTestRunContext
  • MSTestDiscoveryContext
  • MSTestFrameworkHandle
  • MSTestRunSettings
  • MSTestRunSettingsConfigurationProvider
  • MSTestRunSettingsEnvironmentVariableProvider
  • MSTestRunSettingsCommandLineOptionsProvider
  • MSTestTestCaseFilterCommandLineOptionsProvider
  • MSTestTestRunParametersCommandLineOptionsProvider
  • MSTestTestFramework

Proposed fix

Rebase the PR onto current main and regenerate the baseline:

git fetch origin main
git rebase origin/main
# Regenerate the InternalAPI baseline for the TestAdapter
dotnet format analyzers --diagnostics RS0051 --include-generated \
--project src/Adapter/MSTest.TestAdapter/MSTest.TestAdapter.csproj

This will add the newly-introduced symbols to src/Adapter/MSTest.TestAdapter/InternalAPI/InternalAPI.Shipped.txt (since the intent is to baseline the current surface).

Note: The same rebase should be verified against the UWP-specific InternalAPI/uwp/InternalAPI.Shipped.txt if those TFMs include the new TestingPlatformAdapter types.


Build overview
  • Build status: FAILED
  • Duration: 200.1s
  • MSBuild: 18.8.0-preview-26302-115
  • Projects: 49 total; 3 failed (Build.proj, NonWindowsTests.slnf, MSTest.TestAdapter.csproj)
  • Errors: 151 (all RS0051)
  • Warnings: 0
  • Configuration: Debug, Linux (non-Windows TFMs only)
  • Failed target:CoreCompile (Csc task) in MSTest.TestAdapter.csproj
All MSBuild errors (151 — all RS0051)
CodeFileLineSymbol (abbreviated)
RS0051IMSTestTrxReportCapability.cs14IMSTestTrxReportCapability
RS0051IMSTestTrxReportCapability.cs16IMSTestTrxReportCapability.IsTrxEnabled
RS0051MSTestFilterContext.cs27MSTestFilterContextBase
RS0051MSTestFilterContext.cs32MSTestFilterContextBase..ctor(...)
RS0051MSTestFilterContext.cs51MSTestFilterContextBase.RunSettings
RS0051MSTestFilterContext.cs72MSTestFilterContextBase.GetTestCaseFilter(...)
RS0051MSTestFilterContext.cs192MSTestRunContext
RS0051MSTestFilterContext.cs194MSTestRunContext..ctor(...)
RS0051MSTestFilterContext.cs201–211MSTestRunContext properties
RS0051MSTestFilterContext.cs218–220MSTestDiscoveryContext
RS0051MSTestFrameworkHandle.cs20–33MSTestFrameworkHandle + members
RS0051MSTestRunSettings.cs25–60MSTestRunSettings + members
RS0051MSTestRunSettingsConfigurationProvider.cs19–35MSTestRunSettingsConfigurationProvider + members
RS0051MSTestRunSettingsEnvironmentVariableProvider.cs21–103MSTestRunSettingsEnvironmentVariableProvider + members
RS0051MSTestRunSettingsCommandLineOptionsProvider.cs21–31MSTestRunSettingsCommandLineOptionsProvider + members
RS0051MSTestTestCaseFilterCommandLineOptionsProvider.cs17–21MSTestTestCaseFilterCommandLineOptionsProvider + members
RS0051MSTestTestRunParametersCommandLineOptionsProvider.cs18–27MSTestTestRunParametersCommandLineOptionsProvider + members
RS0051MSTestTestFramework.cs41MSTestTestFramework

All files are under src/Adapter/MSTest.TestAdapter/TestingPlatformAdapter/ — these exist in main but not in the PR branch.


🤖 Generated by the Build Failure Analysis workflow using (a href="(dev.azure.com/redacted) · commit d2d9f5f

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 321.4 AIC · ⌖ 7.02 AIC · ⊞ 7.3K · [◷]( · )

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 321.4 AIC · ⌖ 7.02 AIC · ⊞ 7.3K ·

CopilotAI added 2 commits July 9, 2026 00:48
Merging current main brought in the Phase 6a native MTP adapter (dotnet/testfx#9748) TestingPlatformAdapter types, whose internal API was not in the baseline, causing 75 RS0051 errors per TFM in the PR merge build. Added the 75 entries to MSTest.TestAdapter's InternalAPI.Shipped.txt in canonical sorted order.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 22:55

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 99/101 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@Evangelink
Amaury Levé (Evangelink) enabled auto-merge (squash) July 9, 2026 09:20
@Evangelink
Amaury Levé (Evangelink) enabled auto-merge (squash) July 9, 2026 09:20
@Evangelink
Amaury Levé (Evangelink) merged commit 1e92d89 into mainJul 9, 2026
89 checks passed
@Evangelink
Amaury Levé (Evangelink) deleted the dev/add-internalapi-tracking branch July 9, 2026 09:21
Amaury Levé (Evangelink) added a commit that referenced this pull request Jul 9, 2026
…RS0051
Microsoft.Testing.Platform's BaseSerializer.ReadFields and WriteListPayload<T>
(added by #9774) were never added to InternalAPI.Unshipped.txt, so once #9752
enabled RS0051 internal-API enforcement both landed on main and left main red.
This foundational project's failure cascades and blocks the whole build, so
track the two methods in the base InternalAPI.Unshipped.txt (the diagnostic
fires on netstandard2.0 too, so it belongs in the base file, not net/).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Amaury Levé (Evangelink) added a commit that referenced this pull request Jul 9, 2026
…ternalAPI
With Microsoft.Testing.Platform now building, MSTest.TestAdapter compiles and surfaces its own RS0051 failures for the internal PlatformServicesConfigurationAdapter type (added while InternalAPI tracking was being rolled out in #9752). Declare the type, its constructor and indexer in the non-UWP InternalAPI.Unshipped.txt so the adapter builds.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Amaury Levé (Evangelink) added a commit that referenced this pull request Jul 28, 2026
- Bump System.Threading.Tasks.Extensions 4.5.4 -> 4.6.3. Microsoft.ApplicationInsights
3.1.2 -> Azure.Monitor.OpenTelemetry.Exporter -> Azure.Core 1.54.0 requires >= 4.6.3,
which made every .NETFramework project referencing MSTest.TestAdapter fail restore with
NU1605 (Windows-only, because the Linux/macOS legs skip the net462 targets).
- Declare the new/changed internal APIs (LocalFileTelemetryClient,
AppInsightTelemetryClientFactory ctor, AppInsightsProvider.LocalExportPathEnvVar,
TelemetryProperties.VersionValue = "21") in the InternalAPI.Unshipped.txt baselines
introduced by #9752, which landed on main after this PR was opened.
- Add the required UTF-8 BOM to LocalFileTelemetryClient.cs and
LocalFileTelemetryClientTests.cs.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e947c36-e52a-4ba8-8185-cd338ae24060
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state/needs-reviewAwaiting review from the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@Evangelink@0101
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Add InternalAPI tracking to all projects with PublicAPI - #9752

Merged
Amaury Levé (Evangelink) merged 7 commits into
mainfrom
dev/add-internalapi-tracking
Jul 9, 2026
Merged

Add InternalAPI tracking to all projects with PublicAPI#9752
Amaury Levé (Evangelink) merged 7 commits into
mainfrom
dev/add-internalapi-tracking

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Summary

Adds InternalAPI tracking to every source project that already tracks a public API surface, so the Roslyn public/internal API analyzers (RS0051–RS0061) validate the internal surface too — mirroring how PublicAPI.Shipped.txt / PublicAPI.Unshipped.txt work today.

What changed

  • New InternalAPI files for all 25 projects with a PublicAPI folder, mirroring the exact layout — including framework-specific subfolders (net/, net9.0/, net462/, net8.0-windows*, uwp/, uap10.0.16299/, …) and root-level files for the two projects (MSBuild, VSTestBridge) that keep API files at project root.
  • Wired into each .csproj as AdditionalFiles, with the same Condition expressions as the corresponding PublicAPI entries.
  • Baselined the current internal API surface into InternalAPI.Shipped.txt (leaving Unshipped empty), matching the repo's post-release PublicAPI state. Entries were generated with the analyzer's own code fix (dotnet format analyzers --diagnostics RS0051 --include-generated), which also captures RESX-generated resource classes and compiler-emitted attributes.
  • eng/mark-shipped.ps1 now processes InternalAPI files in addition to PublicAPI (parameterized prefix; also fixes a PublicApiPublicAPI glob casing bug).
  • .editorconfig enables the internal-API analyzer diagnostics (RS0051–RS0061), which is what makes this tracking active.

Verification

Authoritative --no-incremental / /t:Rebuild builds across all reachable TFMs (netstandard2.0, net8.0, net9.0, net462, net8.0-windows, net9.0-windows) for all 25 projects report 0 RS0051. PublicAPI files are untouched.

Note

The uap10.0.16299 TFM cannot be compiled in every environment (needs the UWP/Windows XAML workload); its internal deltas were populated from build output and verified not to regress the shared-folder ModernUwp (net9.0-windows) leg.

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

Introduce InternalAPI.Shipped.txt / InternalAPI.Unshipped.txt files (mirroring
the existing PublicAPI folder layout, including framework-specific subfolders)
for every source project that already tracks its public API surface, and wire
them into each project as AdditionalFiles so the Roslyn public/internal API
analyzers (RS0051-RS0061) validate the internal surface too.
- Baseline the current internal API surface into InternalAPI.Shipped.txt
(Unshipped left empty), matching the repo's post-release PublicAPI state.
- Update eng/mark-shipped.ps1 to also process InternalAPI files.
- .editorconfig enables the internal-API analyzer diagnostics (RS0051-RS0061).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 19:33
CopilotAI reviewed Jul 8, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

🤖 Automated review by GitHub Copilot. Generated by the Expert Code Review workflow. To request a follow-up action, reply by tagging @copilot directly.

Review Summary

Clean, well-structured infrastructure PR. All 22 review dimensions assessed — no blocking issues found.

Key Findings

DimensionAssessment
Completeness✅ All 25 projects with PublicAPI tracking now have matching InternalAPI tracking. Folder structures (TFM subfolders, root-level files) mirror exactly.
.editorconfig✅ RS0051–RS0061 correctly enabled. RS0057 (oblivious types) reasonably suppressed for polyfill/compiler-generated code.
eng/mark-shipped.ps1✅ Correctly parameterized via $Prefix. The PublicApiPublicAPI casing fix resolves a latent bug on case-sensitive filesystems (Linux + PowerShell 7). The regex '\.Shipped\.txt$' correctly extracts the prefix.
.csproj wiringAdditionalFiles entries use the same Condition expressions as their corresponding PublicAPI entries. MSBuild/VSTestBridge correctly reference root-level files; other projects use InternalAPI/ subfolders.
InternalAPI content✅ Shipped files are populated; Unshipped files all contain only #nullable enable. TPEXP/MSTESTEXP prefixed entries are correctly placed for internal (not public) members. Compiler-emitted polyfill types (EmbeddedAttribute, CompilerLoweringPreserveAttribute, etc.) are expected per the analyzer's code-fix output.
Backward Compatibility✅ No public API surface changes. New analyzer warnings (RS0051+) are additive and enforcement-only for maintainers.

Notes

  • The Write-Host "Processing $shippedFilePath" improvement gives better diagnostic output (shows full path including prefix) — nice QoL improvement.
  • The Get-ChildItem -Include array pattern ("PublicAPI.Shipped.txt", "InternalAPI.Shipped.txt") correctly invokes Set-AsShipped once per matching file with the right prefix.
  • No issues with cross-TFM correctness, naming conventions, or scope creep.

@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 431.7 AIC · ⌖ 8.36 AIC · ⊞ 7.3K ·

Comment threadsrc/Platform/Microsoft.Testing.Platform/InternalAPI/InternalAPI.Shipped.txt Outdated
Comment thread.editorconfig
CI surfaced RS0051 failures because generated code was baked into the
InternalAPI files: BuildInfo version constants embed the build version
(e.g. "1.0.0-ci" on CI vs "2.4.0-dev" locally), plus RESX-generated resource
accessors and *.g.cs content-file sources.
- .editorconfig: disable the internal API analyzers (RS0051-RS0061) for
generated code (*.g.cs and artifacts/obj/**/*.cs).
- Regenerate InternalAPI baselines without the version-stamped / generated
symbols, while keeping real auto-generated-marked API (Polyfills attributes).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 20:29

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 97/99 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 221.4 AIC · ⌖ 7.47 AIC · ⊞ 7.3K ·

Comment thread.editorconfig
…TestBridge
The regenerated InternalAPI.Shipped.txt baselines for these three extensions were missing the shared polyfill symbols (EmbeddedAttribute, CompilerLoweringPreserveAttribute, Polyfills.Polyfill OS helpers, HashHelpers), causing RS0051 build failures. Added them in canonical sorted order to match the other tracked projects.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 20:52

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 97/99 changed files
  • Comments generated: 0 new
  • Review effort level: Low

@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 136.9 AIC · ⌖ 7.15 AIC · ⊞ 7.3K ·

Comment threadsrc/Platform/Microsoft.Testing.Platform/InternalAPI/InternalAPI.Shipped.txt Outdated
…nal API
ProtocolVersion = PlatformVersion.Version inlines the build-time version stamp, which differs by environment (2.4.0-dev locally vs 2.4.0-ci on CI). Tracking its literal value in InternalAPI.Shipped.txt made the internal API analyzer non-deterministic and failed CI (Linux Debug) with RS0051. Suppress RS0051 at the declaration and drop the version-valued baseline entry, consistent with the PR's exclusion of version-stamped constants.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 21:24

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 98/100 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 335.7 AIC · ⌖ 7.69 AIC · ⊞ 7.3K ·

Comment threadsrc/Platform/Microsoft.Testing.Platform/InternalAPI/InternalAPI.Shipped.txt Outdated
…onst
The raw string literal const embeds the source file's line endings (CRLF on Windows where the baseline was generated, LF on Linux CI), so its compile-time value is non-deterministic across platforms and failed CI (Linux Debug) with RS0051. Suppress RS0051 at the declaration and drop the CRLF-valued baseline entry, matching the ProtocolVersion fix.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 21:55

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 99/101 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Build Failure Analysis

Summary — All 151 build errors are RS0051 (Internal API analyzer: "Symbol is not part of the declared API") in MSTest.TestAdapter.csproj, caused by a merge conflict with main — the PR's InternalAPI.Shipped.txt baseline was generated from an older main that didn't yet contain the Native MTP integration types.

Root cause: PR branch is stale — missing new TestingPlatformAdapter symbols from main

The PR was branched from commit 1300ae0 (Jul 8, 14:52). After branching, several PRs landed on main that added new internal types to src/Adapter/MSTest.TestAdapter/TestingPlatformAdapter/:

PRCommitAdded
#974318c741fPhases 3–5: MSTestFilterContext, MSTestRunContext, MSTestDiscoveryContext, MSTestFilterContextBase
#9748279d3b8Phase 6a: MSTestFrameworkHandle, MSTestRunSettings, MSTestRunSettingsConfigurationProvider, MSTestRunSettingsEnvironmentVariableProvider, MSTestRunSettingsCommandLineOptionsProvider, MSTestTestRunParametersCommandLineOptionsProvider, MSTestTestCaseFilterCommandLineOptionsProvider, IMSTestTrxReportCapability, MSTestTestFramework
#9749cf0dea9Follow-up simplification to the above

When CI merges the PR head (d2d9f5f) into latest main (52192c9), the merged code includes both:

  1. ✅ The InternalAPI tracking infrastructure (from this PR)
  2. ❌ The new TestingPlatformAdapter symbols (from main) — which are not declared in InternalAPI.Shipped.txt or InternalAPI.Unshipped.txt

This triggers 151 RS0051 errors for undeclared internal API symbols.

Affected types (12 types + their members = 151 errors total):

  • IMSTestTrxReportCapability
  • MSTestFilterContextBase
  • MSTestRunContext
  • MSTestDiscoveryContext
  • MSTestFrameworkHandle
  • MSTestRunSettings
  • MSTestRunSettingsConfigurationProvider
  • MSTestRunSettingsEnvironmentVariableProvider
  • MSTestRunSettingsCommandLineOptionsProvider
  • MSTestTestCaseFilterCommandLineOptionsProvider
  • MSTestTestRunParametersCommandLineOptionsProvider
  • MSTestTestFramework

Proposed fix

Rebase the PR onto current main and regenerate the baseline:

git fetch origin main
git rebase origin/main
# Regenerate the InternalAPI baseline for the TestAdapter
dotnet format analyzers --diagnostics RS0051 --include-generated \
--project src/Adapter/MSTest.TestAdapter/MSTest.TestAdapter.csproj

This will add the newly-introduced symbols to src/Adapter/MSTest.TestAdapter/InternalAPI/InternalAPI.Shipped.txt (since the intent is to baseline the current surface).

Note: The same rebase should be verified against the UWP-specific InternalAPI/uwp/InternalAPI.Shipped.txt if those TFMs include the new TestingPlatformAdapter types.


Build overview
  • Build status: FAILED
  • Duration: 200.1s
  • MSBuild: 18.8.0-preview-26302-115
  • Projects: 49 total; 3 failed (Build.proj, NonWindowsTests.slnf, MSTest.TestAdapter.csproj)
  • Errors: 151 (all RS0051)
  • Warnings: 0
  • Configuration: Debug, Linux (non-Windows TFMs only)
  • Failed target:CoreCompile (Csc task) in MSTest.TestAdapter.csproj
All MSBuild errors (151 — all RS0051)
CodeFileLineSymbol (abbreviated)
RS0051IMSTestTrxReportCapability.cs14IMSTestTrxReportCapability
RS0051IMSTestTrxReportCapability.cs16IMSTestTrxReportCapability.IsTrxEnabled
RS0051MSTestFilterContext.cs27MSTestFilterContextBase
RS0051MSTestFilterContext.cs32MSTestFilterContextBase..ctor(...)
RS0051MSTestFilterContext.cs51MSTestFilterContextBase.RunSettings
RS0051MSTestFilterContext.cs72MSTestFilterContextBase.GetTestCaseFilter(...)
RS0051MSTestFilterContext.cs192MSTestRunContext
RS0051MSTestFilterContext.cs194MSTestRunContext..ctor(...)
RS0051MSTestFilterContext.cs201–211MSTestRunContext properties
RS0051MSTestFilterContext.cs218–220MSTestDiscoveryContext
RS0051MSTestFrameworkHandle.cs20–33MSTestFrameworkHandle + members
RS0051MSTestRunSettings.cs25–60MSTestRunSettings + members
RS0051MSTestRunSettingsConfigurationProvider.cs19–35MSTestRunSettingsConfigurationProvider + members
RS0051MSTestRunSettingsEnvironmentVariableProvider.cs21–103MSTestRunSettingsEnvironmentVariableProvider + members
RS0051MSTestRunSettingsCommandLineOptionsProvider.cs21–31MSTestRunSettingsCommandLineOptionsProvider + members
RS0051MSTestTestCaseFilterCommandLineOptionsProvider.cs17–21MSTestTestCaseFilterCommandLineOptionsProvider + members
RS0051MSTestTestRunParametersCommandLineOptionsProvider.cs18–27MSTestTestRunParametersCommandLineOptionsProvider + members
RS0051MSTestTestFramework.cs41MSTestTestFramework

All files are under src/Adapter/MSTest.TestAdapter/TestingPlatformAdapter/ — these exist in main but not in the PR branch.


🤖 Generated by the Build Failure Analysis workflow using (a href="(dev.azure.com/redacted) · commit d2d9f5f

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 321.4 AIC · ⌖ 7.02 AIC · ⊞ 7.3K · [◷]( · )

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 321.4 AIC · ⌖ 7.02 AIC · ⊞ 7.3K ·

CopilotAI added 2 commits July 9, 2026 00:48
Merging current main brought in the Phase 6a native MTP adapter (dotnet/testfx#9748) TestingPlatformAdapter types, whose internal API was not in the baseline, causing 75 RS0051 errors per TFM in the PR merge build. Added the 75 entries to MSTest.TestAdapter's InternalAPI.Shipped.txt in canonical sorted order.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 22:55

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 99/101 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@Evangelink
Amaury Levé (Evangelink) enabled auto-merge (squash) July 9, 2026 09:20
@Evangelink
Amaury Levé (Evangelink) enabled auto-merge (squash) July 9, 2026 09:20
@Evangelink
Amaury Levé (Evangelink) merged commit 1e92d89 into mainJul 9, 2026
89 checks passed
@Evangelink
Amaury Levé (Evangelink) deleted the dev/add-internalapi-tracking branch July 9, 2026 09:21
Amaury Levé (Evangelink) added a commit that referenced this pull request Jul 9, 2026
…RS0051
Microsoft.Testing.Platform's BaseSerializer.ReadFields and WriteListPayload<T>
(added by #9774) were never added to InternalAPI.Unshipped.txt, so once #9752
enabled RS0051 internal-API enforcement both landed on main and left main red.
This foundational project's failure cascades and blocks the whole build, so
track the two methods in the base InternalAPI.Unshipped.txt (the diagnostic
fires on netstandard2.0 too, so it belongs in the base file, not net/).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Amaury Levé (Evangelink) added a commit that referenced this pull request Jul 9, 2026
…ternalAPI
With Microsoft.Testing.Platform now building, MSTest.TestAdapter compiles and surfaces its own RS0051 failures for the internal PlatformServicesConfigurationAdapter type (added while InternalAPI tracking was being rolled out in #9752). Declare the type, its constructor and indexer in the non-UWP InternalAPI.Unshipped.txt so the adapter builds.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Amaury Levé (Evangelink) added a commit that referenced this pull request Jul 28, 2026
- Bump System.Threading.Tasks.Extensions 4.5.4 -> 4.6.3. Microsoft.ApplicationInsights
3.1.2 -> Azure.Monitor.OpenTelemetry.Exporter -> Azure.Core 1.54.0 requires >= 4.6.3,
which made every .NETFramework project referencing MSTest.TestAdapter fail restore with
NU1605 (Windows-only, because the Linux/macOS legs skip the net462 targets).
- Declare the new/changed internal APIs (LocalFileTelemetryClient,
AppInsightTelemetryClientFactory ctor, AppInsightsProvider.LocalExportPathEnvVar,
TelemetryProperties.VersionValue = "21") in the InternalAPI.Unshipped.txt baselines
introduced by #9752, which landed on main after this PR was opened.
- Add the required UTF-8 BOM to LocalFileTelemetryClient.cs and
LocalFileTelemetryClientTests.cs.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e947c36-e52a-4ba8-8185-cd338ae24060
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state/needs-reviewAwaiting review from the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@Evangelink@0101
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Add InternalAPI tracking to all projects with PublicAPI - #9752

Merged
Amaury Levé (Evangelink) merged 7 commits into
mainfrom
dev/add-internalapi-tracking
Jul 9, 2026
Merged

Add InternalAPI tracking to all projects with PublicAPI#9752
Amaury Levé (Evangelink) merged 7 commits into
mainfrom
dev/add-internalapi-tracking

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Summary

Adds InternalAPI tracking to every source project that already tracks a public API surface, so the Roslyn public/internal API analyzers (RS0051–RS0061) validate the internal surface too — mirroring how PublicAPI.Shipped.txt / PublicAPI.Unshipped.txt work today.

What changed

  • New InternalAPI files for all 25 projects with a PublicAPI folder, mirroring the exact layout — including framework-specific subfolders (net/, net9.0/, net462/, net8.0-windows*, uwp/, uap10.0.16299/, …) and root-level files for the two projects (MSBuild, VSTestBridge) that keep API files at project root.
  • Wired into each .csproj as AdditionalFiles, with the same Condition expressions as the corresponding PublicAPI entries.
  • Baselined the current internal API surface into InternalAPI.Shipped.txt (leaving Unshipped empty), matching the repo's post-release PublicAPI state. Entries were generated with the analyzer's own code fix (dotnet format analyzers --diagnostics RS0051 --include-generated), which also captures RESX-generated resource classes and compiler-emitted attributes.
  • eng/mark-shipped.ps1 now processes InternalAPI files in addition to PublicAPI (parameterized prefix; also fixes a PublicApiPublicAPI glob casing bug).
  • .editorconfig enables the internal-API analyzer diagnostics (RS0051–RS0061), which is what makes this tracking active.

Verification

Authoritative --no-incremental / /t:Rebuild builds across all reachable TFMs (netstandard2.0, net8.0, net9.0, net462, net8.0-windows, net9.0-windows) for all 25 projects report 0 RS0051. PublicAPI files are untouched.

Note

The uap10.0.16299 TFM cannot be compiled in every environment (needs the UWP/Windows XAML workload); its internal deltas were populated from build output and verified not to regress the shared-folder ModernUwp (net9.0-windows) leg.

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

Introduce InternalAPI.Shipped.txt / InternalAPI.Unshipped.txt files (mirroring
the existing PublicAPI folder layout, including framework-specific subfolders)
for every source project that already tracks its public API surface, and wire
them into each project as AdditionalFiles so the Roslyn public/internal API
analyzers (RS0051-RS0061) validate the internal surface too.
- Baseline the current internal API surface into InternalAPI.Shipped.txt
(Unshipped left empty), matching the repo's post-release PublicAPI state.
- Update eng/mark-shipped.ps1 to also process InternalAPI files.
- .editorconfig enables the internal-API analyzer diagnostics (RS0051-RS0061).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 19:33
CopilotAI reviewed Jul 8, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

🤖 Automated review by GitHub Copilot. Generated by the Expert Code Review workflow. To request a follow-up action, reply by tagging @copilot directly.

Review Summary

Clean, well-structured infrastructure PR. All 22 review dimensions assessed — no blocking issues found.

Key Findings

DimensionAssessment
Completeness✅ All 25 projects with PublicAPI tracking now have matching InternalAPI tracking. Folder structures (TFM subfolders, root-level files) mirror exactly.
.editorconfig✅ RS0051–RS0061 correctly enabled. RS0057 (oblivious types) reasonably suppressed for polyfill/compiler-generated code.
eng/mark-shipped.ps1✅ Correctly parameterized via $Prefix. The PublicApiPublicAPI casing fix resolves a latent bug on case-sensitive filesystems (Linux + PowerShell 7). The regex '\.Shipped\.txt$' correctly extracts the prefix.
.csproj wiringAdditionalFiles entries use the same Condition expressions as their corresponding PublicAPI entries. MSBuild/VSTestBridge correctly reference root-level files; other projects use InternalAPI/ subfolders.
InternalAPI content✅ Shipped files are populated; Unshipped files all contain only #nullable enable. TPEXP/MSTESTEXP prefixed entries are correctly placed for internal (not public) members. Compiler-emitted polyfill types (EmbeddedAttribute, CompilerLoweringPreserveAttribute, etc.) are expected per the analyzer's code-fix output.
Backward Compatibility✅ No public API surface changes. New analyzer warnings (RS0051+) are additive and enforcement-only for maintainers.

Notes

  • The Write-Host "Processing $shippedFilePath" improvement gives better diagnostic output (shows full path including prefix) — nice QoL improvement.
  • The Get-ChildItem -Include array pattern ("PublicAPI.Shipped.txt", "InternalAPI.Shipped.txt") correctly invokes Set-AsShipped once per matching file with the right prefix.
  • No issues with cross-TFM correctness, naming conventions, or scope creep.

@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 431.7 AIC · ⌖ 8.36 AIC · ⊞ 7.3K ·

Comment threadsrc/Platform/Microsoft.Testing.Platform/InternalAPI/InternalAPI.Shipped.txt Outdated
Comment thread.editorconfig
CI surfaced RS0051 failures because generated code was baked into the
InternalAPI files: BuildInfo version constants embed the build version
(e.g. "1.0.0-ci" on CI vs "2.4.0-dev" locally), plus RESX-generated resource
accessors and *.g.cs content-file sources.
- .editorconfig: disable the internal API analyzers (RS0051-RS0061) for
generated code (*.g.cs and artifacts/obj/**/*.cs).
- Regenerate InternalAPI baselines without the version-stamped / generated
symbols, while keeping real auto-generated-marked API (Polyfills attributes).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 20:29

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 97/99 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 221.4 AIC · ⌖ 7.47 AIC · ⊞ 7.3K ·

Comment thread.editorconfig
…TestBridge
The regenerated InternalAPI.Shipped.txt baselines for these three extensions were missing the shared polyfill symbols (EmbeddedAttribute, CompilerLoweringPreserveAttribute, Polyfills.Polyfill OS helpers, HashHelpers), causing RS0051 build failures. Added them in canonical sorted order to match the other tracked projects.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 20:52

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 97/99 changed files
  • Comments generated: 0 new
  • Review effort level: Low

@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 136.9 AIC · ⌖ 7.15 AIC · ⊞ 7.3K ·

Comment threadsrc/Platform/Microsoft.Testing.Platform/InternalAPI/InternalAPI.Shipped.txt Outdated
…nal API
ProtocolVersion = PlatformVersion.Version inlines the build-time version stamp, which differs by environment (2.4.0-dev locally vs 2.4.0-ci on CI). Tracking its literal value in InternalAPI.Shipped.txt made the internal API analyzer non-deterministic and failed CI (Linux Debug) with RS0051. Suppress RS0051 at the declaration and drop the version-valued baseline entry, consistent with the PR's exclusion of version-stamped constants.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 21:24

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 98/100 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 335.7 AIC · ⌖ 7.69 AIC · ⊞ 7.3K ·

Comment threadsrc/Platform/Microsoft.Testing.Platform/InternalAPI/InternalAPI.Shipped.txt Outdated
…onst
The raw string literal const embeds the source file's line endings (CRLF on Windows where the baseline was generated, LF on Linux CI), so its compile-time value is non-deterministic across platforms and failed CI (Linux Debug) with RS0051. Suppress RS0051 at the declaration and drop the CRLF-valued baseline entry, matching the ProtocolVersion fix.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 21:55

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 99/101 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Build Failure Analysis

Summary — All 151 build errors are RS0051 (Internal API analyzer: "Symbol is not part of the declared API") in MSTest.TestAdapter.csproj, caused by a merge conflict with main — the PR's InternalAPI.Shipped.txt baseline was generated from an older main that didn't yet contain the Native MTP integration types.

Root cause: PR branch is stale — missing new TestingPlatformAdapter symbols from main

The PR was branched from commit 1300ae0 (Jul 8, 14:52). After branching, several PRs landed on main that added new internal types to src/Adapter/MSTest.TestAdapter/TestingPlatformAdapter/:

PRCommitAdded
#974318c741fPhases 3–5: MSTestFilterContext, MSTestRunContext, MSTestDiscoveryContext, MSTestFilterContextBase
#9748279d3b8Phase 6a: MSTestFrameworkHandle, MSTestRunSettings, MSTestRunSettingsConfigurationProvider, MSTestRunSettingsEnvironmentVariableProvider, MSTestRunSettingsCommandLineOptionsProvider, MSTestTestRunParametersCommandLineOptionsProvider, MSTestTestCaseFilterCommandLineOptionsProvider, IMSTestTrxReportCapability, MSTestTestFramework
#9749cf0dea9Follow-up simplification to the above

When CI merges the PR head (d2d9f5f) into latest main (52192c9), the merged code includes both:

  1. ✅ The InternalAPI tracking infrastructure (from this PR)
  2. ❌ The new TestingPlatformAdapter symbols (from main) — which are not declared in InternalAPI.Shipped.txt or InternalAPI.Unshipped.txt

This triggers 151 RS0051 errors for undeclared internal API symbols.

Affected types (12 types + their members = 151 errors total):

  • IMSTestTrxReportCapability
  • MSTestFilterContextBase
  • MSTestRunContext
  • MSTestDiscoveryContext
  • MSTestFrameworkHandle
  • MSTestRunSettings
  • MSTestRunSettingsConfigurationProvider
  • MSTestRunSettingsEnvironmentVariableProvider
  • MSTestRunSettingsCommandLineOptionsProvider
  • MSTestTestCaseFilterCommandLineOptionsProvider
  • MSTestTestRunParametersCommandLineOptionsProvider
  • MSTestTestFramework

Proposed fix

Rebase the PR onto current main and regenerate the baseline:

git fetch origin main
git rebase origin/main
# Regenerate the InternalAPI baseline for the TestAdapter
dotnet format analyzers --diagnostics RS0051 --include-generated \
--project src/Adapter/MSTest.TestAdapter/MSTest.TestAdapter.csproj

This will add the newly-introduced symbols to src/Adapter/MSTest.TestAdapter/InternalAPI/InternalAPI.Shipped.txt (since the intent is to baseline the current surface).

Note: The same rebase should be verified against the UWP-specific InternalAPI/uwp/InternalAPI.Shipped.txt if those TFMs include the new TestingPlatformAdapter types.


Build overview
  • Build status: FAILED
  • Duration: 200.1s
  • MSBuild: 18.8.0-preview-26302-115
  • Projects: 49 total; 3 failed (Build.proj, NonWindowsTests.slnf, MSTest.TestAdapter.csproj)
  • Errors: 151 (all RS0051)
  • Warnings: 0
  • Configuration: Debug, Linux (non-Windows TFMs only)
  • Failed target:CoreCompile (Csc task) in MSTest.TestAdapter.csproj
All MSBuild errors (151 — all RS0051)
CodeFileLineSymbol (abbreviated)
RS0051IMSTestTrxReportCapability.cs14IMSTestTrxReportCapability
RS0051IMSTestTrxReportCapability.cs16IMSTestTrxReportCapability.IsTrxEnabled
RS0051MSTestFilterContext.cs27MSTestFilterContextBase
RS0051MSTestFilterContext.cs32MSTestFilterContextBase..ctor(...)
RS0051MSTestFilterContext.cs51MSTestFilterContextBase.RunSettings
RS0051MSTestFilterContext.cs72MSTestFilterContextBase.GetTestCaseFilter(...)
RS0051MSTestFilterContext.cs192MSTestRunContext
RS0051MSTestFilterContext.cs194MSTestRunContext..ctor(...)
RS0051MSTestFilterContext.cs201–211MSTestRunContext properties
RS0051MSTestFilterContext.cs218–220MSTestDiscoveryContext
RS0051MSTestFrameworkHandle.cs20–33MSTestFrameworkHandle + members
RS0051MSTestRunSettings.cs25–60MSTestRunSettings + members
RS0051MSTestRunSettingsConfigurationProvider.cs19–35MSTestRunSettingsConfigurationProvider + members
RS0051MSTestRunSettingsEnvironmentVariableProvider.cs21–103MSTestRunSettingsEnvironmentVariableProvider + members
RS0051MSTestRunSettingsCommandLineOptionsProvider.cs21–31MSTestRunSettingsCommandLineOptionsProvider + members
RS0051MSTestTestCaseFilterCommandLineOptionsProvider.cs17–21MSTestTestCaseFilterCommandLineOptionsProvider + members
RS0051MSTestTestRunParametersCommandLineOptionsProvider.cs18–27MSTestTestRunParametersCommandLineOptionsProvider + members
RS0051MSTestTestFramework.cs41MSTestTestFramework

All files are under src/Adapter/MSTest.TestAdapter/TestingPlatformAdapter/ — these exist in main but not in the PR branch.


🤖 Generated by the Build Failure Analysis workflow using (a href="(dev.azure.com/redacted) · commit d2d9f5f

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 321.4 AIC · ⌖ 7.02 AIC · ⊞ 7.3K · [◷]( · )

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 321.4 AIC · ⌖ 7.02 AIC · ⊞ 7.3K ·

CopilotAI added 2 commits July 9, 2026 00:48
Merging current main brought in the Phase 6a native MTP adapter (dotnet/testfx#9748) TestingPlatformAdapter types, whose internal API was not in the baseline, causing 75 RS0051 errors per TFM in the PR merge build. Added the 75 entries to MSTest.TestAdapter's InternalAPI.Shipped.txt in canonical sorted order.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 22:55

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 99/101 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@Evangelink
Amaury Levé (Evangelink) enabled auto-merge (squash) July 9, 2026 09:20
@Evangelink
Amaury Levé (Evangelink) enabled auto-merge (squash) July 9, 2026 09:20
@Evangelink
Amaury Levé (Evangelink) merged commit 1e92d89 into mainJul 9, 2026
89 checks passed
@Evangelink
Amaury Levé (Evangelink) deleted the dev/add-internalapi-tracking branch July 9, 2026 09:21
Amaury Levé (Evangelink) added a commit that referenced this pull request Jul 9, 2026
…RS0051
Microsoft.Testing.Platform's BaseSerializer.ReadFields and WriteListPayload<T>
(added by #9774) were never added to InternalAPI.Unshipped.txt, so once #9752
enabled RS0051 internal-API enforcement both landed on main and left main red.
This foundational project's failure cascades and blocks the whole build, so
track the two methods in the base InternalAPI.Unshipped.txt (the diagnostic
fires on netstandard2.0 too, so it belongs in the base file, not net/).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Amaury Levé (Evangelink) added a commit that referenced this pull request Jul 9, 2026
…ternalAPI
With Microsoft.Testing.Platform now building, MSTest.TestAdapter compiles and surfaces its own RS0051 failures for the internal PlatformServicesConfigurationAdapter type (added while InternalAPI tracking was being rolled out in #9752). Declare the type, its constructor and indexer in the non-UWP InternalAPI.Unshipped.txt so the adapter builds.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Amaury Levé (Evangelink) added a commit that referenced this pull request Jul 28, 2026
- Bump System.Threading.Tasks.Extensions 4.5.4 -> 4.6.3. Microsoft.ApplicationInsights
3.1.2 -> Azure.Monitor.OpenTelemetry.Exporter -> Azure.Core 1.54.0 requires >= 4.6.3,
which made every .NETFramework project referencing MSTest.TestAdapter fail restore with
NU1605 (Windows-only, because the Linux/macOS legs skip the net462 targets).
- Declare the new/changed internal APIs (LocalFileTelemetryClient,
AppInsightTelemetryClientFactory ctor, AppInsightsProvider.LocalExportPathEnvVar,
TelemetryProperties.VersionValue = "21") in the InternalAPI.Unshipped.txt baselines
introduced by #9752, which landed on main after this PR was opened.
- Add the required UTF-8 BOM to LocalFileTelemetryClient.cs and
LocalFileTelemetryClientTests.cs.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e947c36-e52a-4ba8-8185-cd338ae24060
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state/needs-reviewAwaiting review from the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@Evangelink@0101
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Add InternalAPI tracking to all projects with PublicAPI - #9752

Merged
Amaury Levé (Evangelink) merged 7 commits into
mainfrom
dev/add-internalapi-tracking
Jul 9, 2026
Merged

Add InternalAPI tracking to all projects with PublicAPI#9752
Amaury Levé (Evangelink) merged 7 commits into
mainfrom
dev/add-internalapi-tracking

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Summary

Adds InternalAPI tracking to every source project that already tracks a public API surface, so the Roslyn public/internal API analyzers (RS0051–RS0061) validate the internal surface too — mirroring how PublicAPI.Shipped.txt / PublicAPI.Unshipped.txt work today.

What changed

  • New InternalAPI files for all 25 projects with a PublicAPI folder, mirroring the exact layout — including framework-specific subfolders (net/, net9.0/, net462/, net8.0-windows*, uwp/, uap10.0.16299/, …) and root-level files for the two projects (MSBuild, VSTestBridge) that keep API files at project root.
  • Wired into each .csproj as AdditionalFiles, with the same Condition expressions as the corresponding PublicAPI entries.
  • Baselined the current internal API surface into InternalAPI.Shipped.txt (leaving Unshipped empty), matching the repo's post-release PublicAPI state. Entries were generated with the analyzer's own code fix (dotnet format analyzers --diagnostics RS0051 --include-generated), which also captures RESX-generated resource classes and compiler-emitted attributes.
  • eng/mark-shipped.ps1 now processes InternalAPI files in addition to PublicAPI (parameterized prefix; also fixes a PublicApiPublicAPI glob casing bug).
  • .editorconfig enables the internal-API analyzer diagnostics (RS0051–RS0061), which is what makes this tracking active.

Verification

Authoritative --no-incremental / /t:Rebuild builds across all reachable TFMs (netstandard2.0, net8.0, net9.0, net462, net8.0-windows, net9.0-windows) for all 25 projects report 0 RS0051. PublicAPI files are untouched.

Note

The uap10.0.16299 TFM cannot be compiled in every environment (needs the UWP/Windows XAML workload); its internal deltas were populated from build output and verified not to regress the shared-folder ModernUwp (net9.0-windows) leg.

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

Introduce InternalAPI.Shipped.txt / InternalAPI.Unshipped.txt files (mirroring
the existing PublicAPI folder layout, including framework-specific subfolders)
for every source project that already tracks its public API surface, and wire
them into each project as AdditionalFiles so the Roslyn public/internal API
analyzers (RS0051-RS0061) validate the internal surface too.
- Baseline the current internal API surface into InternalAPI.Shipped.txt
(Unshipped left empty), matching the repo's post-release PublicAPI state.
- Update eng/mark-shipped.ps1 to also process InternalAPI files.
- .editorconfig enables the internal-API analyzer diagnostics (RS0051-RS0061).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 19:33
CopilotAI reviewed Jul 8, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

🤖 Automated review by GitHub Copilot. Generated by the Expert Code Review workflow. To request a follow-up action, reply by tagging @copilot directly.

Review Summary

Clean, well-structured infrastructure PR. All 22 review dimensions assessed — no blocking issues found.

Key Findings

DimensionAssessment
Completeness✅ All 25 projects with PublicAPI tracking now have matching InternalAPI tracking. Folder structures (TFM subfolders, root-level files) mirror exactly.
.editorconfig✅ RS0051–RS0061 correctly enabled. RS0057 (oblivious types) reasonably suppressed for polyfill/compiler-generated code.
eng/mark-shipped.ps1✅ Correctly parameterized via $Prefix. The PublicApiPublicAPI casing fix resolves a latent bug on case-sensitive filesystems (Linux + PowerShell 7). The regex '\.Shipped\.txt$' correctly extracts the prefix.
.csproj wiringAdditionalFiles entries use the same Condition expressions as their corresponding PublicAPI entries. MSBuild/VSTestBridge correctly reference root-level files; other projects use InternalAPI/ subfolders.
InternalAPI content✅ Shipped files are populated; Unshipped files all contain only #nullable enable. TPEXP/MSTESTEXP prefixed entries are correctly placed for internal (not public) members. Compiler-emitted polyfill types (EmbeddedAttribute, CompilerLoweringPreserveAttribute, etc.) are expected per the analyzer's code-fix output.
Backward Compatibility✅ No public API surface changes. New analyzer warnings (RS0051+) are additive and enforcement-only for maintainers.

Notes

  • The Write-Host "Processing $shippedFilePath" improvement gives better diagnostic output (shows full path including prefix) — nice QoL improvement.
  • The Get-ChildItem -Include array pattern ("PublicAPI.Shipped.txt", "InternalAPI.Shipped.txt") correctly invokes Set-AsShipped once per matching file with the right prefix.
  • No issues with cross-TFM correctness, naming conventions, or scope creep.

@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 431.7 AIC · ⌖ 8.36 AIC · ⊞ 7.3K ·

Comment threadsrc/Platform/Microsoft.Testing.Platform/InternalAPI/InternalAPI.Shipped.txt Outdated
Comment thread.editorconfig
CI surfaced RS0051 failures because generated code was baked into the
InternalAPI files: BuildInfo version constants embed the build version
(e.g. "1.0.0-ci" on CI vs "2.4.0-dev" locally), plus RESX-generated resource
accessors and *.g.cs content-file sources.
- .editorconfig: disable the internal API analyzers (RS0051-RS0061) for
generated code (*.g.cs and artifacts/obj/**/*.cs).
- Regenerate InternalAPI baselines without the version-stamped / generated
symbols, while keeping real auto-generated-marked API (Polyfills attributes).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 20:29

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 97/99 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 221.4 AIC · ⌖ 7.47 AIC · ⊞ 7.3K ·

Comment thread.editorconfig
…TestBridge
The regenerated InternalAPI.Shipped.txt baselines for these three extensions were missing the shared polyfill symbols (EmbeddedAttribute, CompilerLoweringPreserveAttribute, Polyfills.Polyfill OS helpers, HashHelpers), causing RS0051 build failures. Added them in canonical sorted order to match the other tracked projects.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 20:52

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 97/99 changed files
  • Comments generated: 0 new
  • Review effort level: Low

@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 136.9 AIC · ⌖ 7.15 AIC · ⊞ 7.3K ·

Comment threadsrc/Platform/Microsoft.Testing.Platform/InternalAPI/InternalAPI.Shipped.txt Outdated
…nal API
ProtocolVersion = PlatformVersion.Version inlines the build-time version stamp, which differs by environment (2.4.0-dev locally vs 2.4.0-ci on CI). Tracking its literal value in InternalAPI.Shipped.txt made the internal API analyzer non-deterministic and failed CI (Linux Debug) with RS0051. Suppress RS0051 at the declaration and drop the version-valued baseline entry, consistent with the PR's exclusion of version-stamped constants.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 21:24

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 98/100 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 335.7 AIC · ⌖ 7.69 AIC · ⊞ 7.3K ·

Comment threadsrc/Platform/Microsoft.Testing.Platform/InternalAPI/InternalAPI.Shipped.txt Outdated
…onst
The raw string literal const embeds the source file's line endings (CRLF on Windows where the baseline was generated, LF on Linux CI), so its compile-time value is non-deterministic across platforms and failed CI (Linux Debug) with RS0051. Suppress RS0051 at the declaration and drop the CRLF-valued baseline entry, matching the ProtocolVersion fix.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 21:55

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 99/101 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Build Failure Analysis

Summary — All 151 build errors are RS0051 (Internal API analyzer: "Symbol is not part of the declared API") in MSTest.TestAdapter.csproj, caused by a merge conflict with main — the PR's InternalAPI.Shipped.txt baseline was generated from an older main that didn't yet contain the Native MTP integration types.

Root cause: PR branch is stale — missing new TestingPlatformAdapter symbols from main

The PR was branched from commit 1300ae0 (Jul 8, 14:52). After branching, several PRs landed on main that added new internal types to src/Adapter/MSTest.TestAdapter/TestingPlatformAdapter/:

PRCommitAdded
#974318c741fPhases 3–5: MSTestFilterContext, MSTestRunContext, MSTestDiscoveryContext, MSTestFilterContextBase
#9748279d3b8Phase 6a: MSTestFrameworkHandle, MSTestRunSettings, MSTestRunSettingsConfigurationProvider, MSTestRunSettingsEnvironmentVariableProvider, MSTestRunSettingsCommandLineOptionsProvider, MSTestTestRunParametersCommandLineOptionsProvider, MSTestTestCaseFilterCommandLineOptionsProvider, IMSTestTrxReportCapability, MSTestTestFramework
#9749cf0dea9Follow-up simplification to the above

When CI merges the PR head (d2d9f5f) into latest main (52192c9), the merged code includes both:

  1. ✅ The InternalAPI tracking infrastructure (from this PR)
  2. ❌ The new TestingPlatformAdapter symbols (from main) — which are not declared in InternalAPI.Shipped.txt or InternalAPI.Unshipped.txt

This triggers 151 RS0051 errors for undeclared internal API symbols.

Affected types (12 types + their members = 151 errors total):

  • IMSTestTrxReportCapability
  • MSTestFilterContextBase
  • MSTestRunContext
  • MSTestDiscoveryContext
  • MSTestFrameworkHandle
  • MSTestRunSettings
  • MSTestRunSettingsConfigurationProvider
  • MSTestRunSettingsEnvironmentVariableProvider
  • MSTestRunSettingsCommandLineOptionsProvider
  • MSTestTestCaseFilterCommandLineOptionsProvider
  • MSTestTestRunParametersCommandLineOptionsProvider
  • MSTestTestFramework

Proposed fix

Rebase the PR onto current main and regenerate the baseline:

git fetch origin main
git rebase origin/main
# Regenerate the InternalAPI baseline for the TestAdapter
dotnet format analyzers --diagnostics RS0051 --include-generated \
--project src/Adapter/MSTest.TestAdapter/MSTest.TestAdapter.csproj

This will add the newly-introduced symbols to src/Adapter/MSTest.TestAdapter/InternalAPI/InternalAPI.Shipped.txt (since the intent is to baseline the current surface).

Note: The same rebase should be verified against the UWP-specific InternalAPI/uwp/InternalAPI.Shipped.txt if those TFMs include the new TestingPlatformAdapter types.


Build overview
  • Build status: FAILED
  • Duration: 200.1s
  • MSBuild: 18.8.0-preview-26302-115
  • Projects: 49 total; 3 failed (Build.proj, NonWindowsTests.slnf, MSTest.TestAdapter.csproj)
  • Errors: 151 (all RS0051)
  • Warnings: 0
  • Configuration: Debug, Linux (non-Windows TFMs only)
  • Failed target:CoreCompile (Csc task) in MSTest.TestAdapter.csproj
All MSBuild errors (151 — all RS0051)
CodeFileLineSymbol (abbreviated)
RS0051IMSTestTrxReportCapability.cs14IMSTestTrxReportCapability
RS0051IMSTestTrxReportCapability.cs16IMSTestTrxReportCapability.IsTrxEnabled
RS0051MSTestFilterContext.cs27MSTestFilterContextBase
RS0051MSTestFilterContext.cs32MSTestFilterContextBase..ctor(...)
RS0051MSTestFilterContext.cs51MSTestFilterContextBase.RunSettings
RS0051MSTestFilterContext.cs72MSTestFilterContextBase.GetTestCaseFilter(...)
RS0051MSTestFilterContext.cs192MSTestRunContext
RS0051MSTestFilterContext.cs194MSTestRunContext..ctor(...)
RS0051MSTestFilterContext.cs201–211MSTestRunContext properties
RS0051MSTestFilterContext.cs218–220MSTestDiscoveryContext
RS0051MSTestFrameworkHandle.cs20–33MSTestFrameworkHandle + members
RS0051MSTestRunSettings.cs25–60MSTestRunSettings + members
RS0051MSTestRunSettingsConfigurationProvider.cs19–35MSTestRunSettingsConfigurationProvider + members
RS0051MSTestRunSettingsEnvironmentVariableProvider.cs21–103MSTestRunSettingsEnvironmentVariableProvider + members
RS0051MSTestRunSettingsCommandLineOptionsProvider.cs21–31MSTestRunSettingsCommandLineOptionsProvider + members
RS0051MSTestTestCaseFilterCommandLineOptionsProvider.cs17–21MSTestTestCaseFilterCommandLineOptionsProvider + members
RS0051MSTestTestRunParametersCommandLineOptionsProvider.cs18–27MSTestTestRunParametersCommandLineOptionsProvider + members
RS0051MSTestTestFramework.cs41MSTestTestFramework

All files are under src/Adapter/MSTest.TestAdapter/TestingPlatformAdapter/ — these exist in main but not in the PR branch.


🤖 Generated by the Build Failure Analysis workflow using (a href="(dev.azure.com/redacted) · commit d2d9f5f

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 321.4 AIC · ⌖ 7.02 AIC · ⊞ 7.3K · [◷]( · )

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 321.4 AIC · ⌖ 7.02 AIC · ⊞ 7.3K ·

CopilotAI added 2 commits July 9, 2026 00:48
Merging current main brought in the Phase 6a native MTP adapter (dotnet/testfx#9748) TestingPlatformAdapter types, whose internal API was not in the baseline, causing 75 RS0051 errors per TFM in the PR merge build. Added the 75 entries to MSTest.TestAdapter's InternalAPI.Shipped.txt in canonical sorted order.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 22:55

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 99/101 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@Evangelink
Amaury Levé (Evangelink) enabled auto-merge (squash) July 9, 2026 09:20
@Evangelink
Amaury Levé (Evangelink) enabled auto-merge (squash) July 9, 2026 09:20
@Evangelink
Amaury Levé (Evangelink) merged commit 1e92d89 into mainJul 9, 2026
89 checks passed
@Evangelink
Amaury Levé (Evangelink) deleted the dev/add-internalapi-tracking branch July 9, 2026 09:21
Amaury Levé (Evangelink) added a commit that referenced this pull request Jul 9, 2026
…RS0051
Microsoft.Testing.Platform's BaseSerializer.ReadFields and WriteListPayload<T>
(added by #9774) were never added to InternalAPI.Unshipped.txt, so once #9752
enabled RS0051 internal-API enforcement both landed on main and left main red.
This foundational project's failure cascades and blocks the whole build, so
track the two methods in the base InternalAPI.Unshipped.txt (the diagnostic
fires on netstandard2.0 too, so it belongs in the base file, not net/).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Amaury Levé (Evangelink) added a commit that referenced this pull request Jul 9, 2026
…ternalAPI
With Microsoft.Testing.Platform now building, MSTest.TestAdapter compiles and surfaces its own RS0051 failures for the internal PlatformServicesConfigurationAdapter type (added while InternalAPI tracking was being rolled out in #9752). Declare the type, its constructor and indexer in the non-UWP InternalAPI.Unshipped.txt so the adapter builds.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Amaury Levé (Evangelink) added a commit that referenced this pull request Jul 28, 2026
- Bump System.Threading.Tasks.Extensions 4.5.4 -> 4.6.3. Microsoft.ApplicationInsights
3.1.2 -> Azure.Monitor.OpenTelemetry.Exporter -> Azure.Core 1.54.0 requires >= 4.6.3,
which made every .NETFramework project referencing MSTest.TestAdapter fail restore with
NU1605 (Windows-only, because the Linux/macOS legs skip the net462 targets).
- Declare the new/changed internal APIs (LocalFileTelemetryClient,
AppInsightTelemetryClientFactory ctor, AppInsightsProvider.LocalExportPathEnvVar,
TelemetryProperties.VersionValue = "21") in the InternalAPI.Unshipped.txt baselines
introduced by #9752, which landed on main after this PR was opened.
- Add the required UTF-8 BOM to LocalFileTelemetryClient.cs and
LocalFileTelemetryClientTests.cs.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e947c36-e52a-4ba8-8185-cd338ae24060
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state/needs-reviewAwaiting review from the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@Evangelink@0101
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Add InternalAPI tracking to all projects with PublicAPI - #9752

Merged
Amaury Levé (Evangelink) merged 7 commits into
mainfrom
dev/add-internalapi-tracking
Jul 9, 2026
Merged

Add InternalAPI tracking to all projects with PublicAPI#9752
Amaury Levé (Evangelink) merged 7 commits into
mainfrom
dev/add-internalapi-tracking

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Summary

Adds InternalAPI tracking to every source project that already tracks a public API surface, so the Roslyn public/internal API analyzers (RS0051–RS0061) validate the internal surface too — mirroring how PublicAPI.Shipped.txt / PublicAPI.Unshipped.txt work today.

What changed

  • New InternalAPI files for all 25 projects with a PublicAPI folder, mirroring the exact layout — including framework-specific subfolders (net/, net9.0/, net462/, net8.0-windows*, uwp/, uap10.0.16299/, …) and root-level files for the two projects (MSBuild, VSTestBridge) that keep API files at project root.
  • Wired into each .csproj as AdditionalFiles, with the same Condition expressions as the corresponding PublicAPI entries.
  • Baselined the current internal API surface into InternalAPI.Shipped.txt (leaving Unshipped empty), matching the repo's post-release PublicAPI state. Entries were generated with the analyzer's own code fix (dotnet format analyzers --diagnostics RS0051 --include-generated), which also captures RESX-generated resource classes and compiler-emitted attributes.
  • eng/mark-shipped.ps1 now processes InternalAPI files in addition to PublicAPI (parameterized prefix; also fixes a PublicApiPublicAPI glob casing bug).
  • .editorconfig enables the internal-API analyzer diagnostics (RS0051–RS0061), which is what makes this tracking active.

Verification

Authoritative --no-incremental / /t:Rebuild builds across all reachable TFMs (netstandard2.0, net8.0, net9.0, net462, net8.0-windows, net9.0-windows) for all 25 projects report 0 RS0051. PublicAPI files are untouched.

Note

The uap10.0.16299 TFM cannot be compiled in every environment (needs the UWP/Windows XAML workload); its internal deltas were populated from build output and verified not to regress the shared-folder ModernUwp (net9.0-windows) leg.

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

Introduce InternalAPI.Shipped.txt / InternalAPI.Unshipped.txt files (mirroring
the existing PublicAPI folder layout, including framework-specific subfolders)
for every source project that already tracks its public API surface, and wire
them into each project as AdditionalFiles so the Roslyn public/internal API
analyzers (RS0051-RS0061) validate the internal surface too.
- Baseline the current internal API surface into InternalAPI.Shipped.txt
(Unshipped left empty), matching the repo's post-release PublicAPI state.
- Update eng/mark-shipped.ps1 to also process InternalAPI files.
- .editorconfig enables the internal-API analyzer diagnostics (RS0051-RS0061).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 19:33
CopilotAI reviewed Jul 8, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

🤖 Automated review by GitHub Copilot. Generated by the Expert Code Review workflow. To request a follow-up action, reply by tagging @copilot directly.

Review Summary

Clean, well-structured infrastructure PR. All 22 review dimensions assessed — no blocking issues found.

Key Findings

DimensionAssessment
Completeness✅ All 25 projects with PublicAPI tracking now have matching InternalAPI tracking. Folder structures (TFM subfolders, root-level files) mirror exactly.
.editorconfig✅ RS0051–RS0061 correctly enabled. RS0057 (oblivious types) reasonably suppressed for polyfill/compiler-generated code.
eng/mark-shipped.ps1✅ Correctly parameterized via $Prefix. The PublicApiPublicAPI casing fix resolves a latent bug on case-sensitive filesystems (Linux + PowerShell 7). The regex '\.Shipped\.txt$' correctly extracts the prefix.
.csproj wiringAdditionalFiles entries use the same Condition expressions as their corresponding PublicAPI entries. MSBuild/VSTestBridge correctly reference root-level files; other projects use InternalAPI/ subfolders.
InternalAPI content✅ Shipped files are populated; Unshipped files all contain only #nullable enable. TPEXP/MSTESTEXP prefixed entries are correctly placed for internal (not public) members. Compiler-emitted polyfill types (EmbeddedAttribute, CompilerLoweringPreserveAttribute, etc.) are expected per the analyzer's code-fix output.
Backward Compatibility✅ No public API surface changes. New analyzer warnings (RS0051+) are additive and enforcement-only for maintainers.

Notes

  • The Write-Host "Processing $shippedFilePath" improvement gives better diagnostic output (shows full path including prefix) — nice QoL improvement.
  • The Get-ChildItem -Include array pattern ("PublicAPI.Shipped.txt", "InternalAPI.Shipped.txt") correctly invokes Set-AsShipped once per matching file with the right prefix.
  • No issues with cross-TFM correctness, naming conventions, or scope creep.

@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 431.7 AIC · ⌖ 8.36 AIC · ⊞ 7.3K ·

Comment threadsrc/Platform/Microsoft.Testing.Platform/InternalAPI/InternalAPI.Shipped.txt Outdated
Comment thread.editorconfig
CI surfaced RS0051 failures because generated code was baked into the
InternalAPI files: BuildInfo version constants embed the build version
(e.g. "1.0.0-ci" on CI vs "2.4.0-dev" locally), plus RESX-generated resource
accessors and *.g.cs content-file sources.
- .editorconfig: disable the internal API analyzers (RS0051-RS0061) for
generated code (*.g.cs and artifacts/obj/**/*.cs).
- Regenerate InternalAPI baselines without the version-stamped / generated
symbols, while keeping real auto-generated-marked API (Polyfills attributes).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 20:29

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 97/99 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 221.4 AIC · ⌖ 7.47 AIC · ⊞ 7.3K ·

Comment thread.editorconfig
…TestBridge
The regenerated InternalAPI.Shipped.txt baselines for these three extensions were missing the shared polyfill symbols (EmbeddedAttribute, CompilerLoweringPreserveAttribute, Polyfills.Polyfill OS helpers, HashHelpers), causing RS0051 build failures. Added them in canonical sorted order to match the other tracked projects.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 20:52

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 97/99 changed files
  • Comments generated: 0 new
  • Review effort level: Low

@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 136.9 AIC · ⌖ 7.15 AIC · ⊞ 7.3K ·

Comment threadsrc/Platform/Microsoft.Testing.Platform/InternalAPI/InternalAPI.Shipped.txt Outdated
…nal API
ProtocolVersion = PlatformVersion.Version inlines the build-time version stamp, which differs by environment (2.4.0-dev locally vs 2.4.0-ci on CI). Tracking its literal value in InternalAPI.Shipped.txt made the internal API analyzer non-deterministic and failed CI (Linux Debug) with RS0051. Suppress RS0051 at the declaration and drop the version-valued baseline entry, consistent with the PR's exclusion of version-stamped constants.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 21:24

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 98/100 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 335.7 AIC · ⌖ 7.69 AIC · ⊞ 7.3K ·

Comment threadsrc/Platform/Microsoft.Testing.Platform/InternalAPI/InternalAPI.Shipped.txt Outdated
…onst
The raw string literal const embeds the source file's line endings (CRLF on Windows where the baseline was generated, LF on Linux CI), so its compile-time value is non-deterministic across platforms and failed CI (Linux Debug) with RS0051. Suppress RS0051 at the declaration and drop the CRLF-valued baseline entry, matching the ProtocolVersion fix.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 21:55

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 99/101 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Build Failure Analysis

Summary — All 151 build errors are RS0051 (Internal API analyzer: "Symbol is not part of the declared API") in MSTest.TestAdapter.csproj, caused by a merge conflict with main — the PR's InternalAPI.Shipped.txt baseline was generated from an older main that didn't yet contain the Native MTP integration types.

Root cause: PR branch is stale — missing new TestingPlatformAdapter symbols from main

The PR was branched from commit 1300ae0 (Jul 8, 14:52). After branching, several PRs landed on main that added new internal types to src/Adapter/MSTest.TestAdapter/TestingPlatformAdapter/:

PRCommitAdded
#974318c741fPhases 3–5: MSTestFilterContext, MSTestRunContext, MSTestDiscoveryContext, MSTestFilterContextBase
#9748279d3b8Phase 6a: MSTestFrameworkHandle, MSTestRunSettings, MSTestRunSettingsConfigurationProvider, MSTestRunSettingsEnvironmentVariableProvider, MSTestRunSettingsCommandLineOptionsProvider, MSTestTestRunParametersCommandLineOptionsProvider, MSTestTestCaseFilterCommandLineOptionsProvider, IMSTestTrxReportCapability, MSTestTestFramework
#9749cf0dea9Follow-up simplification to the above

When CI merges the PR head (d2d9f5f) into latest main (52192c9), the merged code includes both:

  1. ✅ The InternalAPI tracking infrastructure (from this PR)
  2. ❌ The new TestingPlatformAdapter symbols (from main) — which are not declared in InternalAPI.Shipped.txt or InternalAPI.Unshipped.txt

This triggers 151 RS0051 errors for undeclared internal API symbols.

Affected types (12 types + their members = 151 errors total):

  • IMSTestTrxReportCapability
  • MSTestFilterContextBase
  • MSTestRunContext
  • MSTestDiscoveryContext
  • MSTestFrameworkHandle
  • MSTestRunSettings
  • MSTestRunSettingsConfigurationProvider
  • MSTestRunSettingsEnvironmentVariableProvider
  • MSTestRunSettingsCommandLineOptionsProvider
  • MSTestTestCaseFilterCommandLineOptionsProvider
  • MSTestTestRunParametersCommandLineOptionsProvider
  • MSTestTestFramework

Proposed fix

Rebase the PR onto current main and regenerate the baseline:

git fetch origin main
git rebase origin/main
# Regenerate the InternalAPI baseline for the TestAdapter
dotnet format analyzers --diagnostics RS0051 --include-generated \
--project src/Adapter/MSTest.TestAdapter/MSTest.TestAdapter.csproj

This will add the newly-introduced symbols to src/Adapter/MSTest.TestAdapter/InternalAPI/InternalAPI.Shipped.txt (since the intent is to baseline the current surface).

Note: The same rebase should be verified against the UWP-specific InternalAPI/uwp/InternalAPI.Shipped.txt if those TFMs include the new TestingPlatformAdapter types.


Build overview
  • Build status: FAILED
  • Duration: 200.1s
  • MSBuild: 18.8.0-preview-26302-115
  • Projects: 49 total; 3 failed (Build.proj, NonWindowsTests.slnf, MSTest.TestAdapter.csproj)
  • Errors: 151 (all RS0051)
  • Warnings: 0
  • Configuration: Debug, Linux (non-Windows TFMs only)
  • Failed target:CoreCompile (Csc task) in MSTest.TestAdapter.csproj
All MSBuild errors (151 — all RS0051)
CodeFileLineSymbol (abbreviated)
RS0051IMSTestTrxReportCapability.cs14IMSTestTrxReportCapability
RS0051IMSTestTrxReportCapability.cs16IMSTestTrxReportCapability.IsTrxEnabled
RS0051MSTestFilterContext.cs27MSTestFilterContextBase
RS0051MSTestFilterContext.cs32MSTestFilterContextBase..ctor(...)
RS0051MSTestFilterContext.cs51MSTestFilterContextBase.RunSettings
RS0051MSTestFilterContext.cs72MSTestFilterContextBase.GetTestCaseFilter(...)
RS0051MSTestFilterContext.cs192MSTestRunContext
RS0051MSTestFilterContext.cs194MSTestRunContext..ctor(...)
RS0051MSTestFilterContext.cs201–211MSTestRunContext properties
RS0051MSTestFilterContext.cs218–220MSTestDiscoveryContext
RS0051MSTestFrameworkHandle.cs20–33MSTestFrameworkHandle + members
RS0051MSTestRunSettings.cs25–60MSTestRunSettings + members
RS0051MSTestRunSettingsConfigurationProvider.cs19–35MSTestRunSettingsConfigurationProvider + members
RS0051MSTestRunSettingsEnvironmentVariableProvider.cs21–103MSTestRunSettingsEnvironmentVariableProvider + members
RS0051MSTestRunSettingsCommandLineOptionsProvider.cs21–31MSTestRunSettingsCommandLineOptionsProvider + members
RS0051MSTestTestCaseFilterCommandLineOptionsProvider.cs17–21MSTestTestCaseFilterCommandLineOptionsProvider + members
RS0051MSTestTestRunParametersCommandLineOptionsProvider.cs18–27MSTestTestRunParametersCommandLineOptionsProvider + members
RS0051MSTestTestFramework.cs41MSTestTestFramework

All files are under src/Adapter/MSTest.TestAdapter/TestingPlatformAdapter/ — these exist in main but not in the PR branch.


🤖 Generated by the Build Failure Analysis workflow using (a href="(dev.azure.com/redacted) · commit d2d9f5f

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 321.4 AIC · ⌖ 7.02 AIC · ⊞ 7.3K · [◷]( · )

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated content by GitHub Copilot. Generated by the Build Failure Analysis workflow. · 321.4 AIC · ⌖ 7.02 AIC · ⊞ 7.3K ·

CopilotAI added 2 commits July 9, 2026 00:48
Merging current main brought in the Phase 6a native MTP adapter (dotnet/testfx#9748) TestingPlatformAdapter types, whose internal API was not in the baseline, causing 75 RS0051 errors per TFM in the PR merge build. Added the 75 entries to MSTest.TestAdapter's InternalAPI.Shipped.txt in canonical sorted order.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 8, 2026 22:55

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 99/101 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@Evangelink
Amaury Levé (Evangelink) enabled auto-merge (squash) July 9, 2026 09:20
@Evangelink
Amaury Levé (Evangelink) enabled auto-merge (squash) July 9, 2026 09:20
@Evangelink
Amaury Levé (Evangelink) merged commit 1e92d89 into mainJul 9, 2026
89 checks passed
@Evangelink
Amaury Levé (Evangelink) deleted the dev/add-internalapi-tracking branch July 9, 2026 09:21
Amaury Levé (Evangelink) added a commit that referenced this pull request Jul 9, 2026
…RS0051
Microsoft.Testing.Platform's BaseSerializer.ReadFields and WriteListPayload<T>
(added by #9774) were never added to InternalAPI.Unshipped.txt, so once #9752
enabled RS0051 internal-API enforcement both landed on main and left main red.
This foundational project's failure cascades and blocks the whole build, so
track the two methods in the base InternalAPI.Unshipped.txt (the diagnostic
fires on netstandard2.0 too, so it belongs in the base file, not net/).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Amaury Levé (Evangelink) added a commit that referenced this pull request Jul 9, 2026
…ternalAPI
With Microsoft.Testing.Platform now building, MSTest.TestAdapter compiles and surfaces its own RS0051 failures for the internal PlatformServicesConfigurationAdapter type (added while InternalAPI tracking was being rolled out in #9752). Declare the type, its constructor and indexer in the non-UWP InternalAPI.Unshipped.txt so the adapter builds.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Amaury Levé (Evangelink) added a commit that referenced this pull request Jul 28, 2026
- Bump System.Threading.Tasks.Extensions 4.5.4 -> 4.6.3. Microsoft.ApplicationInsights
3.1.2 -> Azure.Monitor.OpenTelemetry.Exporter -> Azure.Core 1.54.0 requires >= 4.6.3,
which made every .NETFramework project referencing MSTest.TestAdapter fail restore with
NU1605 (Windows-only, because the Linux/macOS legs skip the net462 targets).
- Declare the new/changed internal APIs (LocalFileTelemetryClient,
AppInsightTelemetryClientFactory ctor, AppInsightsProvider.LocalExportPathEnvVar,
TelemetryProperties.VersionValue = "21") in the InternalAPI.Unshipped.txt baselines
introduced by #9752, which landed on main after this PR was opened.
- Add the required UTF-8 BOM to LocalFileTelemetryClient.cs and
LocalFileTelemetryClientTests.cs.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1e947c36-e52a-4ba8-8185-cd338ae24060
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state/needs-reviewAwaiting review from the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@Evangelink@0101