Skip to content

Commit 5cc3d59

Browse files
committed
Reapply "Avoid dotnet format hang"
This reverts commit 46e768b. Because dotnet/sdk#44951 is repro'ing again even on the latest .NET SDK.
1 parent 3b421ec commit 5cc3d59

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Directory.Packages.props

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
<ItemGroup Label="Library.Template">
2020
<GlobalPackageReference Include="CSharpIsNullAnalyzer" Version="0.1.593" />
2121
<GlobalPackageReference Include="DotNetAnalyzers.DocumentationAnalyzers" Version="1.0.0-beta.59" />
22-
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.7.115" />
22+
<!-- The condition works around https://github.com/dotnet/sdk/issues/44951 -->
23+
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.7.115" Condition="!('$(TF_BUILD)'=='true' and '$(dotnetformat)'=='true')" />
2324
<GlobalPackageReference Include="PolySharp" Version="1.15.0" />
2425
<GlobalPackageReference Include="StyleCop.Analyzers.Unstable" Version="1.2.0.556" />
2526
</ItemGroup>

azure-pipelines/build.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ jobs:
3737
- template: dotnet.yml
3838
parameters:
3939
RunTests: ${{ parameters.RunTests }}
40-
- script: dotnet format --verify-no-changes --no-restore
40+
- script: dotnet format --verify-no-changes
4141
displayName: 💅 Verify formatted code
42+
env:
43+
dotnetformat: true # part of a workaround for https://github.com/dotnet/sdk/issues/44951
4244
- template: expand-template.yml
4345

4446
- job: macOS

0 commit comments

Comments
 (0)