Repository navigation
feat: support .NET 10 / PowerShell 7.6 (bump sentry-dotnet to 6.5.0) - #133
Merged
Merged
Conversation
- Bumps `dependencies/Sentry.properties` from 5.16.1 to 6.5.0 - Adds a `net10.0` download entry to `dependencies/download.ps1` - Routes PowerShell 7.6+ to the `net10.0` Sentry assembly in `Get-SentryAssembliesDirectory` Sentry Logs APIs are no longer experimental in sentry-dotnet 6.x; updated the sample and tests to call `$_.EnableLogs` / `$_.SetBeforeSendLog(...)` directly on `SentryOptions`. The `CaptureUserFeedback` API was also removed in 6.x; the corresponding test now uses `CaptureFeedback` and asserts on the new `feedback` envelope item shape (a `SentryEvent` with `Contexts.Feedback`). Closes #125 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
|
vaind
approved these changes
May 27, 2026
…h 7.6 explicitly Windows PowerShell 5.1 (net462) was failing to resolve [Sentry.SentryOptions] because Sentry 6.x's net462 build references System.Text.Json 8.x types while we were still flattening v6.0.10 into the module's lib/net462 folder. Bump the affected transitive packages to versions that match the Sentry 6.5.0 nuspec: - System.Text.Json: 6.0.10 -> 8.0.5 - Microsoft.Bcl.AsyncInterfaces: 6.0.0 -> 8.0.0 - System.Text.Encodings.Web: 6.0.0 -> 8.0.0 - Adds System.Runtime.InteropServices.RuntimeInformation 4.3.0 (new dep in 6.x) Also add an explicit pwsh 7.6 target to the test matrix (tests/test-pwsh-7.6.props + build.yml) per @vaind's review suggestion, so .NET 10 compatibility is verified directly instead of relying on whatever 'latest' happens to point at. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
sentry-dotnet 6.5.0's net462 build (via System.Text.Json 8.0.5) binds
against System.Memory assembly 4.0.1.2; we were shipping 4.0.1.1 (package
4.5.4), which broke WinPS module load with:
Could not load file or assembly 'System.Memory, Version=4.0.1.2'
Bumping the package to 4.5.5 ships the matching 4.0.1.2 assembly. This
also unblocks the three Windows integration tests that spawn powershell.exe
as a subprocess.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Collaborator
Author
|
For the |
jamescrosswell
marked this pull request as ready for review
May 28, 2026 00:04
vaind
added a commit
that referenced
this pull request
Sep 7, 2026
Write-SentryLog (#131) and the move of its options off Experimental (#133) both land in this same unreleased cycle, so no released version ever exposed $_.Experimental.SetBeforeSendLog through the module. There is nothing for a user upgrading from 0.4.0 to migrate. Reaching past the module into the bundled SDK's options object was the only way to touch it from 0.4.0, and the Dependencies entry for the 5.16.1 -> 6.10.0 bump already covers that surface. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
vaind
added a commit
that referenced
this pull request
Sep 7, 2026
#133 moved the Logs options off Experimental and updated the sample and tests accordingly, so it shaped the logging surface users see. Its attribution lived in the breaking-change entry that was just removed; fold it into the feature entry rather than losing it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
vaind
added a commit
that referenced
this pull request
Sep 7, 2026
* chore: update dependencies/Sentry.properties to 6.10.0 * docs: Drop the Logs opt-in from the send-logs sample sentry-dotnet 6.10.0 removed the EnableLogs gate on SentrySdk.Logger, which is what Write-SentryLog calls. Setting $_.EnableLogs = $true no longer has any bearing on whether Write-SentryLog emits, so the sample's "opt in to Logs" guidance now teaches something untrue. Verified against the bundled 6.10.0 assembly: a log envelope item reaches the transport with EnableLogs both set and unset, where 6.5.0 emitted only when it was set. No test covers the disabled path, which is why the change was invisible to CI. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Configure Sentry client with DSN and debug mode * docs: Fold the Logs opt-in note into the Write-SentryLog entry Write-SentryLog and the SDK bump that removed the EnableLogs gate both land in the same unreleased cycle, so describing the removal as its own entry documents a change no released version ever exposed. Readers of the next release only need to know the cmdlet exists, so reference #137 from the entry that introduced it instead. Drop the EnableLogs half of the breaking-changes entry for the same reason: it directed readers to set $_.EnableLogs, which is no longer required for Write-SentryLog to emit. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs: Drop the Experimental breaking-change entry Write-SentryLog (#131) and the move of its options off Experimental (#133) both land in this same unreleased cycle, so no released version ever exposed $_.Experimental.SetBeforeSendLog through the module. There is nothing for a user upgrading from 0.4.0 to migrate. Reaching past the module into the bundled SDK's options object was the only way to touch it from 0.4.0, and the Dependencies entry for the 5.16.1 -> 6.10.0 bump already covers that surface. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs: Credit #133 on the Write-SentryLog entry #133 moved the Logs options off Experimental and updated the sample and tests accordingly, so it shaped the logging surface users see. Its attribution lived in the breaking-change entry that was just removed; fold it into the feature entry rather than losing it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: GitHub <noreply@github.com> Co-authored-by: Ivan Dlugos <dlugos.ivan@gmail.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: Ivan Dlugos <6349682+vaind@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds .NET 10 / PowerShell 7.6 support by bumping the bundled
sentry-dotnetassembly from 5.16.1 to 6.5.0 and wiringGet-SentryAssembliesDirectoryto picknet10.0on pwsh ≥ 7.6.dependencies/Sentry.properties→ 6.5.0dependencies/download.ps1→ adds anet10.0DownloadlineGet-SentryAssembliesDirectory.ps1→ adds a7.6 → net10.0branch (and a comment-block entry)Motivation
5.xtops out atnet9.0, so on PowerShell 7.6 (which runs on .NET 10) the module currently loads thenet9.0Sentry assembly into a .NET 10 runtime — producingCS1701warnings and, on some hosts, a fatalAdd-Typefailure.Breaking-change audit (5.16.1 → 6.5.0)
Grepped the module / samples / tests for every breaking change in the 6.0.0 changelog. Only three sites needed fixing — all in tests/samples, no public PowerShell surface changed:
SentrySdk.CaptureUserFeedbackremoved.tests/out-sentry.tests.ps1now usesCaptureFeedback(message, contactEmail, name, replayId, url, associatedEventId)and asserts on the newfeedbackenvelope-item shape (SentryEventwithContexts.Feedback) instead of the legacyuser_reportpayload.SentryOptions.Experimental.{EnableLogs,SetBeforeSendLog}graduated to stable.tests/write-sentrylog.tests.ps1andsamples/send-logs.ps1now call$_.EnableLogs/$_.SetBeforeSendLog(...)directly. This is the only user-visible behavior change in this PR — documented under "Breaking changes" in the changelog.SentryLog.Templateis nownullwhen no parameters are supplied (the raw string moves toMessage). Adjusted the one assertion that relied on the old behavior.No usages found for the other 6.0 breaking changes (
BreadcrumbLevel.Critical,ScopeExtensions.Populate, MAUI / UWP / Azure Functions surfaces, etc.).Verification
pwsh ./dependencies/download.ps1regeneratesmodules/Sentry/lib/{net8.0,net9.0,net10.0,net462}at 6.5.0Closes #125
🤖 Generated with Claude Code