Skip to content

Commit 8b93d9e

Browse files
authored
BuildIisNativeProjects -> UseIisNativeAssets (#39655)
1 parent c47b9ed commit 8b93d9e

File tree

9 files changed

+19
-19
lines changed

9 files changed

+19
-19
lines changed

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@
220220
<MvcTestingTargets>$(MSBuildThisFileDirectory)src\Mvc\Mvc.Testing\src\Microsoft.AspNetCore.Mvc.Testing.targets</MvcTestingTargets>
221221
<_MvcTestingTasksAssembly>$(ArtifactsBinDir)\Microsoft.AspNetCore.Mvc.Testing.Tasks\$(Configuration)\netstandard2.0\Microsoft.AspNetCore.Mvc.Testing.Tasks.dll</_MvcTestingTasksAssembly>
222222
<!-- IIS native projects can only be built on Windows for x86/x64/ARM64. -->
223-
<BuildIisNativeProjects Condition=" '$(TargetOsName)' == 'win' AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64' OR '$(TargetArchitecture)' == 'ARM64') ">true</BuildIisNativeProjects>
223+
<UseIisNativeAssets Condition=" '$(TargetOsName)' == 'win' AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64' OR '$(TargetArchitecture)' == 'ARM64') ">true</UseIisNativeAssets>
224224
<!-- This property is shared by several projects to layout the AspNetCore.App targeting pack for installers -->
225225
<TargetingPackLayoutRoot>$(ArtifactsObjDir)TargetingPack.Layout\$(Configuration)\</TargetingPackLayoutRoot>
226226
<!-- This property is shared by several projects to layout the AspNetCore.App shared framework for installers -->

src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant
137137
PrivateAssets="All"
138138
GeneratePathProperty="true" />
139139

140-
<ProjectReference Condition=" '$(BuildIisNativeProjects)' == 'true' AND $(BuildNative) "
140+
<ProjectReference Condition=" '$(UseIisNativeAssets)' == 'true' AND $(BuildNative) "
141141
Include="$(RepoRoot)src\Servers\IIS\AspNetCoreModuleV2\InProcessRequestHandler\InProcessRequestHandler.vcxproj">
142142
<SetPlatform>Platform=$(NativePlatform)</SetPlatform>
143143
<!-- Custom attribute used to distinguish managed from native references. -->
@@ -148,7 +148,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant
148148
<Targets>Build;GetTargetPath</Targets>
149149
</ProjectReference>
150150

151-
<_ResolvedNativeProjectReferencePaths Condition=" '$(BuildIisNativeProjects)' == 'true' AND !$(BuildNative) "
151+
<_ResolvedNativeProjectReferencePaths Condition=" '$(UseIisNativeAssets)' == 'true' AND !$(BuildNative) "
152152
Include="$(ArtifactsBinDir)InProcessRequestHandler\$(NativePlatform)\$(Configuration)\aspnetcorev2_inprocess.dll">
153153
<IsNativeImage>true</IsNativeImage>
154154
</_ResolvedNativeProjectReferencePaths>
@@ -233,7 +233,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant
233233

234234
<Target Name="_WarnAboutUnbuiltNativeDependencies"
235235
BeforeTargets="Build"
236-
Condition=" '$(BuildIisNativeProjects)' == 'true' AND !$(BuildNative) AND
236+
Condition=" '$(UseIisNativeAssets)' == 'true' AND !$(BuildNative) AND
237237
!EXISTS('$(ArtifactsBinDir)InProcessRequestHandler\$(NativePlatform)\$(Configuration)\aspnetcorev2_inprocess.dll') ">
238238
<Warning Text="This project has native dependencies which were not built. Without this, tests may not function correctly. Run `build.cmd -BuildNative -BuildManaged` to build both C# and C++." />
239239
</Target>

src/Servers/IIS/AspNetCoreModuleV2/Symbols/Microsoft.AspNetCore.ANCMSymbols.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@
2727
</None>
2828
</ItemGroup>
2929

30-
<ItemGroup Condition=" '$(BuildIisNativeProjects)' == 'true' ">
30+
<ItemGroup Condition=" '$(UseIisNativeAssets)' == 'true' ">
3131
<NativeProjectReference Include="$(MSBuildThisFileDirectory)..\..\AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj" Platform="$(NativeVCPlatform)" />
3232
<NativeProjectReference Include="$(MSBuildThisFileDirectory)..\..\AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj" Platform="$(NativeVCPlatform)" />
3333

3434
<UpToDateCheckInput Include="$(AspNetCoreModuleV2OutOfProcessHandlerDll)" />
3535
<UpToDateCheckInput Include="$(AspNetCoreModuleV2ShimDll)" />
3636
</ItemGroup>
3737

38-
<Target Name="AddPackNativeComponents" AfterTargets="_CalculateInputsOutputsForPack" Condition="'$(BuildIisNativeProjects)' == 'true' AND '$(PackNativeAssets)' == 'true'">
38+
<Target Name="AddPackNativeComponents" AfterTargets="_CalculateInputsOutputsForPack" Condition="'$(UseIisNativeAssets)' == 'true' AND '$(PackNativeAssets)' == 'true'">
3939
<ItemGroup>
4040
<!-- RunShimComponents is based on the current runtime (NativePlatform) which should be the same as TargetRuntimeIdentifier -->
4141
<BuiltProjectOutputGroupOutput Include="%(RunShimComponents.DllLocation)" />

src/Servers/IIS/IIS/perf/Microbenchmarks/IIS.Microbenchmarks.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<Content Include="..\..\test\Common.FunctionalTests\Infrastructure\*.config" CopyToOutputDirectory="PreserveNewest" />
1818
</ItemGroup>
1919

20-
<ItemGroup Condition="'$(BuildIisNativeProjects)' == 'true'">
20+
<ItemGroup Condition="'$(UseIisNativeAssets)' == 'true'">
2121
<None Include="$(ArtifactsBinDir)InProcessRequestHandler\x64\$(Configuration)\aspnetcorev2_inprocess.dll" CopyToOutputDirectory="PreserveNewest" Visible="true" Link="%(FileName)%(Extension)" />
2222
<None Include="$(ArtifactsBinDir)InProcessRequestHandler\x64\$(Configuration)\aspnetcorev2_inprocess.pdb" CopyToOutputDirectory="PreserveNewest" Visible="true" Link="%(FileName)%(Extension)" />
2323
<None Include="$(ArtifactsBinDir)AspNetCoreModuleShim\x64\$(Configuration)\aspnetcorev2.dll" CopyToOutputDirectory="PreserveNewest" Visible="true" Link="%(FileName)%(Extension)" />

src/Servers/IIS/IIS/src/Microsoft.AspNetCore.Server.IIS.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@
3030

3131
<Target Name="ValidateNativeComponentsBuilt" AfterTargets="Build" >
3232
<Error Text="Required dll from ANCM has not been built. To build ANCM, you must use MSBuild.exe."
33-
Condition="'$(BuildIisNativeProjects)' == 'true' AND !Exists('$(AspNetCoreModuleV2InProcessHandlerDll)')" />
33+
Condition="'$(UseIisNativeAssets)' == 'true' AND !Exists('$(AspNetCoreModuleV2InProcessHandlerDll)')" />
3434
</Target>
3535

36-
<ItemGroup Condition=" '$(BuildIisNativeProjects)' == 'true' ">
36+
<ItemGroup Condition=" '$(UseIisNativeAssets)' == 'true' ">
3737
<NativeProjectReference Include="$(MSBuildThisFileDirectory)..\..\AspNetCoreModuleV2\InProcessRequestHandler\InProcessRequestHandler.vcxproj" Platform="x64" />
3838
<NativeProjectReference Include="$(MSBuildThisFileDirectory)..\..\AspNetCoreModuleV2\InProcessRequestHandler\InProcessRequestHandler.vcxproj" Platform="Win32" />
3939
<NativeProjectReference Include="$(MSBuildThisFileDirectory)..\..\AspNetCoreModuleV2\InProcessRequestHandler\InProcessRequestHandler.vcxproj" Platform="ARM64" />

src/Servers/IIS/IntegrationTesting.IIS/src/Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
<EmbeddedResource Include="Http.config" />
2929
</ItemGroup>
3030

31-
<Target Name="ValidateNativeComponentsBuilt" AfterTargets="Build" Condition="'$(BuildIisNativeProjects)' == 'true' and '$(SkipTestBuild)' != 'true'">
31+
<Target Name="ValidateNativeComponentsBuilt" AfterTargets="Build" Condition="'$(UseIisNativeAssets)' == 'true' and '$(SkipTestBuild)' != 'true'">
3232
<Error Text="Required dll from ANCM has not been built. To build ANCM, you must use MSBuild.exe."
3333
Condition="!Exists('$(AspNetCoreModuleV2ShimDll)') OR !Exists('$(AspNetCoreModuleV2OutOfProcessHandlerDll)')" />
3434
</Target>
3535

36-
<ItemGroup Condition="'$(BuildIisNativeProjects)' == 'true' AND '$(TestGroupName)' != 'IISNewHandler.FunctionalTests'">
36+
<ItemGroup Condition="'$(UseIisNativeAssets)' == 'true' AND '$(TestGroupName)' != 'IISNewHandler.FunctionalTests'">
3737
<NativeProjectReference Include="$(MSBuildThisFileDirectory)..\..\AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj" Platform="x64"/>
3838
<NativeProjectReference Include="$(MSBuildThisFileDirectory)..\..\AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj" Platform="x64" />
3939

@@ -44,13 +44,13 @@
4444
<UpToDateCheckInput Include="$(AspNetCoreModuleV2OutOfProcessHandlerDll)" />
4545
</ItemGroup>
4646

47-
<Target Name="AddRunNativeComponents" BeforeTargets="AssignTargetPaths" Condition="'$(BuildIisNativeProjects)' == 'true'">
47+
<Target Name="AddRunNativeComponents" BeforeTargets="AssignTargetPaths" Condition="'$(UseIisNativeAssets)' == 'true'">
4848
<ItemGroup>
4949
<None Include="%(ShimComponents.DllLocation)" CopyToOutputDirectory="PreserveNewest" CopyToPublishDirectory="PreserveNewest" Condition="Exists('%(ShimComponents.DllLocation)')" Link="ANCM\%(ShimComponents.Platform)\%(ShimComponents.PackageSubPath)\%(ShimComponents.NativeAsset).dll" />
5050
</ItemGroup>
5151
</Target>
5252

53-
<Target Name="AddPackNativeComponents" BeforeTargets="_GetPackageFiles" Condition="'$(BuildIisNativeProjects)' == 'true'">
53+
<Target Name="AddPackNativeComponents" BeforeTargets="_GetPackageFiles" Condition="'$(UseIisNativeAssets)' == 'true'">
5454
<ItemGroup>
5555
<Content Include="%(ShimComponents.DllLocation)" PackageCopyToOutput="true" PackagePath="contentFiles/any/any/%(ShimComponents.Platform)/%(ShimComponents.PackageSubPath)" />
5656
</ItemGroup>

src/Servers/IIS/build/assets.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<!-- This file is autogenerated -->
22
<Project>
33
<PropertyGroup>
4-
<BuildIisNativeProjects Condition="'$(SolutionName)' == 'IISIntegration'">true</BuildIisNativeProjects>
5-
<PackNativeAssets Condition="'$(BuildIisNativeProjects)' == 'true'">true</PackNativeAssets>
6-
<PackNativeAssets Condition="'$(BuildIisNativeProjects)' != 'true'">false</PackNativeAssets>
4+
<UseIisNativeAssets Condition="'$(SolutionName)' == 'IISIntegration'">true</UseIisNativeAssets>
5+
<PackNativeAssets Condition="'$(UseIisNativeAssets)' == 'true'">true</PackNativeAssets>
6+
<PackNativeAssets Condition="'$(UseIisNativeAssets)' != 'true'">false</PackNativeAssets>
77
<NativePlatform Condition="'$(TargetArchitecture)' == 'AnyCPU'">x64</NativePlatform>
88
<NativePlatform Condition="'$(NativePlatform)' == ''">$(TargetArchitecture)</NativePlatform>
99
<NativeVCPlatform Condition="'$(NativePlatform)' == 'x86'">Win32</NativeVCPlatform>

src/Servers/IIS/build/testsite.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
the end of processes using the GenerateBuildDependencyFile target.
6464
-->
6565
<Target Name="InjectRequestHandler"
66-
Condition=" '$(InProcessTestSite)' == 'true' AND '$(BuildIisNativeProjects)' == 'true' AND '$(TargetFrameworkIdentifier)' != '.NETFramework'"
66+
Condition=" '$(InProcessTestSite)' == 'true' AND '$(UseIisNativeAssets)' == 'true' AND '$(TargetFrameworkIdentifier)' != '.NETFramework'"
6767
BeforeTargets="BuildDepsJson;CoreBuild"
6868
DependsOnTargets="GenerateBuildDependencyFile;PrepareInjectionApp">
6969
<Exec Command="$(InjectDepsApp) &quot;$(ProjectDepsFilePath)&quot; $(RuntimeIdentifier) " />
@@ -76,7 +76,7 @@
7676
(GenerateSingleFileBundle also uses the intermediate .desp file but only in single-file publish cases ignored here.)
7777
-->
7878
<Target Name="InjectRequestHandlerOnPublish"
79-
Condition=" '$(InProcessTestSite)' == 'true' AND '$(BuildIisNativeProjects)' == 'true' AND '$(TargetFrameworkIdentifier)' != '.NETFramework'"
79+
Condition=" '$(InProcessTestSite)' == 'true' AND '$(UseIisNativeAssets)' == 'true' AND '$(TargetFrameworkIdentifier)' != '.NETFramework'"
8080
BeforeTargets="Publish"
8181
DependsOnTargets="GeneratePublishDependencyFile;CopyFilesToPublishDirectory;PrepareInjectionApp">
8282
<Exec Command="$(InjectDepsApp) &quot;$(PublishDepsFilePath)&quot; $(RuntimeIdentifier) " />

src/Servers/IIS/tools/GenerateNativeAssets.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ $content = @"
128128
<!-- This file is autogenerated -->
129129
<Project>
130130
<PropertyGroup>
131-
<PackNativeAssets Condition="'`$(BuildIisNativeProjects)' == 'true'">true</PackNativeAssets>
131+
<PackNativeAssets Condition="'`$(UseIisNativeAssets)' == 'true'">true</PackNativeAssets>
132132
<NativePlatform Condition="'`$(Platform)' == 'AnyCPU'">x64</NativePlatform>
133133
<NativePlatform Condition="'`$(NativePlatform)' == ''">`$(Platform)</NativePlatform>
134134
<NativeVCPlatform Condition="'`$(NativePlatform)' == 'x86'">Win32</NativeVCPlatform>

0 commit comments

Comments
 (0)