Browse Source

Set the ConfigureAwait weaver default with a shared MSBuild property

pull/26078/head
maliming 4 days ago
parent
commit
8f0d2b0425
No known key found for this signature in database GPG Key ID: A646B9CB645ECEA4
  1. 18
      configureawait.props
  2. 16
      templates/module/aspnet-core/common.props

18
configureawait.props

@ -6,4 +6,22 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<!-- The xsd only feeds editor completion and Fody rewrites it on every run. -->
<PropertyGroup>
<FodyGenerateXsd>false</FodyGenerateXsd>
</PropertyGroup>
<!-- Component assemblies keep their own FodyWeavers.xml: their lifecycle methods must
resume on the renderer's synchronization context. Unconditional because a solution
build compiles cross-solution project references with the default configuration. -->
<PropertyGroup Condition="$(MSBuildProjectName.EndsWith('.Bundling'))
Or (!$(MSBuildProjectName.Contains('Blazor'))
And !$(MSBuildProjectName.Contains('AspNetCore.Components')))">
<WeaverConfiguration Condition="'$(WeaverConfiguration)' == ''">
<Weavers>
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>
</WeaverConfiguration>
</PropertyGroup>
</Project>

16
templates/module/aspnet-core/common.props

@ -14,7 +14,23 @@
</PackageReference>
</ItemGroup>
<!-- The xsd only feeds editor completion and Fody rewrites it on every run. -->
<PropertyGroup>
<FodyGenerateXsd>false</FodyGenerateXsd>
</PropertyGroup>
<!-- Component assemblies keep their own FodyWeavers.xml: their lifecycle methods must
resume on the renderer's synchronization context. Unconditional because a solution
build compiles cross-solution project references with the default configuration. -->
<PropertyGroup Condition="$(MSBuildProjectName.EndsWith('.Bundling'))
Or (!$(MSBuildProjectName.Contains('Blazor'))
And !$(MSBuildProjectName.Contains('AspNetCore.Components')))">
<WeaverConfiguration Condition="'$(WeaverConfiguration)' == ''">
<Weavers>
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>
</WeaverConfiguration>
</PropertyGroup>
<Target Name="NoWarnOnRazorViewImportedTypeConflicts" BeforeTargets="RazorCoreCompile">
<PropertyGroup>
<NoWarn>$(NoWarn);0436</NoWarn>

Loading…
Cancel
Save