Skip to content

Commit 3b77dbe

Browse files
committed
Add workaround for extremely slow builds on .NET 10
1 parent 8c4f43b commit 3b77dbe

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

Directory.Build.targets

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
<Project>
22
<Target Name="DisableCompileTimeOpenApiXmlGenerator" BeforeTargets="CoreCompile">
33
<ItemGroup>
4-
<Analyzer Remove="@(Analyzer)" Condition="'%(Filename)' == 'Microsoft.AspNetCore.OpenApi.SourceGenerators'"/>
4+
<Analyzer Remove="@(Analyzer)" Condition="'%(Filename)' == 'Microsoft.AspNetCore.OpenApi.SourceGenerators'" />
5+
</ItemGroup>
6+
</Target>
7+
8+
<!-- Workaround for compiler regression at https://github.com/dotnet/roslyn/issues/80756 -->
9+
<Target Name="DisableSlowAnalyzers" Condition="'$(Configuration)' == 'Debug'" BeforeTargets="CoreCompile">
10+
<ItemGroup>
11+
<Analyzer Remove="@(Analyzer)" Condition="'%(Filename)' == 'CSharpGuidelinesAnalyzer'" />
12+
<Analyzer Remove="@(Analyzer)" Condition="'%(Filename)' == 'Microsoft.CodeAnalysis.CSharp.CodeStyle'" />
13+
<Analyzer Remove="@(Analyzer)" Condition="'%(Filename)' == 'Microsoft.CodeAnalysis.NetAnalyzers'" />
14+
<Analyzer Remove="@(Analyzer)" Condition="'%(Filename)' == 'Microsoft.CodeAnalysis.CSharp.NetAnalyzers'" />
15+
<Analyzer Remove="@(Analyzer)" Condition="'%(Filename)' == 'xunit.analyzers'" />
516
</ItemGroup>
617
</Target>
718
</Project>

0 commit comments

Comments
 (0)