Skip to content

Commit 1210dc1

Browse files
committed
Avoid dotnet format hang
Attempt to workaround dotnet/sdk#44951
1 parent 09b4049 commit 1210dc1

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
@@ -39,7 +39,8 @@
3939
<ItemGroup>
4040
<GlobalPackageReference Include="CSharpIsNullAnalyzer" Version="0.1.593" />
4141
<GlobalPackageReference Include="DotNetAnalyzers.DocumentationAnalyzers" Version="1.0.0-beta.59" />
42-
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.6.146" />
42+
<!-- The condition works around https://github.com/dotnet/sdk/issues/44951 -->
43+
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.6.146" Condition="!('$(TF_BUILD)'=='true' and '$(dotnetformat)'=='true')" />
4344
<GlobalPackageReference Include="Nullable" Version="1.3.1" />
4445
<GlobalPackageReference Include="StyleCop.Analyzers.Unstable" Version="1.2.0.556" />
4546
</ItemGroup>

azure-pipelines/build.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,10 @@ jobs:
4747
parameters:
4848
RunTests: ${{ parameters.RunTests }}
4949
osRID: linux
50-
- script: dotnet format --verify-no-changes --no-restore
50+
- script: dotnet format --verify-no-changes
5151
displayName: 💅 Verify formatted code
52+
env:
53+
dotnetformat: true
5254
- template: node.yml
5355
- template: collect-artifacts.yml
5456
parameters:

0 commit comments

Comments
 (0)