Skip to content

VSTHRD003 support for marking known completed tasks as non-foreign #1509

@drewnoakes

Description

@drewnoakes

If I understand correctly, VSTHRD003 (Avoid awaiting foreign Tasks) is redundant on a task that is known to have completed already.

In the dotnet/project-system repo we have historically turned this analyzer off, and I'm investigating turning it on.

Most of the subsequent diagnostics are on singleton instances of completed tasks with well-known immutable values.

I'd like a way to annotate these values (mostly properties) to suppress VSTHRD003 when they're returned from methods and so forth. Today, it seems I have to suppress every consumer.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions