Skip to content

Commit 3abd306

Browse files
authored
[in-proc backport] Fail build on critical package (#10590) (#10596)
* Fail build on critical package (#10590) * Address test dependency
1 parent 3215ab5 commit 3abd306

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

Directory.Build.props

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,20 @@
1313
<EngRoot>$(RepoRoot)eng/</EngRoot>
1414
</PropertyGroup>
1515

16+
<PropertyGroup>
17+
<ContinuousIntegrationBuild>false</ContinuousIntegrationBuild>
18+
<ContinuousIntegrationBuild Condition="'$(TF_BUILD)' == 'true'">true</ContinuousIntegrationBuild>
19+
<CI>$(ContinuousIntegrationBuild)</CI>
20+
</PropertyGroup>
21+
22+
<PropertyGroup>
23+
<!-- Nuget audit as warnings only, even in TreatWarningsAsErrors. -->
24+
<!-- Except for in CI, critical will fail the build. -->
25+
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU1901;NU1902;NU1903</WarningsNotAsErrors>
26+
<WarningsNotAsErrors Condition="'$(CI)' == 'false'">$(WarningsNotAsErrors)NU1904</WarningsNotAsErrors>
27+
<WarningsAsErrors Condition="'$(CI)' == 'true'">$(WarningsAsErrors)NU1904</WarningsAsErrors>
28+
<NuGetAuditLevel>moderate</NuGetAuditLevel> <!-- warn on moderate severity only. -->
29+
<NuGetAuditMode>all</NuGetAuditMode> <!-- audit transitive dependencies. -->
30+
</PropertyGroup>
31+
1632
</Project>

build/common.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)..\src.ruleset</CodeAnalysisRuleSet>
2222
<NoWarn>$(NoWarn);NU1701</NoWarn>
2323

24-
<ContinuousIntegrationBuild Condition="'$(TF_BUILD)' == 'true'">true</ContinuousIntegrationBuild>
2524
<DebugType>embedded</DebugType>
2625
<GenerateRuntimeConfigDevFile>true</GenerateRuntimeConfigDevFile><!-- https://github.com/dotnet/runtime/issues/54684 -->
2726
<DisableImplicitNamespaceImports>true</DisableImplicitNamespaceImports>

test/TestFunctions/TestFunctions.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<ItemGroup>
2121
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Http" Version="3.2.0" />
2222
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
23+
<PackageReference Include="System.Text.Encodings.Web" Version="4.7.2" />
2324
</ItemGroup>
2425

2526
</Project>

0 commit comments

Comments
 (0)