Visitar URL original
AppVeyor - Visual Studio 2026 by snakefoot · Pull Request #6209 · NLog/NLog · GitHub
Skip to content

AppVeyor - Visual Studio 2026 - #6209

Merged
snakefoot merged 2 commits into
NLog:devfrom
snakefoot:AppVeyor2026
Jun 7, 2026
Merged

snakefoot merged 2 commits into
NLog:devfrom
snakefoot:AppVeyor2026

Conversation

@snakefoot

Copy link
Copy Markdown
Contributor

No description provided.

@coderabbitai

coderabbitai Bot commented Jun 7, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: d6aaf8a0-dec4-46fe-85bb-0209c51a32c5

📥 Commits

Reviewing files that changed from the base of the PR and between cd36694 and 3b179f4.

📒 Files selected for processing (11)
  • appveyor.yml
  • run-tests.ps1
  • src/NLog.Targets.AtomicFile/NLog.Targets.AtomicFile.csproj
  • src/NLog.Targets.AtomicFile/README.md
  • tests/NLog.Benchmarks/NLog.Benchmarks.csproj
  • tests/NLog.RegEx.Tests/NLog.RegEx.Tests.csproj
  • tests/NLog.Targets.AtomicFile.Tests/NLog.Targets.AtomicFile.Tests.csproj
  • tests/NLog.Targets.GZipFile.Tests/NLog.Targets.GZipFile.Tests.csproj
  • tests/NLog.UnitTests/NLog.UnitTests.csproj
  • tests/NLog.UnitTests/Targets/Wrappers/BufferingTargetWrapperTests.cs
  • tests/TestTrimPublish/TestTrimPublish.csproj
✅ Files skipped from review due to trivial changes (2)
  • src/NLog.Targets.AtomicFile/README.md
  • tests/NLog.RegEx.Tests/NLog.RegEx.Tests.csproj
🚧 Files skipped from review as they are similar to previous changes (8)
  • tests/NLog.Targets.GZipFile.Tests/NLog.Targets.GZipFile.Tests.csproj
  • tests/TestTrimPublish/TestTrimPublish.csproj
  • appveyor.yml
  • src/NLog.Targets.AtomicFile/NLog.Targets.AtomicFile.csproj
  • tests/NLog.UnitTests/NLog.UnitTests.csproj
  • run-tests.ps1
  • tests/NLog.UnitTests/Targets/Wrappers/BufferingTargetWrapperTests.cs
  • tests/NLog.Targets.AtomicFile.Tests/NLog.Targets.AtomicFile.Tests.csproj

Walkthrough

AppVeyor CI image moved to Visual Studio 2026; test runner and many project files switch defaults/conditions to include or target net10.0; BufferingTargetWrapper tests change hitCount to long and use Interlocked.Read in the wait helper.

Changes

CI and test runner scripts

Layer / File(s) Summary
AppVeyor image and environment changes
appveyor.yml
Top-level image list and job include entries updated to use "Visual Studio 2026"; DOTNET_CLI_TELEMETRY_OPTOUT placement adjusted in job environments.
Test runner: switch frameworks to net10.0
run-tests.ps1
dotnet test invocations and TestTrimPublish paths updated to use --framework net10.0 / net10.0 output directories for multiple test projects, including non-Windows branches.

Project targets and docs

Layer / File(s) Summary
AtomicFile project and README
src/NLog.Targets.AtomicFile/*.csproj, src/NLog.Targets.AtomicFile/README.md
Add net10.0/net10.0-windows targets, generalize trim/AOT checks to framework compatibility, expand ItemGroup conditions to include net10.0, and update README publish example to --framework net10.0.
Test project TargetFramework updates
tests/*/*.csproj, tests/TestTrimPublish/TestTrimPublish.csproj
Multiple test project TargetFramework(s) and conditional MSBuild guards updated to include or default to net10.0 (benchmarks, RegEx, AtomicFile.Tests, GZipFile.Tests, NLog.UnitTests, TestTrimPublish, etc.).

Tests and helpers

Layer / File(s) Summary
BufferingTargetWrapper tests: hitCount -> long
tests/NLog.UnitTests/Targets/Wrappers/BufferingTargetWrapperTests.cs
Change hitCount initializations to 0L, update helper signature to ref long, and switch polling reads to Interlocked.Read(ref hitCount).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hopped through CI and targets bright,
Swapped images and bumped frameworks to ten tonight,
Counters grew long, safe across threads they run,
Tests and projects aligned — a tidy little bun. 🥕

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive No description was provided by the author, making it impossible to assess relevance to the changeset. Add a description explaining the purpose of updating to Visual Studio 2026 and .NET 10 support across the CI and test configurations.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'AppVeyor - Visual Studio 2026' is specific and directly related to the main change—updating CI configuration to use Visual Studio 2026.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@appveyor.yml`:
- Line 3: The CONTRIBUTING.md reference to "Use Visual Studio 2022" is out of
sync with the CI baseline change in appveyor.yml (which now targets "Visual
Studio 2026"); update CONTRIBUTING.md to mention Visual Studio 2026 (or a
neutral statement matching the new CI toolchain) and adjust any related
prerequisites or version-specific instructions so the local developer setup
aligns with the appveyor.yml setting.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: bd9cb042-9fe4-4fac-962c-3ed3943de2e9

📥 Commits

Reviewing files that changed from the base of the PR and between d6f69e6 and 3d3e3d4.

📒 Files selected for processing (1)
  • appveyor.yml

Comment thread appveyor.yml
image:
- Visual Studio 2022
- Ubuntu2204
- Visual Studio 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Sync contributor build docs with the new CI toolchain baseline.

appveyor.yml now targets Visual Studio 2026, but CONTRIBUTING.md still says “Use Visual Studio 2022”. Please update that doc to avoid contributor confusion and local-vs-CI mismatch.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@appveyor.yml` at line 3, The CONTRIBUTING.md reference to "Use Visual Studio
2022" is out of sync with the CI baseline change in appveyor.yml (which now
targets "Visual Studio 2026"); update CONTRIBUTING.md to mention Visual Studio
2026 (or a neutral statement matching the new CI toolchain) and adjust any
related prerequisites or version-specific instructions so the local developer
setup aligns with the appveyor.yml setting.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/TestTrimPublish/TestTrimPublish.csproj`:
- Around line 8-9: Update the second TargetFramework element in
TestTrimPublish.csproj (the <TargetFramework Condition=" '$(TargetFramework)' ==
'' "> element) from net8.0 to net10.0 so the default target for VS >= 18.0
matches the run-tests.ps1 expectation; leave the first conditional
TargetFramework for VisualStudioVersion < '18.0' unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: ccdd5526-8f25-4d06-83ee-0b21bf8d5b12

📥 Commits

Reviewing files that changed from the base of the PR and between 3d3e3d4 and 6a5d67b.

📒 Files selected for processing (11)
  • appveyor.yml
  • run-tests.ps1
  • src/NLog.Targets.AtomicFile/NLog.Targets.AtomicFile.csproj
  • src/NLog.Targets.AtomicFile/README.md
  • tests/NLog.Benchmarks/NLog.Benchmarks.csproj
  • tests/NLog.RegEx.Tests/NLog.RegEx.Tests.csproj
  • tests/NLog.Targets.AtomicFile.Tests/NLog.Targets.AtomicFile.Tests.csproj
  • tests/NLog.Targets.GZipFile.Tests/NLog.Targets.GZipFile.Tests.csproj
  • tests/NLog.UnitTests/NLog.UnitTests.csproj
  • tests/NLog.UnitTests/Targets/Wrappers/BufferingTargetWrapperTests.cs
  • tests/TestTrimPublish/TestTrimPublish.csproj
✅ Files skipped from review due to trivial changes (4)
  • tests/NLog.Benchmarks/NLog.Benchmarks.csproj
  • src/NLog.Targets.AtomicFile/README.md
  • tests/NLog.RegEx.Tests/NLog.RegEx.Tests.csproj
  • tests/NLog.Targets.GZipFile.Tests/NLog.Targets.GZipFile.Tests.csproj

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/NLog.RegEx.Tests/NLog.RegEx.Tests.csproj`:
- Around line 6-7: The two TargetFrameworks assignments conflict because both
conditions can be true; change the second TargetFrameworks condition to be
mutually exclusive by adding a VisualStudioVersion guard (e.g., make the second
Condition " '$(TargetFrameworks)' == '' AND '$(VisualStudioVersion)' &gt;=
'18.0' ") so only one assignment wins; update the TargetFrameworks elements (the
ones referencing TargetFrameworks and VisualStudioVersion) to ensure
net462;net8.0 is chosen for VisualStudioVersion &lt; 18.0 and net462;net10.0 for
VisualStudioVersion &gt;= 18.0.

In `@tests/NLog.UnitTests/NLog.UnitTests.csproj`:
- Around line 6-7: The second TargetFrameworks element currently has no
VisualStudioVersion guard and will overwrite the first because MSBuild evaluates
matching conditions in order; update the second TargetFrameworks Condition so it
is mutually exclusive with the first (e.g., change the Condition on the second
TargetFrameworks to "'$(TargetFrameworks)' == '' AND '$(VisualStudioVersion)'
&gt;= '18.0'" or equivalent) so that TargetFrameworks only becomes net10.0 for
VisualStudioVersion >= 18.0 while VisualStudioVersion < 18.0 keeps
net462;net8.0; reference the TargetFrameworks elements and the
VisualStudioVersion property when making this change.

In `@tests/TestTrimPublish/TestTrimPublish.csproj`:
- Around line 7-9: The last TargetFramework element is unconditional and
overwrites the net8.0 assignment; update the third TargetFramework condition so
it's mutually exclusive by requiring either VisualStudioVersion be empty
(CLI/MSBuild) or >= '18.0' (the newer VS), e.g. change the Condition on the
TargetFramework that sets net10.0 to "'$(TargetFramework)' == '' AND (
'$(VisualStudioVersion)' == '' OR '$(VisualStudioVersion)' &gt;= '18.0' )" so
net8.0 (the second TargetFramework) won't be overwritten for VS versions < 18.0.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: a8f342d6-9d6a-4c63-ab28-73998ee946b6

📥 Commits

Reviewing files that changed from the base of the PR and between 6a5d67b and cd36694.

📒 Files selected for processing (10)
  • run-tests.ps1
  • src/NLog.Targets.AtomicFile/NLog.Targets.AtomicFile.csproj
  • src/NLog.Targets.AtomicFile/README.md
  • tests/NLog.Benchmarks/NLog.Benchmarks.csproj
  • tests/NLog.RegEx.Tests/NLog.RegEx.Tests.csproj
  • tests/NLog.Targets.AtomicFile.Tests/NLog.Targets.AtomicFile.Tests.csproj
  • tests/NLog.Targets.GZipFile.Tests/NLog.Targets.GZipFile.Tests.csproj
  • tests/NLog.UnitTests/NLog.UnitTests.csproj
  • tests/NLog.UnitTests/Targets/Wrappers/BufferingTargetWrapperTests.cs
  • tests/TestTrimPublish/TestTrimPublish.csproj
✅ Files skipped from review due to trivial changes (2)
  • src/NLog.Targets.AtomicFile/README.md
  • tests/NLog.Targets.GZipFile.Tests/NLog.Targets.GZipFile.Tests.csproj
🚧 Files skipped from review as they are similar to previous changes (5)
  • tests/NLog.Benchmarks/NLog.Benchmarks.csproj
  • tests/NLog.Targets.AtomicFile.Tests/NLog.Targets.AtomicFile.Tests.csproj
  • tests/NLog.UnitTests/Targets/Wrappers/BufferingTargetWrapperTests.cs
  • src/NLog.Targets.AtomicFile/NLog.Targets.AtomicFile.csproj
  • run-tests.ps1

@sonarqubecloud

sonarqubecloud Bot commented Jun 7, 2026

Copy link
Copy Markdown

@snakefoot
snakefoot merged commit c5d8e29 into NLog:dev Jun 7, 2026
5 of 6 checks passed
@snakefoot snakefoot added this to the 6.1.4 milestone Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant