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

Allow to configure Fody globally using AssemblyAttribute in Directory.Build.props #606

Open
octocat-mona opened this issue Mar 11, 2024 · 1 comment

Comments

@octocat-mona
Copy link

Is the proposal related to a problem

I would like to be able to configure Fody.ConfigureAwait(false) globally using a Directory.Build.props file.
This can usually be done by adding an item group in this file (or per project in the .csproj file):

<ItemGroup>
  <AssemblyAttribute Include="Fody.ConfigureAwait">
    <_Parameter1>false</_Parameter1>
  </AssemblyAttribute>
</ItemGroup>

However parameters are limited to string parameters only, so this won't work with the bool continueOnCapturedContext parameter.

image

Describe the solution

Add a constructor on https://github.com/Fody/ConfigureAwait/blob/master/ConfigureAwait/ConfigureAwaitAttribute.cs which accepts a string value for continueOnCapturedContext and converts in into a bool.

@curia-damiano
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants