Skip to content

Commit 96a7d73

Browse files
committed
Fix handling of runtimeconfig files in incremental builds
Fixes dotnet#471
1 parent 8e5f565 commit 96a7d73

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"configProperties": {
3+
"System.GC.Server": true
4+
}
5+
}

src/Tasks/Microsoft.NET.Build.Tasks/build/Microsoft.NET.Sdk.targets

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,14 @@ Copyright (c) .NET Foundation. All rights reserved.
124124
PlatformLibraryName="$(MicrosoftNETPlatformLibrary)"
125125
UserRuntimeConfig="$(UserRuntimeConfig)">
126126

127-
<Output TaskParameter="FilesWritten" ItemName="FileWrites" />
128127
</GenerateRuntimeConfigurationFiles>
128+
129+
<ItemGroup>
130+
<!-- Do this in an ItemGroup instead of as an output parameter of the GenerateDepsFile task so that it still gets added to the item set
131+
during incremental builds when the task is skipped -->
132+
<FileWrites Include="$(ProjectRuntimeConfigFilePath)" Condition="Exists('$(ProjectRuntimeConfigFilePath)')"/>
133+
<FileWrites Include="$(ProjectRuntimeConfigDevFilePath)" Condition="Exists('$(ProjectRuntimeConfigDevFilePath)')"/>
134+
</ItemGroup>
129135

130136
</Target>
131137

0 commit comments

Comments
 (0)