Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project-level default for await configuration #61816

Closed
Keith-McKinley opened this issue May 27, 2022 · 4 comments
Closed

Project-level default for await configuration #61816

Keith-McKinley opened this issue May 27, 2022 · 4 comments
Assignees
Labels
untriaged Issues and PRs which have not yet been triaged by a lead

Comments

@Keith-McKinley
Copy link

Is your feature request related to a problem? Please describe.

It is both tedious and easily-forgotten to religiously include .ConfigureAwait(false) in libraries. While the default behavior does make sense, the default should be able to be defined in the csproj file. Allowing a flag such as <DefaultAwaitConfiguration>false</DefaultAwaitConfiguration> would be of great help

Describe the solution you'd like

Allow a sinple declaration in the csproj xml (and similar for other .net languages) that changes the way the compiler builds the assembly. If this sets the default to false, then the developer could use .ConfigureAwait(true) in specific cases where that behavior is desired.

When the project file lacks the flag, the current default (true) should be used.

Additional context

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Issues and PRs which have not yet been triaged by a lead label May 27, 2022
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@KalleOlaviNiemitalo
Copy link

KalleOlaviNiemitalo commented May 28, 2022

Similar things have been requested in

@marcpopMSFT marcpopMSFT self-assigned this Jun 3, 2022
@marcpopMSFT marcpopMSFT transferred this issue from dotnet/sdk Jun 10, 2022
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@CyrusNajmabadi
Copy link
Member

Closing out as a dupe. Please use the existing csharplang discussions for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

No branches or pull requests

4 participants