Browse Source

Add new build.cmd/sh options for suppressing restore, NodeJS, setting target arch and OS name, and more (#7137)

Add new command line parameters for working with the project:

* `-NoBuild`, `-NoRestore` - these already existed, but users found it hard to discover this powershell syntax: '-build:$false'
* `-Arch`/`--arch` - set the target CPU architecture to build. Defaults to x64
* `--os-name` - on non-Windows builds, manually specify if the build should target Alpine. generic Linux, or MacOS
* Rename flags used to build specific project types. The pattern now is `--build-$(group)` or `--no-build-$(group)` (In PowerShell its `-Build$(Group)` or `-NoBuild$(Group). Example: -NoBuildJava

Changes to build definitions:
* Update the ci build definition to build all supported architectures
* Support publishing multiple artifacts per job

Other changes:
* `-NoBuild` implies `-NoRestore`
* Add new properties, `TargetArchitecture`, `TargetOsName`, and `TargetRuntimeIdentifier`
* Replace usages of `SharedFxRid` with these new properties
* To make `--no-build-nodejs` actually work, replaced Components.Browser.JS.csproj with Components.Browser.JS.npmproj
* Fix errors when building for win-arm on a clean machine
* Fix a few other project errors, like using the wrong syntax for DefaultItemExcludes, or using the wrong Platform value for x86
Nate McMaster 7 years ago
parent
commit
6081fec894
65 changed files with 738 additions and 616 deletions
  1. 3 4
      .azure/pipelines/benchmarks.yml
  2. 0 222
      .azure/pipelines/ci-official.yml
  3. 257 10
      .azure/pipelines/ci.yml
  4. 26 0
      .azure/pipelines/jobs/codesign-xplat.yml
  5. 45 35
      .azure/pipelines/jobs/default-build.yml
  6. 3 3
      .azure/pipelines/jobs/iisintegration-job.yml
  7. 0 10
      .azure/pipelines/jobs/site-extensions-job.yml
  8. 20 2
      Directory.Build.props
  9. 1 1
      build.cmd
  10. 75 38
      build.ps1
  11. 75 29
      build.sh
  12. 16 6
      build/CodeSign.props
  13. 1 1
      build/CodeSign.targets
  14. 10 1
      build/Publish.targets
  15. 6 12
      build/SharedFx.targets
  16. 2 2
      build/publish/Publish.csproj
  17. 31 21
      build/repo.props
  18. 3 1
      build/repo.targets
  19. 2 2
      build/tasks/RepoTasks.csproj
  20. 2 1
      docs/BuildFromSource.md
  21. 1 2
      eng/ProjectReferences.props
  22. 1 1
      eng/Versions.props
  23. 3 7
      eng/scripts/CodeCheck.ps1
  24. 8 0
      eng/scripts/GenerateProjectList.ps1
  25. 1 1
      eng/scripts/cibuild.cmd
  26. 1 1
      eng/scripts/cibuild.sh
  27. 2 1
      eng/signcheck.exclusions.txt
  28. 1 0
      eng/targets/ResolveIisReferences.targets
  29. 0 28
      eng/targets/RuntimeIdentifiers.props
  30. 1 1
      eng/tools/XplatPackageSigner/sign-packages.cmd
  31. 1 1
      global.json
  32. 2 2
      korebuild-lock.txt
  33. 1 1
      restore.cmd
  34. 3 1
      src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.csproj
  35. 0 34
      src/Components/Browser.JS/src/Microsoft.AspNetCore.Components.Browser.JS.csproj
  36. 24 0
      src/Components/Browser.JS/src/Microsoft.AspNetCore.Components.Browser.JS.npmproj
  37. 0 17
      src/Components/Components.sln
  38. 8 2
      src/Components/Server/src/Microsoft.AspNetCore.Components.Server.csproj
  39. 1 1
      src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj
  40. 11 14
      src/Framework/src/Microsoft.AspNetCore.App.shfxproj
  41. 19 29
      src/Framework/src/SharedFx.targets
  42. 2 2
      src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj
  43. 1 1
      src/Framework/test/TestData.cs
  44. 3 4
      src/Hosting/Server.IntegrationTesting/src/ApplicationPublisher.cs
  45. 2 2
      src/Installers/Archive/Archive.Internal.zipproj
  46. 4 4
      src/Installers/Archive/Archive.Redist.zipproj
  47. 3 4
      src/Installers/Debian/Runtime.debproj
  48. 1 1
      src/Installers/Directory.Build.props
  49. 1 1
      src/Installers/Rpm/Rpm.props
  50. 2 2
      src/Installers/Rpm/Rpm.targets
  51. 16 1
      src/Installers/Windows/SharedFramework/SharedFramework.wixproj
  52. 1 1
      src/Installers/Windows/SharedFrameworkLib/SharedFrameworkLib.wixproj
  53. 13 19
      src/Installers/Windows/build.ps1
  54. 1 6
      src/Middleware/CORS/test/FunctionalTests/FunctionalTests.csproj
  55. 1 1
      src/Servers/IIS/IIS/benchmarks/IIS.Performance/IIS.Performance.csproj
  56. 2 3
      src/Servers/IIS/IIS/src/Microsoft.AspNetCore.Server.IIS.csproj
  57. 4 5
      src/Servers/IIS/IntegrationTesting.IIS/src/Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj
  58. 1 1
      src/Servers/IIS/build/Build.Settings
  59. 1 1
      src/Servers/IIS/build/assets.props
  60. 2 2
      src/Servers/IIS/build/testsite.props
  61. 1 1
      src/Servers/IIS/tools/GenerateNativeAssets.ps1
  62. 1 1
      src/SiteExtensions/LoggingAggregate/Directory.Build.props
  63. 1 1
      src/SiteExtensions/LoggingAggregate/SiteExtensions.sln
  64. 2 2
      src/SiteExtensions/LoggingBranch/LoggingBranch.csproj
  65. 5 5
      src/SiteExtensions/Runtime/Microsoft.AspNetCore.Runtime.SiteExtension.pkgproj

+ 3 - 4
.azure/pipelines/benchmarks.yml

@@ -9,8 +9,7 @@ jobs:
     jobName: Windows_Build
     jobDisplayName: "Build only : Windows"
     agentOs: Windows
-    buildArgs: -all -pack
+    buildArgs: -ci -all -pack
     artifacts:
-      path: artifacts/
-      publish: true
-      force: true
+    - path: artifacts/
+      includeForks: true

+ 0 - 222
.azure/pipelines/ci-official.yml

@@ -1,222 +0,0 @@
-trigger:
-  branches:
-    include:
-    - master
-    - release/*
-    exclude:
-    - release/2.0
-
-name: $(Date:yyMMdd)-$(Rev:rr)
-
-phases:
-- phase: Windows
-  queue:
-    name: DotNetCore-Windows
-    timeoutInMinutes: 120
-    matrix:
-      Release:
-        BuildConfiguration: Release
-  variables:
-    CI: true
-    DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
-
-    # This variable is required by MicroBuildSigningPlugin to determine permissions for codesigning.
-    TeamName: AspNetCore
-
-    # SignType = { test, real }
-    # This is prefixed underscore because variables automatically become environment variables (and therefore MSBuild properties),
-    # and this one was causing issues in MSBuild projects which use the $(SignType) MSbuild prop.
-    _SignType: real
-
-  steps:
-  - task: NodeTool@0
-    displayName: Install Node 10.x
-    inputs:
-      versionSpec: 10.x
-  - task: MicroBuildSigningPlugin@1
-    displayName: Install MicroBuild plugin
-    condition: and(succeeded(), in(variables['_SignType'], 'test', 'real'))
-    inputs:
-      signType: $(_SignType)
-      zipSources: false
-  # TODO: configure build.cmd to build both x64 and x86 in one invocation
-  - script: build.cmd -ci /p:SkipTests=true /p:Configuration=$(BuildConfiguration) /p:BuildNumber=$(Build.BuildNumber) /t:Build /t:BuildSharedFx /p:SharedFxRID=win-x64 /t:BuildFallbackArchive
-    displayName: Build NuGet packages and win-x64 runtime
-  - script: build.cmd -ci /p:SkipTests=true /p:Configuration=$(BuildConfiguration) /p:BuildNumber=$(Build.BuildNumber) /t:BuildSharedFx /p:SharedFxRID=win-x86
-    displayName: Build win-x86 runtime
-  - script: build.cmd -ci /p:SkipTests=true /p:Configuration=$(BuildConfiguration) /p:BuildNumber=$(Build.BuildNumber) /t:BuildSharedFx /p:SharedFxRID=win-arm
-    displayName: Build win-arm runtime
-  - powershell: >
-      src/Installers/Windows/clone_and_build_ancm.ps1
-      -GitCredential '$(dn-bot-devdiv-build-rw-code-rw)'
-      -Config $(BuildConfiguration)
-      -BuildNumber $(Build.BuildNumber)
-      -SignType $(_SignType)
-    displayName: Build ANCM installers
-  # TODO: configure harvesting to run as a part of build.cmd
-  - powershell: >
-      src/Installers/Windows/build.ps1
-      -x64 artifacts/runtime/aspnetcore-runtime-internal-3.0.0-alpha1-$(Build.BuildNumber)-win-x64.zip
-      -x86 artifacts/runtime/aspnetcore-runtime-internal-3.0.0-alpha1-$(Build.BuildNumber)-win-x86.zip
-      -Config $(BuildConfiguration)
-      -BuildNumber $(Build.BuildNumber)
-      -SignType $(_SignType)
-    displayName: Build Windows installers
-  - task: PublishTestResults@2
-    displayName: Publish test results
-    condition: always()
-    inputs:
-      testRunner: vstest
-      testResultsFiles: 'artifacts/logs/**/*.trx'
-  - task: PublishBuildArtifacts@1
-    displayName: Upload artifacts
-    condition: eq(variables['system.pullrequest.isfork'], false)
-    inputs:
-      pathtoPublish: ./artifacts/
-      artifactName: artifacts-Windows-Release
-      artifactType: Container
-  # Detect OSS Components in use in the product. Only needs to run on one OS in the matrix.
-  - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
-    displayName: 'Component Detection'
-    inputs:
-      # This funky GUID represents the product "ASP.NET and EF Core"
-      governanceProduct: 'c641993b-8380-e811-80c3-0004ffb4789e'
-      snapshotForceEnabled: true
-  - task: MicroBuildCleanup@1
-    displayName: Cleanup MicroBuild tasks
-    condition: always()
-
-- phase: macOS
-  dependsOn: Windows
-  queue:
-    name: Hosted macOS Preview
-    matrix:
-      Release:
-        BuildConfiguration: Release
-  variables:
-    CI: true
-    DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
-  steps:
-  - task: DownloadBuildArtifacts@0
-    displayName: Download artifacts
-    inputs:
-      artifactName: artifacts-Windows-Release
-      downloadPath: $(Build.SourcesDirectory)/.deps
-      itemPattern: '**/*.nupkg'
-  # Workaround https://github.com/Microsoft/vsts-tasks/issues/6739
-  - task: CopyFiles@2
-    displayName: Copy package assets to correct folder
-    inputs:
-      sourceFolder: $(Build.SourcesDirectory)/.deps/artifacts-Windows-Release
-      targetFolder: $(Build.SourcesDirectory)/.deps
-  - script: >
-      ./build.sh
-      --ci
-      /t:Prepare
-      /t:Restore
-      /t:GeneratePropsFiles
-      /t:BuildSharedFx
-      /p:SharedFxRID=osx-x64
-      /p:BuildNumber=$(Build.BuildNumber)
-    displayName: Build osx-x64 runtime
-  - task: PublishTestResults@2
-    displayName: Publish test results
-    condition: always()
-    inputs:
-      testRunner: vstest
-      testResultsFiles: 'artifacts/logs/**/*.trx'
-  - task: PublishBuildArtifacts@1
-    displayName: Upload artifacts
-    condition: eq(variables['system.pullrequest.isfork'], false)
-    inputs:
-      pathtoPublish: ./artifacts/
-      artifactName: artifacts-macOS-Release
-      artifactType: Container
-
-- phase: Linux
-  dependsOn:
-  - Windows
-  - macOS
-  queue:
-    name: DotNetCore-Linux
-    matrix:
-      Release:
-        BuildConfiguration: Release
-  variables:
-    CI: true
-    DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
-  steps:
-  - task: DownloadBuildArtifacts@0
-    displayName: Download artifacts
-    inputs:
-      artifactName: artifacts-Windows-Release
-      downloadPath: $(Build.SourcesDirectory)/.deps
-      itemPattern: '**/*.nupkg'
-  - task: DownloadBuildArtifacts@0
-    displayName: Download Windows artifacts
-    inputs:
-      artifactName: artifacts-Windows-Release
-      downloadPath: $(Build.SourcesDirectory)/.r
-      itemPattern: '**/aspnetcore-runtime-*'
-  - task: DownloadBuildArtifacts@0
-    displayName: Download macOS artifacts
-    inputs:
-      artifactName: artifacts-macOS-Release
-      downloadPath: $(Build.SourcesDirectory)/.r
-      itemPattern: '**/aspnetcore-runtime-*'
-  # Workaround https://github.com/Microsoft/vsts-tasks/issues/6739
-  - task: CopyFiles@2
-    displayName: Copy package assets to correct folder
-    inputs:
-      sourceFolder: $(Build.SourcesDirectory)/.deps/artifacts-Windows-Release
-      targetFolder: $(Build.SourcesDirectory)/.deps
-  # TODO: Make the cumulative zips build in their own step
-  - task: CopyFiles@2
-    displayName: Copy package assets to correct folder
-    inputs:
-      sourceFolder: $(Build.SourcesDirectory)/.r/artifacts-Windows-Release
-      targetFolder: $(Build.SourcesDirectory)/artifacts/
-  - task: CopyFiles@2
-    displayName: Copy package assets to correct folder
-    inputs:
-      sourceFolder: $(Build.SourcesDirectory)/.r/artifacts-macOS-Release
-      targetFolder: $(Build.SourcesDirectory)/artifacts/
-  - script: >
-      ./build.sh
-      --ci
-      /t:Prepare
-      /t:Restore
-      /t:GeneratePropsFiles
-      /t:BuildSharedFx
-      /p:SharedFxRID=linux-x64
-      /p:BuildNumber=$(Build.BuildNumber)
-    displayName: Build linux-x64 runtime
-  - script: >
-      ./build.sh
-      --ci
-      /t:BuildSharedFx
-      /p:SharedFxRID=linux-arm
-      /p:BuildNumber=$(Build.BuildNumber)
-    displayName: Build linux-arm runtime
-  - script: >
-      ./dockerbuild.sh
-      alpine
-      /t:Prepare
-      /t:GeneratePropsFiles
-      /t:BuildSharedFx
-      /p:SharedFxRID=linux-musl-x64
-      /p:BuildNumber=$(Build.BuildNumber)
-    displayName: Build linux-musl-x64 runtime
-  - task: PublishTestResults@2
-    displayName: Publish test results
-    condition: always()
-    inputs:
-      testRunner: vstest
-      testResultsFiles: 'artifacts/logs/**/*.trx'
-  - task: PublishBuildArtifacts@1
-    displayName: Upload artifacts
-    condition: eq(variables['system.pullrequest.isfork'], false)
-    inputs:
-      pathtoPublish: ./artifacts/
-      artifactName: artifacts-Linux-Release
-      artifactType: Container

+ 257 - 10
.azure/pipelines/ci.yml

@@ -1,8 +1,20 @@
-# Don't run CI for this config yet. We're not ready to move official builds on to Azure Pipelines
-trigger: none
+#
+# See https://docs.microsoft.com/en-us/vsts/pipelines/yaml-schema for details on this file.
+#
+
+# Configure which branches trigger builds
+trigger:
+  batch: true
+  branches:
+    include:
+    - master
+    - release/*
+    - internal/release/*
+    - ci/*
 
 # Run PR validation on all branches
 pr:
+  autoCancel: true
   branches:
     include:
     - '*'
@@ -16,48 +28,283 @@ jobs:
     vmImage: vs2017-win2016
   steps:
   - powershell: ./eng/scripts/CodeCheck.ps1 -ci
+    displayName: Run eng/scripts/CodeCheck.ps1
+
+- template: jobs/default-build.yml
+  parameters:
+    codeSign: true
+    agentOs: Windows
+    buildScript: ./src/SiteExtensions/LoggingAggregate/build.cmd
+    buildArgs: -ci -sign /p:SignType=$(_SignType)
+    jobName: SiteExtensions
+    jobDisplayName: "Build: Azure Logging Site Extension"
+    artifacts:
+    - name: AzureSiteExtensions_Packages
+      path: artifacts/packages/
+    - name: AzureSiteExtensions_Logs
+      path: artifacts/logs/
+
+# Build Windows (x64/x86)
+- template: jobs/default-build.yml
+  parameters:
+    codeSign: true
+    jobName: Windows_build
+    jobDisplayName: "Build: Windows x64/x86"
+    agentOs: Windows
+    buildSteps:
+    - script: "echo ##vso[build.addbuildtag]daily-build"
+      condition: and(ne(variables['Build.Reason'], 'PullRequest'), ne(variables['IsFinalBuild'], 'true'))
+      displayName: 'Set CI tags'
+    - script: "echo ##vso[build.addbuildtag]release-candidate"
+      condition: and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['IsFinalBuild'], 'true'))
+      displayName: 'Set CI tags'
+    # This is going to actually build x86 native assets
+    # TODO: make it possible to build for one Windows architecture at a time
+    - script: ./eng/scripts/cibuild.cmd -arch x64 /p:SignType=$(_SignType)
+      displayName: Build x64
+    # Build the x86 shared framework
+    - script: ./eng/scripts/cibuild.cmd -arch x86 /t:BuildSharedFx /p:SignType=$(_SignType)
+      displayName: Build x86
+    # Windows installers bundle both x86 and x64 assets
+    - powershell: |
+        ./src/Installers/Windows/build.ps1 `
+          -ci `
+          '/p:SignType=$(_SignType)'
+      displayName: Build Installers
+    artifacts:
+    - name: Windows_Packages
+      path: artifacts/packages/
+    - name: Windows_VSIX
+      path: artifacts/VSSetup/
+    - name: Windows_Manifests
+      path: artifacts/manifests/
+    - name: Windows_Installers
+      path: artifacts/installers/
+    - name: Windows_Logs
+      path: artifacts/logs/
+
+# Build Windows ARM
+- template: jobs/default-build.yml
+  parameters:
+    codeSign: true
+    jobName: Windows_arm_build
+    jobDisplayName: "Build: Windows ARM"
+    agentOs: Windows
+    buildScript: ./eng/scripts/cibuild.cmd
+    buildArgs: -arch arm /p:SignType=$(_SignType)
+    afterBuild:
+    # Remove packages that are not rid-specific.
+    # TODO add a flag so builds only produce runtime packages
+    - powershell: gci artifacts/packages/ -recurse -exclude 'runtime.*' -file | rm -ea ignore
+    artifacts:
+    - name: Windows_arm_Packages
+      path: artifacts/packages/
+    - name: Windows_arm_Manifests
+      path: artifacts/manifests/
+    - name: Windows_arm_Installers
+      path: artifacts/installers/
+    - name: Windows_arm_Logs
+      path: artifacts/logs/
+
+# Build MacOS
+- template: jobs/default-build.yml
+  parameters:
+    jobName: MacOs_x64_build
+    jobDisplayName: "Build: macOS"
+    agentOs: macOs
+    buildScript: ./eng/scripts/cibuild.sh
+    buildArgs: --no-build-nodejs --no-build-java
+    afterBuild:
+    # Remove packages that are not rid-specific.
+    # TODO add a flag so macOS/Linux builds only produce runtime packages
+    - script: find artifacts/packages/ -type f -not -name 'runtime.*' -delete
+    artifacts:
+    - name: MacOS_x64_Packages
+      path: artifacts/packages/
+    - name: MacOS_x64_Manifests
+      path: artifacts/manifests/
+    - name: MacOS_x64_Installers
+      path: artifacts/installers/
+    - name: MacOS_x64_Logs
+      path: artifacts/logs/
+- template: jobs/codesign-xplat.yml
+  parameters:
+    inputName: MacOS_x64
+
+# Build Linux x64
+- template: jobs/default-build.yml
+  parameters:
+    jobName: Linux_x64_build
+    jobDisplayName: "Build: Linux x64"
+    agentOs: Linux
+    buildSteps:
+    - script: ./eng/scripts/cibuild.sh --arch x64 --no-build-nodejs --no-build-java
+      displayName: Run cibuild.sh
+    - script: |
+        rm -rf .dotnet/
+        git clean -xfd src/
+        ./dockerbuild.sh bionic \
+          --ci --pack --all --no-build-nodejs --no-build-java \
+          --arch x64 \
+          -e KOREBUILD_SKIP_INSTALL_NETFX=0 \
+          /t:BuildSharedFx  \
+          /p:BuildRuntimeArchive=false \
+          /p:LinuxInstallerType=deb
+      displayName: Build Debian installers
+    - script: |
+        rm -rf .dotnet/
+        git clean -xfd src/
+        ./dockerbuild.sh rhel \
+          --ci --pack --all --no-build-nodejs --no-build-java \
+          --arch x64 \
+          -e KOREBUILD_SKIP_INSTALL_NETFX=0 \
+          /t:BuildSharedFx  \
+          /p:BuildRuntimeArchive=false \
+          /p:LinuxInstallerType=rpm
+      displayName: Build RPM installers
+    afterBuild:
+    # Remove packages that are not rid-specific.
+    # TODO add a flag so macOS/Linux builds only produce runtime packages
+    - script: find artifacts/packages/ -type f -not -name 'runtime.*' -delete
+    artifacts:
+    - name: Linux_x64_Packages
+      path: artifacts/packages/
+    - name: Linux_x64_Manifests
+      path: artifacts/manifests/
+    - name: Linux_x64_Installers
+      path: artifacts/installers/
+    - name: Linux_x64_Logs
+      path: artifacts/logs/
+- template: jobs/codesign-xplat.yml
+  parameters:
+    inputName: Linux_x64
+
+# Build Linux ARM
+- template: jobs/default-build.yml
+  parameters:
+    jobName: Linux_arm_build
+    jobDisplayName: "Build: Linux ARM"
+    agentOs: Linux
+    buildScript: ./eng/scripts/cibuild.sh
+    buildArgs: --arch arm --no-build-nodejs --no-build-java
+    afterBuild:
+    # Remove packages that are not rid-specific.
+    # TODO add a flag so macOS/Linux builds only produce runtime packages
+    - script: find artifacts/packages/ -type f -not -name 'runtime.*' -delete
+    artifacts:
+    - name: Linux_arm_Packages
+      path: artifacts/packages/
+    - name: Linux_arm_Manifests
+      path: artifacts/manifests/
+    - name: Linux_arm_Installers
+      path: artifacts/installers/
+    - name: Linux_arm_Logs
+      path: artifacts/logs/
+- template: jobs/codesign-xplat.yml
+  parameters:
+    inputName: Linux_arm
+
+# Build Linux ARM64
+- template: jobs/default-build.yml
+  parameters:
+    jobName: Linux_arm64_build
+    jobDisplayName: "Build: Linux ARM64"
+    agentOs: Linux
+    buildScript: ./eng/scripts/cibuild.sh
+    buildArgs: --arch arm64 --no-build-nodejs --no-build-java
+    afterBuild:
+    # Remove packages that are not rid-specific.
+    # TODO add a flag so macOS/Linux builds only produce runtime packages
+    - script: find artifacts/packages/ -type f -not -name 'runtime.*' -delete
+    artifacts:
+    - name: Linux_arm64_Packages
+      path: artifacts/packages/
+    - name: Linux_arm64_Manifests
+      path: artifacts/manifests/
+    - name: Linux_arm64_Installers
+      path: artifacts/installers/
+    - name: Linux_arm64_Logs
+      path: artifacts/logs/
+- template: jobs/codesign-xplat.yml
+  parameters:
+    inputName: Linux_arm64
+
+# Build Linux Musl x64
+- template: jobs/default-build.yml
+  parameters:
+    jobName: Linux_musl_x64_build
+    jobDisplayName: "Build: Linux Musl x64"
+    agentOs: Linux
+    buildScript: ./dockerbuild.sh alpine
+    buildArgs: --ci --pack --all -e KOREBUILD_SKIP_INSTALL_NETFX=0 --arch x64 --os-name linux-musl --no-build-nodejs --no-build-java
+    afterBuild:
+    # Remove packages that are not rid-specific.
+    # TODO add a flag so macOS/Linux builds only produce runtime packages
+    - script: find artifacts/packages/ -type f -not -name 'runtime.*' -delete
+    artifacts:
+    - name: Linux_musl_x64_Packages
+      path: artifacts/packages/
+    - name: Linux_musl_x64_Manifests
+      path: artifacts/manifests/
+    - name: Linux_musl_x64_Installers
+      path: artifacts/installers/
+    - name: Linux_musl_x64_Logs
+      path: artifacts/logs/
+- template: jobs/codesign-xplat.yml
+  parameters:
+    inputName: Linux_musl_x64
+
+# Test jobs
 - template: jobs/default-build.yml
   parameters:
-    jobName: Windows_Build
-    jobDisplayName: "Build and test: Windows"
+    condition: ne(variables['SkipTests'], 'true')
+    jobName: Windows_Test
+    jobDisplayName: "Test: Windows Server 2016 x64"
     agentOs: Windows
     buildScript: ./eng/scripts/cibuild.cmd
+    buildArgs: -test "/p:SkipIISBackwardsCompatibilityTests=true /p:SkipIISTests=true /p:SkipIISExpressTests=true /p:SkipIISForwardsCompatibilityTests=true"
     beforeBuild:
     - powershell: "& ./src/Servers/IIS/tools/UpdateIISExpressCertificate.ps1; & ./src/Servers/IIS/tools/update_schema.ps1"
       displayName: Setup IISExpress test certificates and schema
-    buildArgs: "/p:SkipIISBackwardsCompatibilityTests=true /p:SkipIISTests=true /p:SkipIISExpressTests=true /p:SkipIISForwardsCompatibilityTests=true"
 - template: jobs/default-build.yml
   parameters:
-    jobName: MacOs_Build
-    jobDisplayName: "Build and test: macOS"
+    condition: ne(variables['SkipTests'], 'true')
+    jobName: MacOs_Test
+    jobDisplayName: "Test: macOS 10.13"
     agentOs: macOs
     buildScript: ./eng/scripts/cibuild.sh
+    buildArgs: --test
     beforeBuild:
     - bash: "./eng/scripts/install-nginx-mac.sh"
       displayName: Installing Nginx
 - template: jobs/default-build.yml
   parameters:
-    jobName: Linux_Build
-    jobDisplayName: "Build and test: Linux"
+    condition: ne(variables['SkipTests'], 'true')
+    jobName: Linux_Test
+    jobDisplayName: "Test: Ubuntu 16.04 x64"
     agentOs: Linux
     buildScript: ./eng/scripts/cibuild.sh
+    buildArgs: --test
     beforeBuild:
     - bash: "./eng/scripts/install-nginx-linux.sh"
       displayName: Installing Nginx
 - template: jobs/iisintegration-job.yml
   parameters:
+    condition: ne(variables['SkipTests'], 'true')
     TestGroupName: IIS
     skipArgs: " /p:SkipIISBackwardsCompatibilityTests=true /p:SkipIISTests=false /p:SkipIISExpressTests=true /p:SkipIISForwardsCompatibilityTests=true"
 - template: jobs/iisintegration-job.yml
   parameters:
+    condition: ne(variables['SkipTests'], 'true')
     TestGroupName: IISExpress
     skipArgs: "/p:SkipIISBackwardsCompatibilityTests=true /p:SkipIISTests=true /p:SkipIISExpressTests=false /p:SkipIISForwardsCompatibilityTests=true"
 - template: jobs/iisintegration-job.yml
   parameters:
+    condition: ne(variables['SkipTests'], 'true')
     TestGroupName: IISForwardCompat
     skipArgs: "/p:SkipIISBackwardsCompatibilityTests=true /p:SkipIISTests=true /p:SkipIISExpressTests=true /p:SkipIISForwardsCompatibilityTests=false"
 - template: jobs/iisintegration-job.yml
   parameters:
+    condition: ne(variables['SkipTests'], 'true')
     TestGroupName: IISBackCompat
     skipArgs: "/p:SkipIISBackwardsCompatibilityTests=false /p:SkipIISTests=true /p:SkipIISExpressTests=true /p:SkipIISForwardsCompatibilityTests=true"
-- template: jobs/site-extensions-job.yml

+ 26 - 0
.azure/pipelines/jobs/codesign-xplat.yml

@@ -0,0 +1,26 @@
+# This runs code signing for .nupkg files built on MacOS or Linux
+parameters:
+  inputName: ''
+
+jobs:
+- template: default-build.yml
+  parameters:
+    dependsOn:
+    - ${{ parameters.inputName }}_build
+    condition: in(variables['_SignType'], 'test', 'real')
+    jobName: CodeSign_Xplat_${{ parameters.inputName }}
+    jobDisplayName: "Code-sign ${{ parameters.inputName }} packages"
+    agentOs: Windows
+    beforeBuild:
+    - task: DownloadBuildArtifacts@0
+      displayName: Download ${{ parameters.inputName }} artifacts
+      inputs:
+        artifactName: ${{ parameters.inputName }}_Packages
+        downloadPath: $(Build.StagingDirectory)/deps/
+        itemPattern: '**/*.nupkg'
+    buildScript: eng\tools\XplatPackageSigner\sign-packages.cmd $(Build.StagingDirectory)\deps\${{ parameters.inputName }}Packages\
+    artifacts:
+    - name: ${{ parameters.inputName }}_Packages_Signed
+      path: $(Build.StagingDirectory)\deps\${{ parameters.inputName }}Packages\
+    - name: ${{ parameters.inputName }}_Logs
+      path: artifacts/logs/

+ 45 - 35
.azure/pipelines/jobs/default-build.yml

@@ -14,14 +14,14 @@
 #       Note: -ci is always passed
 #   beforeBuild: [steps]
 #       Additional steps to run before build.sh/cmd
+#   buildSteps: [steps]
+#       Instead of running build.cmd/sh, run these build steps.
 #   afterBuild: [steps]
 #       Additional steps to run after build.sh/cmd
-#   artifacts:
-#      publish: boolean
-#           Should artifacts be published
-#      path: string
+#   artifacts: [array]
+#    - path: string
 #           The file path to artifacts output
-#      force: boolean
+#      includeForks: boolean
 #           Should artifacts from forks be published
 #      name: string
 #           The name of the artifact container
@@ -31,6 +31,8 @@
 #     A map of matrix configurations and variables. https://docs.microsoft.com/en-us/vsts/pipelines/yaml-schema?view=vsts#matrix
 #   dependsOn: string | [ string ]
 #     For fan-out/fan-in. https://docs.microsoft.com/en-us/vsts/pipelines/yaml-schema?view=vsts#phase
+#   condition: string
+#     A condition which can be used to skip the job completely
 #   codeSign: boolean
 #       This build definition is enabled for code signing. (Only applies to Windows)
 #   buildDirectory: string
@@ -48,17 +50,16 @@ parameters:
   buildArgs: ''
   configuration: 'Release'
   beforeBuild: []
+  # buildSteps: []  don't define an empty object default because there is no way in template expression yet to check "if isEmpty(parameters.buildSteps)"
   afterBuild: []
   codeSign: false
   variables: {}
   dependsOn: ''
+  condition: ''
   # jobName: '' - use agentOs by default.
   # jobDisplayName: '' - use agentOs by default.
   # matrix: {} - don't define an empty object default because there is no way in template expression yet to check "if isEmpty(parameters.matrix)"
-  artifacts:
-    publish: true
-    path: 'artifacts/'
-    force: false
+  artifacts:  []
   buildDirectory: ''
   buildScript: ''
 
@@ -66,6 +67,8 @@ jobs:
 - job: ${{ coalesce(parameters.jobName, parameters.agentOs) }}
   displayName: ${{ coalesce(parameters.jobDisplayName, parameters.agentOs) }}
   dependsOn: ${{ parameters.dependsOn }}
+  ${{ if ne(parameters.condition, '') }}:
+    condition: ${{ parameters.condition }}
   timeoutInMinutes: 120
   workspace:
     clean: all
@@ -76,15 +79,14 @@ jobs:
   # Map friendly OS names to the right queue
   # See https://github.com/dotnet/arcade/blob/master/Documentation/ChoosingAMachinePool.md
   pool:
-    ${{ if ne(parameters.poolName, '') }}:
-      name: ${{ parameters.poolName }}
+    ${{ if ne(parameters.poolVmImage, '') }}:
       vmImage: ${{ parameters.poolVmImage }}
-    ${{ if and(eq(parameters.poolName, ''), eq(parameters.agentOs, 'macOS')) }}:
-      name: Hosted macOS
+    ${{ if and(eq(parameters.poolVmImage, ''), eq(parameters.agentOs, 'macOS')) }}:
       vmImage: macOS-10.13
-    ${{ if and(eq(parameters.poolName, ''), eq(parameters.agentOs, 'Linux')) }}:
-      name: Hosted Ubuntu 1604
+    ${{ if and(eq(parameters.poolVmImage, ''), eq(parameters.agentOs, 'Linux')) }}:
       vmImage: ubuntu-16.04
+    ${{ if ne(parameters.poolName, '') }}:
+      name: ${{ parameters.poolName }}
     ${{ if and(eq(parameters.poolName, ''), eq(parameters.agentOs, 'Windows')) }}:
       ${{ if eq(variables['System.TeamProject'], 'internal') }}:
         name: dotnet-internal-temp
@@ -102,7 +104,7 @@ jobs:
     ${{ if eq(parameters.agentOs, 'Windows') }}:
       JAVA_HOME: $(Agent.BuildDirectory)\.tools\jdk
     ${{ if or(ne(parameters.codeSign, 'true'), ne(variables['System.TeamProject'], 'internal')) }}:
-      _SignType:
+      _SignType: ''
     ${{ if and(eq(parameters.codeSign, 'true'), eq(variables['System.TeamProject'], 'internal')) }}:
       _SignType: real
     ${{ insert }}: ${{ parameters.variables }}
@@ -124,17 +126,25 @@ jobs:
         signType: $(_SignType)
         zipSources: false
         feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json
+
   - ${{ parameters.beforeBuild }}
-  - ${{ if eq(parameters.buildScript, '') }}:
-    - ${{ if eq(parameters.agentOs, 'Windows') }}:
-      - script: .\$(BuildDirectory)\build.cmd -ci /p:SignType=$(_SignType) /p:Configuration=$(BuildConfiguration) $(BuildScriptArgs)
-        displayName: Run build.cmd
-    - ${{ if ne(parameters.agentOs, 'Windows') }}:
-      - script: ./$(BuildDirectory)/build.sh -ci -p:Configuration=$(BuildConfiguration) $(BuildScriptArgs)
-        displayName: Run build.sh
-  - ${{ if ne(parameters.buildScript, '') }}:
-    - script: $(BuildScript) /p:Configuration=$(BuildConfiguration) $(BuildScriptArgs)
-      displayName: run $(BuildScript)
+
+  - ${{ if ne(parameters.buildSteps, '')}}:
+    - ${{ parameters.buildSteps }}
+  - ${{ if eq(parameters.buildSteps, '')}}:
+    - ${{ if eq(parameters.buildScript, '') }}:
+      - ${{ if eq(parameters.agentOs, 'Windows') }}:
+        - script: .\$(BuildDirectory)\build.cmd -ci /p:SignType=$(_SignType) /p:Configuration=$(BuildConfiguration) $(BuildScriptArgs)
+          displayName: Run build.cmd
+      - ${{ if ne(parameters.agentOs, 'Windows') }}:
+        - script: ./$(BuildDirectory)/build.sh -ci -p:Configuration=$(BuildConfiguration) $(BuildScriptArgs)
+          displayName: Run build.sh
+    - ${{ if ne(parameters.buildScript, '') }}:
+      - script: $(BuildScript) /p:Configuration=$(BuildConfiguration) $(BuildScriptArgs)
+        displayName: run $(BuildScript)
+
+  - ${{ parameters.afterBuild }}
+
   - task: PublishTestResults@2
     displayName: Publish test results
     condition: always()
@@ -144,23 +154,23 @@ jobs:
       testRunner: vstest
       testResultsFiles: '**/artifacts/**/*.trx'
       mergeTestResults: true
-  - ${{ if eq(parameters.artifacts.publish, 'true') }}:
+  - ${{ each artifact in parameters.artifacts }}:
     - task: PublishBuildArtifacts@1
-      displayName: Upload artifacts
-      condition: or(eq(variables['system.pullrequest.isfork'], false), eq('${{ parameters.artifacts.force }}', 'true'))
+      displayName: Upload artifacts from ${{ artifact.path }}
+      condition: or(eq(variables['system.pullrequest.isfork'], false), eq('${{ artifact.includeForks }}', 'true'))
       continueOnError: true
       inputs:
         ${{ if eq(parameters.buildDirectory, '') }}:
-          pathtoPublish: ${{ parameters.artifacts.path }}
+          pathtoPublish: ${{ artifact.path }}
         ${{ if ne(parameters.buildDirectory, '') }}:
-          pathtoPublish: ${{ parameters.buildDirectory }}\${{ parameters.artifacts.path }}
-        ${{ if eq(parameters.artifacts.name, '') }}:
+          pathtoPublish: ${{ parameters.buildDirectory }}\${{ artifact.path }}
+        ${{ if eq(artifact.name, '') }}:
           artifactName: artifacts-$(AgentOsName)-$(BuildConfiguration)
-        ${{ if ne(parameters.artifacts.name, '') }}:
-          artifactName: ${{ parameters.artifacts.name }}
+        ${{ if ne(artifact.name, '') }}:
+          artifactName: ${{ artifact.name }}
         artifactType: Container
         parallel: true
-  - ${{ parameters.afterBuild }}
+
   - ${{ if and(eq(variables['System.TeamProject'], 'internal'), eq(parameters.agentOs, 'Windows')) }}:
     - task: MicroBuildCleanup@1
       displayName: Cleanup MicroBuild tasks

+ 3 - 3
.azure/pipelines/jobs/iisintegration-job.yml

@@ -1,8 +1,8 @@
 jobs:
 - template: default-build.yml
   parameters:
-    buildScript: ./build.cmd
-    buildArgs: "-ci -restore -build -test -projects src/Servers/IIS/**/*.csproj ${{ parameters.skipArgs }}"
+    buildScript: .\build.cmd
+    buildArgs: "-ci -test -projects src/Servers/IIS/**/*.csproj ${{ parameters.skipArgs }}"
     poolName: "Hosted VS2017"
     poolVmImage: "vs2017-win2016"
     beforeBuild:
@@ -13,4 +13,4 @@ jobs:
         displayName: Stop AppVerifier
         condition: always()
     jobName: ANCM_${{ parameters.TestGroupName }}
-    jobDisplayName: "Build and test: ANCM ${{ parameters.TestGroupName }}"
+    jobDisplayName: "Test: ANCM ${{ parameters.TestGroupName }}"

+ 0 - 10
.azure/pipelines/jobs/site-extensions-job.yml

@@ -1,10 +0,0 @@
-jobs:
-- template: default-build.yml
-  parameters:
-    buildScript: ./src/SiteExtensions/LoggingAggregate/build.cmd
-    buildArgs: "-ci"
-    jobName: SiteExtensions
-    jobDisplayName: "Build logging site extension"
-    artifacts:
-      publish: true
-      path: 'artifacts'

+ 20 - 2
Directory.Build.props

@@ -53,6 +53,23 @@
     <SignAssembly>true</SignAssembly>
     <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <TargetOsName Condition=" '$(TargetOsName)' == '' AND $([MSBuild]::IsOSPlatform('Windows'))">win</TargetOsName>
+    <TargetOsName Condition=" '$(TargetOsName)' == '' AND $([MSBuild]::IsOSPlatform('OSX'))">osx</TargetOsName>
+    <TargetOsName Condition=" '$(TargetOsName)' == '' AND $([MSBuild]::IsOSPlatform('Linux'))">linux</TargetOsName>
+    <TargetArchitecture Condition="'$(TargetArchitecture)' == ''">x64</TargetArchitecture>
+    <TargetRuntimeIdentifier>$(TargetOsName)-$(TargetArchitecture)</TargetRuntimeIdentifier>
+
+    <!-- This defines the list of RIDs supported by the ASP.NET Core shared framework. -->
+    <SupportedRuntimeIdentifiers>
+      win-x64;
+      win-x86;
+      win-arm;
+      osx-x64;
+      linux-musl-x64;
+      linux-x64;
+      linux-arm;
+      linux-arm64
+    </SupportedRuntimeIdentifiers>
 
     <!-- Instructs the compiler to use SHA256 instead of SHA1 when adding file hashes to PDBs. -->
     <ChecksumAlgorithm>SHA256</ChecksumAlgorithm>
@@ -61,7 +78,7 @@
 
     <!-- Fixes a common error in targets implementing a NoBuild mode. -->
     <BuildProjectReferences Condition=" '$(NoBuild)' == 'true' ">false</BuildProjectReferences>
-    
+
     <!-- Enables Strict mode for Roslyn compiler -->
     <Features>strict</Features>
   </PropertyGroup>
@@ -114,12 +131,13 @@
   <PropertyGroup>
     <!-- Projects which reference Microsoft.AspNetCore.Mvc.Testing should import this targets file to ensure dependency .deps.json files are copied into test output. -->
     <MvcTestingTargets>$(MSBuildThisFileDirectory)src\Mvc\src\Microsoft.AspNetCore.Mvc.Testing\Microsoft.AspNetCore.Mvc.Testing.targets</MvcTestingTargets>
+    <!-- IIS native projects can only be built on Windows for x86 and x64. -->
+    <BuildIisNativeProjects Condition="'$(BuildNative)' != 'false' AND '$(TargetOsName)' == 'win' AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64')">true</BuildIisNativeProjects>
   </PropertyGroup>
 
   <Import Project="eng\Dependencies.props" />
   <Import Project="eng\PatchConfig.props" />
   <Import Project="eng\ProjectReferences.props" />
-  <Import Project="eng\targets\RuntimeIdentifiers.props" />
   <Import Project="eng\targets\Cpp.Common.props"  Condition="'$(MSBuildProjectExtension)' == '.vcxproj'" />
   <Import Project="eng\targets\CSharp.Common.props"  Condition="'$(MSBuildProjectExtension)' == '.csproj'" />
   <Import Project="eng\targets\Wix.Common.props"  Condition="'$(MSBuildProjectExtension)' == '.wixproj'" />

+ 1 - 1
build.cmd

@@ -1,2 +1,2 @@
 @ECHO OFF
-PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0build.ps1' %*; exit $LASTEXITCODE"
+PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = ''; try { & '%~dp0build.ps1' %*; exit $LASTEXITCODE } catch { write-host $_; exit 1 }"

+ 75 - 38
build.ps1

@@ -13,10 +13,13 @@ build projects, run tests, and generate code.
 Sets up CI specific settings and variables.
 
 .PARAMETER Restore
-Run restore on projects.
+Run restore.
 
-.PARAMETER Build
-Compile projects.
+.PARAMETER NoRestore
+Suppress running restore on projects.
+
+.PARAMETER NoBuild
+Suppress re-compile projects. (Implies -NoRestore)
 
 .PARAMETER Pack
 Produce packages.
@@ -27,23 +30,34 @@ Run tests.
 .PARAMETER Sign
 Run code signing.
 
+.PARAMETER Architecture
+The CPU architecture to build for (x64, x86, arm). Default=x64
+
 .PARAMETER Projects
 A list of projects to build. Globbing patterns are supported, such as "$(pwd)/**/*.csproj"
 
 .PARAMETER All
 Build all project types.
 
-.PARAMETER Managed
+.PARAMETER BuildManaged
 Build managed projects (C#, F#, VB).
+You can also use -NoBuildManaged to suppress this project type.
 
-.PARAMETER Native
+.PARAMETER BuildNative
 Build native projects (C++).
+You can also use -NoBuildNative to suppress this project type.
 
-.PARAMETER NodeJS
+.PARAMETER BuildNodeJS
 Build NodeJS projects (TypeScript, JS).
+You can also use -NoBuildNodeJS to suppress this project type.
 
-.PARAMETER Installers
+.PARAMETER BuildJava
+Build Java projects.
+You can also use -NoBuildJava to suppress this project type.
+
+.PARAMETER BuildInstallers
 Build Windows Installers. Required .NET 3.5 to be installed (WiX toolset requirement).
+You can also use -NoBuildInstallers to suppress this project type.
 
 .PARAMETER MSBuildArguments
 Additional MSBuild arguments to be passed through.
@@ -51,7 +65,7 @@ Additional MSBuild arguments to be passed through.
 .EXAMPLE
 Building both native and managed projects.
 
-    build.ps1 -managed -native
+    build.ps1 -BuildManaged -BuildNative
 
 .EXAMPLE
 Building a subfolder of code.
@@ -71,29 +85,35 @@ param(
     [switch]$CI,
 
     # Build lifecycle options
-    [switch]$Restore = $True, # Run tests
-    [switch]$Build = $True, # Compile
+    [switch]$Restore,
+    [switch]$NoRestore, # Suppress restore
+    [switch]$NoBuild, # Suppress compiling
     [switch]$Pack, # Produce packages
     [switch]$Test, # Run tests
     [switch]$Sign, # Code sign
 
-    # Project selection
-    [Parameter(ParameterSetName = 'All')]
-    [switch]$All,  # Build everything
+    [ValidateSet('x64', 'x86', 'arm')]
+    $Architecture = 'x64',
 
     # A list of projects which should be built.
-    [Parameter(ParameterSetName = 'Projects')]
     [string]$Projects,
 
+    # Project selection
+    [switch]$All,  # Build everything
+
     # Build a specified set of project groups
-    [Parameter(ParameterSetName = 'Groups')]
-    [switch]$Managed,
-    [Parameter(ParameterSetName = 'Groups')]
-    [switch]$Native,
-    [Parameter(ParameterSetName = 'Groups')]
-    [switch]$NodeJS,
-    [Parameter(ParameterSetName = 'Groups')]
-    [switch]$Installers,
+    [switch]$BuildManaged,
+    [switch]$BuildNative,
+    [switch]$BuildNodeJS,
+    [switch]$BuildJava,
+    [switch]$BuildInstallers,
+
+    # Inverse of the previous switches because specifying '-switch:$false' is not intuitive for most command line users
+    [switch]$NoBuildManaged,
+    [switch]$NoBuildNative,
+    [switch]$NoBuildNodeJS,
+    [switch]$NoBuildJava,
+    [switch]$NoBuildInstallers,
 
     # By default, Windows builds will use MSBuild.exe. Passing this will force the build to run on
     # dotnet.exe instead, which may cause issues if you invoke build on a project unsupported by
@@ -237,31 +257,48 @@ elseif ($Projects) {
     }
     $MSBuildArguments += "/p:Projects=$Projects"
 }
-else {
-    # When adding new sub-group build flags, add them to this check.
-    if((-not $Native) -and (-not $Managed) -and (-not $NodeJS) -and (-not $Installers)) {
-        Write-Warning "No default group of projects was specified, so building the 'managed' and 'native' subsets of projects. Run ``build.cmd -help`` for more details."
+# 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)) {
+    Write-Warning "No default group of projects was specified, so building the 'managed' and 'native' 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.
-        # Now that we support subfolder invokations of build.cmd, we will be pushing to have build.cmd build everything (-all) by default
+    # This goal of this is to pick a sensible default for `build.cmd` with zero arguments.
+    # Now that we support subfolder invokations of build.cmd, we will be pushing to have build.cmd build everything (-all) by default
 
-        $Managed = $true
-        $Native = $true
-    }
-
-    $MSBuildArguments += "/p:BuildManaged=$Managed"
-    $MSBuildArguments += "/p:BuildNative=$Native"
-    $MSBuildArguments += "/p:BuildNodeJS=$NodeJS"
-    $MSBuildArguments += "/p:BuildWindowsInstallers=$Installers"
+    $BuildManaged = $true
+    $BuildNative = $true
 }
 
+if ($BuildInstallers) { $MSBuildArguments += "/p:BuildInstallers=true" }
+if ($BuildManaged) { $MSBuildArguments += "/p:BuildManaged=true" }
+if ($BuildNative) { $MSBuildArguments += "/p:BuildNative=true" }
+if ($BuildNodeJS) { $MSBuildArguments += "/p:BuildNodeJS=true" }
+if ($BuildJava) { $MSBuildArguments += "/p:BuildJava=true" }
+
+if ($NoBuildInstallers) { $MSBuildArguments += "/p:BuildInstallers=false" }
+if ($NoBuildManaged) { $MSBuildArguments += "/p:BuildManaged=false" }
+if ($NoBuildNative) { $MSBuildArguments += "/p:BuildNative=false" }
+if ($NoBuildNodeJS) { $MSBuildArguments += "/p:BuildNodeJS=false" }
+if ($NoBuildJava) { $MSBuildArguments += "/p:BuildJava=false" }
+
+$RunBuild = if ($NoBuild) { $false } else { $true }
+
+# Run restore by default unless -NoRestore is set.
+# -NoBuild implies -NoRestore, unless -Restore is explicitly set (as in restore.cmd)
+$RunRestore = if ($NoRestore) { $false }
+    elseif ($Restore) { $true }
+    elseif ($NoBuild) { $false }
+    else { $true }
+
 # Target selection
-$MSBuildArguments += "/p:_RunRestore=$Restore"
-$MSBuildArguments += "/p:_RunBuild=$Build"
+$MSBuildArguments += "/p:_RunRestore=$RunRestore"
+$MSBuildArguments += "/p:_RunBuild=$RunBuild"
 $MSBuildArguments += "/p:_RunPack=$Pack"
 $MSBuildArguments += "/p:_RunTests=$Test"
 $MSBuildArguments += "/p:_RunSign=$Sign"
 
+$MSBuildArguments += "/p:TargetArchitecture=$Architecture"
+$MSBuildArguments += "/p:TargetOsName=win"
+
 Import-Module -Force -Scope Local (Join-Path $korebuildPath 'KoreBuild.psd1')
 
 try {

+ 75 - 29
build.sh

@@ -18,15 +18,26 @@ lockfile_path="$DIR/korebuild-lock.txt"
 config_file="$DIR/korebuild.json"
 channel='master'
 tools_source='https://aspnetcore.blob.core.windows.net/buildtools'
+target_os_name=''
 ci=false
 run_restore=true
 run_build=true
 run_pack=false
 run_tests=false
 build_all=false
-build_managed=false
-build_nodejs=false
+build_managed=''
+build_native=''
+build_nodejs=''
+build_java=''
 build_projects=''
+target_arch='x64'
+
+if [ "$(uname)" = "Darwin" ]; then
+    target_os_name='osx'
+else
+    target_os_name='linux'
+fi
+
 msbuild_args=()
 
 #
@@ -36,23 +47,28 @@ __usage() {
     echo "Usage: $(basename "${BASH_SOURCE[0]}") [options] [[--] <Arguments>...]
 
 Arguments:
-    <Arguments>...     Arguments passed to the command. Variable number of arguments allowed.
+    <Arguments>...         Arguments passed to the command. Variable number of arguments allowed.
 
 Options:
-    --[no-]restore     Run restore.
-    --[no-]build       Compile projects
-    --[no-]pack        Produce packages.
-    --[no-]test        Run tests.
+    --arch                 The CPU architecture to build for (x64, arm, arm64). Default=$target_arch
+    --os-name              The base runtime identifier to build for (linux, osx, linux-musl). Default=$target_os_name
+
+    --[no-]restore         Run restore.
+    --[no-]build           Compile projects. (Implies --no-restore)
+    --[no-]pack            Produce packages.
+    --[no-]test            Run tests.
 
-    --projects         A list of projects to build. (Must be an absolute path.)
-                       Globbing patterns are supported, such as \"$(pwd)/**/*.csproj\".
+    --projects             A list of projects to build. (Must be an absolute path.)
+                           Globbing patterns are supported, such as \"$(pwd)/**/*.csproj\".
 
-    --all              Build all project types.
-    --managed          Build managed projects (C#, F#, VB).
-    --nodejs           Build NodeJS projects (TypeScript, JS).
+    --all                  Build all project types.
+    --[no-]build-native    Build native projects (C, C++).
+    --[no-]build-managed   Build managed projects (C#, F#, VB).
+    --[no-]build-nodejs    Build NodeJS projects (TypeScript, JS).
+    --[no-]build-java      Build Java projects.
 
-    --ci               Apply CI specific settings and environment variables.
-    --verbose          Show verbose output.
+    --ci                   Apply CI specific settings and environment variables.
+    --verbose              Show verbose output.
 
 Description:
     This build script installs required tools and runs an MSBuild command on this repository
@@ -150,6 +166,16 @@ while [[ $# -gt 0 ]]; do
             __usage --no-exit
             exit 0
             ;;
+        --arch)
+            shift
+            target_arch="${1:-}"
+            [ -z "$target_arch" ] && __error "Missing value for parameter --arch" && __usage
+            ;;
+        --os-name)
+            shift
+            target_os_name="${1:-}"
+            [ -z "$target_os_name" ] && __error "Missing value for parameter --os-name" && __usage
+            ;;
         --restore|-[Rr]estore)
             run_restore=true
             ;;
@@ -161,6 +187,8 @@ while [[ $# -gt 0 ]]; do
             ;;
         --no-build)
             run_build=false
+            # --no-build implies --no-restore
+            run_restore=false
             ;;
         --pack|-[Pp]ack)
             run_pack=true
@@ -182,14 +210,29 @@ while [[ $# -gt 0 ]]; do
         --all|-[Aa]ll)
             build_all=true
             ;;
-        --managed|-[Mm]anaged)
+        --build-managed|-BuildManaged)
             build_managed=true
             ;;
-        --nodejs|-[Nn]ode[Jj][Ss])
+        --no-build-managed|-NoBuildManaged)
+            build_managed=false
+            ;;
+        --build-nodejs|-BuildNodeJs)
             build_nodejs=true
             ;;
-        --native|-[Nn]ative)
-            __warn 'The C++ projects in this repo only build on Windows. The --native flag will be ignored.'
+        --no-build-nodejs|-NoBuildNodeJs)
+            build_nodejs=false
+            ;;
+        --build-java|-BuildJava)
+            build_java=true
+            ;;
+        --no-build-java|-NoBuildJava)
+            build_java=false
+            ;;
+        --build-native|-BuildNative)
+            build_native=true
+            ;;
+        --no-build-native|-NoBuildNative)
+            build_native=false
             ;;
         --ci|-[Cc][Ii])
             ci=true
@@ -252,24 +295,27 @@ if [ "$build_all" = true ]; then
     msbuild_args[${#msbuild_args[*]}]="-p:BuildAllProjects=true"
 elif [ ! -z "$build_projects" ]; then
     msbuild_args[${#msbuild_args[*]}]="-p:Projects=$build_projects"
-else
-    # When adding new sub-group build flags, add them to this check
-    if [ "$build_managed" = false ] && [ "$build_nodejs" = false ]; 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' subset of projects. Run ``build.sh -help`` for more details."
-        build_managed=true
-    fi
-
-    msbuild_args[${#msbuild_args[*]}]="-p:BuildManaged=$build_managed"
-    msbuild_args[${#msbuild_args[*]}]="-p:BuildNodeJS=$build_nodejs"
+elif [ -z "$build_managed" ] && [ -z "$build_nodejs" ] && [ -z "$build_java" ] && [ -z "$build_native" ]; 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' subset of projects. Run ``build.sh -help`` for more details."
+    build_managed=true
 fi
 
+# Only set these MSBuild properties if they were explicitly set by build parameters.
+[ ! -z "$build_java" ] && msbuild_args[${#msbuild_args[*]}]="-p:BuildJava=$build_java"
+[ ! -z "$build_native" ] && msbuild_args[${#msbuild_args[*]}]="-p:BuildNative=$build_native"
+[ ! -z "$build_nodejs" ] && msbuild_args[${#msbuild_args[*]}]="-p:BuildNodeJS=$build_nodejs"
+[ ! -z "$build_managed" ] && msbuild_args[${#msbuild_args[*]}]="-p:BuildManaged=$build_managed"
+
 msbuild_args[${#msbuild_args[*]}]="-p:_RunRestore=$run_restore"
 msbuild_args[${#msbuild_args[*]}]="-p:_RunBuild=$run_build"
 msbuild_args[${#msbuild_args[*]}]="-p:_RunPack=$run_pack"
 msbuild_args[${#msbuild_args[*]}]="-p:_RunTests=$run_tests"
 
+msbuild_args[${#msbuild_args[*]}]="-p:TargetArchitecture=$target_arch"
+msbuild_args[${#msbuild_args[*]}]="-p:TargetOsName=$target_os_name"
+
 # Disable downloading ref assemblies as a tarball. Use netfx refs from the Microsoft.NETFramework.ReferenceAssemblies NuGet package instead.
 [ -z "${KOREBUILD_SKIP_INSTALL_NETFX:-}" ] && KOREBUILD_SKIP_INSTALL_NETFX=1
 

+ 16 - 6
build/CodeSign.props

@@ -1,12 +1,22 @@
 <Project>
 
   <ItemGroup>
-    <!-- Use the PublicKeyToken of .NET assemblies to determine 'Microsoft' assemblies. -->
-    <AssemblyToSign Include="AspNetCore" PublicKeyToken="adb9793829ddae60" CertificateName="Microsoft400" />
-    <AssemblyToSign Include="MsSharedLib72" PublicKeyToken="31bf3856ad364e35" CertificateName="Microsoft400" />
-    <AssemblyToSign Include="MsftStrongName" PublicKeyToken="b03f5f7f11d50a3a" CertificateName="Microsoft400" />
-    <AssemblyToSign Include="MsftStrongName2" PublicKeyToken="b77a5c561934e089" CertificateName="Microsoft400" />
-    <AssemblyToSign Include="MsftOpenStrongName" PublicKeyToken="cc7b13ffcd2ddd51" CertificateName="Microsoft400" />
+    <!--
+      Use the PublicKeyToken of .NET assemblies to determine with authenticode cert to use.
+      'None' is required to ensure code signing does not attempt to re-sign them or submit
+      to ESPR for strong-naming signing. We don't delay sign, so we only need to authenticode sign.
+      See https://github.com/dotnet/arcade/issues/1911 for context.
+    -->
+    <!-- The AspNetCore strong name. -->
+    <AssemblyToSign Include="None" PublicKeyToken="adb9793829ddae60" CertificateName="Microsoft400" />
+    <!-- The MsSharedLib72 strong name. -->
+    <AssemblyToSign Include="None" PublicKeyToken="31bf3856ad364e35" CertificateName="Microsoft400" />
+    <!-- The MsftStrongName strong name. -->
+    <AssemblyToSign Include="None" PublicKeyToken="b03f5f7f11d50a3a" CertificateName="Microsoft400" />
+    <!-- The MsftStrongName2 strong name. -->
+    <AssemblyToSign Include="None" PublicKeyToken="b77a5c561934e089" CertificateName="Microsoft400" />
+    <!-- The MsftOpenStrongName strong name. -->
+    <AssemblyToSign Include="None" PublicKeyToken="cc7b13ffcd2ddd51" CertificateName="Microsoft400" />
 
     <!-- Native .dll's. These don't have a public key token, but are from Microsoft and should be signed. -->
     <FileNamesToSign Include="aspnetcore.dll" CertificateName="Microsoft400" />

+ 1 - 1
build/CodeSign.targets

@@ -7,7 +7,7 @@
   <Target Name="CollectFileSignInfo">
     <PropertyGroup>
       <BaseRedistNetCorePath>$(IntermediateDir)ar\</BaseRedistNetCorePath>
-      <RedistNetCorePath>$(BaseRedistNetCorePath)$(SharedFxRid)\</RedistNetCorePath>
+      <RedistNetCorePath>$(BaseRedistNetCorePath)$(TargetRuntimeIdentifier)\</RedistNetCorePath>
     </PropertyGroup>
 
     <ItemGroup>

+ 10 - 1
build/Publish.targets

@@ -1,10 +1,19 @@
 <Project>
 
-  <Target Name="Publish">
+  <Target Name="RestorePublishProject">
     <MSBuild Projects="$(MSBuildThisFileDirectory)publish\Publish.csproj"
              Targets="Restore"
              Properties="$(BuildProperties);KoreBuildTasksDll=$(KoreBuildTasksDll);__DummyTarget=Restore" />
+  </Target>
+
+  <Target Name="GenerateBuildAssetManifest" DependsOnTargets="RestorePublishProject">
+    <!-- Generate build manifests without building them remotely. These manifests are used by Maestro and the Build Asset Registry to flow dependencies to other repos. -->
+    <MSBuild Projects="$(MSBuildThisFileDirectory)publish\Publish.csproj"
+             Targets="GenerateBuildAssetManifest"
+             Properties="$(BuildProperties);KoreBuildTasksDll=$(KoreBuildTasksDll);__DummyTarget=GenerateBuildAssetManifest" />
+  </Target>
 
+  <Target Name="Publish" DependsOnTargets="RestorePublishProject">
     <MSBuild Projects="$(MSBuildThisFileDirectory)publish\Publish.csproj"
              Targets="Publish"
              Properties="$(BuildProperties);KoreBuildTasksDll=$(KoreBuildTasksDll);__DummyTarget=Publish" />

+ 6 - 12
build/SharedFx.targets

@@ -12,8 +12,8 @@
     <FxProjectToBuild Include="$(UnitTestFxProject)" />
     <FxProjectToBuild Condition=" '$(BuildRuntimeArchive)' != 'false' " Include="$(RepositoryRoot)src\Installers\Archive\*.*proj" />
 
-    <FxProjectToBuild Condition=" '$(SharedFxRid)' == 'linux-x64' AND '$(LinuxInstallerType)' == 'deb' " Include="$(RepositoryRoot)src\Installers\Debian\*.*proj" />
-    <FxProjectToBuild Condition=" '$(SharedFxRid)' == 'linux-x64' AND '$(LinuxInstallerType)' == 'rpm' " Include="$(RepositoryRoot)src\Installers\Rpm\*.*proj" />
+    <FxProjectToBuild Condition=" '$(TargetRuntimeIdentifier)' == 'linux-x64' AND '$(LinuxInstallerType)' == 'deb' " Include="$(RepositoryRoot)src\Installers\Debian\*.*proj" />
+    <FxProjectToBuild Condition=" '$(TargetRuntimeIdentifier)' == 'linux-x64' AND '$(LinuxInstallerType)' == 'rpm' " Include="$(RepositoryRoot)src\Installers\Rpm\*.*proj" />
 
     <FxProjectToBuild Condition=" '$(BuildSiteExtensions)' == 'true' " Include="$(RepositoryRoot)src\SiteExtensions\Runtime\Microsoft.AspNetCore.Runtime.SiteExtension.pkgproj" />
     <FxProjectToBuild Condition=" '$(BuildSiteExtensions)' == 'true' " Include="$(RepositoryRoot)src\SiteExtensions\LoggingBranch\LoggingBranch.csproj" />
@@ -25,25 +25,19 @@
 
     <PropertyGroup>
       <_RestoreGraphProjectInput>@(FxProjectToBuild)</_RestoreGraphProjectInput>
-      <SharedFxBuildProperties>
-        $(BuildProperties);
-        SharedFxRid=$(SharedFxRid);
-        SharedFxArchitecture=$(SharedFxArchitecture);
-        PackageVersion=$(PackageVersion)
-      </SharedFxBuildProperties>
     </PropertyGroup>
 
     <MSBuild Projects="$(NuGetRestoreTargets)"
              Targets="Restore"
-             Properties="$(SharedFxBuildProperties);RestoreGraphProjectInput=$(_RestoreGraphProjectInput);_DummyTarget=Restore" />
+             Properties="$(BuildProperties);RestoreGraphProjectInput=$(_RestoreGraphProjectInput);_DummyTarget=Restore" />
 
     <MSBuild Projects="@(FxProjectToBuild)"
-             Properties="$(SharedFxBuildProperties)"
+             Properties="$(BuildProperties)"
              BuildInParallel="true" />
     <!-- BuildInParallel="false" because dotnet store runs during site extension build and is failing if packages are being currently generated -->
     <MSBuild Projects="@(FxProjectToBuild)"
              Targets="Pack"
-             Properties="$(SharedFxBuildProperties);NoBuild=true"
+             Properties="$(BuildProperties);NoBuild=true"
              BuildInParallel="false"
              SkipNonexistentTargets="true" />
   </Target>
@@ -52,7 +46,7 @@
 
     <PropertyGroup>
       <!-- The file path to the log file, from within the container -->
-      <UnitTestFxTrxLogFile>$(LogOutputDir)SharedFx-UnitTests-$(Version).trx</UnitTestFxTrxLogFile>
+      <UnitTestFxTrxLogFile>$(LogOutputDir)SharedFx-UnitTests-$(PackageVersion)-$(TargetRuntimeIdentifier).trx</UnitTestFxTrxLogFile>
       <!-- The trx file path from the perspective of the TeamCity agent -->
       <UnitTestFxTrxPhysicalFilePath>$(UnitTestFxTrxLogFile)</UnitTestFxTrxPhysicalFilePath>
       <UnitTestFxTrxPhysicalFilePath Condition="'$(HostMachineRepositoryRoot)' != ''">$(HostMachineRepositoryRoot)/artifacts/logs/SharedFx-UnitTests.trx</UnitTestFxTrxPhysicalFilePath>

+ 2 - 2
build/publish/Publish.csproj

@@ -8,6 +8,7 @@
     <DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
     <ManifestsPath>$(ArtifactsDir)manifests\</ManifestsPath>
     <MaestroApiEndpoint Condition="'$(MaestroApiEndpoint)' == ''">https://maestro-prod.westus2.cloudapp.azure.com</MaestroApiEndpoint>
+    <DisablePackageReferenceRestrictions>true</DisablePackageReferenceRestrictions>
   </PropertyGroup>
 
   <ItemGroup>
@@ -156,9 +157,8 @@
 
     <GenerateBuildManifest
       Artifacts="@(PackageToPublish);@(FilesToPublish)"
-      OutputPath="$(ManifestsPath)aspnetcore-$(SharedFxRid)-$(PackageVersion).xml"
+      OutputPath="$(ManifestsPath)aspnetcore-$(TargetRuntimeIdentifier)-$(PackageVersion).xml"
       BuildId="$(PackageVersion)"
-      BuildData="Location=https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json"
       RepoUri="$(RepositoryUrl)"
       RepoBranch="$(RepositoryBranch)"
       RepoCommit="$(RepositoryCommit)" />

+ 31 - 21
build/repo.props

@@ -1,13 +1,16 @@
 <Project>
-  <Import Project="..\eng\targets\RuntimeIdentifiers.props" />
   <Import Project="SharedFrameworkOnly.props" />
 
+  <PropertyGroup>
+    <TargetRuntimeIdentifier Condition="'$(TargetRuntimeIdentifier)' == ''">$(TargetOsName)-$(TargetArchitecture)</TargetRuntimeIdentifier>
+  </PropertyGroup>
+
   <PropertyGroup>
     <!-- This repo does not have solutions to build -->
     <DisableDefaultTargets>true</DisableDefaultTargets>
     <DisableDefaultItems>true</DisableDefaultItems>
     <BuildSolutions>false</BuildSolutions>
-    <BuildSiteExtensions Condition="'$(SharedFxRid)' == 'win-x64' OR '$(SharedFxRid)' == 'win-x86'">true</BuildSiteExtensions>
+    <BuildSiteExtensions Condition="'$(TargetRuntimeIdentifier)' == 'win-x64' OR '$(TargetRuntimeIdentifier)' == 'win-x86'">true</BuildSiteExtensions>
 
     <OverridePackageOutputPath>false</OverridePackageOutputPath>
 
@@ -69,10 +72,10 @@
       </ItemGroup>
     </When>
     <Otherwise>
-      <ItemGroup Condition=" '$(BuildWindowsInstallers)' == 'true' ">
+      <ItemGroup Condition=" '$(BuildInstallers)' == 'true' AND '$(TargetOsName)' == 'win' ">
         <!-- Build the ANCM custom action -->
         <ProjectToBuild Include="$(RepositoryRoot)src\Installers\Windows\AspNetCoreModule-Setup\CustomAction\aspnetcoreCA.vcxproj" AdditionalProperties="Platform=x64" />
-        <ProjectToBuild Include="$(RepositoryRoot)src\Installers\Windows\AspNetCoreModule-Setup\CustomAction\aspnetcoreCA.vcxproj" AdditionalProperties="Platform=x86" />
+        <ProjectToBuild Include="$(RepositoryRoot)src\Installers\Windows\AspNetCoreModule-Setup\CustomAction\aspnetcoreCA.vcxproj" AdditionalProperties="Platform=Win32" />
 
         <!-- Build the ANCM msis -->
         <ProjectToBuild Include="$(RepositoryRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMIISExpressV2\AncmIISExpressV2.wixproj" AdditionalProperties="Platform=x64" />
@@ -93,36 +96,40 @@
       </ItemGroup>
 
       <ItemGroup>
-        <ProjectToBuild Condition=" '$(OS)' == 'Windows_NT' AND '$(BuildNative)' == 'true' " Include="$(RepositoryRoot)src\Servers\**\*.vcxproj">
+        <ProjectToBuild Include="$(RepositoryRoot)src\Servers\**\*.pkgproj" Condition=" '$(_RunPack)' == 'true' OR '$(BuildAllProjects)' == 'true' "/>
+
+        <NativeProjects Condition=" '$(TargetOsName)' == 'win' AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64') "
+                        Include="$(RepositoryRoot)src\Servers\**\*.vcxproj">
           <!-- Required to prevent triggering double-builds. See src\Servers\IIS\ResolveIisReferences.targets for details. -->
-          <AdditionalProperties Condition="'$(SharedFxRid)' == 'win-x64'">Platform=x64</AdditionalProperties>
-          <AdditionalProperties Condition="'$(SharedFxRid)' == 'win-x86'">Platform=x86</AdditionalProperties>
-        </ProjectToBuild>
+          <AdditionalProperties Condition="'$(TargetArchitecture)' == 'x64'">Platform=x64</AdditionalProperties>
+          <AdditionalProperties Condition="'$(TargetArchitecture)' == 'x86'">Platform=Win32</AdditionalProperties>
+        </NativeProjects>
 
-        <ProjectToBuild Include="$(RepositoryRoot)src\Servers\**\*.pkgproj" Condition=" '$(_RunPack)' == 'true' OR '$(BuildAllProjects)' == 'true' "/>
+        <ProjectToBuild Condition=" '$(BuildNative)' == 'true'" Include="@(NativeProjects)" Exclude="@(ProjectToExclude)" />
+        <ProjectToExclude Condition=" '$(BuildNative)' != 'true'" Include="@(NativeProjects)" />
 
-        <ProjectToBuild Condition="'$(BuildNodeJS)' == 'true'"
-                        Include="
+        <NodeJsProjects Include="
                           $(RepositoryRoot)src\SignalR\**\*.npmproj;
                           $(RepositoryRoot)src\Middleware\**\*.npmproj;
+                          $(RepositoryRoot)src\Components\Browser.JS\**\*.npmproj;
                           "
                         RestoreInParallel="false"
-                        Exclude="
-                          @(ProjectToBuild);
-                          @(ProjectToExclude)" />
+                        Exclude="@(ProjectToExclude)" />
 
-        <ProjectToBuild Condition="'$(BuildJava)' == 'true'"
-                        Include="$(RepositoryRoot)src\SignalR\**\*.javaproj"
-                        Exclude="
-                          @(ProjectToBuild);
-                          @(ProjectToExclude);" />
+        <ProjectToBuild Condition=" '$(BuildNodeJS)' == 'true'" Include="@(NodeJsProjects)" Exclude="@(ProjectToExclude)" />
+        <ProjectToExclude Condition=" '$(BuildNodeJS)' != 'true'" Include="@(NodeJsProjects)" />
+
+        <JavaProjects Include="$(RepositoryRoot)src\SignalR\**\*.javaproj"
+                      Exclude="@(ProjectToExclude)" />
+
+        <ProjectToBuild Condition=" '$(BuildJava)' == 'true'" Include="@(JavaProjects)" Exclude="@(ProjectToExclude)" />
+        <ProjectToExclude Condition=" '$(BuildJava)' != 'true'" Include="@(JavaProjects)" />
 
         <!--
           Use caution to avoid deep recursion. If the globbing pattern picks up something which exceeds MAX_PATH,
           the entire pattern will silently fail to evaluate correctly.
         -->
-        <ProjectToBuild Condition=" '$(BuildManaged)' == 'true' "
-                        Include="
+        <DotNetProjects Include="
                           $(RepositoryRoot)src\DefaultBuilder\**\*.*proj;
                           $(RepositoryRoot)src\Features\JsonPatch\**\*.*proj;
                           $(RepositoryRoot)src\DataProtection\**\*.*proj;
@@ -152,6 +159,9 @@
                           $(RepositoryRoot)**\node_modules\**\*;
                           $(RepositoryRoot)**\bin\**\*;
                           $(RepositoryRoot)**\obj\**\*;" />
+
+        <ProjectToBuild Condition=" '$(BuildManaged)' == 'true'" Include="@(DotNetProjects)" Exclude="@(ProjectToExclude)" />
+        <ProjectToExclude Condition=" '$(BuildManaged)' != 'true'" Include="@(DotNetProjects)" />
       </ItemGroup>
     </Otherwise>
   </Choose>

+ 3 - 1
build/repo.targets

@@ -34,6 +34,8 @@
     <TestDependsOn Condition=" '$(_RunBuild)' == 'true' ">$(TestDependsOn);Compile</TestDependsOn>
     <TestDependsOn>$(TestDependsOn);TestProjects</TestDependsOn>
 
+    <BuildDependsOn Condition="'$(CI)' == 'true'">$(BuildDependsOn);GenerateBuildAssetManifest</BuildDependsOn>
+
     <!-- Package modification must happen before code signing. -->
     <CodeSignDependsOn>$(CodeSignDependsOn);RemoveSharedFrameworkOnlyRefsFromNuspec</CodeSignDependsOn>
   </PropertyGroup>
@@ -71,7 +73,7 @@
       <ProjectListContent>
       <![CDATA[
 <!--
-  This file is automatically generated. Run `build.cmd /t:GenerateProjectList` to update.
+  This file is automatically generated. Run `./eng/scripts/GenerateProjectList.ps1` to update.
 
   This file contains a map of assembly names to the projects that build them.
 -->

+ 2 - 2
build/tasks/RepoTasks.csproj

@@ -4,7 +4,7 @@
   <PropertyGroup>
     <TargetFramework Condition="'$(MSBuildRuntimeType)' == 'Core' ">netcoreapp2.2</TargetFramework>
     <TargetFramework Condition="'$(MSBuildRuntimeType)' != 'Core' ">net461</TargetFramework>
-    <DefineConstants Condition="'$(BuildWindowsInstallers)' == 'true'">$(DefineConstants);BUILD_MSI_TASKS</DefineConstants>
+    <DefineConstants Condition="'$(BuildInstallers)' == 'true' AND '$(TargetOsName)' == 'win'">$(DefineConstants);BUILD_MSI_TASKS</DefineConstants>
     <DefineConstants Condition="'$(PublishToAzureFeed)' == 'true'">$(DefineConstants);BUILD_AZ_TASKS</DefineConstants>
     <DisablePackageReferenceRestrictions>true</DisablePackageReferenceRestrictions>
   </PropertyGroup>
@@ -16,7 +16,7 @@
     <PackageReference Include="WindowsAzure.Storage" Version="8.7.0" Condition="'$(PublishToAzureFeed)' == 'true'" />
   </ItemGroup>
 
-  <ItemGroup Condition="'$(BuildWindowsInstallers)' == 'true'">
+  <ItemGroup Condition="'$(BuildInstallers)' == 'true' AND '$(TargetOsName)' == 'win'">
     <PackageReference Include="Wix" Version="3.11.1" />
 
     <Reference Include="Microsoft.Deployment.WindowsInstaller">

+ 2 - 1
docs/BuildFromSource.md

@@ -167,7 +167,8 @@ Property                 | Description
 -------------------------|-------------------------------------------------------------------------------------------------------------
 BuildNumberSuffix        | (string). A specific build number, typically from a CI counter, which is appended to the pre-release label.
 Configuration            | `Debug` or `Release`. Default = `Debug`.
-SharedFxRID              | The runtime identifier of the shared framework.
+TargetArchitecture       | The CPU architecture to build for (x64, x86, arm, arm64).
+TargetOsName             | The base runtime identifier to build for (win, linux, osx, linux-musl).
 
 ## Use the result of your build
 

+ 1 - 2
eng/ProjectReferences.props

@@ -1,5 +1,5 @@
 <!--
-  This file is automatically generated. Run `build.cmd /t:GenerateProjectList` to update.
+  This file is automatically generated. Run `./eng/scripts/GenerateProjectList.ps1` to update.
 
   This file contains a map of assembly names to the projects that build them.
 -->
@@ -125,7 +125,6 @@
     <ProjectReferenceProvider Include="Microsoft.AspNetCore.Blazor" ProjectPath="$(RepositoryRoot)src\Components\Blazor\Blazor\src\Microsoft.AspNetCore.Blazor.csproj" />
     <ProjectReferenceProvider Include="Microsoft.AspNetCore.Blazor.Build" ProjectPath="$(RepositoryRoot)src\Components\Blazor\Build\src\Microsoft.AspNetCore.Blazor.Build.csproj" />
     <ProjectReferenceProvider Include="Microsoft.AspNetCore.Blazor.Server" ProjectPath="$(RepositoryRoot)src\Components\Blazor\Server\src\Microsoft.AspNetCore.Blazor.Server.csproj" />
-    <ProjectReferenceProvider Include="Microsoft.AspNetCore.Components.Browser.JS" ProjectPath="$(RepositoryRoot)src\Components\Browser.JS\src\Microsoft.AspNetCore.Components.Browser.JS.csproj" />
     <ProjectReferenceProvider Include="Microsoft.AspNetCore.Components.Browser" ProjectPath="$(RepositoryRoot)src\Components\Browser\src\Microsoft.AspNetCore.Components.Browser.csproj" />
     <ProjectReferenceProvider Include="Microsoft.AspNetCore.Components.Build" ProjectPath="$(RepositoryRoot)src\Components\Build\src\Microsoft.AspNetCore.Components.Build.csproj" />
     <ProjectReferenceProvider Include="Microsoft.AspNetCore.Components" ProjectPath="$(RepositoryRoot)src\Components\Components\src\Microsoft.AspNetCore.Components.csproj" />

+ 1 - 1
eng/Versions.props

@@ -109,7 +109,7 @@
   </PropertyGroup>
   <PropertyGroup Label="Build tool dependencies">
     <InternalAspNetCoreSdkPackageVersion>$(KoreBuildVersion)</InternalAspNetCoreSdkPackageVersion>
-    <InternalAspNetCoreSdkPackageVersion Condition=" '$(KoreBuildVersion)' == '' ">3.0.0-build-20190128.3</InternalAspNetCoreSdkPackageVersion>
+    <InternalAspNetCoreSdkPackageVersion Condition=" '$(KoreBuildVersion)' == '' ">3.0.0-build-20190130.1</InternalAspNetCoreSdkPackageVersion>
     <MicrosoftNETFrameworkReferenceAssembliesPackageVersion>1.0.0-alpha-004</MicrosoftNETFrameworkReferenceAssembliesPackageVersion>
     <MicrosoftNETTestSdkPackageVersion>15.9.0</MicrosoftNETTestSdkPackageVersion>
   </PropertyGroup>

+ 3 - 7
eng/scripts/CodeCheck.ps1

@@ -26,7 +26,7 @@ try {
     #
 
     if ($ci) {
-        & $repoRoot/build.cmd /t:InstallDotNet
+        & $repoRoot/build.ps1 -ci /t:InstallDotNet
     }
 
     Write-Host "Checking that solutions are up to date"
@@ -56,13 +56,9 @@ try {
 
     Write-Host "Re-running code generation"
 
-    Write-Host "Re-generating ProjectReference.props"
+    Write-Host "Re-generating project lists"
     Invoke-Block {
-        [string[]] $generateArgs = @()
-        if ($ci) {
-            $generateArgs += '-ci'
-        }
-        & $repoRoot/build.cmd /t:GenerateProjectList @generateArgs
+        & $PSScriptRoot\GenerateProjectList.ps1 -ci:$ci
     }
 
     Write-Host "Re-generating package baselines"

+ 8 - 0
eng/scripts/GenerateProjectList.ps1

@@ -0,0 +1,8 @@
+param(
+    [switch]$ci
+)
+$ErrorActionPreference = 'stop'
+
+$repoRoot = Resolve-Path "$PSScriptRoot/../.."
+
+& "$repoRoot\build.ps1" -ci:$ci -all /t:GenerateProjectList

+ 1 - 1
eng/scripts/cibuild.cmd

@@ -1,3 +1,3 @@
 @ECHO OFF
 SET RepoRoot=%~dp0..\..
-%RepoRoot%\build.cmd -ci -all -restore -build -pack -test -sign %*
+%RepoRoot%\build.cmd -ci -all -pack -sign %*

+ 1 - 1
eng/scripts/cibuild.sh

@@ -6,4 +6,4 @@ export PATH="$PATH:$HOME/nginxinstall/sbin/"
 
 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 repo_root="$DIR/../.."
-"$repo_root/build.sh" --ci --all --restore --build --pack --test "$@"
+"$repo_root/build.sh" --ci --all --pack "$@"

+ 2 - 1
eng/signcheck.exclusions.txt

@@ -1,4 +1,5 @@
-content/sdk/*/AppHostTemplate/apphost.exe;AspNetCoreRuntime.*.nupkg; Exclude the apphost because this is expected to be code-signed by customers after the SDK modifies it.
+*/AppHostTemplate/apphost.exe;AspNetCoreRuntime.*.nupkg; Exclude the apphost because this is expected to be code-signed by customers after the SDK modifies it.
+*/runtime.*.microsoft.netcore.dotnetapphost/*/apphost.exe;Microsoft.AspNetCore.AzureAppServices.SiteExtension.*.nupkg; Exclude the apphost because this is expected to be code-signed by customers after the SDK modifies it.
 *.js;; Exclude all JavaScript files from codesigning because we don't expect these to run on Windows Script Host
 *.binlog;; Exclude msbuild log files
 *.symbols.nupkg;; Exclude NuGet symbols packages. These are not shipped to customers and should not be code signed.

+ 1 - 0
eng/targets/ResolveIisReferences.targets

@@ -13,6 +13,7 @@ with the right MSBuild incantations to get output copied to the right place.
         <ProjectReference Include="@(NativeProjectReference)">
           <!-- Set the arch-->
           <SetPlatform>Platform=%(Platform)</SetPlatform>
+          <SetPlatform Condition="'%(Platform)' == 'x86'">Platform=Win32</SetPlatform>
           <!-- The base path for the output. -->
           <LinkBase>%(Platform)\%(HandlerPath)\</LinkBase>
           <!-- This reference assembly doesn't need -->

+ 0 - 28
eng/targets/RuntimeIdentifiers.props

@@ -1,28 +0,0 @@
-<Project>
-  <!-- Runtime identifiers -->
-  <PropertyGroup>
-    <!-- Defines the runtime identifier of the shared framework -->
-    <SharedFxRid Condition=" '$(SharedFxRid)' == '' AND $([MSBuild]::IsOSPlatform('Windows'))">win-x64</SharedFxRid>
-    <SharedFxRid Condition=" '$(SharedFxRid)' == '' AND $([MSBuild]::IsOSPlatform('OSX'))">osx-x64</SharedFxRid>
-    <SharedFxRid Condition=" '$(SharedFxRid)' == '' AND $([MSBuild]::IsOSPlatform('Linux'))">linux-x64</SharedFxRid>
-
-    <SharedFxArchitecture Condition="'$(SharedFxArchitecture)' == ''">$(SharedFxRid.Substring($([MSBuild]::Add($(SharedFxRid.LastIndexOf('-')), 1))))</SharedFxArchitecture>
-
-    <!-- Defines the default RID of the platform currently running the build. -->
-    <HostRid Condition=" '$(HostRid)' == '' AND $([MSBuild]::IsOSPlatform('Windows'))">win-x64</HostRid>
-    <HostRid Condition=" '$(HostRid)' == '' AND $([MSBuild]::IsOSPlatform('OSX'))">osx-x64</HostRid>
-    <HostRid Condition=" '$(HostRid)' == '' AND $([MSBuild]::IsOSPlatform('Linux'))">linux-x64</HostRid>
-
-    <!-- This defines the list of RIDs supported by the ASP.NET Core shared framework. -->
-    <SupportedRuntimeIdentifiers>
-      win-x64;
-      win-x86;
-      win-arm;
-      osx-x64;
-      linux-musl-x64;
-      linux-x64;
-      linux-arm;
-      linux-arm64
-    </SupportedRuntimeIdentifiers>
-  </PropertyGroup>
-</Project>

+ 1 - 1
eng/tools/XplatPackageSigner/sign-packages.cmd

@@ -12,4 +12,4 @@ IF "%DirToSign%"=="" (
 SET RepoRoot=%~dp0..\..\..
 SET Project=%~dp0\XplatPackageSigner.proj
 
-%RepoRoot%\build.cmd "-restore:$false" -projects %project% /p:DirectoryToSign=%DirToSign% /bl:%RepoRoot%\artifacts\logs\XplatSign.binlog
+%RepoRoot%\build.cmd -NoRestore -projects %project% /p:DirectoryToSign=%DirToSign% /bl:%RepoRoot%\artifacts\logs\XplatSign.binlog

+ 1 - 1
global.json

@@ -3,6 +3,6 @@
     "version": "3.0.100-preview-009750"
   },
   "msbuild-sdks": {
-    "Internal.AspNetCore.Sdk": "3.0.0-build-20190128.3"
+    "Internal.AspNetCore.Sdk": "3.0.0-build-20190130.1"
   }
 }

+ 2 - 2
korebuild-lock.txt

@@ -1,2 +1,2 @@
-version:3.0.0-build-20190128.3
-commithash:59917974421fcb1511c1395fd8f4f114c792a635
+version:3.0.0-build-20190130.1
+commithash:3b24877488f6bbff779aa3bd66fcffb4a6c04daf

+ 1 - 1
restore.cmd

@@ -1,2 +1,2 @@
 @ECHO OFF
-PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0build.ps1' -all -restore:$true -build:$False %*; exit $LASTEXITCODE"
+PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0build.ps1' -all -nobuild -restore %*; exit $LASTEXITCODE"

+ 3 - 1
src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.csproj

@@ -10,6 +10,8 @@
 
   <!-- Pack settings -->
   <PropertyGroup>
+    <!-- Producing this package requires building with NodeJS enabled. -->
+    <IsPackable Condition="'$(BuildNodeJS)' == 'false'">false</IsPackable>
     <NoPackageAnalysis>true</NoPackageAnalysis>
     <NuspecFile>Microsoft.AspNetCore.Blazor.Build.nuspec</NuspecFile>
     <IntermediatePackDir>obj\publish\</IntermediatePackDir>
@@ -35,7 +37,7 @@
   </Target>
 
   <ItemGroup>
-    <Reference Include="Microsoft.AspNetCore.Components.Browser.JS" />
+    <ProjectReference Condition="'$(BuildNodeJS)' != 'false'" Include="$(RepositoryRoot)src\Components\Browser.JS\src\Microsoft.AspNetCore.Components.Browser.JS.npmproj" ReferenceOutputAssembly="false" />
     <Reference Include="Microsoft.AspNetCore.Components" />
     <Reference Include="Microsoft.Extensions.CommandLineUtils.Sources" PrivateAssets="All" />
     <Reference Include="Microsoft.Extensions.FileProviders.Composite" />

+ 0 - 34
src/Components/Browser.JS/src/Microsoft.AspNetCore.Components.Browser.JS.csproj

@@ -1,34 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-
-  <PropertyGroup>
-    <TargetFramework>netstandard2.0</TargetFramework>
-    <Description>JavaScript runtime files needed for ASP.NET Core Components browser rendering.</Description>
-    <TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
-    <TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
-    <DefaultItemExcludes>${DefaultItemExcludes};node_modules\**</DefaultItemExcludes>
-    <IsPackable>false</IsPackable>
-
-    <!-- VS's FastUpToDateCheck doesn't consider .ts file changes, so it's necessary to disable it to get incremental builds to work correctly (albeit not as fast as if FastUpToDateCheck did work for them) -->
-    <DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
-  </PropertyGroup>
-
-  <ItemGroup>
-    <Reference Include="Microsoft.Extensions.FileProviders.Embedded" />
-    <WebpackInputs Include="**\*.ts" Exclude="node_modules\**" />
-  </ItemGroup>
-
-  <Target Name="EnsureNpmRestored" Condition="!Exists('node_modules')">
-    <Message Importance="high" Text="Restoring dependencies using 'npm'. This may take several minutes..." />
-    <Exec Command="npm ci" />
-  </Target>
-
-  <Target Name="RunWebpack" AfterTargets="ResolveReferences" Inputs="@(WebpackInputs)" Outputs="dist\components.webassembly.js;dist\components.server.js" DependsOnTargets="EnsureNpmRestored">
-    <RemoveDir Directories="dist" />
-    <Exec Command="npm run build:debug" Condition="'$(Configuration)' == 'Debug'" />
-    <Exec Command="npm run build:production" Condition="'$(Configuration)' != 'Debug'" />
-    <ItemGroup>
-      <EmbeddedResource Include="dist\components.webassembly.js" LogicalName="blazor./components.webassembly.js" />
-      <EmbeddedResource Include="dist\components.server.js" LogicalName="blazor./components.server.js" />
-    </ItemGroup>
-  </Target>
-</Project>

+ 24 - 0
src/Components/Browser.JS/src/Microsoft.AspNetCore.Components.Browser.JS.npmproj

@@ -0,0 +1,24 @@
+<Project DefaultTargets="Build">
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
+
+  <PropertyGroup>
+    <IsTestProject>false</IsTestProject>
+    <IsPackable>false</IsPackable>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <WebpackInputs Include="**\*.ts" Exclude="node_modules\**" />
+  </ItemGroup>
+
+  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
+
+  <!-- Override the default 'Build' target from eng/targets/Npm.Common.targets. -->
+  <Target Name="Build"
+          Inputs="@(WebpackInputs)"
+          Outputs="dist\components.webassembly.js;dist\components.server.js">
+    <RemoveDir Directories="dist" />
+    <Exec Command="npm run build:debug" Condition="'$(Configuration)' == 'Debug'" />
+    <Exec Command="npm run build:production" Condition="'$(Configuration)' != 'Debug'" />
+  </Target>
+
+</Project>

+ 0 - 17
src/Components/Components.sln

@@ -43,10 +43,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Browser", "Browser", "{A27F
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Browser", "Browser\src\Microsoft.AspNetCore.Components.Browser.csproj", "{3B1A56F8-B3E0-4F33-A717-50BDD4FBE12E}"
 EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Browser.JS", "Browser.JS", "{11F9B329-F22E-4AD3-AB38-98C55C2DC54C}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Browser.JS", "Browser.JS\src\Microsoft.AspNetCore.Components.Browser.JS.csproj", "{E52044BD-17D3-483D-8F1D-BE9C9F091CCD}"
-EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{2639736B-94BF-4A6C-AFAE-E9A44FF04CD0}"
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Build", "Build\src\Microsoft.AspNetCore.Components.Build.csproj", "{74759A1D-159F-4B66-9FC1-7BE3F0DF2B2B}"
@@ -415,18 +411,6 @@ Global
 		{3B1A56F8-B3E0-4F33-A717-50BDD4FBE12E}.Release|x64.Build.0 = Release|Any CPU
 		{3B1A56F8-B3E0-4F33-A717-50BDD4FBE12E}.Release|x86.ActiveCfg = Release|Any CPU
 		{3B1A56F8-B3E0-4F33-A717-50BDD4FBE12E}.Release|x86.Build.0 = Release|Any CPU
-		{E52044BD-17D3-483D-8F1D-BE9C9F091CCD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{E52044BD-17D3-483D-8F1D-BE9C9F091CCD}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{E52044BD-17D3-483D-8F1D-BE9C9F091CCD}.Debug|x64.ActiveCfg = Debug|Any CPU
-		{E52044BD-17D3-483D-8F1D-BE9C9F091CCD}.Debug|x64.Build.0 = Debug|Any CPU
-		{E52044BD-17D3-483D-8F1D-BE9C9F091CCD}.Debug|x86.ActiveCfg = Debug|Any CPU
-		{E52044BD-17D3-483D-8F1D-BE9C9F091CCD}.Debug|x86.Build.0 = Debug|Any CPU
-		{E52044BD-17D3-483D-8F1D-BE9C9F091CCD}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{E52044BD-17D3-483D-8F1D-BE9C9F091CCD}.Release|Any CPU.Build.0 = Release|Any CPU
-		{E52044BD-17D3-483D-8F1D-BE9C9F091CCD}.Release|x64.ActiveCfg = Release|Any CPU
-		{E52044BD-17D3-483D-8F1D-BE9C9F091CCD}.Release|x64.Build.0 = Release|Any CPU
-		{E52044BD-17D3-483D-8F1D-BE9C9F091CCD}.Release|x86.ActiveCfg = Release|Any CPU
-		{E52044BD-17D3-483D-8F1D-BE9C9F091CCD}.Release|x86.Build.0 = Release|Any CPU
 		{74759A1D-159F-4B66-9FC1-7BE3F0DF2B2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{74759A1D-159F-4B66-9FC1-7BE3F0DF2B2B}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{74759A1D-159F-4B66-9FC1-7BE3F0DF2B2B}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -1373,7 +1357,6 @@ Global
 		{1C4BF2D3-44A8-4A71-B031-15B983663CB0} = {A7ABAC29-F73F-456D-AE54-46842CFC2E10}
 		{C0FFB29E-4696-4875-9039-E5FA1AC5A42A} = {A7ABAC29-F73F-456D-AE54-46842CFC2E10}
 		{3B1A56F8-B3E0-4F33-A717-50BDD4FBE12E} = {A27FF193-195B-4474-8E6C-840B2E339373}
-		{E52044BD-17D3-483D-8F1D-BE9C9F091CCD} = {11F9B329-F22E-4AD3-AB38-98C55C2DC54C}
 		{74759A1D-159F-4B66-9FC1-7BE3F0DF2B2B} = {2639736B-94BF-4A6C-AFAE-E9A44FF04CD0}
 		{35A8AE1D-ED82-485E-A8E6-A357B3CB31B3} = {3D9B9B2C-E379-41BD-83D4-2E099FBDA107}
 		{8D49A92D-B4AA-4A5C-99C1-B4DCBD5491DD} = {3D9B9B2C-E379-41BD-83D4-2E099FBDA107}

+ 8 - 2
src/Components/Server/src/Microsoft.AspNetCore.Components.Server.csproj

@@ -7,6 +7,12 @@
     <GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
   </PropertyGroup>
 
+  <!-- Producing this package requires building with NodeJS enabled. -->
+  <PropertyGroup Condition="'$(BuildNodeJS)' == 'false'">
+    <IsPackable>false</IsPackable>
+    <GenerateEmbeddedFilesManifest>false</GenerateEmbeddedFilesManifest>
+  </PropertyGroup>
+
   <ItemGroup>
     <Compile Include="$(ComponentsSharedSourceRoot)\src\ConventionBasedStartup.cs" Link="Hosting\ConventionBasedStartup.cs" />
     <Compile Include="$(ComponentsSharedSourceRoot)\src\IBlazorStartup.cs" Link="Hosting\IBlazorStartup.cs" />
@@ -21,9 +27,9 @@
     <Reference Include="Microsoft.Extensions.FileProviders.Embedded" />
   </ItemGroup>
 
-  <ItemGroup>
+  <ItemGroup Condition="'$(BuildNodeJS)' != 'false'">
     <!-- We need .Browser.JS to build first so we can embed its .js output -->
-    <ProjectReference Include="..\..\Browser.JS\src\Microsoft.AspNetCore.Components.Browser.JS.csproj" ReferenceOutputAssembly="false" />
+    <ProjectReference Include="..\..\Browser.JS\src\Microsoft.AspNetCore.Components.Browser.JS.npmproj" ReferenceOutputAssembly="false" />
     <EmbeddedResource Include="..\..\Browser.JS\src\dist\components.server.js" LogicalName="frameworkFiles\%(Filename)%(Extension)" />
   </ItemGroup>
 

+ 1 - 1
src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netcoreapp3.0</TargetFramework>
-    <DefaultItemExcludes>${DefaultItemExcludes};node_modules\**</DefaultItemExcludes>
+    <DefaultItemExcludes>$(DefaultItemExcludes);node_modules\**</DefaultItemExcludes>
     <!-- WebDriver is not strong-named signed -->
     <SignAssembly>false</SignAssembly>
 

+ 11 - 14
src/Framework/src/Microsoft.AspNetCore.App.shfxproj

@@ -1,25 +1,26 @@
 <Project>
   <PropertyGroup>
-    <TargetFramework>netcoreapp3.0</TargetFramework>
+    <OutputPath>$(RepositoryRoot)bin\fx\$(TargetOsName)\$(TargetArchitecture)\$(MSBuildProjectName)\</OutputPath>
+    <BaseIntermediateOutputPath>$(RepositoryRoot)obj\fx\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
+  </PropertyGroup>
+
+  <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
+
+  <PropertyGroup>
+    <RuntimeIdentifier>$(TargetRuntimeIdentifier)</RuntimeIdentifier>
+    <TargetFramework>netcoreapp$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion)</TargetFramework>
     <BaseSharedFrameworkName>Microsoft.NETCore.App</BaseSharedFrameworkName>
     <RuntimeFrameworkVersion>$(MicrosoftNETCoreAppPackageVersion)</RuntimeFrameworkVersion>
 
-    <OutputPath>$(RepositoryRoot)bin\fx\$(SharedFxRid)\$(MSBuildProjectName)\</OutputPath>
-    <BaseIntermediateOutputPath>$(RepositoryRoot)obj\fx\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
-
     <!-- shfxproj must be explicit about its dependencies. -->
     <DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
 
-    <RuntimeIdentifier Condition="'$(RuntimeIdentifier)' == ''">$(SharedFxRID)</RuntimeIdentifier>
-    <RuntimeIdentifier Condition="'$(RuntimeIdentifier)' == ''">$(HostRid)</RuntimeIdentifier>
-    <SharedFxRid Condition="'$(SharedFxRid)' == ''">$(RuntimeIdentifier)</SharedFxRid>
-
     <!-- Optimize the framework using the crossgen tool -->
     <CrossgenOutput>true</CrossgenOutput>
 
     <!-- Produce crossgen symbols when running the crossgen tool -->
     <CrossgenSymbolsOutput>true</CrossgenSymbolsOutput>
-    <CrossgenSymbolsOutput Condition=" '$(CrossgenOutput)' == 'false' OR '$(SharedFxRid)' == 'osx-x64'">false</CrossgenSymbolsOutput>
+    <CrossgenSymbolsOutput Condition=" '$(CrossgenOutput)' == 'false' OR '$(TargetOsName)' == 'osx'">false</CrossgenSymbolsOutput>
 
     <!-- Always generated, even though output type == Library -->
     <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
@@ -35,13 +36,9 @@
     <CopyBuildOutputToPublishDirectory>false</CopyBuildOutputToPublishDirectory>
     <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
     <IncludeMainProjectInDepsFile>false</IncludeMainProjectInDepsFile>
-  </PropertyGroup>
 
-  <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
-
-  <PropertyGroup>
     <!-- The runtime Package ID is for self-contained assets. -->
-    <PackageId>runtime.$(SharedFxRid).$(MSBuildProjectName)</PackageId>
+    <PackageId>runtime.$(TargetRuntimeIdentifier).$(MSBuildProjectName)</PackageId>
     <PackageDescription>This package provides assets used for self-contained deployments of an ASP.NET Core application. It is an internal implementation package not meant for direct consumption. Please do not reference directly.
 
 $(MSBuildProjectName) provides a default set of APIs for building an ASP.NET Core application.

+ 19 - 29
src/Framework/src/SharedFx.targets

@@ -49,26 +49,16 @@ This targets file should only be imported by .shfxproj files.
     <!-- The name of the shared framework. -->
     <SharedFxName Condition=" '$(SharedFxName)' == '' ">$(MSBuildProjectName)</SharedFxName>
 
-    <!--
-      Defines the base RID for a vertical of related runtimes, e.g. Windows, macOS, Linux.
-      This is used during runtime graph generation to determine which RIDs to include in the .deps.json file.
-    -->
-    <BaseSharedFxRid Condition="$(SharedFxRid.StartsWith('win'))">win</BaseSharedFxRid>
-    <BaseSharedFxRid Condition="$(SharedFxRid.StartsWith('osx'))">osx</BaseSharedFxRid>
-    <BaseSharedFxRid Condition="$(SharedFxRid.StartsWith('linux')) AND ! $(SharedFxRid.StartsWith('linux-musl')) ">linux</BaseSharedFxRid>
-    <BaseSharedFxRid Condition="$(SharedFxRid.StartsWith('linux-musl'))">linux-musl</BaseSharedFxRid>
-    <BaseSharedFxRid Condition="'$(BaseSharedFxRid)' == '' ">unix</BaseSharedFxRid>
-
-    <LibPrefix Condition=" '$(BaseSharedFxRid)' != 'win' ">lib</LibPrefix>
+    <LibPrefix Condition=" '$(TargetOsName)' != 'win' ">lib</LibPrefix>
     <LibExtension>.so</LibExtension>
-    <LibExtension Condition=" '$(BaseSharedFxRid)' == 'win' ">.dll</LibExtension>
-    <LibExtension Condition=" '$(BaseSharedFxRid)' == 'osx' ">.dylib</LibExtension>
-    <ExeExtension Condition=" '$(BaseSharedFxRid)' == 'win' ">.exe</ExeExtension>
+    <LibExtension Condition=" '$(TargetOsName)' == 'win' ">.dll</LibExtension>
+    <LibExtension Condition=" '$(TargetOsName)' == 'osx' ">.dylib</LibExtension>
+    <ExeExtension Condition=" '$(TargetOsName)' == 'win' ">.exe</ExeExtension>
     <!-- 3B = semicolon in ASCII -->
     <PathSeparator Condition="'$(PathSeparator)' == ''">:</PathSeparator>
-    <PathSeparator Condition=" '$(BaseSharedFxRid)' == 'win' ">%3B</PathSeparator>
+    <PathSeparator Condition=" '$(TargetOsName)' == 'win' ">%3B</PathSeparator>
 
-    <IntermediateOutputPath>$(IntermediateOutputPath)$(SharedFxRid)\</IntermediateOutputPath>
+    <IntermediateOutputPath>$(IntermediateOutputPath)$(TargetRuntimeIdentifier)\</IntermediateOutputPath>
 
     <!-- Override the SDK Default for this location for copying published output. -->
     <PublishDir>$(IntermediateOutputPath)u\</PublishDir>
@@ -85,13 +75,13 @@ This targets file should only be imported by .shfxproj files.
     <CrossGenToolDir>$(IntermediateOutputPath)crossgen\</CrossGenToolDir>
     <!-- Crossgen executable name -->
     <CrossGenExecutable>crossgen</CrossGenExecutable>
-    <CrossGenExecutable Condition=" '$(BaseSharedFxRid)' == 'win' ">$(CrossGenExecutable).exe</CrossGenExecutable>
+    <CrossGenExecutable Condition=" '$(TargetOsName)' == 'win' ">$(CrossGenExecutable).exe</CrossGenExecutable>
     <!-- Default crossgen executable relative path -->
     <CrossGenTool>$(CrossGenExecutable)</CrossGenTool>
     <!-- Disambiguated RID-specific crossgen executable relative path -->
-    <CrossGenTool Condition=" '$(SharedFxRid)' == 'linux-arm' ">x64_arm\$(CrossGenTool)</CrossGenTool>
-    <CrossGenTool Condition=" '$(SharedFxRid)' == 'linux-arm64' ">x64_arm64\$(CrossGenTool)</CrossGenTool>
-    <CrossGenTool Condition=" '$(SharedFxRid)' == 'win-arm' ">x86_arm\$(CrossGenTool)</CrossGenTool>
+    <CrossGenTool Condition=" '$(TargetRuntimeIdentifier)' == 'linux-arm' ">x64_arm\$(CrossGenTool)</CrossGenTool>
+    <CrossGenTool Condition=" '$(TargetRuntimeIdentifier)' == 'linux-arm64' ">x64_arm64\$(CrossGenTool)</CrossGenTool>
+    <CrossGenTool Condition=" '$(TargetRuntimeIdentifier)' == 'win-arm' ">x86_arm\$(CrossGenTool)</CrossGenTool>
 
     <!-- Map BaseSharedFrameworkName into properties used by the SDK to determine publish output trimming and deps.json generation -->
     <MicrosoftNETPlatformLibrary>$(BaseSharedFrameworkName)</MicrosoftNETPlatformLibrary>
@@ -150,18 +140,18 @@ This targets file should only be imported by .shfxproj files.
     <Error Condition=" '$(BaseSharedFrameworkName)' == '' "
            Text="Missing required property: BaseSharedFrameworkName. Shared frameworks must specify which framework is used at the base." />
 
-    <Error Condition=" '$(SharedFxRid)' == '' "
-           Text="Missing required property: SharedFxRid. Shared frameworks are rid-specific, so this must be set." />
+    <Error Condition=" '$(TargetRuntimeIdentifier)' == '' "
+           Text="Missing required property: TargetRuntimeIdentifier. Shared frameworks are rid-specific, so this must be set." />
 
     <ItemGroup>
       <_UnknownRid Remove="@(_UnknownRid)" />
-      <_UnknownRid Include="$(SharedFxRid)" Exclude="$(SupportedRuntimeIdentifiers)" />
+      <_UnknownRid Include="$(TargetRuntimeIdentifier)" Exclude="$(SupportedRuntimeIdentifiers)" />
     </ItemGroup>
 
     <Error Condition=" '@(_UnknownRid)' != '' "
-           Text="&quot;$(SharedFxRid)&quot; not acceptable runtime identifier. Please specify an acceptable value: {$(SupportedRuntimeIdentifiers)}." />
+           Text="&quot;$(TargetRuntimeIdentifier)&quot; not acceptable runtime identifier. Please specify an acceptable value: {$(SupportedRuntimeIdentifiers)}." />
 
-    <Message Importance="High" Text="Building $(SharedFxName) (fx: $(SharedFxRid))" />
+    <Message Importance="High" Text="Building $(SharedFxName) (fx: $(TargetRuntimeIdentifier))" />
   </Target>
 
   <Target Name="PrepareOutputPaths">
@@ -193,12 +183,12 @@ This targets file should only be imported by .shfxproj files.
       DepsFilePath="$(PublishDepsFilePath)"
       DepsFileOutputPath="$(SharedFxDepsFilePath)"
       PlatformManifestOutputPath="$(PlatformManifestOutputPath)"
-      BaseRuntimeIdentifier="$(BaseSharedFxRid)" />
+      BaseRuntimeIdentifier="$(TargetOsName)" />
   </Target>
 
   <!-- Optimizes shared framework output -->
   <Target Name="CollectSharedFxOutput" DependsOnTargets="$(CollectOutputSharedFxDependsOn)">
-    <Message Importance="High" Text="$(SharedFxName) (fx: $(SharedFxRid)) -> $(OutputPath)" />
+    <Message Importance="High" Text="$(SharedFxName) (fx: $(TargetRuntimeIdentifier)) -> $(OutputPath)" />
   </Target>
 
   <!-- Prepare the project to run crossgen. -->
@@ -229,7 +219,7 @@ This targets file should only be imported by .shfxproj files.
       <RuntimePackage Include="@(PackageDefinitions)" Condition="$([System.String]::new('%(PackageDefinitions.Name)').Contains('runtime')) AND $([System.String]::new('%(PackageDefinitions.Name)').Contains('$(RuntimePackageName)'))" />
     </ItemGroup>
 
-    <Error Text="Could not identify the crossgen package for $(SharedFxRid)" Condition="@(RuntimePackage->Count()) == 0" />
+    <Error Text="Could not identify the crossgen package for $(TargetRuntimeIdentifier)" Condition="@(RuntimePackage->Count()) == 0" />
 
     <ItemGroup>
       <RuntimePackageFiles Include="%(RuntimePackage.ResolvedPath)\runtimes\**\*" />
@@ -339,7 +329,7 @@ This targets file should only be imported by .shfxproj files.
         id=$(PackageId);
         version=$(PackageVersion);
         authors=$(Authors);
-        rid=$(SharedFxRid);
+        rid=$(TargetRuntimeIdentifier);
         description=$(PackageDescription);
         tags=$(PackageTags.Replace(';', ' '));
         licenseUrl=$(PackageLicenseUrl);

+ 2 - 2
src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj

@@ -13,8 +13,8 @@
       <_Parameter2>$(PackageVersion)</_Parameter2>
     </AssemblyAttribute>
     <AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
-      <_Parameter1>SharedFxRid</_Parameter1>
-      <_Parameter2>$(SharedFxRid)</_Parameter2>
+      <_Parameter1>TargetRuntimeIdentifier</_Parameter1>
+      <_Parameter2>$(TargetRuntimeIdentifier)</_Parameter2>
     </AssemblyAttribute>
     <AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
       <_Parameter1>RepositoryCommit</_Parameter1>

+ 1 - 1
src/Framework/test/TestData.cs

@@ -14,7 +14,7 @@ namespace Microsoft.AspNetCore
 
         public static string GetRepositoryCommit() => GetTestDataValue("RepositoryCommit");
 
-        public static string GetSharedFxRuntimeIdentifier() => GetTestDataValue("SharedFxRid");
+        public static string GetSharedFxRuntimeIdentifier() => GetTestDataValue("TargetRuntimeIdentifier");
 
         public static string GetSharedFxDependencies() => GetTestDataValue("SharedFxDependencies");
 

+ 3 - 4
src/Hosting/Server.IntegrationTesting/src/ApplicationPublisher.cs

@@ -35,9 +35,8 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting
                                  + $" --output \"{publishDirectory.FullName}\""
                                  + $" --framework {deploymentParameters.TargetFramework}"
                                  + $" --configuration {deploymentParameters.Configuration}"
-                                 + " --no-restore -p:VerifyMatchingImplicitPackageVersion=false";
-                // Set VerifyMatchingImplicitPackageVersion to disable errors when Microsoft.NETCore.App's version is overridden externally
-                // This verification doesn't matter if we are skipping restore during tests.
+                                 + $" /p:TargetArchitecture={deploymentParameters.RuntimeArchitecture}"
+                                 + " --no-restore";
 
                 if (deploymentParameters.ApplicationType == ApplicationType.Standalone)
                 {
@@ -127,4 +126,4 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting
             return target;
         }
     }
-}
+}

+ 2 - 2
src/Installers/Archive/Archive.Internal.zipproj

@@ -9,8 +9,8 @@
 
   <PropertyGroup>
     <!-- Use a short folder name to avoid MAX_PATH issues on Windows -->
-    <IntermediateOutputPath>$(RepositoryRoot)obj\ai\$(SharedFxRid)\</IntermediateOutputPath>
-    <OutputFileName>$(InternalInstallerBaseName)-$(PackageVersion)-$(SharedFxRid)$(ArchiveExtension)</OutputFileName>
+    <IntermediateOutputPath>$(RepositoryRoot)obj\ai\$(TargetRuntimeIdentifier)\</IntermediateOutputPath>
+    <OutputFileName>$(InternalInstallerBaseName)-$(PackageVersion)-$(TargetRuntimeIdentifier)$(ArchiveExtension)</OutputFileName>
     <OutputPath>$(InstallersOutputPath)</OutputPath>
     <TargetPath>$(InstallersOutputPath)$(OutputFileName)</TargetPath>
   </PropertyGroup>

+ 4 - 4
src/Installers/Archive/Archive.Redist.zipproj

@@ -9,18 +9,18 @@
   <PropertyGroup>
     <!-- Use a short folder name to avoid MAX_PATH issues on Windows -->
     <BaseIntermediateOutputPath>$(RepositoryRoot)obj\ar\</BaseIntermediateOutputPath>
-    <IntermediateOutputPath>$(BaseIntermediateOutputPath)$(SharedFxRid)\</IntermediateOutputPath>
-    <OutputFileName>$(RuntimeInstallerBaseName)-$(PackageVersion)-$(SharedFxRid)$(ArchiveExtension)</OutputFileName>
+    <IntermediateOutputPath>$(BaseIntermediateOutputPath)$(TargetRuntimeIdentifier)\</IntermediateOutputPath>
+    <OutputFileName>$(RuntimeInstallerBaseName)-$(PackageVersion)-$(TargetRuntimeIdentifier)$(ArchiveExtension)</OutputFileName>
     <OutputPath>$(InstallersOutputPath)</OutputPath>
     <TargetPath>$(InstallersOutputPath)$(OutputFileName)</TargetPath>
-    <DotNetRuntimeArchiveFileName>dotnet-runtime-$(MicrosoftNETCoreAppPackageVersion)-$(SharedFxRid)$(ArchiveExtension)</DotNetRuntimeArchiveFileName>
+    <DotNetRuntimeArchiveFileName>dotnet-runtime-$(MicrosoftNETCoreAppPackageVersion)-$(TargetRuntimeIdentifier)$(ArchiveExtension)</DotNetRuntimeArchiveFileName>
     <DotNetRuntimeDownloadUrl>$(DotNetAssetRootUrl)Runtime/$(MicrosoftNETCoreAppPackageVersion)/$(DotNetRuntimeArchiveFileName)</DotNetRuntimeDownloadUrl>
     <DotNetRuntimeArchive>$(BaseIntermediateOutputPath)$(DotNetRuntimeArchiveFileName)</DotNetRuntimeArchive>
     <!-- This file is used by the dotnet/core-sdk to determine if our shared framework aligns with the version they pull. -->
     <BaseRuntimeVersionFileName>aspnetcore_base_runtime.version</BaseRuntimeVersionFileName>
     <BaseRuntimeVersionFileOutputPath>$(OutputPath)$(BaseRuntimeVersionFileName)</BaseRuntimeVersionFileOutputPath>
     <!-- This file can be used in READMEs or other webpages -->
-    <SvgBadgeFileName>aspnetcore-runtime-$(SharedFxRid)-version-badge.svg</SvgBadgeFileName>
+    <SvgBadgeFileName>aspnetcore-runtime-$(TargetRuntimeIdentifier)-version-badge.svg</SvgBadgeFileName>
     <SvgBadgeOutputPath>$(OutputPath)$(SvgBadgeFileName)</SvgBadgeOutputPath>
   </PropertyGroup>
 

+ 3 - 4
src/Installers/Debian/Runtime.debproj

@@ -10,7 +10,7 @@
   <!-- Output paths -->
   <PropertyGroup>
     <BaseIntermediateOutputPath>$(RepositoryRoot)obj\Debian\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
-    <IntermediateOutputPath>$(BaseIntermediateOutputPath)$(SharedFxRid)\</IntermediateOutputPath>
+    <IntermediateOutputPath>$(BaseIntermediateOutputPath)$(TargetRuntimeIdentifier)\</IntermediateOutputPath>
     <!-- Must be named "package_root/". This is expected by the build.sh script in this project. -->
     <IntermediatePackageRoot>$(IntermediateOutputPath)package_root\</IntermediatePackageRoot>
     <OutputFileName>$(RuntimeInstallerBaseName)-$(SharedFxVersion)-x64.deb</OutputFileName>
@@ -51,7 +51,7 @@
   <Target Name="GetTargetPath" Returns="$(TargetPath)" />
 
   <Target Name="PrepareForBuild">
-    <Error Text="Currently only linux-x64 is supported by Debian installers." Condition=" '$(SharedFxRid)' != 'linux-x64' " />
+    <Error Text="Currently only linux-x64 is supported by Debian installers." Condition=" '$(TargetRuntimeIdentifier)' != 'linux-x64' " />
 
     <MakeDir Directories="$(IntermediateOutputPath);$(IntermediatePackageRoot);$(OutputPath)" />
   </Target>
@@ -96,8 +96,7 @@
     <Exec Command="./build.sh -i '$(IntermediateOutputPath)' -o '$(IntermediateOutputPath)out/'" />
 
     <PropertyGroup>
-      <!-- Map our RIDs to the arch names used by debuild. -->
-      <DebArch Condition=" '$(SharedFxRid)' == 'linux-x64' ">amd64</DebArch>
+      <DebArch Condition=" '$(TargetArchitecture)' == 'x64' ">amd64</DebArch>
       <BuildScriptOutputFileName>$(PackageId)_$(PackageVersion)-$(PackageRevision)_$(DebArch).deb</BuildScriptOutputFileName>
     </PropertyGroup>
 

+ 1 - 1
src/Installers/Directory.Build.props

@@ -8,7 +8,7 @@
     <InternalInstallerBaseName>$(RuntimeInstallerBaseName)-internal</InternalInstallerBaseName>
 
     <ArchiveExtension>.tar.gz</ArchiveExtension>
-    <ArchiveExtension Condition="$(SharedFxRid.StartsWith('win'))">.zip</ArchiveExtension>
+    <ArchiveExtension Condition="'$(TargetOsName)' == 'win'">.zip</ArchiveExtension>
   </PropertyGroup>
 
 </Project>

+ 1 - 1
src/Installers/Rpm/Rpm.props

@@ -8,7 +8,7 @@
   <!-- Output paths -->
   <PropertyGroup>
     <BaseIntermediateOutputPath>$(RepositoryRoot)obj\Rpm\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
-    <IntermediateOutputPath>$(BaseIntermediateOutputPath)$(SharedFxRid)\</IntermediateOutputPath>
+    <IntermediateOutputPath>$(BaseIntermediateOutputPath)$(TargetRuntimeIdentifier)\</IntermediateOutputPath>
     <IntermediatePackageRoot>$([MSBuild]::NormalizeDirectory('$(IntermediateOutputPath)content/'))</IntermediatePackageRoot>
     <OutputPath>$(InstallersOutputPath)</OutputPath>
   </PropertyGroup>

+ 2 - 2
src/Installers/Rpm/Rpm.targets

@@ -18,7 +18,7 @@
   <Target Name="PrepareForBuild">
     <MakeDir Directories="$(IntermediateOutputPath);$(IntermediatePackageRoot)" />
 
-    <Error Text="Currently only linux-x64 is supported by Rpm installers." Condition=" '$(SharedFxRid)' != 'linux-x64' " />
+    <Error Text="Currently only linux-x64 is supported by Rpm installers." Condition=" '$(TargetRuntimeIdentifier)' != 'linux-x64' " />
 
     <Error Text="Missing required property: RpmPackageInstallRoot" Condition=" '$(RpmPackageInstallRoot)' == '' " />
   </Target>
@@ -49,7 +49,7 @@
 
     <!-- Run fpm -->
     <PropertyGroup>
-      <RpmArch Condition=" '$(SharedFxRid)' == 'linux-x64' ">amd64</RpmArch>
+      <RpmArch Condition=" '$(TargetArchitecture)' == 'x64' ">amd64</RpmArch>
     </PropertyGroup>
 
     <ItemGroup>

+ 16 - 1
src/Installers/Windows/SharedFramework/SharedFramework.wixproj

@@ -14,7 +14,7 @@
     <HarvestDirectoryAutoGenerateGuids>true</HarvestDirectoryAutoGenerateGuids>
     <HarvestDirectorySuppressSpecificWarnings>5150;5151</HarvestDirectorySuppressSpecificWarnings>
     <HarvestDirectorySuppressRegistry>true</HarvestDirectorySuppressRegistry>
-    <HarvestSource>$(SharedFrameworkHarvestRootPath)\$(Platform)\</HarvestSource>
+    <HarvestSource>$(IntermediateOutputPath)fx\</HarvestSource>
     <DefineConstants>$(DefineConstants);AspNetCoreSharedFrameworkSource=$(HarvestSource)</DefineConstants>
     <NamespaceGuid>$(SharedFrameworkNamespaceGuid)</NamespaceGuid>
     <SchemaVersion>2.0</SchemaVersion>
@@ -54,5 +54,20 @@
     </HarvestDirectory>
   </ItemGroup>
 
+  <!-- TODO: harvest shared frameworks from a project reference -->
+  <Target Name="ExtractIntermediateSharedFx" BeforeTargets="PrepareForBuild">
+    <PropertyGroup>
+      <SharedFrameworkX64HarvestRootPath Condition="'$(SharedFrameworkX64HarvestRootPath)' == ''">$(InstallersOutputPath)</SharedFrameworkX64HarvestRootPath>
+      <SharedFrameworkX86HarvestRootPath Condition="'$(SharedFrameworkX86HarvestRootPath)' == ''">$(InstallersOutputPath)</SharedFrameworkX86HarvestRootPath>
+      <IntermediateX64SharedFxZip>$(SharedFrameworkX64HarvestRootPath)aspnetcore-runtime-internal-$(PackageVersion)-win-x64.zip</IntermediateX64SharedFxZip>
+      <IntermediateX86SharedFxZip>$(SharedFrameworkX86HarvestRootPath)aspnetcore-runtime-internal-$(PackageVersion)-win-x86.zip</IntermediateX86SharedFxZip>
+    </PropertyGroup>
+
+    <Unzip Condition="'$(Platform)' == 'x64'"
+           SourceFiles="$(IntermediateX64SharedFxZip)" DestinationFolder="$(HarvestSource)" />
+    <Unzip Condition="'$(Platform)' == 'x86'"
+           SourceFiles="$(IntermediateX86SharedFxZip)" DestinationFolder="$(HarvestSource)" />
+  </Target>
+
   <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
 </Project>

+ 1 - 1
src/Installers/Windows/SharedFrameworkLib/SharedFrameworkLib.wixproj

@@ -5,7 +5,7 @@
   <PropertyGroup>
     <Name>AspNetCoreSharedFrameworkLib$(Platform)</Name>
     <!-- Use the internal installer name because .wixlib files are only produced so we can hand them off to the dotnet/cli repo. -->
-    <OutputName>$(InternalInstallerBaseName)-$(PackageVersion)-win-$(Platform)</OutputName>
+    <OutputName>$(InternalInstallerBaseName)-$(PackageVersion)-$(TargetRuntimeIdentifier)</OutputName>
     <!-- This is still marked as a 'product' because is needs to copied to artifact outputs. -->
     <IsProductInstaller>true</IsProductInstaller>
     <OutputType>Library</OutputType>

+ 13 - 19
src/Installers/Windows/build.ps1

@@ -1,16 +1,11 @@
 #requires -version 5
 [cmdletbinding()]
 param(
-    [string]$Configuration = 'Debug',
-    [Parameter(Mandatory = $true)]
+    [switch]$ci,
     [Alias("x86")]
-    [string]$Runtime86Zip,
-    [Parameter(Mandatory = $true)]
+    [string]$sharedfx86harvestroot,
     [Alias("x64")]
-    [string]$Runtime64Zip,
-    [string]$BuildNumber = 't000',
-    [switch]$IsFinalBuild,
-    [string]$SignType = ''
+    [string]$sharedfx64harvestroot
 )
 
 $ErrorActionPreference = 'Stop'
@@ -26,24 +21,23 @@ if ($clean) {
 
 New-Item "$harvestRoot/x86", "$harvestRoot/x64" -ItemType Directory -ErrorAction Ignore | Out-Null
 
-if (-not (Test-Path "$harvestRoot/x86/shared/")) {
-    Expand-Archive $Runtime86Zip -DestinationPath "$harvestRoot/x86"
+[string[]] $msbuildargs = @()
+if (-not $sharedfx86harvestroot) {
+    $msbuildargs += "-p:SharedFrameworkX86HarvestRootPath=$sharedfx86harvestroot"
 }
 
-if (-not (Test-Path "$harvestRoot/x64/shared/")) {
-    Expand-Archive $Runtime64Zip -DestinationPath "$harvestRoot/x64"
+if (-not $sharedfx64harvestroot) {
+    $msbuildargs += "-p:SharedFrameworkX64HarvestRootPath=$sharedfx64harvestroot"
 }
 
 Push-Location $PSScriptRoot
 try {
     & $repoRoot/build.ps1 `
-            -Installers `
-            "-p:SharedFrameworkHarvestRootPath=$repoRoot/obj/sfx/" `
-            "-p:Configuration=$Configuration" `
-            "-p:BuildNumberSuffix=$BuildNumber" `
-            "-p:SignType=$SignType" `
-            "-p:IsFinalBuild=$IsFinalBuild" `
-            "-bl:$repoRoot/artifacts/logs/installers.msbuild.binlog"
+            -ci:$ci `
+            -sign `
+            -BuildInstallers `
+            "-bl:$repoRoot/artifacts/logs/installers.msbuild.binlog" `
+            @msbuildargs
 }
 finally {
     Pop-Location

+ 1 - 6
src/Middleware/CORS/test/FunctionalTests/FunctionalTests.csproj

@@ -3,14 +3,9 @@
   <PropertyGroup>
     <TargetFramework>netcoreapp3.0</TargetFramework>
     <TestGroupName>Cors.FunctionalTests</TestGroupName>
+    <DefaultItemExcludes>$(DefaultItemExcludes);node_modules\**\*</DefaultItemExcludes>
   </PropertyGroup>
 
-  <ItemGroup>
-    <Compile Remove="node_modules\**" />
-    <EmbeddedResource Remove="node_modules\**" />
-    <None Remove="node_modules\**" />
-  </ItemGroup>
-
   <ItemGroup>
     <!-- We don't need anything in this assembly, we just want to make sure it's built -->
     <ProjectReference Include="..\..\samples\SampleOrigin\SampleOrigin.csproj" ReferenceOutputAssembly="false" />

+ 1 - 1
src/Servers/IIS/IIS/benchmarks/IIS.Performance/IIS.Performance.csproj

@@ -15,7 +15,7 @@
     <Content Include="..\..\test\Common.FunctionalTests\AppHostConfig\*.config" CopyToOutputDirectory="PreserveNewest" />
   </ItemGroup>
 
-  <ItemGroup Condition="'$(OS)' == 'Windows_NT'">
+  <ItemGroup Condition="'$(BuildIisNativeProjects)' == 'true'">
     <None Include="$(MSBuildThisFileDirectory)..\..\..\AspNetCoreModuleV2\InProcessRequestHandler\bin\$(Configuration)\x64\aspnetcorev2_inprocess.dll" CopyToOutputDirectory="PreserveNewest" Visible="true" Link="%(FileName)%(Extension)" />
     <None Include="$(MSBuildThisFileDirectory)..\..\..\AspNetCoreModuleV2\InProcessRequestHandler\bin\$(Configuration)\x64\aspnetcorev2_inprocess.pdb" CopyToOutputDirectory="PreserveNewest" Visible="true" Link="%(FileName)%(Extension)" />
     <None Include="$(MSBuildThisFileDirectory)..\..\..\AspNetCoreModuleV2\AspNetCore\bin\$(Configuration)\x64\aspnetcorev2.dll" CopyToOutputDirectory="PreserveNewest" Visible="true" Link="%(FileName)%(Extension)" />

+ 2 - 3
src/Servers/IIS/IIS/src/Microsoft.AspNetCore.Server.IIS.csproj

@@ -8,7 +8,6 @@
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <PackageTags>aspnetcore;iis</PackageTags>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-    <PackNativeAssets Condition="'$(OS)' == 'Windows_NT'">true</PackNativeAssets>
     <NativeAssetsTargetFramework>netcoreapp3.0</NativeAssetsTargetFramework>
     <DisableFastUpToDateCheck>True</DisableFastUpToDateCheck>
   </PropertyGroup>
@@ -20,10 +19,10 @@
 
   <Target Name="ValidateNativeComponentsBuilt" AfterTargets="Build" >
     <Error Text="Required dll from ANCM has not been built. To build ANCM, you must use MSBuild.exe."
-        Condition="'$(OS)' == 'Windows_NT' AND !Exists('$(AspNetCoreModuleV2InProcessHandlerDll)')" />
+        Condition="'$(BuildIisNativeProjects)' == 'true' AND !Exists('$(AspNetCoreModuleV2InProcessHandlerDll)')" />
   </Target>
 
-  <ItemGroup Condition="'$(OS)' == 'Windows_NT' AND '$(VCTargetsPath)' != ''">
+  <ItemGroup Condition="'$(BuildIisNativeProjects)' == 'true' AND '$(VCTargetsPath)' != ''">
     <NativeProjectReference Include="$(MSBuildThisFileDirectory)..\..\AspNetCoreModuleV2\InProcessRequestHandler\InProcessRequestHandler.vcxproj" Platform="x64" />
     <NativeProjectReference Include="$(MSBuildThisFileDirectory)..\..\AspNetCoreModuleV2\InProcessRequestHandler\InProcessRequestHandler.vcxproj" Platform="Win32" />
   </ItemGroup>

+ 4 - 5
src/Servers/IIS/IntegrationTesting.IIS/src/Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj

@@ -21,12 +21,12 @@
     <EmbeddedResource Include="Http.config" />
   </ItemGroup>
 
-  <Target Name="ValidateNativeComponentsBuilt" AfterTargets="Build" Condition="'$(OS)' == 'Windows_NT'">
+  <Target Name="ValidateNativeComponentsBuilt" AfterTargets="Build" Condition="'$(BuildIisNativeProjects)' == 'true'">
     <Error Text="Required dll from ANCM has not been built. To build ANCM, you must use MSBuild.exe."
           Condition="!Exists('$(AspNetCoreModuleV2ShimDll)') OR !Exists('$(AspNetCoreModuleV2OutOfProcessHandlerDll)')" />
   </Target>
 
-  <ItemGroup Condition="'$(OS)' == 'Windows_NT' AND '$(VCTargetsPath)' != ''">
+  <ItemGroup Condition="'$(BuildIisNativeProjects)' == 'true' AND '$(VCTargetsPath)' != ''">
     <NativeProjectReference Include="$(MSBuildThisFileDirectory)..\..\AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj" Platform="x64"/>
     <NativeProjectReference Include="$(MSBuildThisFileDirectory)..\..\AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj" Platform="x64" />
 
@@ -34,16 +34,15 @@
     <NativeProjectReference Include="$(MSBuildThisFileDirectory)..\..\AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj" Platform="Win32" />
   </ItemGroup>
 
-  <Target Name="AddRunNativeComponents" BeforeTargets="AssignTargetPaths" Condition="'$(OS)' == 'Windows_NT'">
+  <Target Name="AddRunNativeComponents" BeforeTargets="AssignTargetPaths" Condition="'$(BuildIisNativeProjects)' == 'true'">
     <ItemGroup>
       <None Include="%(ShimComponents.DllLocation)" CopyToOutputDirectory="PreserveNewest" Link="%(ShimComponents.Platform)\%(ShimComponents.PackageSubPath)\%(ShimComponents.NativeAsset).dll" />
     </ItemGroup>
   </Target>
 
-  <Target Name="AddPackNativeComponents" BeforeTargets="_GetPackageFiles" Condition="$(PackNativeAssets) == 'true'">
+  <Target Name="AddPackNativeComponents" BeforeTargets="_GetPackageFiles" Condition="'$(BuildIisNativeProjects)' == 'true'">
     <ItemGroup>
       <Content Include="%(ShimComponents.DllLocation)" PackageCopyToOutput="true" PackagePath="contentFiles/any/any/%(ShimComponents.Platform)/%(ShimComponents.PackageSubPath)" />
-      <SignedPackageFile Include="%(ShimComponents.DllLocation)" PackagePath="contentFiles/any/any/%(ShimComponents.Platform)/%(ShimComponents.PackageSubPath)%(ShimComponents.NativeAsset).dll" Certificate="$(AssemblySigningCertName)" />
     </ItemGroup>
   </Target>
 

+ 1 - 1
src/Servers/IIS/build/Build.Settings

@@ -93,4 +93,4 @@
     <AssemblyBuild>$(_TwoDigitYear)$(_ThreeDigitDayOfYear)</AssemblyBuild>
   </PropertyGroup>
 
- </Project>
+ </Project>

+ 1 - 1
src/Servers/IIS/build/assets.props

@@ -1,7 +1,7 @@
 <!-- This file is autogenerated -->
 <Project>
     <PropertyGroup>
-        <PackNativeAssets Condition="'$(OS)' == 'Windows_NT'">true</PackNativeAssets>
+        <PackNativeAssets Condition="'$(BuildIisNativeProjects)' == 'true'">true</PackNativeAssets>
         <NativePlatform Condition="'$(Platform)' == 'AnyCPU'">x64</NativePlatform>
         <NativePlatform Condition="'$(NativePlatform)' == ''">$(Platform)</NativePlatform>
         <NativeVCPlatform Condition="'$(NativePlatform)' == 'x86'">Win32</NativeVCPlatform>

+ 2 - 2
src/Servers/IIS/build/testsite.props

@@ -66,14 +66,14 @@
 
 
   <Target Name="InjectRequestHandler"
-          Condition=" '$(InProcessTestSite)' == 'true' AND '$(OS)' == 'Windows_NT' AND '$(TargetFrameworkIdentifier)' != '.NETFramework'"
+          Condition=" '$(InProcessTestSite)' == 'true' AND '$(BuildIisNativeProjects)' == 'true' AND '$(TargetFrameworkIdentifier)' != '.NETFramework'"
           AfterTargets="GenerateBuildDependencyFile"
           DependsOnTargets="PrepareInjectionApp">
     <Exec Command="$(InjectDepsApp) &quot;$(ProjectDepsFilePath)&quot; $(RuntimeIdentifier) " />
   </Target>
 
   <Target Name="InjectRequestHandlerOnPublish"
-          Condition=" '$(InProcessTestSite)' == 'true' AND '$(OS)' == 'Windows_NT' AND '$(TargetFrameworkIdentifier)' != '.NETFramework'"
+          Condition=" '$(InProcessTestSite)' == 'true' AND '$(BuildIisNativeProjects)' == 'true' AND '$(TargetFrameworkIdentifier)' != '.NETFramework'"
           AfterTargets="GeneratePublishDependencyFile"
           DependsOnTargets="PrepareInjectionApp">
     <Exec Command="$(InjectDepsApp) &quot;$(PublishDepsFilePath)&quot; $(RuntimeIdentifier) " />

+ 1 - 1
src/Servers/IIS/tools/GenerateNativeAssets.ps1

@@ -121,7 +121,7 @@ $content = @"
 <!-- This file is autogenerated -->
 <Project>
     <PropertyGroup>
-        <PackNativeAssets Condition="'`$(OS)' == 'Windows_NT'">true</PackNativeAssets>
+        <PackNativeAssets Condition="'`$(BuildIisNativeProjects)' == 'true'">true</PackNativeAssets>
         <NativePlatform Condition="'`$(Platform)' == 'AnyCPU'">x64</NativePlatform>
         <NativePlatform Condition="'`$(NativePlatform)' == ''">`$(Platform)</NativePlatform>
         <NativeVCPlatform Condition="'`$(NativePlatform)' == 'x86'">Win32</NativeVCPlatform>

+ 1 - 1
src/SiteExtensions/LoggingAggregate/Directory.Build.props

@@ -7,7 +7,7 @@
 
   <PropertyGroup>
     <!-- temporary until site extension build moves into the main build -->
-    <PackageOutputPath>$(MSBuildThisFileDirectory)..\..\..\artifacts\packages\$(Configuration)\shipping</PackageOutputPath>
+    <PackageOutputPath>$(MSBuildThisFileDirectory)..\..\..\artifacts\packages\$(Configuration)\Shipping</PackageOutputPath>
   </PropertyGroup>
 
 </Project>

+ 1 - 1
src/SiteExtensions/LoggingAggregate/SiteExtensions.sln

@@ -7,7 +7,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{0ED05384-4F6
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.AzureAppServices.SiteExtension", "src\Microsoft.AspNetCore.AzureAppServices.SiteExtension\Microsoft.AspNetCore.AzureAppServices.SiteExtension.csproj", "{69E22952-302D-4C56-B2BE-7C086EB05C79}"
 EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Web.Xdt.Extensions", "src\Microsoft.Web.Xdt.Extensions\Microsoft.Web.Xdt.Extensions.csproj", "{637E1D65-7F1C-476B-AD0A-30B295DF5414}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Web.Xdt.Extensions", "..\Microsoft.Web.Xdt.Extensions\src\Microsoft.Web.Xdt.Extensions.csproj", "{637E1D65-7F1C-476B-AD0A-30B295DF5414}"
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{6C71D9CD-271C-41CB-ACCD-9EABED6C9E80}"
 EndProject

+ 2 - 2
src/SiteExtensions/LoggingBranch/LoggingBranch.csproj

@@ -8,7 +8,7 @@
     <GenerateDocumentationFile>false</GenerateDocumentationFile>
     <PackageTags>aspnet;logging;aspnetcore;AzureSiteExtension;keyvault;configuration;dataprotection</PackageTags>
     <ContentTargetFolders>content</ContentTargetFolders>
-    <PackageId>Microsoft.AspNetCore.AzureAppServices.SiteExtension.$(TrimmedVersion).$(SharedFxArchitecture)</PackageId>
+    <PackageId>Microsoft.AspNetCore.AzureAppServices.SiteExtension.$(TrimmedVersion).$(TargetArchitecture)</PackageId>
     <MicrosoftAspNetCoreAppPackageVersion>$(PackageVersion)</MicrosoftAspNetCoreAppPackageVersion>
     <HostingStartupRuntimeFrameworkVersion>$(MicrosoftNETCoreAppPackageVersion)</HostingStartupRuntimeFrameworkVersion>
 
@@ -24,7 +24,7 @@
 
   <ItemGroup>
 
-    <HostingStartupRuntimeStoreTargets Include="netcoreapp3.0" Runtime="$(SharedFxRid)" />
+    <HostingStartupRuntimeStoreTargets Include="netcoreapp3.0" Runtime="$(TargetRuntimeIdentifier)" />
     <HostingStartupPackageReference Include="Microsoft.AspNetCore.AzureAppServices.HostingStartup" Version="$(PackageVersion)" />
 
     <PackageReference Include="Internal.AspNetCore.Sdk" PrivateAssets="All" Version="$(InternalAspNetCoreSdkPackageVersion)" />

+ 5 - 5
src/SiteExtensions/Runtime/Microsoft.AspNetCore.Runtime.SiteExtension.pkgproj

@@ -6,12 +6,12 @@
     <ContentTargetFolders>content</ContentTargetFolders>
 
     <TrimmedVersion>$(VersionPrefix.Substring(0, $(VersionPrefix.LastIndexOf('.'))))</TrimmedVersion>
-    <Title>ASP.NET Core $(TrimmedVersion) ($(SharedFxArchitecture)) Runtime </Title>
+    <Title>ASP.NET Core $(TrimmedVersion) ($(TargetArchitecture)) Runtime </Title>
     <Description>This site extension installs Microsoft.AspNetCore.All, Microsoft.AspNetCore.App and Microsoft.NetCore.App shared runtimes.</Description>
     <PackageTags>aspnetcore;AzureSiteExtension</PackageTags>
-    <PackageId>AspNetCoreRuntime.$(TrimmedVersion).$(SharedFxArchitecture)</PackageId>
+    <PackageId>AspNetCoreRuntime.$(TrimmedVersion).$(TargetArchitecture)</PackageId>
     <NoPackageAnalysis>true</NoPackageAnalysis>
-    <DotNetUnpackFolder>$(RepositoryRoot)obj\ar\$(SharedFxRid)\</DotNetUnpackFolder>
+    <DotNetUnpackFolder>$(RepositoryRoot)obj\ar\$(TargetRuntimeIdentifier)\</DotNetUnpackFolder>
     <IsShippingPackage>true</IsShippingPackage>
   </PropertyGroup>
 
@@ -27,8 +27,8 @@
     <!-- Make sure redist folder is built and ready -->
     <ProjectReference Include="..\..\Installers\Archive\Archive.Redist.zipproj" PrivateAssets="All" ReferenceOutputAssembly="False" />
 
-    <NativeProjectReference Include="$(RepositoryRoot)src\Servers\IIS\AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj" Platform="$(SharedFxArchitecture)" />
-    <NativeProjectReference Include="$(RepositoryRoot)src\Servers\IIS\AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj" HandlerPath="2.0.0" Platform="$(SharedFxArchitecture)" />
+    <NativeProjectReference Include="$(RepositoryRoot)src\Servers\IIS\AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj" Platform="$(TargetArchitecture)" />
+    <NativeProjectReference Include="$(RepositoryRoot)src\Servers\IIS\AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj" HandlerPath="2.0.0" Platform="$(TargetArchitecture)" />
 
   </ItemGroup>