Skip to content

Commit 7c4657d

Browse files
[VMR] Codeflow 7ba32e7-7ba32e7
[[ commit created by automation ]]
1 parent 7ba32e7 commit 7c4657d

File tree

13 files changed

+59
-24
lines changed

13 files changed

+59
-24
lines changed

eng/Build.props

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@
5656
$(RepoRoot)src\SignalR\perf\benchmarkapps\**\*.csproj;
5757
" />
5858

59-
<!-- In the VMR, we don't build the native ANCM bits in pass 1 -->
59+
<!-- In the .NET product build mode, don't build the native ANCM bits in pass 1 -->
6060
<ProjectToExclude Include="
6161
$(RepoRoot)src\Installers\**\*.vcxproj;
6262
"
6363
Condition=" '$(BuildNative)' == 'true' and '$(DotNetBuild)' == 'true' and ('$(DotNetBuildPass)' == '' or '$(DotNetBuildPass)' == '1') " />
6464

6565

66-
<!-- This project requires inputs from x64, x86, and arm64 on Windows - therefore in the VMR, we build it in pass 2 -->
66+
<!-- This project requires inputs from x64, x86, and arm64 on Windows - therefore in the .NET product build mode, build it in pass 2 -->
6767
<ProjectToExclude Include="
6868
$(RepoRoot)src\Servers\IIS/IntegrationTesting.IIS\src\Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj;
6969
"
@@ -83,7 +83,7 @@
8383
</ProjectToBuild>
8484
</ItemGroup>
8585
</When>
86-
<!-- Projects to build in VMR build pass 2 -->
86+
<!-- Projects to build in .NET product build pass 2 -->
8787
<When Condition="'$(DotNetBuildPass)' == '2'">
8888
<ItemGroup Condition=" '$(DotNetBuild)' == 'true' AND '$(TargetOsName)' == 'win' AND '$(TargetArchitecture)' == 'x64' ">
8989
<!-- Build Hosting Bundle -->
@@ -264,7 +264,7 @@
264264
<_VcxTargetPlatform Condition="'$(TargetArchitecture)' == 'arm64'">ARM64</_VcxTargetPlatform>
265265
</PropertyGroup>
266266

267-
<!-- In the VMR, we build the installers entirely via HostingBundle ProjectReferences in pass 2 -->
267+
<!-- In .NET product build mode, build the installers entirely via HostingBundle ProjectReferences in pass 2 -->
268268
<ItemGroup Condition="'$(DotNetBuild)' != 'true' and '$(_BuildWindowsInstallers)' == 'true' ">
269269
<!-- Build the ANCM custom action -->
270270
<InstallerProject Include="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\CustomAction\aspnetcoreCA.vcxproj" AdditionalProperties="Platform=x64" />

eng/Common.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<TargetRuntimeIdentifier Condition="'$(TargetRuntimeIdentifier)' == ''">$(TargetOsName)-$(TargetArchitecture)</TargetRuntimeIdentifier>
1313
<PortableBuild Condition="'$(PortableBuild)' == ''">true</PortableBuild>
14-
<DefaultAppHostRuntimeIdentifier Condition=" '$(DotNetBuild)' == 'true' ">$(TargetRuntimeIdentifier)</DefaultAppHostRuntimeIdentifier>
14+
<DefaultAppHostRuntimeIdentifier Condition="'$(DotNetBuild)' == 'true'">$(TargetRuntimeIdentifier)</DefaultAppHostRuntimeIdentifier>
1515

1616
<BuildNodeJS>$(BuildNodeJSUnlessSourcebuild)</BuildNodeJS>
1717
<BuildNodeJS Condition="'$(DotNetBuildSourceOnly)' == 'true'">false</BuildNodeJS>
@@ -44,8 +44,8 @@
4444
- If we're building outside of the VMR, publish these assets from the Windows job.
4545
- If we're building inside the VMR, publish these assets from whichever job is producing non-RID-specific artifacts.
4646
-->
47-
<PublishAllBuildsAssetsInThisJob Condition="('$(OS)' == 'Windows_NT' and '$(DotNetBuildOrchestrator)' != 'true')
48-
or ('$(DotNetBuildOrchestrator)' == 'true' and '$(EnableDefaultRidSpecificArtifacts)' != 'true'
47+
<PublishAllBuildsAssetsInThisJob Condition="('$(OS)' == 'Windows_NT' and '$(DotNetBuildFromVMR)' != 'true')
48+
or ('$(DotNetBuildFromVMR)' == 'true' and '$(EnableDefaultRidSpecificArtifacts)' != 'true'
4949
and ('$(DotNetBuildPass)' == '' or '$(DotNetBuildPass)' == '1'))">true</PublishAllBuildsAssetsInThisJob>
5050
<PublishInstallerBaseVersion Condition="'$(PublishInstallerBaseVersion)' == ''">$(PublishAllBuildsAssetsInThisJob)</PublishInstallerBaseVersion>
5151
</PropertyGroup>

eng/Dependencies.props

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,4 +258,23 @@ and are generated based on the last package release.
258258
Condition=" $([System.String]::new('%(Identity)').StartsWith('Microsoft.NETCore.App.Runtime.')) or $([System.String]::new('%(Identity)').StartsWith('Microsoft.NETCore.App.Crossgen2.'))">$(MicrosoftNETCoreAppRefVersion)</Version>
259259
</LatestPackageReference>
260260
</ItemGroup>
261+
262+
<!-- Replicates the same overriding of versions that occurs on Roslyn package versions for source only builds -->
263+
<ItemGroup Label="Source only build overrides" Condition="'$(DotNetBuildSourceOnly)' == 'true'">
264+
<LatestPackageReference Update="Microsoft.CodeAnalysis.Common">
265+
<Version>$(MicrosoftCodeAnalysisVersion_LatestVS)</Version>
266+
</LatestPackageReference>
267+
<LatestPackageReference Update="Microsoft.CodeAnalysis.CSharp">
268+
<Version>$(Analyzer_MicrosoftCodeAnalysisCSharpVersion)</Version>
269+
</LatestPackageReference>
270+
<LatestPackageReference Update="Microsoft.CodeAnalysis.CSharp.Workspaces">
271+
<Version>$(Analyzer_MicrosoftCodeAnalysisCSharpWorkspacesVersion)</Version>
272+
</LatestPackageReference>
273+
<LatestPackageReference Update="Microsoft.CodeAnalysis.ExternalAccess.AspNetCore">
274+
<Version>$(MicrosoftCodeAnalysisVersion_LatestVS)</Version>
275+
</LatestPackageReference>
276+
<LatestPackageReference Update="Microsoft.CodeAnalysis.Razor">
277+
<Version>$(MicrosoftCodeAnalysisVersion_LatestVS)</Version>
278+
</LatestPackageReference>
279+
</ItemGroup>
261280
</Project>

eng/Publishing.props

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
<Project>
2+
23
<PropertyGroup>
34
<ProducesDotNetReleaseShippingAssets>true</ProducesDotNetReleaseShippingAssets>
45

5-
<!-- Do not push .nupkg files from Linux and macOS builds. They'll be packed up separately and signed on Windows.
6-
Do not remove if post build sign is true, as we avoid the xplat codesign jobs, and need to have
7-
the nupkgs pushed. Do not do this if building from source, since we want the source build intermediate package
8-
to be published. Use DotNetBuildRepo is only set in the internal source build,
9-
and Build.proj is invoked from the wrapper build. -->
6+
<!-- Don't sign and publish rid agnostic nuget packages from other builds than windows when not building
7+
inside the VMR. Do not remove if post build sign is true, as we avoid the xplat codesign jobs, and need to have
8+
the nupkgs pushed. -->
109
<EnableDefaultArtifacts Condition="'$(OS)' != 'Windows_NT' and
1110
'$(PostBuildSign)' != 'true' and
12-
'$(DotNetBuildRepo)' != 'true'">false</EnableDefaultArtifacts>
11+
'$(DotNetBuild)' != 'true'">false</EnableDefaultArtifacts>
1312

1413
<!-- This avoids creating VS.*.symbols.nupkg packages that are identical to the original package. -->
1514
<AutoGenerateSymbolPackages>false</AutoGenerateSymbolPackages>

eng/SharedFramework.External.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
<ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Options" Version="$(MicrosoftExtensionsOptionsVersion)" />
4444
<ExternalAspNetCoreAppReference Include="Microsoft.Extensions.Primitives" Version="$(MicrosoftExtensionsPrimitivesVersion)" />
4545
<ExternalAspNetCoreAppReference Include="System.Security.Cryptography.Xml" Version="$(SystemSecurityCryptographyXmlVersion)" />
46+
<ExternalAspNetCoreAppReference Include="System.Threading.AccessControl" Version="$(SystemThreadingAccessControlVersion)" />
4647
<ExternalAspNetCoreAppReference Include="System.Threading.RateLimiting" Version="$(SystemThreadingRateLimitingVersion)" />
4748

4849
<!--

eng/build.ps1

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ Key for feed that can be used when downloading .NET runtimes and SDKs
102102
.PARAMETER ProductBuild
103103
Build the repository in product mode (short: -pb).
104104
105+
.PARAMETER fromVMR
106+
Set when building from within the VMR.
107+
105108
.EXAMPLE
106109
Building both native and managed projects.
107110
@@ -203,6 +206,9 @@ param(
203206
[Alias('pb')]
204207
[switch]$ProductBuild,
205208

209+
# Intentionally lowercase as tools.ps1 depends on it
210+
[switch]$fromVMR,
211+
206212
# Capture the rest
207213
[Parameter(ValueFromRemainingArguments = $true)]
208214
[string[]]$MSBuildArguments
@@ -282,7 +288,8 @@ $MSBuildArguments += "/p:Publish=$Publish"
282288
$MSBuildArguments += "/p:TargetArchitecture=$Architecture"
283289
$MSBuildArguments += "/p:TargetOsName=win"
284290

285-
if ($ProductBuild) { $MSBuildArguments += "/p:DotNetBuildRepo=$ProductBuild" }
291+
if ($ProductBuild) { $MSBuildArguments += "/p:DotNetBuild=$ProductBuild" }
292+
if ($fromVMR) { $MSBuildArguments += "/p:DotNetBuildFromVMR=$fromVMR" }
286293

287294
if (-not $Configuration) {
288295
$Configuration = if ($CI) { 'Release' } else { 'Debug' }
@@ -298,7 +305,8 @@ if ($RuntimeSourceFeed -or $RuntimeSourceFeedKey) {
298305
$ToolsetBuildArguments += $runtimeFeedArg
299306
$ToolsetBuildArguments += $runtimeFeedKeyArg
300307
}
301-
if ($ProductBuild) { $ToolsetBuildArguments += "/p:DotNetBuildRepo=$ProductBuild" }
308+
if ($ProductBuild) { $ToolsetBuildArguments += "/p:DotNetBuild=$ProductBuild" }
309+
if ($fromVMR) { $ToolsetBuildArguments += "/p:DotNetBuildFromVMR=$fromVMR" }
302310

303311
# Split build categories between dotnet msbuild and desktop msbuild. Use desktop msbuild as little as possible.
304312
[string[]]$dotnetBuildArguments = ''

eng/build.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ runtime_source_feed=''
3737
runtime_source_feed_key=''
3838
source_build=''
3939
product_build=''
40+
from_vmr=''
4041

4142
if [ "$(uname)" = "Darwin" ]; then
4243
target_os_name='osx'
@@ -92,6 +93,7 @@ Options:
9293
9394
--sourceBuild|-sb Build the repository in source-only mode.
9495
--productBuild|-pb Build the repository in product-build mode.
96+
--fromVMR Set when building from within the VMR.
9597
9698
Description:
9799
This build script installs required tools and runs an MSBuild command on this repository
@@ -259,6 +261,9 @@ while [[ $# -gt 0 ]]; do
259261
-productbuild|-product-build|-pb)
260262
product_build=true
261263
;;
264+
-fromvmr|-from-vmr)
265+
from_vmr=true
266+
;;
262267
*)
263268
msbuild_args[${#msbuild_args[*]}]="$1"
264269
;;
@@ -316,8 +321,9 @@ fi
316321
[ ! -z "$build_nodejs" ] && msbuild_args[${#msbuild_args[*]}]="-p:BuildNodeJSUnlessSourcebuild=$build_nodejs"
317322
[ ! -z "$build_managed" ] && msbuild_args[${#msbuild_args[*]}]="-p:BuildManaged=$build_managed"
318323
[ ! -z "$build_installers" ] && msbuild_args[${#msbuild_args[*]}]="-p:BuildInstallers=$build_installers"
319-
[ ! -z "$product_build" ] && msbuild_args[${#msbuild_args[*]}]="-p:DotNetBuildRepo=$product_build"
324+
[ ! -z "$product_build" ] && msbuild_args[${#msbuild_args[*]}]="-p:DotNetBuild=$product_build"
320325
[ ! -z "$source_build" ] && msbuild_args[${#msbuild_args[*]}]="-p:DotNetBuildSourceOnly=$source_build"
326+
[ ! -z "$from_vmr" ] && msbuild_args[${#msbuild_args[*]}]="-p:DotNetBuildFromVMR=$from_vmr"
321327

322328
# Run restore by default unless --no-restore or --no-build was specified.
323329
[ -z "$run_restore" ] && run_restore=true
@@ -354,8 +360,9 @@ if [ ! -z "$runtime_source_feed$runtime_source_feed_key" ]; then
354360
toolset_build_args[${#toolset_build_args[*]}]=$runtimeFeedArg
355361
toolset_build_args[${#toolset_build_args[*]}]=$runtimeFeedKeyArg
356362
fi
357-
[ ! -z "$product_build" ] && toolset_build_args[${#toolset_build_args[*]}]="-p:DotNetBuildRepo=$product_build"
363+
[ ! -z "$product_build" ] && toolset_build_args[${#toolset_build_args[*]}]="-p:DotNetBuild=$product_build"
358364
[ ! -z "$source_build" ] && toolset_build_args[${#toolset_build_args[*]}]="-p:DotNetBuildSourceOnly=$source_build"
365+
[ ! -z "$from_vmr" ] && toolset_build_args[${#toolset_build_args[*]}]="-p:DotNetBuildFromVMR=$from_vmr"
359366

360367
# Initialize global variables need to be set before the import of Arcade is imported
361368
restore=$run_restore

eng/configure-toolset.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# We could potentially try to find an existing installation that has all the required runtimes,
33
# but it's unlikely one will be available.
44

5-
if [ "${DotNetBuild:-false}" = false ]; then
5+
if [ "$product_build" = false ]; then
66
use_installed_dotnet_cli="false"
77
fi
88

eng/tools/GenerateFiles/Directory.Build.targets.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464

6565
<ItemGroup>
6666
<!-- Use the same NETCore shared framework as repo built against except when building product code in servicing. -->
67-
<!-- We cannot use live shims when building tool packs in VMR - only package for current arch is available. -->
67+
<!-- We cannot use live shims when building tool packs in the .NET product mode as only packages for the current arch are available. -->
6868
<KnownFrameworkReference Update="Microsoft.NETCore.App" Condition=" '$(DotNetBuild)' != 'true' OR '$(PackAsToolShimRuntimeIdentifiers)' == '' ">
6969
<LatestRuntimeFrameworkVersion
7070
Condition=" '%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' ">${MicrosoftNETCoreAppRefVersion}</LatestRuntimeFrameworkVersion>
@@ -84,7 +84,7 @@
8484
<RuntimePackRuntimeIdentifiers Condition="'$(DotNetBuild)' == 'true'">%(RuntimePackRuntimeIdentifiers);$(TargetRuntimeIdentifier)</RuntimePackRuntimeIdentifiers>
8585
</KnownFrameworkReference>
8686

87-
<!-- We cannot use live shims when building tool packs in VMR - only package for current arch is available. -->
87+
<!-- We cannot use live shims when building tool packs in .NET product build mode as only packages for the current arch are available. -->
8888
<KnownAppHostPack Update="Microsoft.NETCore.App" Condition=" '$(DotNetBuild)' != 'true' OR '$(PackAsToolShimRuntimeIdentifiers)' == '' ">
8989
<AppHostPackVersion
9090
Condition=" '%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' ">${MicrosoftNETCoreAppRefVersion}</AppHostPackVersion>

src/Framework/App.Ref.Internal/src/Microsoft.AspNetCore.App.Ref.Internal.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<IncludeBuildOutput>false</IncludeBuildOutput>
1212
<IncludeSymbols>false</IncludeSymbols>
1313
<NoPackageAnalysis>true</NoPackageAnalysis>
14+
<ExcludeFromSourceOnlyBuild>false</ExcludeFromSourceOnlyBuild>
1415
</PropertyGroup>
1516

1617
</Project>

0 commit comments

Comments
 (0)