From 6d0fb73ae469eff674232acc762a9edf917f63c6 Mon Sep 17 00:00:00 2001
From: Doug Bunting <6431421+dougbu@users.noreply.github.com>
Date: Sat, 18 Apr 2020 14:34:17 -0700
Subject: [PATCH 1/6] Quick fix: Simplify devBuilds.yml - remove an excess
build step
---
.azure/pipelines/devBuilds.yml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/.azure/pipelines/devBuilds.yml b/.azure/pipelines/devBuilds.yml
index 61cb699a4ec4..3a2389e6e916 100644
--- a/.azure/pipelines/devBuilds.yml
+++ b/.azure/pipelines/devBuilds.yml
@@ -31,12 +31,12 @@ stages:
steps:
- script: git submodule init
- script: git submodule update --recursive
- - script: cd ./src/Components
- script: ./build.cmd
-ci
-arch x64
/bl:artifacts/log/build.components.x64.binlog
displayName: Build x64
+ workingDirectory: ./src/Components
artifacts:
- name: Windows_Logs
path: artifacts/log/
@@ -56,12 +56,12 @@ stages:
steps:
- script: git submodule init
- script: git submodule update --recursive
- - script: cd ./src/Servers
- script: ./build.cmd
-ci
-arch x64
/bl:artifacts/log/build.servers.x64.binlog
displayName: Build x64
+ workingDirectory: ./src/Servers
artifacts:
- name: Windows_Logs
path: artifacts/log/
@@ -81,12 +81,12 @@ stages:
steps:
- script: git submodule init
- script: git submodule update --recursive
- - script: cd ./src/ProjectTemplates
- script: ./build.cmd
-ci
-arch x64
/bl:artifacts/log/build.projectTemplates.x64.binlog
displayName: Build x64
+ workingDirectory: ./src/ProjectTemplates
artifacts:
- name: Windows_Logs
path: artifacts/log/
From 2054d275e2f1ec9de248ad36680656115fe96a20 Mon Sep 17 00:00:00 2001
From: Doug Bunting <6431421+dougbu@users.noreply.github.com>
Date: Sat, 18 Apr 2020 20:30:38 -0700
Subject: [PATCH 2/6] Quick fix: Clean up SiteExtensions/build.cmd - quote all
rooted paths - check `%ERRORLEVEL%` after every `CALL` - nits: - add a few
more `ECHO` commands - wrap long lines
---
src/SiteExtensions/build.cmd | 32 +++++++++++++++++++++++---------
1 file changed, 23 insertions(+), 9 deletions(-)
diff --git a/src/SiteExtensions/build.cmd b/src/SiteExtensions/build.cmd
index a69a02aa7591..76ca111525b3 100644
--- a/src/SiteExtensions/build.cmd
+++ b/src/SiteExtensions/build.cmd
@@ -1,26 +1,40 @@
@ECHO OFF
SET RepoRoot=%~dp0..\..
-ECHO Building Microsoft.AspNetCore.Runtime.SiteExtension
-CALL %RepoRoot%\build.cmd -arch x64 -projects %~dp0Runtime\Microsoft.AspNetCore.Runtime.SiteExtension.pkgproj /bl:artifacts/log/SiteExtensions-Runtime-x64.binlog %*
-CALL %RepoRoot%\build.cmd -arch x86 -projects %~dp0Runtime\Microsoft.AspNetCore.Runtime.SiteExtension.pkgproj /bl:artifacts/log/SiteExtensions-Runtime-x86.binlog %*
+ECHO Building x64 Microsoft.AspNetCore.Runtime.SiteExtension
+CALL "%RepoRoot%\build.cmd" -arch x64 -projects "%~dp0Runtime\Microsoft.AspNetCore.Runtime.SiteExtension.pkgproj" ^
+ /bl:artifacts/log/SiteExtensions-Runtime-x86.binlog %*
+IF %ERRORLEVEL% NEQ 0 (
+ EXIT /b %ErrorLevel%
+)
+ECHO Building x86 Microsoft.AspNetCore.Runtime.SiteExtension
+CALL "%RepoRoot%\build.cmd" -arch x86 -projects "%~dp0Runtime\Microsoft.AspNetCore.Runtime.SiteExtension.pkgproj" ^
+ /bl:artifacts/log/SiteExtensions-Runtime-x86.binlog %*
IF %ERRORLEVEL% NEQ 0 (
EXIT /b %ErrorLevel%
)
-ECHO Building LoggingBranch
-REM /p:DisableTransitiveFrameworkReferences=true is needed to prevent SDK from picking up transitive references to Microsoft.AspNetCore.App as framework references https://github.com/dotnet/sdk/pull/3221
-CALL %RepoRoot%\build.cmd -forceCoreMsbuild -arch x64 -projects %~dp0LoggingBranch\LB.csproj /p:DisableTransitiveFrameworkReferences=true /bl:artifacts/log/SiteExtensions-LoggingBranch-x64.binlog %*
-CALL %RepoRoot%\build.cmd -forceCoreMsbuild -arch x86 -projects %~dp0LoggingBranch\LB.csproj /p:DisableTransitiveFrameworkReferences=true /bl:artifacts/log/SiteExtensions-LoggingBranch-x86.binlog %*
+ECHO Building x64 LoggingBranch
+REM /p:DisableTransitiveFrameworkReferences=true is needed to prevent SDK from picking up transitive references to
+REM Microsoft.AspNetCore.App as framework references https://github.com/dotnet/sdk/pull/3221
+CALL "%RepoRoot%\build.cmd" -forceCoreMsbuild -arch x64 -projects "%~dp0LoggingBranch\LB.csproj" ^
+ /p:DisableTransitiveFrameworkReferences=true /bl:artifacts/log/SiteExtensions-LoggingBranch-x64.binlog %*
+IF %ERRORLEVEL% NEQ 0 (
+ EXIT /b %ErrorLevel%
+)
+ECHO Building x86 LoggingBranch
+CALL "%RepoRoot%\build.cmd" -forceCoreMsbuild -arch x86 -projects "%~dp0LoggingBranch\LB.csproj" ^
+ /p:DisableTransitiveFrameworkReferences=true /bl:artifacts/log/SiteExtensions-LoggingBranch-x86.binlog %*
IF %ERRORLEVEL% NEQ 0 (
EXIT /b %ErrorLevel%
)
ECHO Building Microsoft.AspNetCore.AzureAppServices.SiteExtension
-CALL %RepoRoot%\build.cmd -forceCoreMsbuild -projects %~dp0LoggingAggregate\src\Microsoft.AspNetCore.AzureAppServices.SiteExtension\Microsoft.AspNetCore.AzureAppServices.SiteExtension.csproj /bl:artifacts/log/SiteExtensions-LoggingAggregate.binlog %*
-
+CALL "%RepoRoot%\build.cmd" -forceCoreMsbuild -projects ^
+ "%~dp0LoggingAggregate\src\Microsoft.AspNetCore.AzureAppServices.SiteExtension\Microsoft.AspNetCore.AzureAppServices.SiteExtension.csproj" ^
+ /bl:artifacts/log/SiteExtensions-LoggingAggregate.binlog %*
IF %ERRORLEVEL% NEQ 0 (
EXIT /b %ErrorLevel%
)
From 877b6cc947328ae4e644a2fc038edeef0ea5b0e1 Mon Sep 17 00:00:00 2001
From: Doug Bunting <6431421+dougbu@users.noreply.github.com>
Date: Mon, 13 Apr 2020 12:54:06 -0700
Subject: [PATCH 3/6] Quick fix: Move `SetupNugetSources` script invocations
above `parameters.beforeBuild` - ensure NuGet.config is ready for all
internal builds - remove now-duplicate `SetupNugetSources` invocations
wherever default-build.yml is used
---
.azure/pipelines/ci.yml | 36 +-----------------------
.azure/pipelines/jobs/codesign-xplat.yml | 8 ------
.azure/pipelines/jobs/default-build.yml | 35 ++++++++++++-----------
3 files changed, 19 insertions(+), 60 deletions(-)
diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml
index 0141ccf36e5c..20cbb958c444 100644
--- a/.azure/pipelines/ci.yml
+++ b/.azure/pipelines/ci.yml
@@ -48,7 +48,7 @@ variables:
- group: DotNet-MSRC-Storage
- name: _InternalRuntimeDownloadArgs
value: -DotNetRuntimeSourceFeed https://dotnetclimsrc.blob.core.windows.net/dotnet -DotNetRuntimeSourceFeedKey $(dotnetclimsrc-read-sas-token-base64) /p:DotNetAssetRootAccessTokenSuffix='$(dotnetclimsrc-read-sas-token-base64)'
- # The code signing doesn't use the aspnet build scripts, so the msbuild parameers have
+ # The code signing doesn't use the aspnet build scripts, so the msbuild parameters have
# to be passed directly. This is awkward, since we pass the same info above, but we have
# to have it in two different forms
- name: _InternalRuntimeDownloadCodeSignArgs
@@ -100,14 +100,6 @@ stages:
jobDisplayName: Code check
agentOs: Windows
steps:
- - ${{ if ne(variables['System.TeamProject'], 'public') }}:
- - task: PowerShell@2
- displayName: Setup Private Feeds Credentials
- inputs:
- filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
- arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
- env:
- Token: $(dn-bot-dnceng-artifact-feeds-rw)
- powershell: ./eng/scripts/CodeCheck.ps1 -ci $(_InternalRuntimeDownloadArgs)
displayName: Run eng/scripts/CodeCheck.ps1
artifacts:
@@ -135,15 +127,6 @@ stages:
# This is intentional to workaround https://github.com/dotnet/arcade/issues/1957 which always re-submits for code-signing, even
# if they have already been signed. This results in slower builds due to re-submitting the same .nupkg many times for signing.
# The sign settings have been configured to
- - ${{ if ne(variables['System.TeamProject'], 'public') }}:
- - task: PowerShell@2
- displayName: Setup Private Feeds Credentials
- inputs:
- filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
- arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
- env:
- Token: $(dn-bot-dnceng-artifact-feeds-rw)
-
- script: ./build.cmd
-ci
-arch x64
@@ -325,14 +308,6 @@ stages:
agentOs: Linux
useHostedUbuntu: false
steps:
- - ${{ if ne(variables['System.TeamProject'], 'public') }}:
- - task: Bash@3
- displayName: Setup Private Feeds Credentials
- inputs:
- filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
- arguments: $(Build.SourcesDirectory)/NuGet.config $Token
- env:
- Token: $(dn-bot-dnceng-artifact-feeds-rw)
- script: ./build.sh
--ci
--arch x64
@@ -565,14 +540,6 @@ stages:
agentOs: Windows
isTestingJob: true
steps:
- - ${{ if ne(variables['System.TeamProject'], 'public') }}:
- - task: PowerShell@2
- displayName: Setup Private Feeds Credentials
- inputs:
- filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
- arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
- env:
- Token: $(dn-bot-dnceng-artifact-feeds-rw)
- script: ./build.cmd -ci -all -pack $(_InternalRuntimeDownloadArgs)
displayName: Build Repo
- script: ./src/ProjectTemplates/build.cmd -ci -pack -NoRestore -NoBuilddeps "/p:RunTemplateTests=true /bl:artifacts/log/template.pack.binlog"
@@ -702,7 +669,6 @@ stages:
# Build the shared framework
- script: ./build.cmd -ci -all -pack -arch x64 -buildNative /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log /bl:artifacts/log/helix.daily.build.x64.binlog
displayName: Build shared fx
- # Build the x86 shared framework
- script: .\restore.cmd -ci /p:BuildInteropProjects=true
displayName: Restore
- script: .\build.cmd -ci -NoRestore -test -projects eng\helix\helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true /p:BuildAllProjects=true /p:BuildInteropProjects=true /p:BuildNative=true /p:RunTemplateTests=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log -bl
diff --git a/.azure/pipelines/jobs/codesign-xplat.yml b/.azure/pipelines/jobs/codesign-xplat.yml
index 07e2e99f0e89..2bf05f711d5c 100644
--- a/.azure/pipelines/jobs/codesign-xplat.yml
+++ b/.azure/pipelines/jobs/codesign-xplat.yml
@@ -28,14 +28,6 @@ jobs:
contents: '**/*.nupkg'
targetFolder: $(Build.SourcesDirectory)/artifacts/packages/$(BuildConfiguration)/shipping/
flattenFolders: true
- - ${{ if ne(variables['System.TeamProject'], 'public') }}:
- - task: PowerShell@2
- displayName: Setup Private Feeds Credentials
- inputs:
- filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
- arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
- env:
- Token: $(dn-bot-dnceng-artifact-feeds-rw)
- powershell: .\eng\common\build.ps1
-ci
-restore
diff --git a/.azure/pipelines/jobs/default-build.yml b/.azure/pipelines/jobs/default-build.yml
index a57bf80032e3..88fa296e1474 100644
--- a/.azure/pipelines/jobs/default-build.yml
+++ b/.azure/pipelines/jobs/default-build.yml
@@ -171,27 +171,28 @@ jobs:
- ${{ parameters.beforeBuild }}
- - ${{ if ne(parameters.steps, '')}}:
- - ${{ parameters.steps }}
- - ${{ if eq(parameters.steps, '')}}:
- - ${{ if ne(variables['System.TeamProject'], 'public') }}:
- - ${{ if eq(parameters.agentOs, 'Windows') }}:
- - ${{ if ne(variables['System.TeamProject'], 'public') }}:
- - task: PowerShell@2
- displayName: Setup Private Feeds Credentials
- inputs:
- filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
- arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
- env:
- Token: $(dn-bot-dnceng-artifact-feeds-rw)
- - ${{ if ne(parameters.agentOs, 'Windows') }}:
- - task: Bash@3
+ - ${{ if ne(variables['System.TeamProject'], 'public') }}:
+ - ${{ if eq(parameters.agentOs, 'Windows') }}:
+ - ${{ if ne(variables['System.TeamProject'], 'public') }}:
+ - task: PowerShell@2
displayName: Setup Private Feeds Credentials
inputs:
- filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
- arguments: $(Build.SourcesDirectory)/NuGet.config $Token
+ filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
+ arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
env:
Token: $(dn-bot-dnceng-artifact-feeds-rw)
+ - ${{ if ne(parameters.agentOs, 'Windows') }}:
+ - task: Bash@3
+ displayName: Setup Private Feeds Credentials
+ inputs:
+ filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
+ arguments: $(Build.SourcesDirectory)/NuGet.config $Token
+ env:
+ Token: $(dn-bot-dnceng-artifact-feeds-rw)
+
+ - ${{ if ne(parameters.steps, '')}}:
+ - ${{ parameters.steps }}
+ - ${{ if eq(parameters.steps, '')}}:
- ${{ if eq(parameters.buildScript, '') }}:
- ${{ if eq(parameters.agentOs, 'Windows') }}:
- script: .\$(BuildDirectory)\build.cmd -ci /p:DotNetSignType=$(_SignType) -Configuration $(BuildConfiguration) $(BuildScriptArgs)
From 79534a7e1d56de27ecc0b8fcafefa7dfc7998f4b Mon Sep 17 00:00:00 2001
From: Doug Bunting <6431421+dougbu@users.noreply.github.com>
Date: Mon, 20 Apr 2020 11:06:20 -0700
Subject: [PATCH 4/6] Quick fix: Ensure `$(BuildNative)` is always set
correctly - fix problems using `-all` or `/p:BuildAllProjects=true` without
`-buildNative` - ensure `$(BuildNative)` is `false` where it's not
supported - move some duplicated settings into eng/Common.props and `` the new file - remove now-duplicated parts of conditions using
`$(BuildNative)`
---
Directory.Build.props | 9 +--
eng/Build.props | 15 +----
eng/Common.props | 25 ++++++++
eng/Signing.props | 3 +-
eng/targets/ResolveIisReferences.targets | 57 +++++++++----------
.../Microsoft.AspNetCore.App.Runtime.csproj | 7 ++-
.../Microsoft.AspNetCore.ANCMSymbols.csproj | 2 +-
.../Microsoft.AspNetCore.Server.IIS.csproj | 2 +-
...tCore.Server.IntegrationTesting.IIS.csproj | 2 +-
9 files changed, 65 insertions(+), 57 deletions(-)
create mode 100644 eng/Common.props
diff --git a/Directory.Build.props b/Directory.Build.props
index 6e658ac5967e..5d841856fd18 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -1,4 +1,6 @@
+
+
$(MSBuildThisFileDirectory)
https://github.com/dotnet/aspnetcore
@@ -121,12 +123,7 @@
- win
- osx
- linux
$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant())
- x64
- $(TargetOsName)-$(TargetArchitecture)
@@ -179,7 +176,7 @@
$(MSBuildThisFileDirectory)src\Mvc\Mvc.Testing\src\Microsoft.AspNetCore.Mvc.Testing.targets
- true
+ true
$(ArtifactsObjDir)TargetingPack.Layout\$(Configuration)\
diff --git a/eng/Build.props b/eng/Build.props
index ef89408b4762..dba58547cfb3 100644
--- a/eng/Build.props
+++ b/eng/Build.props
@@ -1,14 +1,5 @@
-
- $(TargetOsName)-$(TargetArchitecture)
-
-
-
- true
- true
- true
- true
-
+
@@ -102,8 +93,8 @@
Platform=Win32
-
-
+
+
win
+ osx
+ linux
+ x64
+ $(TargetOsName)-$(TargetArchitecture)
+
+
+
+
+ false
+ false
+ false
+ true
+
+ true
+ true
+ true
+
+
+
+ false
+
+
diff --git a/eng/Signing.props b/eng/Signing.props
index 024a5c8a0aaa..e3ec6e8a0403 100644
--- a/eng/Signing.props
+++ b/eng/Signing.props
@@ -1,6 +1,6 @@
-
+
@@ -69,7 +69,6 @@
- $(TargetOsName)-$(TargetArchitecture)
$(ArtifactsObjDir)RedistSharedFx.Layout\$(Configuration)\
$(BaseRedistNetCorePath)$(TargetRuntimeIdentifier)\
diff --git a/eng/targets/ResolveIisReferences.targets b/eng/targets/ResolveIisReferences.targets
index 76c17c8c80e8..a13559c7625e 100644
--- a/eng/targets/ResolveIisReferences.targets
+++ b/eng/targets/ResolveIisReferences.targets
@@ -5,40 +5,35 @@ with the right MSBuild incantations to get output copied to the right place.
-->
-
-
-
-
-
-
-
- Platform=%(Platform)
- Platform=Win32
-
- %(Platform)\%(HandlerPath)\
-
- false
-
- NativeContent
-
- Build;BuiltProjectOutputGroup;DebugSymbolsProjectOutputGroup
-
- true
- TargetFramework
-
- All
-
- true
-
-
-
-
-
-
+
+
+
+
+
+ Platform=%(Platform)
+ Platform=Win32
+
+ %(Platform)\%(HandlerPath)\
+
+ false
+
+ NativeContent
+
+ Build;BuiltProjectOutputGroup;DebugSymbolsProjectOutputGroup
+
+ true
+ TargetFramework
+
+ All
+
+ true
+
+
+
+ Condition=" @(NativeProjectReference->Count()) != 0 AND !$(BuildNative) ">
diff --git a/src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj b/src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj
index 7397e945bfcd..2c5b5cd3e495 100644
--- a/src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj
+++ b/src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj
@@ -126,7 +126,8 @@ This package is an internal implementation of the .NET Core SDK and is not meant
-
+
Platform=$(TargetArchitecture)
Platform=Win32
@@ -214,7 +215,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant
+ Condition=" '$(BuildIisNativeProjects)' == 'true' AND !$(BuildNative) ">
@@ -496,7 +497,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant
diff --git a/src/Servers/IIS/AspNetCoreModuleV2/Symbols/Microsoft.AspNetCore.ANCMSymbols.csproj b/src/Servers/IIS/AspNetCoreModuleV2/Symbols/Microsoft.AspNetCore.ANCMSymbols.csproj
index 16ae93a7a1f4..16c9bc447949 100644
--- a/src/Servers/IIS/AspNetCoreModuleV2/Symbols/Microsoft.AspNetCore.ANCMSymbols.csproj
+++ b/src/Servers/IIS/AspNetCoreModuleV2/Symbols/Microsoft.AspNetCore.ANCMSymbols.csproj
@@ -28,7 +28,7 @@
-
+
diff --git a/src/Servers/IIS/IIS/src/Microsoft.AspNetCore.Server.IIS.csproj b/src/Servers/IIS/IIS/src/Microsoft.AspNetCore.Server.IIS.csproj
index a5998c3fa01b..04fbc623281f 100644
--- a/src/Servers/IIS/IIS/src/Microsoft.AspNetCore.Server.IIS.csproj
+++ b/src/Servers/IIS/IIS/src/Microsoft.AspNetCore.Server.IIS.csproj
@@ -28,7 +28,7 @@
Condition="'$(BuildIisNativeProjects)' == 'true' AND !Exists('$(AspNetCoreModuleV2InProcessHandlerDll)')" />
-
+
diff --git a/src/Servers/IIS/IntegrationTesting.IIS/src/Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj b/src/Servers/IIS/IntegrationTesting.IIS/src/Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj
index d012b5212aab..c5686a0ebcb7 100644
--- a/src/Servers/IIS/IntegrationTesting.IIS/src/Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj
+++ b/src/Servers/IIS/IntegrationTesting.IIS/src/Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj
@@ -34,7 +34,7 @@
Condition="!Exists('$(AspNetCoreModuleV2ShimDll)') OR !Exists('$(AspNetCoreModuleV2OutOfProcessHandlerDll)')" />
-
+
From 194ad000813d3d914c8b8a13f732c4e12da9a258 Mon Sep 17 00:00:00 2001
From: Doug Bunting <6431421+dougbu@users.noreply.github.com>
Date: Sun, 19 Apr 2020 00:28:45 -0700
Subject: [PATCH 5/6] Quick fix: Support `-all` together with `-projects` -
remove need to specify `/p:BuildAllProjects=true` - nit: simplify some
Boolean logic
---
build.ps1 | 7 ++++---
build.sh | 12 +++++++-----
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/build.ps1 b/build.ps1
index f371d266734b..b928e4f8119d 100644
--- a/build.ps1
+++ b/build.ps1
@@ -185,7 +185,8 @@ if ($DumpProcesses -or $CI) {
if ($All) {
$MSBuildArguments += '/p:BuildAllProjects=true'
}
-elseif ($Projects) {
+
+if ($Projects) {
if (![System.IO.Path]::IsPathRooted($Projects))
{
$Projects = Join-Path (Get-Location) $Projects
@@ -193,7 +194,7 @@ elseif ($Projects) {
$MSBuildArguments += "/p:ProjectToBuild=$Projects"
}
# When adding new sub-group build flags, add them to this check.
-elseif((-not $BuildNative) -and (-not $BuildManaged) -and (-not $BuildNodeJS) -and (-not $BuildInstallers) -and (-not $BuildJava)) {
+elseif (-not ($All -or $BuildNative -or $BuildManaged -or $BuildNodeJS -or $BuildInstallers -or $BuildJava)) {
Write-Warning "No default group of projects was specified, so building the 'managed' and its dependent subsets of projects. Run ``build.cmd -help`` for more details."
# This goal of this is to pick a sensible default for `build.cmd` with zero arguments.
@@ -203,7 +204,7 @@ elseif((-not $BuildNative) -and (-not $BuildManaged) -and (-not $BuildNodeJS) -a
}
if ($BuildManaged -or ($All -and (-not $NoBuildManaged))) {
- if ((-not $BuildNodeJS) -and (-not $NoBuildNodeJS)) {
+ if (-not ($BuildNodeJS -or $NoBuildNodeJS)) {
$node = Get-Command node -ErrorAction Ignore -CommandType Application
if ($node) {
diff --git a/build.sh b/build.sh
index 92ef856d4759..1e4d0303b153 100755
--- a/build.sh
+++ b/build.sh
@@ -65,7 +65,7 @@ Options:
--no-build-repo-tasks Suppress building RepoTasks.
--all Build all project types.
- --[no-]build-native Build native projects (C, C++).
+ --[no-]build-native Build native projects (C, C++). Ignored in most cases i.e. with `dotnet msbuild`.
--[no-]build-managed Build managed projects (C#, F#, VB).
--[no-]build-nodejs Build NodeJS projects (TypeScript, JS).
--[no-]build-java Build Java projects.
@@ -74,7 +74,7 @@ Options:
--ci Apply CI specific settings and environment variables.
--binarylog|-bl Use a binary logger
--verbosity|-v MSBuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]
-
+
--dotnet-runtime-source-feed Additional feed that can be used when downloading .NET runtimes
--dotnet-runtime-source-feed-key Key for feed that can be used when downloading .NET runtimes
@@ -223,9 +223,11 @@ done
if [ "$build_all" = true ]; then
msbuild_args[${#msbuild_args[*]}]="-p:BuildAllProjects=true"
-elif [ ! -z "$build_projects" ]; then
+fi
+
+if [ ! -z "$build_projects" ]; then
msbuild_args[${#msbuild_args[*]}]="-p:ProjectToBuild=$build_projects"
-elif [ -z "$build_managed" ] && [ -z "$build_nodejs" ] && [ -z "$build_java" ] && [ -z "$build_native" ] && [ -z "$build_installers" ]; then
+elif [ "$build_all" != true ] && [ -z "$build_managed$build_nodejs$build_java$build_native$build_installers" ]; then
# This goal of this is to pick a sensible default for `build.sh` with zero arguments.
# We believe the most common thing our contributors will work on is C#, so if no other build group was picked, build the C# projects.
__warn "No default group of projects was specified, so building the 'managed' and its dependent subset of projects. Run ``build.sh --help`` for more details."
@@ -287,7 +289,7 @@ msbuild_args[${#msbuild_args[*]}]="-verbosity:$verbosity"
# Set up additional runtime args
toolset_build_args=()
-if [ ! -z "$dotnet_runtime_source_feed" ] || [ ! -z "$dotnet_runtime_source_feed_key" ]; then
+if [ ! -z "$dotnet_runtime_source_feed$dotnet_runtime_source_feed_key" ]; then
runtimeFeedArg="/p:DotNetRuntimeSourceFeed=$dotnet_runtime_source_feed"
runtimeFeedKeyArg="/p:DotNetRuntimeSourceFeedKey=$dotnet_runtime_source_feed_key"
msbuild_args[${#msbuild_args[*]}]=$runtimeFeedArg
From bc8ab4eac51ea8051e5a2f57adc3fcff27aa292f Mon Sep 17 00:00:00 2001
From: Doug Bunting <6431421+dougbu@users.noreply.github.com>
Date: Sat, 18 Apr 2020 19:39:12 -0700
Subject: [PATCH 6/6] Quick fix: Consistently use `--build-*` - avoid
`/p:Build*` on the command line (except with eng/scripts/ci-source-build.sh)
- nits: - remove now-useless `-buildNative` with `-all` - expand and
correct a couple of related comments and messages
---
.azure/pipelines/ci.yml | 18 ++++++++----------
.azure/pipelines/quarantined-tests.yml | 6 +++---
docs/BuildFromSource.md | 2 +-
eng/scripts/CodeCheck.ps1 | 4 ++--
eng/targets/Npm.Common.targets | 2 +-
5 files changed, 15 insertions(+), 17 deletions(-)
diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml
index 20cbb958c444..44de26de0f50 100644
--- a/.azure/pipelines/ci.yml
+++ b/.azure/pipelines/ci.yml
@@ -132,7 +132,6 @@ stages:
-arch x64
-pack
-all
- -buildNative
/bl:artifacts/log/build.x64.binlog
$(_BuildArgs)
$(_InternalRuntimeDownloadArgs)
@@ -145,7 +144,6 @@ stages:
-arch x86
-pack
-all
- -buildNative
-noBuildJava
/p:OnlyPackPlatformSpecificPackages=true
/bl:artifacts/log/build.x86.binlog
@@ -504,7 +502,7 @@ stages:
jobDisplayName: "Test: Windows Server 2016 x64"
agentOs: Windows
isTestingJob: true
- buildArgs: -all -pack -test -BuildNative "/p:SkipHelixReadyTests=true /p:SkipIISNewHandlerTests=true /p:SkipIISTests=true /p:SkipIISExpressTests=true /p:SkipIISNewShimTests=true /p:RunTemplateTests=false" $(_InternalRuntimeDownloadArgs)
+ buildArgs: -all -pack -test "/p:SkipHelixReadyTests=true /p:SkipIISNewHandlerTests=true /p:SkipIISTests=true /p:SkipIISExpressTests=true /p:SkipIISNewShimTests=true /p:RunTemplateTests=false" $(_InternalRuntimeDownloadArgs)
beforeBuild:
- powershell: "& ./src/Servers/IIS/tools/UpdateIISExpressCertificate.ps1; & ./src/Servers/IIS/tools/update_schema.ps1"
displayName: Setup IISExpress test certificates and schema
@@ -643,11 +641,11 @@ stages:
timeoutInMinutes: 180
steps:
# Build the shared framework
- - script: ./build.cmd -ci -all -pack -arch x64 -buildNative /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log /bl:artifacts/log/helix.build.x64.binlog
+ - script: ./build.cmd -ci -all -pack -arch x64 /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log /bl:artifacts/log/helix.build.x64.binlog
displayName: Build shared fx
- script: .\restore.cmd -ci /p:BuildInteropProjects=true
- displayName: Restore
- - script: .\build.cmd -ci -NoRestore -test -projects eng\helix\helix.proj /p:IsRequiredCheck=true /p:IsHelixJob=true /p:BuildAllProjects=true /p:BuildInteropProjects=true /p:BuildNative=true /p:RunTemplateTests=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log -bl
+ displayName: Restore interop projects
+ - script: .\build.cmd -ci -NoRestore -test -all -projects eng\helix\helix.proj /p:IsRequiredCheck=true /p:IsHelixJob=true /p:BuildInteropProjects=true /p:RunTemplateTests=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log -bl
displayName: Run build.cmd helix target
env:
HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues
@@ -667,11 +665,11 @@ stages:
timeoutInMinutes: 180
steps:
# Build the shared framework
- - script: ./build.cmd -ci -all -pack -arch x64 -buildNative /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log /bl:artifacts/log/helix.daily.build.x64.binlog
+ - script: ./build.cmd -ci -all -pack -arch x64 /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log /bl:artifacts/log/helix.daily.build.x64.binlog
displayName: Build shared fx
- script: .\restore.cmd -ci /p:BuildInteropProjects=true
- displayName: Restore
- - script: .\build.cmd -ci -NoRestore -test -projects eng\helix\helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true /p:BuildAllProjects=true /p:BuildInteropProjects=true /p:BuildNative=true /p:RunTemplateTests=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log -bl
+ displayName: Restore interop projects
+ - script: .\build.cmd -ci -NoRestore -test -all -projects eng\helix\helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true /p:BuildInteropProjects=true /p:RunTemplateTests=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log -bl
displayName: Run build.cmd helix target
env:
HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues
@@ -694,7 +692,7 @@ stages:
# Build the shared framework
- script: ./restore.sh -ci
displayName: Restore
- - script: ./build.sh -ci --arch arm64 -test --no-build-nodejs -projects $(Build.SourcesDirectory)/eng/helix/helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true /p:BuildAllProjects=true /p:BuildNative=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log -bl
+ - script: ./build.sh -ci --arch arm64 -test --no-build-nodejs --all -projects $(Build.SourcesDirectory)/eng/helix/helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log -bl
displayName: Run build.sh helix arm64 target
env:
HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues
diff --git a/.azure/pipelines/quarantined-tests.yml b/.azure/pipelines/quarantined-tests.yml
index 3666d8fd8ca9..9b2c9da91b43 100644
--- a/.azure/pipelines/quarantined-tests.yml
+++ b/.azure/pipelines/quarantined-tests.yml
@@ -31,11 +31,11 @@ jobs:
timeoutInMinutes: 240
steps:
# Build the shared framework
- - script: ./build.cmd -ci -all -pack -arch x64 -buildNative /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log /bl:artifacts/log/helix.build.x64.binlog
+ - script: ./build.cmd -ci -all -pack -arch x64 /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log /bl:artifacts/log/helix.build.x64.binlog
displayName: Build shared fx
- script: .\restore.cmd -ci /p:BuildInteropProjects=true
- displayName: Restore
- - script: .\build.cmd -ci -NoRestore -test -noBuildJava -projects eng\helix\helix.proj /p:RunQuarantinedTests=true /p:IsRequiredCheck=true /p:IsHelixJob=true /p:BuildAllProjects=true /p:BuildInteropProjects=true /p:BuildNative=true /p:RunTemplateTests=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log -bl
+ displayName: Restore interop projects
+ - script: .\build.cmd -ci -NoRestore -test -noBuildJava -all -projects eng\helix\helix.proj /p:RunQuarantinedTests=true /p:IsRequiredCheck=true /p:IsHelixJob=true /p:BuildInteropProjects=true /p:RunTemplateTests=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log -bl
displayName: Run build.cmd helix target
env:
HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues
diff --git a/docs/BuildFromSource.md b/docs/BuildFromSource.md
index 3fc873b9392d..d4e00f894250 100644
--- a/docs/BuildFromSource.md
+++ b/docs/BuildFromSource.md
@@ -160,7 +160,7 @@ On macOS/Linux:
./build.sh
```
-By default, all of the C# projects are built. Some C# projects require NodeJS to be installed to compile JavaScript assets which are then checked in as source. If NodeJS is detected on the path, the NodeJS projects will be compiled as part of building C# projects. If NodeJS is not detected on the path, the JavaScript assets checked in previously will be used instead. To disable building NodeJS projects, specify /p:BuildNodeJs=false on the command line.
+By default, all of the C# projects are built. Some C# projects require NodeJS to be installed to compile JavaScript assets which are then checked in as source. If NodeJS is detected on the path, the NodeJS projects will be compiled as part of building C# projects. If NodeJS is not detected on the path, the JavaScript assets checked in previously will be used instead. To disable building NodeJS projects, specify `-noBuildNodeJS` or `--no-build-nodejs` on the command line.
### Using `dotnet` on command line in this repo
diff --git a/eng/scripts/CodeCheck.ps1 b/eng/scripts/CodeCheck.ps1
index c48d2e796cd9..4cfdda2c8c32 100644
--- a/eng/scripts/CodeCheck.ps1
+++ b/eng/scripts/CodeCheck.ps1
@@ -48,10 +48,10 @@ try {
if ($ci) {
# Install dotnet.exe
if ($DotNetRuntimeSourceFeed -or $DotNetRuntimeSourceFeedKey) {
- & $repoRoot/restore.cmd -ci -NoBuildNodeJS -DotNetRuntimeSourceFeed $DotNetRuntimeSourceFeed -DotNetRuntimeSourceFeedKey $DotNetRuntimeSourceFeedKey
+ & $repoRoot/restore.cmd -ci -noBuildNodeJS -DotNetRuntimeSourceFeed $DotNetRuntimeSourceFeed -DotNetRuntimeSourceFeedKey $DotNetRuntimeSourceFeedKey
}
else{
- & $repoRoot/restore.cmd -ci -NoBuildNodeJS
+ & $repoRoot/restore.cmd -ci -noBuildNodeJS
}
}
diff --git a/eng/targets/Npm.Common.targets b/eng/targets/Npm.Common.targets
index 3460edde2e7a..7efc7ee841fe 100644
--- a/eng/targets/Npm.Common.targets
+++ b/eng/targets/Npm.Common.targets
@@ -36,7 +36,7 @@
-
+