Skip to content

Commit 84727b6

Browse files
authored
Only build platform-specific native assets in native build in VMR (#60896)
* Only build platform-specific native assets in native build * Fix build * Quote
1 parent 8957ae8 commit 84727b6

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

eng/Build.props

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@
5555
$(RepoRoot)src\Servers\Kestrel\perf\PlatformBenchmarks\**\*.csproj;
5656
$(RepoRoot)src\SignalR\perf\benchmarkapps\**\*.csproj;
5757
" />
58+
59+
<!-- This project requires inputs from x64, x86, and arm64 on Windows - therefore in the VMR, we build it in pass 2 -->
60+
<ProjectToExclude Include="
61+
$(RepoRoot)src\Servers\IIS/IntegrationTesting.IIS\src\Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj;
62+
"
63+
Condition=" '$(TargetOsName)' == 'win' and '$(DotNetBuild)' == 'true' and ('$(DotNetBuildPass)' == '' or '$(DotNetBuildPass)' == '1') " />
5864
</ItemGroup>
5965

6066
<Choose>
@@ -76,11 +82,20 @@
7682
<AdditionalProperties>Platform=x86</AdditionalProperties>
7783
<DotNetBuildPass>$(DotNetBuildPass)</DotNetBuildPass>
7884
</ProjectToBuild>
85+
<ProjectToBuild Include="$(RepoRoot)src\Servers\IIS/IntegrationTesting.IIS\src\Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj" >
86+
<DotNetBuildPass>$(DotNetBuildPass)</DotNetBuildPass>
87+
</ProjectToBuild>
7988
</ItemGroup>
8089
</When>
8190
<Otherwise>
8291
<!-- BuildNative -->
83-
<ItemGroup Condition=" '$(TargetOsName)' == 'win' AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64' OR '$(TargetArchitecture)' == 'arm64') ">
92+
<ItemGroup Condition=" '$(TargetOsName)' == 'win' AND '$(DotNetBuild)' == 'true' ">
93+
<NativeProjects Condition="'$(TargetArchitecture)' == 'x64'" Include="$(RepoRoot)src\**\*.vcxproj" Exclude="@(ProjectToExclude)" AdditionalProperties="Platform=x64" />
94+
<NativeProjects Condition="'$(TargetArchitecture)' == 'x86'" Include="$(RepoRoot)src\**\*.vcxproj" Exclude="@(ProjectToExclude)" AdditionalProperties="Platform=Win32" />
95+
<NativeProjects Condition="'$(TargetArchitecture)' == 'arm64'" Include="$(RepoRoot)src\**\*.vcxproj" Exclude="@(ProjectToExclude)" AdditionalProperties="Platform=arm64" />
96+
</ItemGroup>
97+
98+
<ItemGroup Condition=" '$(TargetOsName)' == 'win' AND '$(DotNetBuild)' != 'true' AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64' OR '$(TargetArchitecture)' == 'arm64') ">
8499
<NativeProjects Include="$(RepoRoot)src\**\*.vcxproj" Exclude="@(ProjectToExclude)" AdditionalProperties="Platform=x64" />
85100
<NativeProjects Include="$(RepoRoot)src\**\*.vcxproj" Exclude="@(ProjectToExclude)" AdditionalProperties="Platform=Win32" />
86101
<NativeProjects Include="$(RepoRoot)src\**\*.vcxproj" Exclude="@(ProjectToExclude)" AdditionalProperties="Platform=arm64" />

0 commit comments

Comments
 (0)