Skip to content

Fix build errors from obsolete MTP API usage#64

Merged
Tyrrrz merged 5 commits intomasterfrom
copilot/fix-build-errors
Mar 1, 2026
Merged

Fix build errors from obsolete MTP API usage#64
Tyrrrz merged 5 commits intomasterfrom
copilot/fix-build-errors

Conversation

Copy link
Contributor

Copilot AI commented Mar 1, 2026

  • Replace deprecated AddTestSessionLifetimeHandle with AddTestSessionLifetimeHandler in MtpIntegration.cs
  • Add #pragma warning disable CS0618 around CancelledTestNodeStateProperty usage in MtpLogger.cs
  • Add explanatory comment for the CS0618 suppression
  • Fix indentation of comment to match surrounding switch arms
  • Build succeeds with 0 errors/warnings

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@Tyrrrz Tyrrrz added the enhancement New feature or request label Mar 1, 2026
…18 for CancelledTestNodeStateProperty

Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix build errors and add ignores for obsolete issues Fix build errors from obsolete MTP API usage Mar 1, 2026
@Tyrrrz Tyrrrz added bug Something isn't working and removed enhancement New feature or request labels Mar 1, 2026
@Tyrrrz Tyrrrz marked this pull request as ready for review March 1, 2026 14:15
Copilot AI review requested due to automatic review settings March 1, 2026 14:15
@codecov
Copy link

codecov bot commented Mar 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.62%. Comparing base (52858f4) to head (1cde2da).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #64      +/-   ##
==========================================
+ Coverage   84.42%   84.62%   +0.20%     
==========================================
  Files          23       23              
  Lines         719      722       +3     
  Branches       85       85              
==========================================
+ Hits          607      611       +4     
  Misses         58       58              
+ Partials       54       53       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the GitHub Actions Test Logger’s Microsoft.Testing.Platform (MTP) integration to compile cleanly against MTP 2.1.0 with TreatWarningsAsErrors=true, addressing newly-obsoleted APIs.

Changes:

  • Replaced obsolete AddTestSessionLifetimeHandle with AddTestSessionLifetimeHandler for MTP 2.1.0 compatibility.
  • Scoped suppression of CS0618 around CancelledTestNodeStateProperty handling to preserve backward compatibility without failing the build.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
GitHubActionsTestLogger/MtpIntegration.cs Updates MTP test host registration to use the non-obsolete lifetime handler API.
GitHubActionsTestLogger/MtpLogger.cs Adds a narrowly-scoped pragma to suppress obsolete warning for cancelled test node state mapping.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Tyrrrz
Copy link
Owner

Tyrrrz commented Mar 1, 2026

@copilot please fix formatting errors

Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 1, 2026

@copilot please fix formatting errors

Fixed in 1cde2da — the comment was at column 0 instead of being indented to match the surrounding switch arms.

This was referenced Mar 25, 2026
github-actions bot pushed a commit to IntelliTect/EssentialCSharp.ListingManager that referenced this pull request Mar 26, 2026
Updated
[GitHubActionsTestLogger](https://github.com/Tyrrrz/GitHubActionsTestLogger)
from 3.0.1 to 3.0.2.

<details>
<summary>Release notes</summary>

_Sourced from [GitHubActionsTestLogger's
releases](https://github.com/Tyrrrz/GitHubActionsTestLogger/releases)._

## 3.0.2

## What's Changed
* Bump the nuget group with 4 updates by @​dependabot[bot] in
Tyrrrz/GitHubActionsTestLogger#59
* Bump the nuget group with 1 update by @​dependabot[bot] in
Tyrrrz/GitHubActionsTestLogger#60
* Migrate to Centralized NuGet Package Management (CPM) by @​Copilot in
Tyrrrz/GitHubActionsTestLogger#61
* Use range indexer in `SubstringAfterLast` by @​Copilot in
Tyrrrz/GitHubActionsTestLogger#62
* Bump the nuget group with 7 updates by @​dependabot[bot] in
Tyrrrz/GitHubActionsTestLogger#63
* Fix build errors from obsolete MTP API usage by @​Copilot in
Tyrrrz/GitHubActionsTestLogger#64
* Remove explicit Microsoft.SourceLink.GitHub package reference by
@​Copilot in Tyrrrz/GitHubActionsTestLogger#65
* Add strong naming by @​mgravell in
Tyrrrz/GitHubActionsTestLogger#67

## New Contributors
* @​Copilot made their first contribution in
Tyrrrz/GitHubActionsTestLogger#61
* @​mgravell made their first contribution in
Tyrrrz/GitHubActionsTestLogger#67

**Full Changelog**:
Tyrrrz/GitHubActionsTestLogger@3.0.1...3.0.2

Commits viewable in [compare
view](Tyrrrz/GitHubActionsTestLogger@3.0.1...3.0.2).
</details>

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=GitHubActionsTestLogger&package-manager=nuget&previous-version=3.0.1&new-version=3.0.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants