Skip to content

Add code fix for MSTEST0040 — AvoidUsingAssertsInAsyncVoidContext #7891

@Evangelink

Description

@Evangelink

Priority: High
Estimated Effort: Small–Medium

AvoidUsingAssertsInAsyncVoidContextAnalyzer (MSTEST0040) warns when Assert calls appear in async void methods. A code fix can offer "Change return type to Task" to convert async void to async Task, which is the canonical remediation.

File to create: `src/Analyzers/MSTest.Analyzers.CodeFixes/AvoidUsingAssertsInAsyncVoidContextFixer.cs

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions