Skip to content

Commit b48f3d7

Browse files
authored
Add target to remove inner .globalconfig file
1 parent f5f770c commit b48f3d7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

eng/DotNetBuild.props

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,20 @@
77
<SourceBuildManagedOnly>true</SourceBuildManagedOnly>
88
</PropertyGroup>
99

10+
<!--
11+
Remove inner source .globalconfig file as both the inner and outer config files get loaded and cause a conflict.
12+
Leaving the inner will cause all conflicting settings to be ignored.
13+
https://learn.microsoft.com/dotnet/fundamentals/code-analysis/configuration-files#general-options.
14+
This only needs to be done if there is an inner clone.
15+
-->
16+
<Target Name="RemoveInnerGlobalConfig"
17+
DependsOnTargets="PrepareInnerSourceBuildRepoRoot"
18+
BeforeTargets="RunInnerSourceBuildCommand"
19+
Condition="'$(DotNetBuildOrchestrator)' != 'true'">
20+
21+
<Delete Files="$(InnerSourceBuildRepoRoot).globalconfig" />
22+
</Target>
23+
1024
<!-- Build RepoTasks - this is normally triggered via the build script but the inner ArPow source-build is run via msbuild.
1125
https://github.com/dotnet/source-build/issues/3807 -->
1226
<Target Name="BuildRepoTasks"

0 commit comments

Comments
 (0)