Skip to content

Commit d5e4977

Browse files
authored
Merge pull request dotnet#494 from dsplaisted/incremental-runtimeconfig-471
Fix handling of runtimeconfig files in incremental builds
2 parents 8e5f565 + 96a7d73 commit d5e4977

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed
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

+7-1
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)