Skip to content

Commit 263c618

Browse files
committed
Move Generation filtering to build.proj
Add KeepProjectReference for Runtime.Loader projects.
1 parent 339e305 commit 263c618

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

build.proj

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,15 @@
169169
DependsOnTargets="FilterProjects;UpdateVersionsOnTestProjectJson"
170170
BeforeTargets="RestorePackages">
171171
<Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Generating Test project.json's..." />
172+
173+
<ItemGroup>
174+
<GenerateForProject Include="src\tests.builds">
175+
<UndefineProperties>%(Project.UndefineProperties);OSGroup</UndefineProperties>
176+
</GenerateForProject>
177+
</ItemGroup>
172178
<MSBuild Targets="GenerateAllTestProjectJsons"
173-
Projects="src\tests.builds"
174-
Properties="GenerateIndependentOfOSGroup=true"
175-
/>
179+
Projects="@(GenerateForProject)"
180+
/>
176181
<Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Generating Test project.json's...done" />
177182
</Target>
178183

src/System.Runtime.Loader/tests/DefaultContext/System.Runtime.Loader.DefaultContext.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
2020
<OutputItemType>content</OutputItemType>
2121
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
22+
<KeepProjectReference>true</KeepProjectReference>
2223
</ProjectReference>
2324
</ItemGroup>
2425
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />

src/System.Runtime.Loader/tests/RefEmitLoadContext/System.Runtime.Loader.RefEmitLoadContext.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
1616
<OutputItemType>content</OutputItemType>
1717
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
18+
<KeepProjectReference>true</KeepProjectReference>
1819
</ProjectReference>
1920
</ItemGroup>
2021
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />

src/tests.builds

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,12 @@
66
</PropertyGroup>
77

88
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
9-
<ItemGroup Condition="'$(GenerateIndependentOfOSGroup)' != 'true'">
9+
<ItemGroup>
1010
<Project Include="*\tests\**\*.builds">
1111
<BuildAllOSGroups Condition="'$(OSGroup)' != '' OR '$(FilterToOSGroup)' != '' ">false</BuildAllOSGroups>
1212
<FilterToOSGroup Condition="'$(_OriginalOSGroup)' == '' AND '$(DontFilterOsGroup)' != 'true'">$(OSEnvironment)</FilterToOSGroup>
1313
</Project>
1414
</ItemGroup>
15-
16-
<ItemGroup Condition="'$(GenerateIndependentOfOSGroup)' == 'true'">
17-
<Project Include="*\tests\**\*.builds">
18-
<BuildAllOSGroups>true</BuildAllOSGroups>
19-
<UndefineProperties>OSGroup;FilterToOSGroup;</UndefineProperties>
20-
</Project>
21-
</ItemGroup>
2215

2316
<Import Project="$(ToolsDir)versioning.targets" Condition="Exists('$(ToolsDir)versioning.targets')" />
2417
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" />

0 commit comments

Comments
 (0)