GetOrCreateAsync's factory should use ConfigureAwait#2767
GetOrCreateAsync's factory should use ConfigureAwait#2767Tratcher merged 1 commit intodotnet:masterfrom ladeak:ladeak-ConfigureAwait
Conversation
|
@Pilchie please suggest reviewers |
analogrelay
left a comment
There was a problem hiding this comment.
Looks fine to me, but with a few thoughts/questions.
|
@davidfowl , I am happy to with the analyzer instead of tests, could you suggest one? |
|
I have setup Microsoft.CodeAnalysis.FxCopAnalyzers in https://github.com/grpc/grpc-dotnet It comes with a lot of analyzers. I have disabled most of them but ConfigureAwait false is still enabled: https://github.com/grpc/grpc-dotnet/blob/dd72d6a38ab2984fd224aa8ed53686dc0153b9da/Grpc.DotNet.ruleset#L69 |
|
I suppose I need to run GenerateReferenceSource or GenerateReferenceAssemblies to resolve build issues. |
|
When Directory.Build.target defines the build Reference to FxCopAnalyzer and as well as CodeAnalysisRuleset, I get a build error because ref/*.csproj-s are not updated.
When I move <ItemGroup>
<Reference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" />
</ItemGroup>to Directory.Build.props, and run the script that updates the ref/ projects, then build.cmd, I get the following error:
What would be the suggested way to resolve this issue? |
|
Looks like we probably have to add this to the references list: https://github.com/aspnet/Extensions/blob/master/docs/ReferenceResolution.md#example-adding-a-new-dependency |
|
Step 1 and 2 there should be all that's needed, I believe. Adding the @ladeak let me know if you have any issues making those updates! |
|
@anurse , I have added the Dependency to the "External dependencies":
|
|
@anurse Could you suggest, I did those two steps as suggested, but I still get errors. |
src/Caching/Abstractions/ref/Microsoft.Extensions.Caching.Abstractions.csproj
Outdated
Show resolved
Hide resolved
…applications might block on the UI thread. Added FxCop dependency to Caching projects, and code analysis rules for shipping and non-shipping projects.
|
Thanks |
GetOrCreateAsync's factory should use with ConfigureAwait false, as some UI applications might block on the UI thread.
Not sure if tests falls into the 'too hard' category, because of the helper classes.
Addresses #2252