Releases clear the dev VersionSuffix in Directory.Build.props
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- csharp, github
- Domain
- build-system, release
Research direction
Start with Directory.Build.props and compare how the VersionSuffix condition is written with the behavior described for Craft's setMsBuildVersion in src/utils/versionPatterns.ts and readXmlTag in src/targets/nuget.ts. Check the proposed conditional element against Craft's version bump and version reading behavior, including the alternative of changing Craft. Done means non-Release builds retain the dev suffix after releases while Release builds and CI package versions remain unaffected.
Written by the indexing model from the issue text.
Description
Every release now clears the dev version suffix that non-Release builds get. The 6.13.0 release commit (e80b26ecc) did this on main:
<PropertyGroup Condition="'$(Configuration)' != 'Release' And '$(VersionSuffix)' == ''">
- <VersionSuffix>dev</VersionSuffix>
+ <VersionSuffix></VersionSuffix>
</PropertyGroup>
Since then, Debug builds of main are versioned 6.13.0 instead of 6.13.0-dev, so they look the same as the published release. Release builds aren't affected, and neither is anything CI packs or publishes.
Cause
Craft's MSBuild version bump clears every <VersionSuffix> in a file that has a <VersionPrefix>, so that MSBuild can't append it to the new version. See setMsBuildVersion in src/utils/versionPatterns.ts, added in getsentry/craft#955 on 2 November. It doesn't see that ours only applies outside Release builds. 7.0.0-rc.3 was cut before that change, which is why it kept the suffix. It will happen on every release from now on, including 7.0.0.
version7 still has dev. It was restored when main was merged into it in #5920. But the 7.0.0 release will clear it there, and craft then merges that into main.
Possible fix
Craft's regexes only match a bare <VersionSuffix> tag, both when it clears the suffix and when it reads the current version (readXmlTag in src/targets/nuget.ts). Moving the condition onto the element itself takes it out of craft's reach:
<VersionSuffix Condition="'$(Configuration)' != 'Release' And '$(VersionSuffix)' == ''">dev</VersionSuffix>
This depends on craft's regex rather than on documented behaviour. The alternative is asking craft to leave conditional suffixes alone.
#skip-changelog
- Dominant language
- C#
- Stars
- 775
- Forks
- 262
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 118
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from getsentry/sentry-dotnet
-
chore: remove stale IL3050/IL3053 workaround from the iOS samplePossibly taken A pull request linked to this issue is open or already merged. OpenState: Needs Discussion
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
getsentry/sentry-dotnet#6071 · 1 comment ·
Maintainers usually reply within 1 day
-
Heap dumps: every SDK shutdown logs "Error waiting for GarbageCollectionMonitor task to complete"Possibly taken @pcbeingused33 claimed this today. OpenState: Needs Discussion
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
getsentry/sentry-dotnet#6039 · 3 comments ·
Maintainers usually reply within 1 day
-
.NET Platform: Android Task
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
getsentry/sentry-dotnet#6020 · 3 comments ·
Maintainers usually reply within 1 day
-
Move the Blazor WebAssembly sample off the deprecated DevServerPossibly taken A pull request linked to this issue is open or already merged. Open.NET Framework: Blazor
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
getsentry/sentry-dotnet#5906 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Docs MSBuild Needs Docs Update
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
getsentry/sentry-dotnet#5691 · 1 comment ·
Maintainers usually reply within 1 day
All issues in getsentry/sentry-dotnet
Similar issues
-
In-car displays show 0 km/h and P while the AV drivesPossibly taken @bazilinskyy claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
bazilinskyy/coupled-sim#366 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
BaryoDev/umbraco-pwa#196 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
microsoft/fluentui-blazor#5688 ·
Maintainers usually reply within 1 day
-
bug flaky lsp-transport small
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day