diff --git a/eng/pipelines/templates/jobs/vmr-build.yml b/eng/pipelines/templates/jobs/vmr-build.yml
index e589d2549..1a5e93ef6 100644
--- a/eng/pipelines/templates/jobs/vmr-build.yml
+++ b/eng/pipelines/templates/jobs/vmr-build.yml
@@ -36,6 +36,11 @@ parameters:
type: boolean
default: false
+- name: useDevVersions
+ displayName: True when build output uses dev/CI versioning instead of official build versioning
+ type: boolean
+ default: false
+
#### SOURCE-ONLY parameters ####
# Instead of building the VMR directly, exports the sources into a tarball and builds from that
@@ -226,8 +231,13 @@ jobs:
- ${{ if eq(parameters.targetOS, 'windows') }}:
- script: |
- call $(sourcesPath)\build.cmd -ci -cleanWhileBuilding -prepareMachine /p:TargetOS=${{ parameters.targetOS }} /p:TargetArchitecture=${{ parameters.targetArchitecture }} ${{ parameters.extraProperties }}
+ call $(sourcesPath)\build.cmd -ci -cleanWhileBuilding -prepareMachine %devArgument% /p:TargetOS=${{ parameters.targetOS }} /p:TargetArchitecture=${{ parameters.targetArchitecture }} ${{ parameters.extraProperties }}
displayName: Build
+ env:
+ ${{ if eq(parameters.useDevVersions, 'True') }}:
+ devArgument: -dev
+ ${{ else }}:
+ devArgument: ''
- ${{ if eq(parameters.runTests, 'True') }}:
- script: |
@@ -295,6 +305,10 @@ jobs:
customBuildArgs="$customBuildArgs --use-mono-runtime"
fi
+ if [[ '${{ parameters.useDevVersions }}' == 'True' ]]; then
+ customBuildArgs="$customBuildArgs --dev"
+ fi
+
if [[ -n "${{ parameters.crossRootFs }}" ]]; then
customEnvVars="$customEnvVars ROOTFS_DIR=${{ parameters.crossRootFs}}"
if [[ '${{ parameters.targetArchitecture }}' != 'wasm' ]]; then
diff --git a/eng/pipelines/templates/stages/vmr-build.yml b/eng/pipelines/templates/stages/vmr-build.yml
index df7751391..2f9c1ed10 100644
--- a/eng/pipelines/templates/stages/vmr-build.yml
+++ b/eng/pipelines/templates/stages/vmr-build.yml
@@ -301,6 +301,18 @@ stages:
vmrBranch: ${{ parameters.vmrBranch }}
jobs:
+ - template: ../jobs/vmr-build.yml
+ parameters:
+ buildName: Ubuntu2204_DevVersions
+ isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }}
+ vmrBranch: ${{ variables.VmrBranch }}
+ architecture: x64
+ pool: ${{ parameters.pool_Linux }}
+ container: ${{ variables.ubuntu2204Container }}
+ targetOS: linux
+ targetArchitecture: x64
+ useDevVersions: true # Use dev versions for CI validation of the experience. If we decide to ship assets from this leg, then we should remove this option.
+
- template: ../jobs/vmr-build.yml
parameters:
buildName: Ubuntu2204
diff --git a/src/SourceBuild/content/build.sh b/src/SourceBuild/content/build.sh
index 6b94d8edf..7ad555225 100755
--- a/src/SourceBuild/content/build.sh
+++ b/src/SourceBuild/content/build.sh
@@ -32,8 +32,12 @@ usage()
echo " --with-sdk
Use the SDK in the specified directory for bootstrapping"
echo ""
+ echo "Non-source-only settings:"
+ echo " --build-repo-tests Build repository tests"
+ echo " --dev Use -dev or -ci versioning instead of .NET official build versions"
+
+
echo "Advanced settings:"
- echo " --build-repo-tests Build repository tests. May not be supported with --source-only"
echo " --ci Set when running on CI server"
echo " --clean-while-building Cleans each repo after building (reduces disk space usage, short: -cwb)"
echo " --excludeCIBinarylog Don't output binary log (short: -nobl)"
@@ -82,6 +86,7 @@ packagesPreviouslySourceBuiltDir="${packagesDir}previously-source-built/"
ci=false
exclude_ci_binary_log=false
prepare_machine=false
+use_dev_versioning=false
properties=''
while [[ $# > 0 ]]; do
@@ -175,6 +180,9 @@ while [[ $# > 0 ]]; do
-use-mono-runtime)
properties="$properties /p:SourceBuildUseMonoRuntime=true"
;;
+ -dev)
+ use_dev_versioning=true
+ ;;
*)
properties="$properties $1"
;;
@@ -189,6 +197,10 @@ if [[ "$ci" == true ]]; then
fi
fi
+if [[ "$use_dev_versioning" == true && "$sourceOnly" != true ]]; then
+ properties="$properties /p:UseOfficialBuildVersioning=false"
+fi
+
# Never use the global nuget cache folder
use_global_nuget_cache=false
diff --git a/src/SourceBuild/content/eng/build.ps1 b/src/SourceBuild/content/eng/build.ps1
index 90ec7afb4..128315cab 100644
--- a/src/SourceBuild/content/eng/build.ps1
+++ b/src/SourceBuild/content/eng/build.ps1
@@ -16,6 +16,7 @@ Param(
[switch][Alias('cwb')]$cleanWhileBuilding,
[switch][Alias('nobl')]$excludeCIBinarylog,
[switch] $prepareMachine,
+ [switch] $dev,
[Parameter(ValueFromRemainingArguments=$true)][String[]]$properties
)
@@ -38,6 +39,7 @@ function Get-Usage() {
Write-Host " -cleanWhileBuilding Cleans each repo after building (reduces disk space usage, short: -cwb)"
Write-Host " -excludeCIBinarylog Don't output binary log (short: -nobl)"
Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build"
+ Write-Host " -dev Use -dev or -ci versioning instead of .NET official build versions"
Write-Host ""
}
@@ -68,6 +70,10 @@ if ($cleanWhileBuilding) {
$arguments += "/p:CleanWhileBuilding=true"
}
+if ($dev) {
+ $arguments += "/p:UseOfficialBuildVersioning=false"
+}
+
function Build {
InitializeToolset
diff --git a/src/SourceBuild/content/repo-projects/Directory.Build.props b/src/SourceBuild/content/repo-projects/Directory.Build.props
index 8a27e0ee9..06df3623a 100644
--- a/src/SourceBuild/content/repo-projects/Directory.Build.props
+++ b/src/SourceBuild/content/repo-projects/Directory.Build.props
@@ -68,7 +68,8 @@
$(BuildActions) $(FlagParameterPrefix)pack
$(BuildActions) $(FlagParameterPrefix)publish
- $(FlagParameterPrefix)ci
+
+ $(FlagParameterPrefix)ci
$(BuildArgs) $(FlagParameterPrefix)configuration $(Configuration)
$(BuildArgs) -bl
$(BuildArgs) /p:DotNetBuildRepo=true
@@ -115,27 +116,30 @@
-
-
-
-
-
+
+
-
+
+
+
+
+
+
+
+
-
@@ -143,7 +147,9 @@
+
+
diff --git a/src/SourceBuild/content/repo-projects/deployment-tools.proj b/src/SourceBuild/content/repo-projects/deployment-tools.proj
index c0c4fc56e..6c1a944fa 100644
--- a/src/SourceBuild/content/repo-projects/deployment-tools.proj
+++ b/src/SourceBuild/content/repo-projects/deployment-tools.proj
@@ -9,9 +9,11 @@
-
+
+
+
diff --git a/src/SourceBuild/content/repo-projects/roslyn.proj b/src/SourceBuild/content/repo-projects/roslyn.proj
index 88d74f0a9..2f26b633c 100644
--- a/src/SourceBuild/content/repo-projects/roslyn.proj
+++ b/src/SourceBuild/content/repo-projects/roslyn.proj
@@ -12,7 +12,7 @@
$(ProjectDirectory)build$(ShellExtension)
- $(BuildArgs) $(FlagParameterPrefix)officialBuildId $(OfficialBuildId)
+ $(BuildArgs) $(FlagParameterPrefix)officialBuildId $(OfficialBuildId)
$(BuildArgs) $(FlagParameterPrefix)officialSkipTests true
$(BuildArgs) $(FlagParameterPrefix)officialSkipApplyOptimizationData true
$(BuildArgs) $(FlagParameterPrefix)officialSourceBranchName placeholder
diff --git a/src/SourceBuild/patches/aspnetcore/0001-Condition-RIDs-on-which-target-RIDs-are-available-wh.patch b/src/SourceBuild/patches/aspnetcore/0001-Condition-RIDs-on-which-target-RIDs-are-available-wh.patch
new file mode 100644
index 000000000..dc9f1bbb6
--- /dev/null
+++ b/src/SourceBuild/patches/aspnetcore/0001-Condition-RIDs-on-which-target-RIDs-are-available-wh.patch
@@ -0,0 +1,49 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Jeremy Koritzinsky
+Date: Tue, 16 Apr 2024 15:56:07 -0700
+Subject: [PATCH] Condition RIDs on which target RIDs are available when doing
+ a VMR build
+
+Backport: https://github.com/dotnet/aspnetcore/pull/55172
+---
+ src/Servers/IIS/IIS/test/testassets/TestTasks/TestTasks.csproj | 1 +
+ src/Servers/IIS/build/testsite.props | 1 +
+ .../ServerComparison.TestSites/ServerComparison.TestSites.csproj | 1 +
+ 3 files changed, 3 insertions(+)
+
+diff --git a/src/Servers/IIS/IIS/test/testassets/TestTasks/TestTasks.csproj b/src/Servers/IIS/IIS/test/testassets/TestTasks/TestTasks.csproj
+index f6157b9730..0e4cfec2ec 100644
+--- a/src/Servers/IIS/IIS/test/testassets/TestTasks/TestTasks.csproj
++++ b/src/Servers/IIS/IIS/test/testassets/TestTasks/TestTasks.csproj
+@@ -4,6 +4,7 @@
+ Exe
+ $(DefaultNetCoreTargetFramework)
+ win-x64;linux-x64;osx-x64
++ $(TargetRuntimeIdentifier)
+
+
+
+
diff --git a/src/redist/targets/GenerateMSIs.targets b/src/redist/targets/GenerateMSIs.targets
index f2af4b0bf..422ed140a 100644
--- a/src/redist/targets/GenerateMSIs.targets
+++ b/src/redist/targets/GenerateMSIs.targets
@@ -62,28 +62,14 @@
$(IntermediateOutputPath)layouts
$(LayoutDirectory)$(ArtifactNameSdk)
$(LayoutDirectory)MSBuildExtensions-->
-
-
-
-
-
-
-
-
-
- $(GitCommitCount.PadLeft(6,'0'))
$(_PatchNumber)
-
- $(GitCommitCount)
+
+ 000000
$(FileVersion)
-
$(VersionPrefix).$(CombinedBuildNumberAndRevision)
@@ -472,9 +458,13 @@
'$(Architecture)'" />
+
+