Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix VSTHRD114 not firing for null in ternary conditional expressions - #1548

#1548
Merged
AArnott merged 2 commits into
mainmicrosoft/vs-threading:mainfrom
copilot/fix-vsthrd114-ternary-violationmicrosoft/vs-threading:copilot/fix-vsthrd114-ternary-violationCopy head branch name to clipboard
Feb 26, 2026
Merged

Fix VSTHRD114 not firing for null in ternary conditional expressions#1548
AArnott merged 2 commits into
mainmicrosoft/vs-threading:mainfrom
copilot/fix-vsthrd114-ternary-violationmicrosoft/vs-threading:copilot/fix-vsthrd114-ternary-violationCopy head branch name to clipboard

Conversation

Copilot AI commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

VSTHRD114 failed to report a diagnostic when null appeared inside a ternary expression — only direct return null was caught, not return flag ? null : Task.CompletedTask.

Root cause: The analyzer checked returnOperation.ReturnedValue.ConstantValue for null, but the return value of a ternary is an IConditionalOperation whose constant value is indeterminate at compile time.

Fix

  • Added recursive CheckForNullValue that drills into IConditionalOperation.WhenTrue/WhenFalse branches before checking for a null constant value
  • Refactored AnalyzerReturnOperation to use guard-and-return pattern and delegate to the new helper

All three forms from the issue now correctly produce a diagnostic:

static Task First(bool flag)
{
    return flag
        ? null              // ← now flagged
        : Task.CompletedTask;
}

static Task Second(bool flag) =>
    flag
        ? null              // ← now flagged
        : Task.CompletedTask;

static Task Third(bool flag)  // ← was already flagged
{
    if (flag) return null;
    return Task.CompletedTask;
}

Handles nested ternaries and VB.NET If(cond, Nothing, ...) as well.

Tests

  • NullInTernary_NoDiagnostic_FalseNegative → renamed NullInTernary_Diagnostic with markers on both branches
  • Added NullInTernaryReturnStatement_Diagnostic covering block-body, expression-body (C#), and If(...) (VB.NET)

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • 7t8vsblobprodwus2168.vsblob.vsassets.io
    • Triggering command: /opt/hostedtoolcache/dotnet/dotnet dotnet restore --no-dependencies /tmp/codeql-scratch-eb66641681425106/dbs/csharp/working/D5B55DFC9E70C92859A4309871089FB3/missingpackages_workingdir --packages /tmp/codeql-scratch-eb66641681425106/dbs/csharp/working/missingpackages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal --configfile /tmp/codeql-scratch-eb66641681425106/dbs/csharp/working/nugetconfig/nuget.config --force (dns block)
  • d94vsblobprodwus2119.vsblob.vsassets.io
    • Triggering command: /opt/hostedtoolcache/dotnet/dotnet dotnet restore --no-dependencies /tmp/codeql-scratch-eb66641681425106/dbs/csharp/working/E1BF8C0FD5E391A267BF9C79E32F43A6/missingpackages_workingdir --packages /tmp/codeql-scratch-eb66641681425106/dbs/csharp/working/missingpackages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal --configfile /tmp/codeql-scratch-eb66641681425106/dbs/csharp/working/nugetconfig/nuget.config --force (dns block)
    • Triggering command: /opt/hostedtoolcache/dotnet/dotnet dotnet restore --no-dependencies /tmp/codeql-scratch-eb66641681425106/dbs/csharp/working/D5B55DFC9E70C92859A4309871089FB3/missingpackages_workingdir --packages /tmp/codeql-scratch-eb66641681425106/dbs/csharp/working/missingpackages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal --configfile /tmp/codeql-scratch-eb66641681425106/dbs/csharp/working/nugetconfig/nuget.config --force (dns block)
    • Triggering command: /opt/hostedtoolcache/dotnet/dotnet dotnet restore --no-dependencies /tmp/codeql-scratch-eb66641681425106/dbs/csharp/working/40092A0EBCDDE0FDE0834F13B5E29B51/missingpackages_workingdir --packages /tmp/codeql-scratch-eb66641681425106/dbs/csharp/working/missingpackages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal --configfile /tmp/codeql-scratch-eb66641681425106/dbs/csharp/working/nugetconfig/nuget.config --force (dns block)
  • i01vsblobprodwus216.vsblob.vsassets.io
    • Triggering command: /opt/hostedtoolcache/dotnet/dotnet dotnet restore --no-dependencies /tmp/codeql-scratch-eb66641681425106/dbs/csharp/working/D5B55DFC9E70C92859A4309871089FB3/missingpackages_workingdir --packages /tmp/codeql-scratch-eb66641681425106/dbs/csharp/working/missingpackages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal --configfile /tmp/codeql-scratch-eb66641681425106/dbs/csharp/working/nugetconfig/nuget.config --force (dns block)
  • mt2vsblobprodwus2110.vsblob.vsassets.io
    • Triggering command: /opt/hostedtoolcache/dotnet/dotnet dotnet restore --no-dependencies /tmp/codeql-scratch-eb66641681425106/dbs/csharp/working/40092A0EBCDDE0FDE0834F13B5E29B51/missingpackages_workingdir --packages /tmp/codeql-scratch-eb66641681425106/dbs/csharp/working/missingpackages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal --configfile /tmp/codeql-scratch-eb66641681425106/dbs/csharp/working/nugetconfig/nuget.config --force (dns block)
  • ox9vsblobprodwus2149.vsblob.vsassets.io
    • Triggering command: /home/REDACTED/work/vs-threading/vs-threading/bin/Microsoft.VisualStudio.Threading.Analyzers.Tests/Release/net8.0/Microsoft.VisualStudio.Threading.Analyzers.Tests /home/REDACTED/work/vs-threading/vs-threading/bin/Microsoft.VisualStudio.Threading.Analyzers.Tests/Release/net8.0/Microsoft.VisualStudio.Threading.Analyzers.Tests --filter-class VSTHRD114AvoidReturningNullTaskAnalyzerTests --server dotnettestcli --dotnet-test-pipe /tmp/369b687f5b424bad9932bd0bc95a1b69 (dns block)
    • Triggering command: /home/REDACTED/work/vs-threading/vs-threading/bin/Microsoft.VisualStudio.Threading.Analyzers.Tests/Release/net8.0/Microsoft.VisualStudio.Threading.Analyzers.Tests /home/REDACTED/work/vs-threading/vs-threading/bin/Microsoft.VisualStudio.Threading.Analyzers.Tests/Release/net8.0/Microsoft.VisualStudio.Threading.Analyzers.Tests --filter-class VSTHRD114AvoidReturningNullTaskAnalyzerTests --server dotnettestcli --dotnet-test-pipe /tmp/9bfacdd4796f4296b90f13ebd88f3be5 (dns block)
    • Triggering command: /home/REDACTED/work/vs-threading/vs-threading/bin/Microsoft.VisualStudio.Threading.Analyzers.Tests/Release/net8.0/Microsoft.VisualStudio.Threading.Analyzers.Tests /home/REDACTED/work/vs-threading/vs-threading/bin/Microsoft.VisualStudio.Threading.Analyzers.Tests/Release/net8.0/Microsoft.VisualStudio.Threading.Analyzers.Tests --filter-class VSTHRD114AvoidReturningNullTaskAnalyzerTests --server dotnettestcli --dotnet-test-pipe /tmp/a717b9d13d1a4223ba566e129fd47011 (dns block)
  • s0ivsblobprodwus2134.vsblob.vsassets.io
    • Triggering command: /home/REDACTED/work/vs-threading/vs-threading/bin/Microsoft.VisualStudio.Threading.Analyzers.Tests/Release/net8.0/Microsoft.VisualStudio.Threading.Analyzers.Tests /home/REDACTED/work/vs-threading/vs-threading/bin/Microsoft.VisualStudio.Threading.Analyzers.Tests/Release/net8.0/Microsoft.VisualStudio.Threading.Analyzers.Tests --filter-class VSTHRD114AvoidReturningNullTaskAnalyzerTests --server dotnettestcli --dotnet-test-pipe /tmp/046e997d430349feb1bf876b6b7c30c9 (dns block)
    • Triggering command: /opt/hostedtoolcache/dotnet/dotnet dotnet restore --no-dependencies /tmp/codeql-scratch-eb66641681425106/dbs/csharp/working/B42A990C1810BF03B6D8FCD090EC1B53/missingpackages_workingdir --packages /tmp/codeql-scratch-eb66641681425106/dbs/csharp/working/missingpackages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal --configfile /tmp/codeql-scratch-eb66641681425106/dbs/csharp/working/nugetconfig/nuget.config --force (dns block)
    • Triggering command: /opt/hostedtoolcache/dotnet/dotnet dotnet restore --no-dependencies /tmp/codeql-scratch-eb66641681425106/dbs/csharp/working/D5B55DFC9E70C92859A4309871089FB3/missingpackages_workingdir --packages /tmp/codeql-scratch-eb66641681425106/dbs/csharp/working/missingpackages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal --configfile /tmp/codeql-scratch-eb66641681425106/dbs/csharp/working/nugetconfig/nuget.config --force (dns block)
  • x0dvsblobprodwus2111.vsblob.vsassets.io
    • Triggering command: /opt/hostedtoolcache/dotnet/dotnet dotnet restore --no-dependencies /tmp/codeql-scratch-eb66641681425106/dbs/csharp/working/D5B55DFC9E70C92859A4309871089FB3/missingpackages_workingdir --packages /tmp/codeql-scratch-eb66641681425106/dbs/csharp/working/missingpackages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal --configfile /tmp/codeql-scratch-eb66641681425106/dbs/csharp/working/nugetconfig/nuget.config --force (dns block)
  • xofvsblobprodwus2114.vsblob.vsassets.io
    • Triggering command: /opt/hostedtoolcache/dotnet/dotnet dotnet build src/Microsoft.VisualStudio.Threading.Analyzers/Microsoft.VisualStudio.Threading.Analyzers.csproj -c Release --no-restore (dns block)
    • Triggering command: /opt/hostedtoolcache/dotnet/dotnet dotnet test --project test/Microsoft.VisualStudio.Threading.Analyzers.Tests/Microsoft.VisualStudio.Threading.Analyzers.Tests.csproj -c Release -- --filter-class VSTHRD114AvoidReturningNullTaskAnalyzerTests (dns block)
  • y1mvsblobprodwus2138.vsblob.vsassets.io
    • Triggering command: /opt/hostedtoolcache/dotnet/dotnet dotnet restore --no-dependencies /tmp/codeql-scratch-eb66641681425106/dbs/csharp/working/F7D2419353110B6F32053972B32A361D/missingpackages_workingdir --packages /tmp/codeql-scratch-eb66641681425106/dbs/csharp/working/missingpackages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal --configfile /tmp/codeql-scratch-eb66641681425106/dbs/csharp/working/nugetconfig/nuget.config --force (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>VSTHRD114 do not triggered on ternary conditional operator</issue_title>
<issue_description>#### Bug description
null Task value in ternary operator do not trigger violation

Repro steps

static Task First(bool flag)
{
    return flag
        ? null
        : Task.CompletedTask;
}

static Task Second(bool flag) =>
    flag
        ? null
        : Task.CompletedTask;

static Task Third(bool flag)
{
    if (flag)
    {
        return null;
    }
    else
    {
        return Task.CompletedTask;
    }
}

Expected behavior

Expect that all three methods violate the rule

Actual behavior

Only Third violate

  • Version used: 17.14.15</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: AArnott <3548+AArnott@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix VSTHRD114 violation for ternary operators Fix VSTHRD114 not firing for null in ternary conditional expressions Feb 25, 2026
@AArnott
AArnott marked this pull request as ready for review February 26, 2026 15:56
Copilot AI review requested due to automatic review settings February 26, 2026 15:56
@AArnott

AArnott commented Feb 26, 2026

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Copilot AI 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.

Pull request overview

This PR fixes VSTHRD114 analyzer to detect null returns inside ternary conditional expressions. Previously, only direct return null statements were caught; expressions like return flag ? null : Task.CompletedTask were missed.

Changes:

  • Added recursive CheckForNullValue helper method to traverse conditional operation trees
  • Refactored AnalyzerReturnOperation to use guard clauses and delegate null detection to the new helper
  • Updated test to reflect that ternary nulls are now properly diagnosed (renamed from false negative test)
  • Added comprehensive test coverage for C# ternaries (block body and expression body) and VB.NET If expressions

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/Microsoft.VisualStudio.Threading.Analyzers/AbstractVSTHRD114AvoidReturningNullTaskAnalyzer.cs Added recursive null detection for conditional operations; refactored main analyzer method to use guard pattern
test/Microsoft.VisualStudio.Threading.Analyzers.Tests/VSTHRD114AvoidReturningNullTaskAnalyzerTests.cs Renamed false negative test to reflect fix; added new test covering ternary expressions in multiple syntactic contexts

@AArnott
AArnott merged commit 05374d1 into main Feb 26, 2026
13 checks passed
@AArnott
AArnott deleted the copilot/fix-vsthrd114-ternary-violation branch February 26, 2026 17:52
cryptohivekeeper added a commit to CryptoHives/Foundation that referenced this pull request Jul 23, 2026
Updated
[Microsoft.Bcl.AsyncInterfaces](https://github.com/dotnet/dotnet) from
10.0.9 to 10.0.10.

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

_Sourced from [Microsoft.Bcl.AsyncInterfaces's
releases](https://github.com/dotnet/dotnet/releases)._

No release notes found for this version range.

Commits viewable in [compare
view](https://github.com/dotnet/dotnet/commits).
</details>

Updated [Microsoft.Bcl.Memory](https://github.com/dotnet/dotnet) from
10.0.9 to 10.0.10.

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

_Sourced from [Microsoft.Bcl.Memory's
releases](https://github.com/dotnet/dotnet/releases)._

No release notes found for this version range.

Commits viewable in [compare
view](https://github.com/dotnet/dotnet/commits).
</details>

Updated [Microsoft.Bcl.TimeProvider](https://github.com/dotnet/dotnet)
from 10.0.9 to 10.0.10.

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

_Sourced from [Microsoft.Bcl.TimeProvider's
releases](https://github.com/dotnet/dotnet/releases)._

No release notes found for this version range.

Commits viewable in [compare
view](https://github.com/dotnet/dotnet/commits).
</details>

Updated
[Microsoft.CodeAnalysis.Analyzers](https://github.com/dotnet/roslyn)
from 5.3.0 to 5.6.0.

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

_Sourced from [Microsoft.CodeAnalysis.Analyzers's
releases](https://github.com/dotnet/roslyn/releases)._

No release notes found for this version range.

Commits viewable in [compare
view](https://github.com/dotnet/roslyn/commits).
</details>

Updated Microsoft.CodeAnalysis.CSharp from 5.3.0 to 5.6.0.

Updated Microsoft.CodeAnalysis.CSharp.Workspaces from 5.3.0 to 5.6.0.

Updated
[Microsoft.Extensions.ObjectPool](https://github.com/dotnet/dotnet) from
10.0.9 to 10.0.10.

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

_Sourced from [Microsoft.Extensions.ObjectPool's
releases](https://github.com/dotnet/dotnet/releases)._

No release notes found for this version range.

Commits viewable in [compare
view](https://github.com/dotnet/dotnet/commits).
</details>

Updated [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest)
from 18.5.1 to 18.8.1.

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

_Sourced from [Microsoft.NET.Test.Sdk's
releases](https://github.com/microsoft/vstest/releases)._

## 18.8.1

## What's Changed
* Fix protocol negotiation timeout when STJ reflection is disabled
(18.8.1) by @​nohwnd in microsoft/vstest#16281


**Full Changelog**:
microsoft/vstest@v18.8.0...v18.8.1

## 18.8.0

## What's Changed
* Migrate from Newtonsoft.Json to System.Text.Json / Jsonite (merge to
main) by @​nohwnd in microsoft/vstest#15687
- For more detail refer to
https://devblogs.microsoft.com/dotnet/vs-test-is-removing-its-newtonsoft-json-dependency/
* Create source-only filter package by @​Youssef1313 in
microsoft/vstest#15638
* Add ARM64 msdia140.dll support to test platform packages by @​nohwnd
in microsoft/vstest#15692
* Fix mutex cleanup crash on macOS/Linux by @​nohwnd in
microsoft/vstest#15684
* Restrict artifact temp directory permissions on Unix by @​nohwnd in
microsoft/vstest#15729
* Add support for filtering uncategorized tests with TestCategory=None
by @​Evangelink in microsoft/vstest#15727
* Fix SCI binding failure in DTA hosts (main) by @​nohwnd in
microsoft/vstest#15724
* Fix HTML logger parallel file collision by @​nohwnd in
microsoft/vstest#15435
* Improve error message when testhost cannot be found by @​nohwnd in
microsoft/vstest#16053
* Fix HTML logger exception on invalid XML chars in test display names
by @​nohwnd in microsoft/vstest#16051

**Full Changelog**:
microsoft/vstest@v18.7.0...v18.8.0

## 18.7.0

## What's Changed
* Add ARM64 msdia140.dll support to test platform packages by
@​jamesmcroft in microsoft/vstest#15689
* Update System.Memory from 4.5.5 to 4.6.3 by @​nohwnd in
microsoft/vstest#15706

## New Contributors
* @​jamesmcroft made their first contribution in
microsoft/vstest#15689

**Full Changelog**:
microsoft/vstest@v18.6.0...v18.7.0

## 18.6.0

## What's Changed
* Revert removal of Video Recorder by @​nohwnd in
microsoft/vstest#15336
* Speed up blame by filtering non-.NET processes from dump collection by
@​nohwnd in microsoft/vstest#15518
* Add README.md to NuGet packages by @​nohwnd in
microsoft/vstest#15550
* Report child process info on connection timeout by @​nohwnd in
microsoft/vstest#15603


### Changes to tests and infra
* Brand as 18.6 by @​nohwnd in
microsoft/vstest#15423
* Upgrading code coverage version to 18.5.1, by @​fhnaseer in
microsoft/vstest#15422
* Updating System.Collections.Immutable to 9.0.11 by @​MSLukeWest in
microsoft/vstest#15425
* Fix attachVS when used for debugging integration tests by @​nohwnd in
microsoft/vstest#15451
* Replace dotnet.config, with global.json by @​nohwnd in
microsoft/vstest#15449
* Document debugging integration tests with AttachVS by @​Copilot in
microsoft/vstest#15452
* Fix stack overflow tests by @​nohwnd in
microsoft/vstest#15461
* Make TestAssets.sln buildable locally by @​Youssef1313 in
microsoft/vstest#15466
* Try filtering out tests by @​nohwnd in
microsoft/vstest#15463
* Build just once when tfms run in parallel by @​nohwnd in
microsoft/vstest#15465
* Review simplify compatibility sources, deduplicate tests by @​nohwnd
in microsoft/vstest#15472
* Cleanup dead TRX code by @​Youssef1313 in
microsoft/vstest#15474
* Update .NET runtimes to 8.0.25, 9.0.14, and 10.0.4 by @​nohwnd in
microsoft/vstest#15481
* Compat matrix checker by @​nohwnd in
microsoft/vstest#15480
* Add trx analysis skill by @​nohwnd in
microsoft/vstest#15486
* Split integration tests to single tfm and multi tfm project by
@​nohwnd in microsoft/vstest#15484
* Update matrix by @​nohwnd in
microsoft/vstest#15477
* Break infinite restore loop in VS by @​nohwnd in
microsoft/vstest#15503
* Use global package cache for build, and local for running integration
tests by @​nohwnd in microsoft/vstest#15500
* Update contributing by @​nohwnd in
microsoft/vstest#15505
* Reduce test wall-clock time by increasing minThreads by @​drognanar in
microsoft/vstest#15502
* Indicator flakiness by @​nohwnd in
microsoft/vstest#15513
* Fix ci build by @​nohwnd in
microsoft/vstest#15515
* Fix thread safety issues by @​Evangelink in
microsoft/vstest#15512
* Optimize DotnetSDKSimulation_PostProcessing test (163s → 61s) by
@​nohwnd in microsoft/vstest#15516
* Build isolated test assets for single TFM instead of 7 by @​nohwnd in
microsoft/vstest#15517
* Remove unused dependencies from Library.IntegrationTests by @​nohwnd
in microsoft/vstest#15527
* Remove printing _attachments content to console by @​nohwnd in
microsoft/vstest#15520
* Add Linux/macOS test filtering guide to CONTRIBUTING.md by @​nohwnd in
microsoft/vstest#15521
* Change integration test parallelization from ClassLevel to MethodLevel
by @​nohwnd in microsoft/vstest#15526
* Unify target framework checks with IsNetFrameworkTarget/IsNetTarget by
@​nohwnd in microsoft/vstest#15523
* Add unattended work instructions to copilot-instructions.md by
@​nohwnd in microsoft/vstest#15531
* Reduce code style rule severity from warning to suggestion by @​nohwnd
in microsoft/vstest#15522
* Remove Debug/Release line number branching from tests by @​nohwnd in
microsoft/vstest#15519
* Revise unattended work instructions in copilot-instructions.md by
@​nohwnd in microsoft/vstest#15532
* Improve CompatibilityRowsBuilder error message with diagnostic details
by @​nohwnd in microsoft/vstest#15529
* docs: add git worktree and upstream sync workflow to
copilot-instructions.md by @​nohwnd in
microsoft/vstest#15538
* Add VSIX runner to smoke tests by @​nohwnd in
microsoft/vstest#15541
* Remove deprecated WebTest and TMI test methods by @​nohwnd in
microsoft/vstest#15525
* Fix compatibility test failures for legacy vstest.console and MSTest
adapter by @​nohwnd in microsoft/vstest#15534
* Convert TestPlatform.sln to slnx format by @​nohwnd in
microsoft/vstest#15551
* Convert test/TestAssets .sln files to .slnx format by @​nohwnd in
microsoft/vstest#15557
 ... (truncated)

Commits viewable in [compare
view](microsoft/vstest@v18.5.1...v18.8.1).
</details>

Updated
[Microsoft.VisualStudio.Threading](https://github.com/microsoft/vs-threading)
from 17.14.15 to 18.7.23.

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

_Sourced from [Microsoft.VisualStudio.Threading's
releases](https://github.com/microsoft/vs-threading/releases)._

## 18.7.23

## What's Changed

### Fixes

* Fix `CancellationToken.Combine` with 3+ cancelable tokens by @​AArnott
in microsoft/vs-threading#1443
* Fix VSTHRD110 firing in Expression-valued scenarios by @​AArnott with
@​Copilot in microsoft/vs-threading#1467
* Fix super set for VSTHRD103 by @​AArnott in
microsoft/vs-threading#1545
* Fix VSTHRD114 not firing for null in ternary conditional expressions
by @​AArnott with @​Copilot in
microsoft/vs-threading#1548
* Disable VSTHRD010 in AppWithoutMainThread.editorconfig by
@​ArturDorochowicz in
microsoft/vs-threading#1562
* Fix VSTHRD103 missing diagnostic for sync extension methods with async
alternatives in the same static class by @​drewnoakes with @​Copilot in
microsoft/vs-threading#1569

### Enhancements

* Add `JoinableTaskFactory.DisableProcessing()` by @​AArnott in
microsoft/vs-threading#1576
* Add `NoMessagePumpSyncContext..ctor(SynchronizationContext)` for
Post/Send behaviors by @​AArnott in
microsoft/vs-threading#1578
* Add trim and NativeAOT safety attributes by @​AArnott in
microsoft/vs-threading#1471
* Add `IPendingExecutionRequestState` interface to expose completion
state of `SingleExecuteProtector` by @​lifengl in
microsoft/vs-threading#1447
* Add AdditionalFiles support to VSTHRD103 analyzer for excluding
specific APIs by @​AArnott with @​Copilot in
microsoft/vs-threading#1465
* Document InvalidOperationException for AsyncReaderWriterLock
acquisition methods by @​AArnott with @​Copilot in
microsoft/vs-threading#1466
* Allow library code to detect the JoinableTaskContext is not associated
with Main thread by @​lifengl in
microsoft/vs-threading#1477
* remove NotifyOfCrossThreadDependency call inside
get_NoMessagePumpSynchronizationContext by @​lifengl in
microsoft/vs-threading#1486
* reduce overhead when running in no main thread mode by @​lifengl in
microsoft/vs-threading#1502
* Join tasks waited by JoinableTaskCollection.JoinUntilEmpty in
dumpasync result by @​lifengl in
microsoft/vs-threading#1538
* Remove slow regex from threading analyzers by @​AArnott in
microsoft/vs-threading#1547


## New Contributors
* @​jgrosic made their first contribution in
microsoft/vs-threading#1485
* @​AbhitejJohn made their first contribution in
microsoft/vs-threading#1533
* @​ArturDorochowicz made their first contribution in
microsoft/vs-threading#1562
* @​microsoft-github-policy-service[bot] made their first contribution
in microsoft/vs-threading#1587

**Full Changelog**:
microsoft/vs-threading@v17.14.15...v18.7.23

Commits viewable in [compare
view](microsoft/vs-threading@v17.14.15...v18.7.23).
</details>

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 <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: The Keeper of the Crypto Hives <235137155+cryptohivekeeper@users.noreply.github.com>
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.

VSTHRD114 do not triggered on ternary conditional operator

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.