Skip to content

Commit 8976b15

Browse files
committed
Only build RID specific assets in ANCM
1 parent 92e9c82 commit 8976b15

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/Installers/Windows/AspNetCoreModule-Setup/Directory.Build.props

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</DefineConstants>
4141
</PropertyGroup>
4242

43-
<ItemGroup Condition="'$(BuildNative)' == 'true'">
43+
<ItemGroup Condition="'$(BuildNative)' == 'true' AND ('$(DotNetBuild)' != 'true' OR or '$(DotNetBuildPass)' == '2') ">
4444
<ProjectReference Include="$(_ServerIISBasePath)AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj">
4545
<Name>AspNetCoreV2</Name>
4646
<Private>True</Private>
@@ -87,6 +87,23 @@
8787
</ProjectReference>
8888
</ItemGroup>
8989

90+
<ItemGroup Condition="'$(BuildNative)' == 'true' AND '$(DotNetBuild)' == 'true' AND '$(DotNetBuildPass)' != '2') ">
91+
<ProjectReference Include="$(_ServerIISBasePath)AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj">
92+
<Name>AspNetCoreV2</Name>
93+
<Private>True</Private>
94+
<DoNotHarvest>True</DoNotHarvest>
95+
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
96+
<SetPlatform>Platform=$(NativePlatform)</SetPlatform>
97+
</ProjectReference>
98+
<ProjectReference Include="$(_ServerIISBasePath)AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj">
99+
<Name>AspNetCoreV2Handler</Name>
100+
<Private>True</Private>
101+
<DoNotHarvest>True</DoNotHarvest>
102+
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
103+
<SetPlatform>Platform=$(NativePlatform)</SetPlatform>
104+
</ProjectReference>
105+
</ItemGroup>
106+
90107
<Target Name="CopyANCM" BeforeTargets="_PrepareForBuild" Condition=" '$(BuildNative)' != 'true' ">
91108
<ItemGroup>
92109
<None Include="%(RunShimComponents.DllLocation)" CopyToOutputDirectory="PreserveNewest" Condition="Exists('%(RunShimComponents.DllLocation)')" Link="%(RunShimComponents.Platform)\%(RunShimComponents.NativeAsset).dll" />

0 commit comments

Comments
 (0)