Merge branch 'blazor-wasm' into merge/release/3.1-to-blazor-wasm
This commit is contained in:
commit
bb4f3a513d
|
|
@ -7,9 +7,9 @@ trigger:
|
||||||
batch: true
|
batch: true
|
||||||
branches:
|
branches:
|
||||||
include:
|
include:
|
||||||
|
- blazor-wasm
|
||||||
- master
|
- master
|
||||||
- release/*
|
- release/*
|
||||||
- internal/release/3.*
|
|
||||||
|
|
||||||
# Run PR validation on all branches
|
# Run PR validation on all branches
|
||||||
pr:
|
pr:
|
||||||
|
|
@ -69,26 +69,11 @@ variables:
|
||||||
# used for post-build phases, internal builds only
|
# used for post-build phases, internal builds only
|
||||||
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||||
- group: DotNet-AspNet-SDLValidation-Params
|
- group: DotNet-AspNet-SDLValidation-Params
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- stage: build
|
- stage: build
|
||||||
displayName: Build
|
displayName: Build
|
||||||
jobs:
|
jobs:
|
||||||
# Code check
|
|
||||||
- template: jobs/default-build.yml
|
|
||||||
parameters:
|
|
||||||
jobName: Code_check
|
|
||||||
jobDisplayName: Code check
|
|
||||||
agentOs: Windows
|
|
||||||
steps:
|
|
||||||
- powershell: ./eng/scripts/CodeCheck.ps1 -ci
|
|
||||||
displayName: Run eng/scripts/CodeCheck.ps1
|
|
||||||
artifacts:
|
|
||||||
- name: Code_Check_Logs
|
|
||||||
path: artifacts/log/
|
|
||||||
publishOnError: true
|
|
||||||
includeForks: true
|
|
||||||
|
|
||||||
# Build Windows (x64/x86)
|
# Build Windows (x64/x86)
|
||||||
- template: jobs/default-build.yml
|
- template: jobs/default-build.yml
|
||||||
parameters:
|
parameters:
|
||||||
|
|
@ -114,34 +99,11 @@ stages:
|
||||||
-arch x64
|
-arch x64
|
||||||
-pack
|
-pack
|
||||||
-all
|
-all
|
||||||
-buildNative
|
-NoBuildNative
|
||||||
/bl:artifacts/log/build.x64.binlog
|
/bl:artifacts/log/build.x64.binlog
|
||||||
$(_BuildArgs)
|
$(_BuildArgs)
|
||||||
displayName: Build x64
|
displayName: Build x64
|
||||||
|
|
||||||
# Build the x86 shared framework
|
|
||||||
# TODO: make it possible to build for one Windows architecture at a time
|
|
||||||
# This is going to actually build x86 native assets. See https://github.com/aspnet/AspNetCore/issues/7196
|
|
||||||
- script: ./build.cmd
|
|
||||||
-ci
|
|
||||||
-arch x86
|
|
||||||
-pack
|
|
||||||
-all
|
|
||||||
-buildNative
|
|
||||||
-noBuildJava
|
|
||||||
/p:OnlyPackPlatformSpecificPackages=true
|
|
||||||
/bl:artifacts/log/build.x86.binlog
|
|
||||||
$(_BuildArgs)
|
|
||||||
displayName: Build x86
|
|
||||||
|
|
||||||
# This is in a separate build step with -forceCoreMsbuild to workaround MAX_PATH limitations - https://github.com/Microsoft/msbuild/issues/53
|
|
||||||
- script: .\src\SiteExtensions\build.cmd
|
|
||||||
-ci
|
|
||||||
-pack
|
|
||||||
-noBuildDeps
|
|
||||||
$(_BuildArgs)
|
|
||||||
displayName: Build SiteExtension
|
|
||||||
|
|
||||||
# This runs code-signing on all packages, zips, and jar files as defined in build/CodeSign.targets. If https://github.com/dotnet/arcade/issues/1957 is resolved,
|
# This runs code-signing on all packages, zips, and jar files as defined in build/CodeSign.targets. If https://github.com/dotnet/arcade/issues/1957 is resolved,
|
||||||
# consider running code-signing inline with the other previous steps.
|
# consider running code-signing inline with the other previous steps.
|
||||||
# Sign check is disabled because it is run in a separate step below, after installers are built.
|
# Sign check is disabled because it is run in a separate step below, after installers are built.
|
||||||
|
|
@ -155,29 +117,6 @@ stages:
|
||||||
$(_BuildArgs)
|
$(_BuildArgs)
|
||||||
displayName: Code sign packages
|
displayName: Code sign packages
|
||||||
|
|
||||||
# Windows installers bundle both x86 and x64 assets
|
|
||||||
- script: ./build.cmd
|
|
||||||
-ci
|
|
||||||
-sign
|
|
||||||
-buildInstallers
|
|
||||||
/bl:artifacts/log/installers.msbuild.binlog
|
|
||||||
/p:DotNetSignType=$(_SignType)
|
|
||||||
/p:AssetManifestFileName=aspnetcore-win-x64-x86.xml
|
|
||||||
$(_BuildArgs)
|
|
||||||
$(_PublishArgs)
|
|
||||||
/p:PublishInstallerBaseVersion=true
|
|
||||||
displayName: Build Installers
|
|
||||||
|
|
||||||
# A few files must also go to the VS package feed.
|
|
||||||
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
|
||||||
- task: NuGetCommand@2
|
|
||||||
displayName: Push Visual Studio packages
|
|
||||||
inputs:
|
|
||||||
command: push
|
|
||||||
packagesToPush: 'artifacts/packages/**/VS.Redist.Common.AspNetCore.*.nupkg'
|
|
||||||
nuGetFeedType: external
|
|
||||||
publishFeedCredentials: 'DevDiv - VS package feed'
|
|
||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
- name: Windows_Logs
|
- name: Windows_Logs
|
||||||
path: artifacts/log/
|
path: artifacts/log/
|
||||||
|
|
@ -186,251 +125,6 @@ stages:
|
||||||
- name: Windows_Packages
|
- name: Windows_Packages
|
||||||
path: artifacts/packages/
|
path: artifacts/packages/
|
||||||
|
|
||||||
# Build Windows ARM
|
|
||||||
- template: jobs/default-build.yml
|
|
||||||
parameters:
|
|
||||||
codeSign: true
|
|
||||||
jobName: Windows_arm_build
|
|
||||||
jobDisplayName: "Build: Windows ARM"
|
|
||||||
agentOs: Windows
|
|
||||||
buildArgs:
|
|
||||||
-arch arm
|
|
||||||
-sign
|
|
||||||
-pack
|
|
||||||
-noBuildNodeJS
|
|
||||||
-noBuildJava
|
|
||||||
/bl:artifacts/log/build.win-arm.binlog
|
|
||||||
/p:DotNetSignType=$(_SignType)
|
|
||||||
/p:OnlyPackPlatformSpecificPackages=true
|
|
||||||
/p:AssetManifestFileName=aspnetcore-win-arm.xml
|
|
||||||
$(_BuildArgs)
|
|
||||||
$(_PublishArgs)
|
|
||||||
installNodeJs: false
|
|
||||||
installJdk: false
|
|
||||||
artifacts:
|
|
||||||
- name: Windows_arm_Logs
|
|
||||||
path: artifacts/log/
|
|
||||||
publishOnError: true
|
|
||||||
includeForks: true
|
|
||||||
- name: Windows_arm_Packages
|
|
||||||
path: artifacts/packages/
|
|
||||||
|
|
||||||
# Build MacOS
|
|
||||||
- template: jobs/default-build.yml
|
|
||||||
parameters:
|
|
||||||
jobName: MacOs_x64_build
|
|
||||||
jobDisplayName: "Build: macOS"
|
|
||||||
agentOs: macOs
|
|
||||||
buildArgs:
|
|
||||||
--pack
|
|
||||||
--all
|
|
||||||
--no-build-nodejs
|
|
||||||
--no-build-java
|
|
||||||
-p:OnlyPackPlatformSpecificPackages=true
|
|
||||||
-bl:artifacts/log/build.macos.binlog
|
|
||||||
-p:AssetManifestFileName=aspnetcore-MacOS_x64.xml
|
|
||||||
$(_BuildArgs)
|
|
||||||
$(_PublishArgs)
|
|
||||||
installNodeJs: false
|
|
||||||
installJdk: false
|
|
||||||
artifacts:
|
|
||||||
- name: MacOS_x64_Logs
|
|
||||||
path: artifacts/log/
|
|
||||||
publishOnError: true
|
|
||||||
includeForks: true
|
|
||||||
- name: MacOS_x64_Packages
|
|
||||||
path: artifacts/packages/
|
|
||||||
- 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
|
|
||||||
steps:
|
|
||||||
- script: ./build.sh
|
|
||||||
--ci
|
|
||||||
--arch x64
|
|
||||||
--pack
|
|
||||||
--all
|
|
||||||
--no-build-nodejs
|
|
||||||
--no-build-java
|
|
||||||
-p:OnlyPackPlatformSpecificPackages=true
|
|
||||||
-bl:artifacts/log/build.linux-x64.binlog
|
|
||||||
$(_BuildArgs)
|
|
||||||
displayName: Run build.sh
|
|
||||||
- script: |
|
|
||||||
git clean -xfd src/**/obj/
|
|
||||||
./dockerbuild.sh bionic \
|
|
||||||
--ci \
|
|
||||||
--arch x64 \
|
|
||||||
--build-installers \
|
|
||||||
--no-build-deps \
|
|
||||||
--no-build-nodejs \
|
|
||||||
-p:OnlyPackPlatformSpecificPackages=true \
|
|
||||||
-p:BuildRuntimeArchive=false \
|
|
||||||
-p:LinuxInstallerType=deb \
|
|
||||||
-bl:artifacts/log/build.deb.binlog \
|
|
||||||
$(_BuildArgs)
|
|
||||||
displayName: Build Debian installers
|
|
||||||
- script: |
|
|
||||||
git clean -xfd src/**/obj/
|
|
||||||
./dockerbuild.sh rhel \
|
|
||||||
--ci \
|
|
||||||
--arch x64 \
|
|
||||||
--build-installers \
|
|
||||||
--no-build-deps \
|
|
||||||
--no-build-nodejs \
|
|
||||||
-p:OnlyPackPlatformSpecificPackages=true \
|
|
||||||
-p:BuildRuntimeArchive=false \
|
|
||||||
-p:LinuxInstallerType=rpm \
|
|
||||||
-bl:artifacts/log/build.rpm.binlog \
|
|
||||||
-p:AssetManifestFileName=aspnetcore-Linux_x64.xml \
|
|
||||||
$(_BuildArgs) \
|
|
||||||
$(_PublishArgs)
|
|
||||||
displayName: Build RPM installers
|
|
||||||
installNodeJs: false
|
|
||||||
installJdk: false
|
|
||||||
artifacts:
|
|
||||||
- name: Linux_x64_Logs
|
|
||||||
path: artifacts/log/
|
|
||||||
publishOnError: true
|
|
||||||
includeForks: true
|
|
||||||
- name: Linux_x64_Packages
|
|
||||||
path: artifacts/packages/
|
|
||||||
- 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
|
|
||||||
buildArgs:
|
|
||||||
--arch arm
|
|
||||||
--pack
|
|
||||||
--all
|
|
||||||
--no-build-nodejs
|
|
||||||
--no-build-java
|
|
||||||
-p:OnlyPackPlatformSpecificPackages=true
|
|
||||||
-bl:artifacts/log/build.linux-arm.binlog
|
|
||||||
-p:AssetManifestFileName=aspnetcore-Linux_arm.xml
|
|
||||||
$(_BuildArgs)
|
|
||||||
$(_PublishArgs)
|
|
||||||
installNodeJs: false
|
|
||||||
installJdk: false
|
|
||||||
artifacts:
|
|
||||||
- name: Linux_arm_Logs
|
|
||||||
path: artifacts/log/
|
|
||||||
publishOnError: true
|
|
||||||
includeForks: true
|
|
||||||
- name: Linux_arm_Packages
|
|
||||||
path: artifacts/packages/
|
|
||||||
- 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
|
|
||||||
buildArgs:
|
|
||||||
--arch arm64
|
|
||||||
--all
|
|
||||||
--pack
|
|
||||||
--no-build-nodejs
|
|
||||||
--no-build-java
|
|
||||||
-p:OnlyPackPlatformSpecificPackages=true
|
|
||||||
-bl:artifacts/log/build.arm64.binlog
|
|
||||||
-p:AssetManifestFileName=aspnetcore-Linux_arm64.xml
|
|
||||||
$(_BuildArgs)
|
|
||||||
$(_PublishArgs)
|
|
||||||
installNodeJs: false
|
|
||||||
installJdk: false
|
|
||||||
artifacts:
|
|
||||||
- name: Linux_arm64_Logs
|
|
||||||
path: artifacts/log/
|
|
||||||
publishOnError: true
|
|
||||||
includeForks: true
|
|
||||||
- name: Linux_arm64_Packages
|
|
||||||
path: artifacts/packages/
|
|
||||||
- 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
|
|
||||||
--arch x64
|
|
||||||
--os-name linux-musl
|
|
||||||
--pack
|
|
||||||
--all
|
|
||||||
--no-build-nodejs
|
|
||||||
--no-build-java
|
|
||||||
-p:OnlyPackPlatformSpecificPackages=true
|
|
||||||
-bl:artifacts/log/build.musl.binlog
|
|
||||||
-p:AssetManifestFileName=aspnetcore-Linux_musl_x64.xml
|
|
||||||
$(_BuildArgs)
|
|
||||||
$(_PublishArgs)
|
|
||||||
installNodeJs: false
|
|
||||||
installJdk: false
|
|
||||||
artifacts:
|
|
||||||
- name: Linux_musl_x64_Logs
|
|
||||||
path: artifacts/log/
|
|
||||||
publishOnError: true
|
|
||||||
includeForks: true
|
|
||||||
- name: Linux_musl_x64_Packages
|
|
||||||
path: artifacts/packages/
|
|
||||||
- template: jobs/codesign-xplat.yml
|
|
||||||
parameters:
|
|
||||||
inputName: Linux_musl_x64
|
|
||||||
|
|
||||||
# Build Linux Musl ARM64
|
|
||||||
- template: jobs/default-build.yml
|
|
||||||
parameters:
|
|
||||||
jobName: Linux_musl_arm64_build
|
|
||||||
jobDisplayName: "Build: Linux Musl ARM64"
|
|
||||||
agentOs: Linux
|
|
||||||
buildScript: ./dockerbuild.sh ubuntu-alpine37
|
|
||||||
buildArgs:
|
|
||||||
--ci
|
|
||||||
--arch arm64
|
|
||||||
--os-name linux-musl
|
|
||||||
--pack
|
|
||||||
--all
|
|
||||||
--no-build-nodejs
|
|
||||||
--no-build-java
|
|
||||||
-p:OnlyPackPlatformSpecificPackages=true
|
|
||||||
-bl:artifacts/log/build.musl.binlog
|
|
||||||
-p:AssetManifestFileName=aspnetcore-Linux_musl_arm64.xml
|
|
||||||
$(_BuildArgs)
|
|
||||||
$(_PublishArgs)
|
|
||||||
installNodeJs: false
|
|
||||||
installJdk: false
|
|
||||||
artifacts:
|
|
||||||
- name: Linux_musl_arm64_Logs
|
|
||||||
path: artifacts/log/
|
|
||||||
publishOnError: true
|
|
||||||
includeForks: true
|
|
||||||
- name: Linux_musl_arm64_Packages
|
|
||||||
path: artifacts/packages/
|
|
||||||
- template: jobs/codesign-xplat.yml
|
|
||||||
parameters:
|
|
||||||
inputName: Linux_musl_arm64
|
|
||||||
|
|
||||||
# Test jobs
|
# Test jobs
|
||||||
- template: jobs/default-build.yml
|
- template: jobs/default-build.yml
|
||||||
parameters:
|
parameters:
|
||||||
|
|
@ -567,63 +261,15 @@ stages:
|
||||||
publishOnError: true
|
publishOnError: true
|
||||||
includeForks: true
|
includeForks: true
|
||||||
|
|
||||||
# Source build
|
|
||||||
- job: Source_Build
|
|
||||||
displayName: 'Test: Linux Source Build'
|
|
||||||
container: centos:7
|
|
||||||
pool:
|
|
||||||
vmImage: 'ubuntu-16.04'
|
|
||||||
variables:
|
|
||||||
DotNetCoreSdkDir: $(Agent.ToolsDirectory)/dotnet
|
|
||||||
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: true
|
|
||||||
steps:
|
|
||||||
- script: |
|
|
||||||
source eng/common/native/common-library.sh
|
|
||||||
mkdir -p $HOME/bin
|
|
||||||
GetFile https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 $HOME/bin/jq
|
|
||||||
chmod +x $HOME/bin/jq
|
|
||||||
echo "##vso[task.prependpath]$HOME/bin"
|
|
||||||
displayName: Install jq
|
|
||||||
- script: ./eng/scripts/ci-source-build.sh --ci --configuration Release /p:BuildManaged=true /p:BuildNodeJs=false
|
|
||||||
displayName: Run ci-source-build.sh
|
|
||||||
- task: PublishBuildArtifacts@1
|
|
||||||
displayName: Upload logs
|
|
||||||
condition: always()
|
|
||||||
continueOnError: true
|
|
||||||
inputs:
|
|
||||||
pathtoPublish: artifacts/log/
|
|
||||||
artifactName: Source_Build_Logs
|
|
||||||
artifactType: Container
|
|
||||||
parallel: true
|
|
||||||
- task: PublishBuildArtifacts@1
|
|
||||||
displayName: Upload package artifacts
|
|
||||||
# Only capture source build artifacts in PRs for the sake of inspecting
|
|
||||||
# changes that impact source-build. The artifacts from this build pipeline are never actually used.
|
|
||||||
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
|
|
||||||
inputs:
|
|
||||||
pathtoPublish: artifacts/packages/
|
|
||||||
artifactName: Source_Build_Packages
|
|
||||||
artifactType: Container
|
|
||||||
parallel: true
|
|
||||||
|
|
||||||
# Publish to the BAR
|
# Publish to the BAR
|
||||||
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||||
- template: /eng/common/templates/job/publish-build-assets.yml
|
- template: /eng/common/templates/job/publish-build-assets.yml
|
||||||
parameters:
|
parameters:
|
||||||
dependsOn:
|
dependsOn:
|
||||||
- Windows_build
|
- Windows_build
|
||||||
- Windows_arm_build
|
|
||||||
- CodeSign_Xplat_MacOS_x64
|
|
||||||
- CodeSign_Xplat_Linux_x64
|
|
||||||
- CodeSign_Xplat_Linux_arm
|
|
||||||
- CodeSign_Xplat_Linux_arm64
|
|
||||||
- CodeSign_Xplat_Linux_musl_x64
|
|
||||||
- CodeSign_Xplat_Linux_musl_arm64
|
|
||||||
# In addition to the dependencies above, ensure the build was successful overall.
|
# In addition to the dependencies above, ensure the build was successful overall.
|
||||||
- Code_check
|
|
||||||
- Linux_Test
|
- Linux_Test
|
||||||
- MacOS_Test
|
- MacOS_Test
|
||||||
- Source_Build
|
|
||||||
- Windows_Templates_Test
|
- Windows_Templates_Test
|
||||||
- Windows_Test
|
- Windows_Test
|
||||||
pool:
|
pool:
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
<packageSources>
|
<packageSources>
|
||||||
<clear />
|
<clear />
|
||||||
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
|
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
|
||||||
<add key="darc-pub-dotnet-core-setup-7d57652" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-core-setup-7d57652f/nuget/v3/index.json" />
|
|
||||||
<add key="darc-pub-dotnet-core-setup-65f04fb" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-core-setup-65f04fb6/nuget/v3/index.json" />
|
<add key="darc-pub-dotnet-core-setup-65f04fb" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-core-setup-65f04fb6/nuget/v3/index.json" />
|
||||||
<add key="darc-pub-dotnet-corefx-0f7f38c" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-corefx-0f7f38c4/nuget/v3/index.json" />
|
<add key="darc-pub-dotnet-corefx-0f7f38c" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-corefx-0f7f38c4/nuget/v3/index.json" />
|
||||||
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
|
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
|
||||||
|
|
@ -13,11 +12,13 @@
|
||||||
<add key="aspnet-extensions" value="https://dotnetfeed.blob.core.windows.net/aspnet-extensions/index.json" />
|
<add key="aspnet-extensions" value="https://dotnetfeed.blob.core.windows.net/aspnet-extensions/index.json" />
|
||||||
<add key="aspnet-entityframeworkcore" value="https://dotnetfeed.blob.core.windows.net/aspnet-entityframeworkcore/index.json" />
|
<add key="aspnet-entityframeworkcore" value="https://dotnetfeed.blob.core.windows.net/aspnet-entityframeworkcore/index.json" />
|
||||||
<add key="aspnet-aspnetcore-tooling" value="https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore-tooling/index.json" />
|
<add key="aspnet-aspnetcore-tooling" value="https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore-tooling/index.json" />
|
||||||
|
<add key="aspnet-stable" value="https://dotnetfeed.blob.core.windows.net/dotnet-core-3-1-rtm-014727/index.json" />
|
||||||
<add key="grpc-nuget-dev" value="https://grpc.jfrog.io/grpc/api/nuget/v3/grpc-nuget-dev" />
|
<add key="grpc-nuget-dev" value="https://grpc.jfrog.io/grpc/api/nuget/v3/grpc-nuget-dev" />
|
||||||
<add key="roslyn" value="https://dotnet.myget.org/F/roslyn/api/v3/index.json" />
|
<add key="roslyn" value="https://dotnet.myget.org/F/roslyn/api/v3/index.json" />
|
||||||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
|
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
|
||||||
<add key="aspnetcore-dev" value="https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json" />
|
<add key="aspnetcore-dev" value="https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json" />
|
||||||
<add key="aspnetcore-tools" value="https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json" />
|
<add key="aspnetcore-tools" value="https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json" />
|
||||||
<add key="roslyn-tools" value="https://dotnet.myget.org/F/roslyn-tools/api/v3/index.json" />
|
<add key="roslyn-tools" value="https://dotnet.myget.org/F/roslyn-tools/api/v3/index.json" />
|
||||||
|
<add key="blazor-wasm" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor/nuget/v3/index.json" />
|
||||||
</packageSources>
|
</packageSources>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
|
||||||
|
|
@ -86,4 +86,4 @@ Update this list when preparing for a new patch.
|
||||||
<Package Id="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="3.1.0" />
|
<Package Id="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="3.1.0" />
|
||||||
<Package Id="Microsoft.Extensions.Identity.Core" Version="3.1.0" />
|
<Package Id="Microsoft.Extensions.Identity.Core" Version="3.1.0" />
|
||||||
<Package Id="Microsoft.Extensions.Identity.Stores" Version="3.1.0" />
|
<Package Id="Microsoft.Extensions.Identity.Stores" Version="3.1.0" />
|
||||||
</Baseline>
|
</Baseline>
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,8 @@
|
||||||
$(RepoRoot)src\Installers\**\*.*proj;
|
$(RepoRoot)src\Installers\**\*.*proj;
|
||||||
$(RepoRoot)src\SignalR\clients\ts\**\node_modules\**\*.*proj;
|
$(RepoRoot)src\SignalR\clients\ts\**\node_modules\**\*.*proj;
|
||||||
$(RepoRoot)src\Components\Web.JS\node_modules\**\*.*proj;
|
$(RepoRoot)src\Components\Web.JS\node_modules\**\*.*proj;
|
||||||
$(RepoRoot)src\Components\Blazor\Templates\src\content\**\*.*proj;
|
$(RepoRoot)src\Components\Blazor\Build\testassets\**\*.*proj;
|
||||||
|
$(RepoRoot)src\ProjectTemplates\BlazorWasm.ProjectTemplates\content\**\*.csproj;
|
||||||
$(RepoRoot)src\ProjectTemplates\Web.ProjectTemplates\content\**\*.csproj;
|
$(RepoRoot)src\ProjectTemplates\Web.ProjectTemplates\content\**\*.csproj;
|
||||||
$(RepoRoot)src\ProjectTemplates\Web.ProjectTemplates\content\**\*.fsproj;
|
$(RepoRoot)src\ProjectTemplates\Web.ProjectTemplates\content\**\*.fsproj;
|
||||||
$(RepoRoot)src\ProjectTemplates\Web.Spa.ProjectTemplates\content\**\*.csproj;
|
$(RepoRoot)src\ProjectTemplates\Web.Spa.ProjectTemplates\content\**\*.csproj;
|
||||||
|
|
@ -49,6 +50,11 @@
|
||||||
" />
|
" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<!-- For the Blazor WASM branch, only build a subset of projects -->
|
||||||
|
<ProjectToBuild>$(RepoRoot)src\Components\**\*.csproj;$(RepoRoot)src\ProjectTemplates\**\*.csproj</ProjectToBuild>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<Choose>
|
<Choose>
|
||||||
<!-- Project selection can be overridden on the command line by passing in -projects -->
|
<!-- Project selection can be overridden on the command line by passing in -projects -->
|
||||||
<When Condition="'$(ProjectToBuild)' != ''">
|
<When Condition="'$(ProjectToBuild)' != ''">
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,9 @@
|
||||||
<ProjectReferenceProvider Include="GetDocument.Insider" ProjectPath="$(RepoRoot)src\Tools\GetDocumentInsider\src\GetDocumentInsider.csproj" />
|
<ProjectReferenceProvider Include="GetDocument.Insider" ProjectPath="$(RepoRoot)src\Tools\GetDocumentInsider\src\GetDocumentInsider.csproj" />
|
||||||
<ProjectReferenceProvider Include="Microsoft.AspNetCore.SignalR.Specification.Tests" ProjectPath="$(RepoRoot)src\SignalR\server\Specification.Tests\src\Microsoft.AspNetCore.SignalR.Specification.Tests.csproj" />
|
<ProjectReferenceProvider Include="Microsoft.AspNetCore.SignalR.Specification.Tests" ProjectPath="$(RepoRoot)src\SignalR\server\Specification.Tests\src\Microsoft.AspNetCore.SignalR.Specification.Tests.csproj" />
|
||||||
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Blazor.Build" ProjectPath="$(RepoRoot)src\Components\Blazor\Build\src\Microsoft.AspNetCore.Blazor.Build.csproj" />
|
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Blazor.Build" ProjectPath="$(RepoRoot)src\Components\Blazor\Build\src\Microsoft.AspNetCore.Blazor.Build.csproj" />
|
||||||
|
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Blazor.HttpClient" ProjectPath="$(RepoRoot)src\Components\Blazor\Http\src\Microsoft.AspNetCore.Blazor.HttpClient.csproj" />
|
||||||
|
<ProjectReferenceProvider Include="Mono.WebAssembly.Interop" ProjectPath="$(RepoRoot)src\Components\Blazor\Mono.WebAssembly.Interop\src\Mono.WebAssembly.Interop.csproj" />
|
||||||
|
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Blazor.Server" ProjectPath="$(RepoRoot)src\Components\Blazor\Server\src\Microsoft.AspNetCore.Blazor.Server.csproj" />
|
||||||
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Blazor.DataAnnotations.Validation" ProjectPath="$(RepoRoot)src\Components\Blazor\Validation\src\Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.csproj" />
|
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Blazor.DataAnnotations.Validation" ProjectPath="$(RepoRoot)src\Components\Blazor\Validation\src\Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.csproj" />
|
||||||
<ProjectReferenceProvider Include="Ignitor" ProjectPath="$(RepoRoot)src\Components\Ignitor\src\Ignitor.csproj" />
|
<ProjectReferenceProvider Include="Ignitor" ProjectPath="$(RepoRoot)src\Components\Ignitor\src\Ignitor.csproj" />
|
||||||
<ProjectReferenceProvider Include="BlazorServerApp" ProjectPath="$(RepoRoot)src\Components\Samples\BlazorServerApp\BlazorServerApp.csproj" />
|
<ProjectReferenceProvider Include="BlazorServerApp" ProjectPath="$(RepoRoot)src\Components\Samples\BlazorServerApp\BlazorServerApp.csproj" />
|
||||||
|
|
@ -136,8 +139,6 @@
|
||||||
<ProjectReferenceProvider Include="Microsoft.AspNetCore.SignalR.StackExchangeRedis" ProjectPath="$(RepoRoot)src\SignalR\server\StackExchangeRedis\src\Microsoft.AspNetCore.SignalR.StackExchangeRedis.csproj" RefProjectPath="$(RepoRoot)src\SignalR\server\StackExchangeRedis\ref\Microsoft.AspNetCore.SignalR.StackExchangeRedis.csproj" />
|
<ProjectReferenceProvider Include="Microsoft.AspNetCore.SignalR.StackExchangeRedis" ProjectPath="$(RepoRoot)src\SignalR\server\StackExchangeRedis\src\Microsoft.AspNetCore.SignalR.StackExchangeRedis.csproj" RefProjectPath="$(RepoRoot)src\SignalR\server\StackExchangeRedis\ref\Microsoft.AspNetCore.SignalR.StackExchangeRedis.csproj" />
|
||||||
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Components.Authorization" ProjectPath="$(RepoRoot)src\Components\Authorization\src\Microsoft.AspNetCore.Components.Authorization.csproj" RefProjectPath="$(RepoRoot)src\Components\Authorization\ref\Microsoft.AspNetCore.Components.Authorization.csproj" />
|
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Components.Authorization" ProjectPath="$(RepoRoot)src\Components\Authorization\src\Microsoft.AspNetCore.Components.Authorization.csproj" RefProjectPath="$(RepoRoot)src\Components\Authorization\ref\Microsoft.AspNetCore.Components.Authorization.csproj" />
|
||||||
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Blazor" ProjectPath="$(RepoRoot)src\Components\Blazor\Blazor\src\Microsoft.AspNetCore.Blazor.csproj" RefProjectPath="$(RepoRoot)src\Components\Blazor\Blazor\ref\Microsoft.AspNetCore.Blazor.csproj" />
|
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Blazor" ProjectPath="$(RepoRoot)src\Components\Blazor\Blazor\src\Microsoft.AspNetCore.Blazor.csproj" RefProjectPath="$(RepoRoot)src\Components\Blazor\Blazor\ref\Microsoft.AspNetCore.Blazor.csproj" />
|
||||||
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Blazor.HttpClient" ProjectPath="$(RepoRoot)src\Components\Blazor\Http\src\Microsoft.AspNetCore.Blazor.HttpClient.csproj" RefProjectPath="$(RepoRoot)src\Components\Blazor\Http\ref\Microsoft.AspNetCore.Blazor.HttpClient.csproj" />
|
|
||||||
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Blazor.Server" ProjectPath="$(RepoRoot)src\Components\Blazor\Server\src\Microsoft.AspNetCore.Blazor.Server.csproj" RefProjectPath="$(RepoRoot)src\Components\Blazor\Server\ref\Microsoft.AspNetCore.Blazor.Server.csproj" />
|
|
||||||
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Components" ProjectPath="$(RepoRoot)src\Components\Components\src\Microsoft.AspNetCore.Components.csproj" RefProjectPath="$(RepoRoot)src\Components\Components\ref\Microsoft.AspNetCore.Components.csproj" />
|
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Components" ProjectPath="$(RepoRoot)src\Components\Components\src\Microsoft.AspNetCore.Components.csproj" RefProjectPath="$(RepoRoot)src\Components\Components\ref\Microsoft.AspNetCore.Components.csproj" />
|
||||||
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Components.Forms" ProjectPath="$(RepoRoot)src\Components\Forms\src\Microsoft.AspNetCore.Components.Forms.csproj" RefProjectPath="$(RepoRoot)src\Components\Forms\ref\Microsoft.AspNetCore.Components.Forms.csproj" />
|
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Components.Forms" ProjectPath="$(RepoRoot)src\Components\Forms\src\Microsoft.AspNetCore.Components.Forms.csproj" RefProjectPath="$(RepoRoot)src\Components\Forms\ref\Microsoft.AspNetCore.Components.Forms.csproj" />
|
||||||
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Components.Server" ProjectPath="$(RepoRoot)src\Components\Server\src\Microsoft.AspNetCore.Components.Server.csproj" RefProjectPath="$(RepoRoot)src\Components\Server\ref\Microsoft.AspNetCore.Components.Server.csproj" />
|
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Components.Server" ProjectPath="$(RepoRoot)src\Components\Server\src\Microsoft.AspNetCore.Components.Server.csproj" RefProjectPath="$(RepoRoot)src\Components\Server\ref\Microsoft.AspNetCore.Components.Server.csproj" />
|
||||||
|
|
|
||||||
|
|
@ -9,285 +9,289 @@
|
||||||
-->
|
-->
|
||||||
<Dependencies>
|
<Dependencies>
|
||||||
<ProductDependencies>
|
<ProductDependencies>
|
||||||
<Dependency Name="Microsoft.AspNetCore.Blazor.Mono" Version="3.1.0-preview4.19605.1">
|
<Dependency Name="Microsoft.AspNetCore.Blazor.Mono" Version="3.1.0-preview4.19578.1">
|
||||||
<Uri>https://github.com/aspnet/Blazor</Uri>
|
<Uri>https://github.com/aspnet/Blazor</Uri>
|
||||||
<Sha>7868699de745fd30a654c798a99dc541b77b95c0</Sha>
|
<Sha>9ff01af4257317a90b64959fe1c87aef3da4a36f</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.AspNetCore.Razor.Language" Version="3.1.1-servicing.19605.6">
|
<Dependency Name="Microsoft.AspNetCore.Razor.Language" Version="3.1.0-rtm.19573.1">
|
||||||
<Uri>https://github.com/aspnet/AspNetCore-Tooling</Uri>
|
<Uri>https://github.com/aspnet/AspNetCore-Tooling</Uri>
|
||||||
<Sha>9cf15bed711983d35362d62972ab87ccc88ba8ca</Sha>
|
<Sha>abd3c17b317dbe455b18a4f5937c43e0fc7a2944</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.AspNetCore.Mvc.Razor.Extensions" Version="3.1.1-servicing.19605.6">
|
<Dependency Name="Microsoft.AspNetCore.Mvc.Razor.Extensions" Version="3.1.0-rtm.19573.1">
|
||||||
<Uri>https://github.com/aspnet/AspNetCore-Tooling</Uri>
|
<Uri>https://github.com/aspnet/AspNetCore-Tooling</Uri>
|
||||||
<Sha>9cf15bed711983d35362d62972ab87ccc88ba8ca</Sha>
|
<Sha>abd3c17b317dbe455b18a4f5937c43e0fc7a2944</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.CodeAnalysis.Razor" Version="3.1.1-servicing.19605.6">
|
<Dependency Name="Microsoft.CodeAnalysis.Razor" Version="3.1.0-rtm.19573.1">
|
||||||
<Uri>https://github.com/aspnet/AspNetCore-Tooling</Uri>
|
<Uri>https://github.com/aspnet/AspNetCore-Tooling</Uri>
|
||||||
<Sha>9cf15bed711983d35362d62972ab87ccc88ba8ca</Sha>
|
<Sha>abd3c17b317dbe455b18a4f5937c43e0fc7a2944</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.NET.Sdk.Razor" Version="3.1.1-servicing.19605.6">
|
<Dependency Name="Microsoft.NET.Sdk.Razor" Version="3.1.0-rtm.19573.1">
|
||||||
<Uri>https://github.com/aspnet/AspNetCore-Tooling</Uri>
|
<Uri>https://github.com/aspnet/AspNetCore-Tooling</Uri>
|
||||||
<Sha>9cf15bed711983d35362d62972ab87ccc88ba8ca</Sha>
|
<Sha>abd3c17b317dbe455b18a4f5937c43e0fc7a2944</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="dotnet-ef" Version="3.1.1-servicing.19605.1">
|
<Dependency Name="dotnet-ef" Version="3.1.0" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
|
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
|
||||||
<Sha>7f59c0bb92fb33698232f0d7007ebcb0a428b543</Sha>
|
<Sha>82c6ea483d3a17393dad5986df9a8eef89ddcd07</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.EntityFrameworkCore.InMemory" Version="3.1.1-servicing.19605.1">
|
<Dependency Name="Microsoft.EntityFrameworkCore.InMemory" Version="3.1.0" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
|
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
|
||||||
<Sha>7f59c0bb92fb33698232f0d7007ebcb0a428b543</Sha>
|
<Sha>82c6ea483d3a17393dad5986df9a8eef89ddcd07</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.EntityFrameworkCore.Relational" Version="3.1.1-servicing.19605.1">
|
<Dependency Name="Microsoft.EntityFrameworkCore.Relational" Version="3.1.0" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
|
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
|
||||||
<Sha>7f59c0bb92fb33698232f0d7007ebcb0a428b543</Sha>
|
<Sha>82c6ea483d3a17393dad5986df9a8eef89ddcd07</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.1-servicing.19605.1">
|
<Dependency Name="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.0" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
|
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
|
||||||
<Sha>7f59c0bb92fb33698232f0d7007ebcb0a428b543</Sha>
|
<Sha>82c6ea483d3a17393dad5986df9a8eef89ddcd07</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.1-servicing.19605.1">
|
<Dependency Name="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.0" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
|
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
|
||||||
<Sha>7f59c0bb92fb33698232f0d7007ebcb0a428b543</Sha>
|
<Sha>82c6ea483d3a17393dad5986df9a8eef89ddcd07</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.EntityFrameworkCore.Tools" Version="3.1.1-servicing.19605.1">
|
<Dependency Name="Microsoft.EntityFrameworkCore.Tools" Version="3.1.0" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
|
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
|
||||||
<Sha>7f59c0bb92fb33698232f0d7007ebcb0a428b543</Sha>
|
<Sha>82c6ea483d3a17393dad5986df9a8eef89ddcd07</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.EntityFrameworkCore" Version="3.1.1-servicing.19605.1">
|
<Dependency Name="Microsoft.EntityFrameworkCore" Version="3.1.0" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
|
<Uri>https://github.com/aspnet/EntityFrameworkCore</Uri>
|
||||||
<Sha>7f59c0bb92fb33698232f0d7007ebcb0a428b543</Sha>
|
<Sha>82c6ea483d3a17393dad5986df9a8eef89ddcd07</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.AspNetCore.Analyzer.Testing" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.AspNetCore.Analyzer.Testing" Version="3.1.0-rtm.19572.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.AspNetCore.BenchmarkRunner.Sources" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.AspNetCore.BenchmarkRunner.Sources" Version="3.1.0-rtm.19572.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.ActivatorUtilities.Sources" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.ActivatorUtilities.Sources" Version="3.1.0-rtm.19572.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Caching.Abstractions" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Caching.Abstractions" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Caching.Memory" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Caching.Memory" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Caching.SqlServer" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Caching.SqlServer" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Caching.StackExchangeRedis" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Caching.StackExchangeRedis" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.CommandLineUtils.Sources" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.CommandLineUtils.Sources" Version="3.1.0-rtm.19572.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Configuration.Abstractions" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Configuration.Abstractions" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Configuration.AzureKeyVault" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Configuration.AzureKeyVault" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Configuration.Binder" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Configuration.Binder" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Configuration.CommandLine" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Configuration.CommandLine" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Configuration.FileExtensions" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Configuration.FileExtensions" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Configuration.Ini" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Configuration.Ini" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Configuration.Json" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Configuration.Json" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Configuration.KeyPerFile" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Configuration.KeyPerFile" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Configuration.UserSecrets" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Configuration.UserSecrets" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Configuration.Xml" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Configuration.Xml" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Configuration" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Configuration" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.DependencyInjection" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.DependencyInjection" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.DiagnosticAdapter" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.DiagnosticAdapter" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Diagnostics.HealthChecks" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Diagnostics.HealthChecks" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.FileProviders.Abstractions" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.FileProviders.Abstractions" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.FileProviders.Composite" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.FileProviders.Composite" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.FileProviders.Embedded" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.FileProviders.Embedded" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.FileProviders.Physical" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.FileProviders.Physical" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.FileSystemGlobbing" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.FileSystemGlobbing" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.HashCodeCombiner.Sources" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.HashCodeCombiner.Sources" Version="3.1.0-rtm.19572.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Hosting.Abstractions" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Hosting.Abstractions" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Hosting" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Hosting" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.HostFactoryResolver.Sources" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.HostFactoryResolver.Sources" Version="3.1.0-rtm.19572.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Http" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Http" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Localization.Abstractions" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Localization.Abstractions" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Localization" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Localization" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Logging.Abstractions" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Logging.Abstractions" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Logging.AzureAppServices" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Logging.AzureAppServices" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Logging.Configuration" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Logging.Configuration" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Logging.Console" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Logging.Console" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Logging.Debug" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Logging.Debug" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Logging.EventSource" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Logging.EventSource" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Logging.EventLog" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Logging.EventLog" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Logging.TraceSource" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Logging.TraceSource" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Logging.Testing" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Logging.Testing" Version="3.1.0-rtm.19572.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Logging" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Logging" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.ObjectPool" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.ObjectPool" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Options.ConfigurationExtensions" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Options.ConfigurationExtensions" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Options.DataAnnotations" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Options.DataAnnotations" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Options" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Options" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.ParameterDefaultValue.Sources" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.ParameterDefaultValue.Sources" Version="3.1.0-rtm.19572.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.Primitives" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.Primitives" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.TypeNameHelper.Sources" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.TypeNameHelper.Sources" Version="3.1.0-rtm.19572.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.ValueStopwatch.Sources" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.ValueStopwatch.Sources" Version="3.1.0-rtm.19572.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.WebEncoders" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Extensions.WebEncoders" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.JSInterop" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.Internal.Extensions.Refs" Version="3.1.0-rtm.19572.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Mono.WebAssembly.Interop" Version="3.1.1-preview4.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.JSInterop" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
|
</Dependency>
|
||||||
|
<Dependency Name="Mono.WebAssembly.Interop" Version="3.1.0-preview4.19572.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
||||||
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Bcl.AsyncInterfaces" Version="1.1.0" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
|
<Dependency Name="Microsoft.Bcl.AsyncInterfaces" Version="1.1.0" CoherentParentDependency="Microsoft.NETCore.App.Runtime.win-x64">
|
||||||
<Uri>https://github.com/dotnet/corefx</Uri>
|
<Uri>https://github.com/dotnet/corefx</Uri>
|
||||||
|
|
@ -377,17 +381,21 @@
|
||||||
<Uri>https://github.com/dotnet/corefx</Uri>
|
<Uri>https://github.com/dotnet/corefx</Uri>
|
||||||
<Sha>0f7f38c4fd323b26da10cce95f857f77f0f09b48</Sha>
|
<Sha>0f7f38c4fd323b26da10cce95f857f77f0f09b48</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Extensions.DependencyModel" Version="3.1.1-servicing.19576.9" CoherentParentDependency="Microsoft.Extensions.Logging">
|
<Dependency Name="Microsoft.Extensions.DependencyModel" Version="3.1.0" Pinned="true">
|
||||||
<Uri>https://github.com/dotnet/core-setup</Uri>
|
<Uri>https://github.com/dotnet/core-setup</Uri>
|
||||||
<Sha>f3f2dd583fffa254015fc21ff0e45784b333256d</Sha>
|
<Sha>65f04fb6db7a5e198d05dbebd5c4ad21eb018f89</Sha>
|
||||||
|
</Dependency>
|
||||||
|
<Dependency Name="Microsoft.NETCore.App.Ref" Version="3.1.0" Pinned="true">
|
||||||
|
<Uri>https://github.com/dotnet/core-setup</Uri>
|
||||||
|
<Sha>65f04fb6db7a5e198d05dbebd5c4ad21eb018f89</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<!--
|
<!--
|
||||||
Win-x64 is used here because we have picked an arbitrary runtime identifier to flow the version of the latest NETCore.App runtime.
|
Win-x64 is used here because we have picked an arbitrary runtime identifier to flow the version of the latest NETCore.App runtime.
|
||||||
All Runtime.$rid packages should have the same version.
|
All Runtime.$rid packages should have the same version.
|
||||||
-->
|
-->
|
||||||
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="3.1.1-servicing.19576.9" CoherentParentDependency="Microsoft.Extensions.Logging">
|
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="3.1.0" Pinned="true">
|
||||||
<Uri>https://github.com/dotnet/core-setup</Uri>
|
<Uri>https://github.com/dotnet/core-setup</Uri>
|
||||||
<Sha>f3f2dd583fffa254015fc21ff0e45784b333256d</Sha>
|
<Sha>65f04fb6db7a5e198d05dbebd5c4ad21eb018f89</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="NETStandard.Library.Ref" Version="2.1.0" Pinned="true">
|
<Dependency Name="NETStandard.Library.Ref" Version="2.1.0" Pinned="true">
|
||||||
<Uri>https://github.com/dotnet/core-setup</Uri>
|
<Uri>https://github.com/dotnet/core-setup</Uri>
|
||||||
|
|
@ -413,25 +421,25 @@
|
||||||
<Uri>https://github.com/dotnet/corefx</Uri>
|
<Uri>https://github.com/dotnet/corefx</Uri>
|
||||||
<Sha>0f7f38c4fd323b26da10cce95f857f77f0f09b48</Sha>
|
<Sha>0f7f38c4fd323b26da10cce95f857f77f0f09b48</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Internal.AspNetCore.Analyzers" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Internal.AspNetCore.Analyzers" Version="3.1.0-rtm.19572.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.DotNet.GenAPI" Version="1.0.0-beta.19517.3">
|
<Dependency Name="Microsoft.DotNet.GenAPI" Version="1.0.0-beta.19577.5">
|
||||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||||
<Sha>a42a124635ce1a218309ecb31ec59d559cacb886</Sha>
|
<Sha>99c6b59a8afff97fe891341b39abe985f1d3c565</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19517.3">
|
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19577.5">
|
||||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||||
<Sha>a42a124635ce1a218309ecb31ec59d559cacb886</Sha>
|
<Sha>99c6b59a8afff97fe891341b39abe985f1d3c565</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.19517.3">
|
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.19577.5">
|
||||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||||
<Sha>a42a124635ce1a218309ecb31ec59d559cacb886</Sha>
|
<Sha>99c6b59a8afff97fe891341b39abe985f1d3c565</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.AspNetCore.Testing" Version="3.1.1-servicing.19604.6" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
<Dependency Name="Microsoft.AspNetCore.Testing" Version="3.1.0-rtm.19572.8" CoherentParentDependency="Microsoft.EntityFrameworkCore">
|
||||||
<Uri>https://github.com/aspnet/Extensions</Uri>
|
<Uri>https://github.com/aspnet/Extensions</Uri>
|
||||||
<Sha>d40e21ccc14908a054b2181b1d6aeb22c49c630d</Sha>
|
<Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="3.4.0-beta4-19569-03" CoherentParentDependency="Microsoft.Extensions.Logging">
|
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="3.4.0-beta4-19569-03" CoherentParentDependency="Microsoft.Extensions.Logging">
|
||||||
<Uri>https://github.com/dotnet/roslyn</Uri>
|
<Uri>https://github.com/dotnet/roslyn</Uri>
|
||||||
|
|
|
||||||
|
|
@ -8,20 +8,17 @@
|
||||||
<PropertyGroup Label="Version settings">
|
<PropertyGroup Label="Version settings">
|
||||||
<AspNetCoreMajorVersion>3</AspNetCoreMajorVersion>
|
<AspNetCoreMajorVersion>3</AspNetCoreMajorVersion>
|
||||||
<AspNetCoreMinorVersion>1</AspNetCoreMinorVersion>
|
<AspNetCoreMinorVersion>1</AspNetCoreMinorVersion>
|
||||||
<AspNetCorePatchVersion>1</AspNetCorePatchVersion>
|
<AspNetCorePatchVersion>0</AspNetCorePatchVersion>
|
||||||
<PreReleasePreviewNumber>0</PreReleasePreviewNumber>
|
<PreReleasePreviewNumber>3</PreReleasePreviewNumber>
|
||||||
<!--
|
<!--
|
||||||
When StabilizePackageVersion is set to 'true', this branch will produce stable outputs for 'Shipping' packages
|
When StabilizePackageVersion is set to 'true', this branch will produce stable outputs for 'Shipping' packages
|
||||||
-->
|
-->
|
||||||
<StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion>
|
<StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">true</StabilizePackageVersion>
|
||||||
<DotNetFinalVersionKind Condition="'$(StabilizePackageVersion)' == 'true'">release</DotNetFinalVersionKind>
|
<DotNetFinalVersionKind Condition="'$(StabilizePackageVersion)' == 'true'">release</DotNetFinalVersionKind>
|
||||||
<IncludePreReleaseLabelInPackageVersion>true</IncludePreReleaseLabelInPackageVersion>
|
<IncludePreReleaseLabelInPackageVersion>true</IncludePreReleaseLabelInPackageVersion>
|
||||||
<IncludePreReleaseLabelInPackageVersion Condition=" '$(DotNetFinalVersionKind)' == 'release' ">false</IncludePreReleaseLabelInPackageVersion>
|
<IncludePreReleaseLabelInPackageVersion Condition=" '$(DotNetFinalVersionKind)' == 'release' ">false</IncludePreReleaseLabelInPackageVersion>
|
||||||
<PreReleaseVersionLabel>servicing</PreReleaseVersionLabel>
|
<PreReleaseVersionLabel>preview$(PreReleasePreviewNumber)</PreReleaseVersionLabel>
|
||||||
<PreReleaseBrandingLabel>Servicing</PreReleaseBrandingLabel>
|
<PreReleaseBrandingLabel>Preview $(PreReleasePreviewNumber)</PreReleaseBrandingLabel>
|
||||||
<!-- Blazor Client packages will not RTM with 3.1 -->
|
|
||||||
<BlazorClientPreReleasePreviewNumber>4</BlazorClientPreReleasePreviewNumber>
|
|
||||||
<BlazorClientPreReleaseVersionLabel>preview$(BlazorClientPreReleasePreviewNumber)</BlazorClientPreReleaseVersionLabel>
|
|
||||||
<AspNetCoreMajorMinorVersion>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion)</AspNetCoreMajorMinorVersion>
|
<AspNetCoreMajorMinorVersion>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion)</AspNetCoreMajorMinorVersion>
|
||||||
<!-- Additional assembly attributes are already configured to include the source revision ID. -->
|
<!-- Additional assembly attributes are already configured to include the source revision ID. -->
|
||||||
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
|
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
|
||||||
|
|
@ -65,14 +62,14 @@
|
||||||
-->
|
-->
|
||||||
<PropertyGroup Label="Automated">
|
<PropertyGroup Label="Automated">
|
||||||
<!-- Packages from dotnet/arcade -->
|
<!-- Packages from dotnet/arcade -->
|
||||||
<MicrosoftDotNetGenAPIPackageVersion>1.0.0-beta.19517.3</MicrosoftDotNetGenAPIPackageVersion>
|
<MicrosoftDotNetGenAPIPackageVersion>1.0.0-beta.19577.5</MicrosoftDotNetGenAPIPackageVersion>
|
||||||
<!-- Packages from dotnet/roslyn -->
|
<!-- Packages from dotnet/roslyn -->
|
||||||
<MicrosoftNetCompilersToolsetPackageVersion>3.4.0-beta4-19569-03</MicrosoftNetCompilersToolsetPackageVersion>
|
<MicrosoftNetCompilersToolsetPackageVersion>3.4.0-beta4-19569-03</MicrosoftNetCompilersToolsetPackageVersion>
|
||||||
<!-- Packages from dotnet/core-setup -->
|
<!-- Packages from dotnet/core-setup -->
|
||||||
<MicrosoftExtensionsDependencyModelPackageVersion>3.1.1-servicing.19576.9</MicrosoftExtensionsDependencyModelPackageVersion>
|
<MicrosoftExtensionsDependencyModelPackageVersion>3.1.1-servicing.19575.1</MicrosoftExtensionsDependencyModelPackageVersion>
|
||||||
<MicrosoftNETCoreAppInternalPackageVersion>3.1.1-servicing.19576.9</MicrosoftNETCoreAppInternalPackageVersion>
|
<MicrosoftNETCoreAppInternalPackageVersion>3.1.1-servicing.19576.9</MicrosoftNETCoreAppInternalPackageVersion>
|
||||||
<MicrosoftNETCoreAppRefPackageVersion>3.1.0</MicrosoftNETCoreAppRefPackageVersion>
|
<MicrosoftNETCoreAppRefPackageVersion>3.1.0</MicrosoftNETCoreAppRefPackageVersion>
|
||||||
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>3.1.1-servicing.19576.9</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
|
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>3.1.1-servicing.19575.1</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
|
||||||
<NETStandardLibraryRefPackageVersion>2.1.0</NETStandardLibraryRefPackageVersion>
|
<NETStandardLibraryRefPackageVersion>2.1.0</NETStandardLibraryRefPackageVersion>
|
||||||
<!-- Packages from dotnet/corefx -->
|
<!-- Packages from dotnet/corefx -->
|
||||||
<MicrosoftBclAsyncInterfacesPackageVersion>1.1.0</MicrosoftBclAsyncInterfacesPackageVersion>
|
<MicrosoftBclAsyncInterfacesPackageVersion>1.1.0</MicrosoftBclAsyncInterfacesPackageVersion>
|
||||||
|
|
@ -100,82 +97,82 @@
|
||||||
<!-- Only listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 -->
|
<!-- Only listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 -->
|
||||||
<MicrosoftNETCorePlatformsPackageVersion>3.1.0</MicrosoftNETCorePlatformsPackageVersion>
|
<MicrosoftNETCorePlatformsPackageVersion>3.1.0</MicrosoftNETCorePlatformsPackageVersion>
|
||||||
<!-- Packages from aspnet/Blazor -->
|
<!-- Packages from aspnet/Blazor -->
|
||||||
<MicrosoftAspNetCoreBlazorMonoPackageVersion>3.1.0-preview4.19605.1</MicrosoftAspNetCoreBlazorMonoPackageVersion>
|
<MicrosoftAspNetCoreBlazorMonoPackageVersion>3.1.0-preview4.19578.1</MicrosoftAspNetCoreBlazorMonoPackageVersion>
|
||||||
<!-- Packages from aspnet/Extensions -->
|
<!-- Packages from aspnet/Extensions -->
|
||||||
<InternalAspNetCoreAnalyzersPackageVersion>3.1.1-servicing.19604.6</InternalAspNetCoreAnalyzersPackageVersion>
|
<InternalAspNetCoreAnalyzersPackageVersion>3.1.0-rtm.19575.5</InternalAspNetCoreAnalyzersPackageVersion>
|
||||||
<MicrosoftAspNetCoreAnalyzerTestingPackageVersion>3.1.1-servicing.19604.6</MicrosoftAspNetCoreAnalyzerTestingPackageVersion>
|
<MicrosoftAspNetCoreAnalyzerTestingPackageVersion>3.1.0-rtm.19575.5</MicrosoftAspNetCoreAnalyzerTestingPackageVersion>
|
||||||
<MicrosoftAspNetCoreBenchmarkRunnerSourcesPackageVersion>3.1.1-servicing.19604.6</MicrosoftAspNetCoreBenchmarkRunnerSourcesPackageVersion>
|
<MicrosoftAspNetCoreBenchmarkRunnerSourcesPackageVersion>3.1.0-rtm.19575.5</MicrosoftAspNetCoreBenchmarkRunnerSourcesPackageVersion>
|
||||||
<MicrosoftAspNetCoreTestingPackageVersion>3.1.1-servicing.19604.6</MicrosoftAspNetCoreTestingPackageVersion>
|
<MicrosoftAspNetCoreTestingPackageVersion>3.1.0-rtm.19575.5</MicrosoftAspNetCoreTestingPackageVersion>
|
||||||
<MicrosoftExtensionsActivatorUtilitiesSourcesPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsActivatorUtilitiesSourcesPackageVersion>
|
<MicrosoftExtensionsActivatorUtilitiesSourcesPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsActivatorUtilitiesSourcesPackageVersion>
|
||||||
<MicrosoftExtensionsCachingAbstractionsPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsCachingAbstractionsPackageVersion>
|
<MicrosoftExtensionsCachingAbstractionsPackageVersion>3.1.0</MicrosoftExtensionsCachingAbstractionsPackageVersion>
|
||||||
<MicrosoftExtensionsCachingMemoryPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsCachingMemoryPackageVersion>
|
<MicrosoftExtensionsCachingMemoryPackageVersion>3.1.0</MicrosoftExtensionsCachingMemoryPackageVersion>
|
||||||
<MicrosoftExtensionsCachingSqlServerPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsCachingSqlServerPackageVersion>
|
<MicrosoftExtensionsCachingSqlServerPackageVersion>3.1.0</MicrosoftExtensionsCachingSqlServerPackageVersion>
|
||||||
<MicrosoftExtensionsCachingStackExchangeRedisPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsCachingStackExchangeRedisPackageVersion>
|
<MicrosoftExtensionsCachingStackExchangeRedisPackageVersion>3.1.0</MicrosoftExtensionsCachingStackExchangeRedisPackageVersion>
|
||||||
<MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>
|
<MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>
|
||||||
<MicrosoftExtensionsConfigurationAbstractionsPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsConfigurationAbstractionsPackageVersion>
|
<MicrosoftExtensionsConfigurationAbstractionsPackageVersion>3.1.0</MicrosoftExtensionsConfigurationAbstractionsPackageVersion>
|
||||||
<MicrosoftExtensionsConfigurationAzureKeyVaultPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsConfigurationAzureKeyVaultPackageVersion>
|
<MicrosoftExtensionsConfigurationAzureKeyVaultPackageVersion>3.1.0</MicrosoftExtensionsConfigurationAzureKeyVaultPackageVersion>
|
||||||
<MicrosoftExtensionsConfigurationBinderPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsConfigurationBinderPackageVersion>
|
<MicrosoftExtensionsConfigurationBinderPackageVersion>3.1.0</MicrosoftExtensionsConfigurationBinderPackageVersion>
|
||||||
<MicrosoftExtensionsConfigurationCommandLinePackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsConfigurationCommandLinePackageVersion>
|
<MicrosoftExtensionsConfigurationCommandLinePackageVersion>3.1.0</MicrosoftExtensionsConfigurationCommandLinePackageVersion>
|
||||||
<MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>
|
<MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>3.1.0</MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>
|
||||||
<MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>
|
<MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>3.1.0</MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>
|
||||||
<MicrosoftExtensionsConfigurationIniPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsConfigurationIniPackageVersion>
|
<MicrosoftExtensionsConfigurationIniPackageVersion>3.1.0</MicrosoftExtensionsConfigurationIniPackageVersion>
|
||||||
<MicrosoftExtensionsConfigurationJsonPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsConfigurationJsonPackageVersion>
|
<MicrosoftExtensionsConfigurationJsonPackageVersion>3.1.0</MicrosoftExtensionsConfigurationJsonPackageVersion>
|
||||||
<MicrosoftExtensionsConfigurationKeyPerFilePackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsConfigurationKeyPerFilePackageVersion>
|
<MicrosoftExtensionsConfigurationKeyPerFilePackageVersion>3.1.0</MicrosoftExtensionsConfigurationKeyPerFilePackageVersion>
|
||||||
<MicrosoftExtensionsConfigurationPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsConfigurationPackageVersion>
|
<MicrosoftExtensionsConfigurationPackageVersion>3.1.0</MicrosoftExtensionsConfigurationPackageVersion>
|
||||||
<MicrosoftExtensionsConfigurationUserSecretsPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsConfigurationUserSecretsPackageVersion>
|
<MicrosoftExtensionsConfigurationUserSecretsPackageVersion>3.1.0</MicrosoftExtensionsConfigurationUserSecretsPackageVersion>
|
||||||
<MicrosoftExtensionsConfigurationXmlPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsConfigurationXmlPackageVersion>
|
<MicrosoftExtensionsConfigurationXmlPackageVersion>3.1.0</MicrosoftExtensionsConfigurationXmlPackageVersion>
|
||||||
<MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>
|
<MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>3.1.0</MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>
|
||||||
<MicrosoftExtensionsDependencyInjectionPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsDependencyInjectionPackageVersion>
|
<MicrosoftExtensionsDependencyInjectionPackageVersion>3.1.0</MicrosoftExtensionsDependencyInjectionPackageVersion>
|
||||||
<MicrosoftExtensionsDiagnosticAdapterPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsDiagnosticAdapterPackageVersion>
|
<MicrosoftExtensionsDiagnosticAdapterPackageVersion>3.1.0</MicrosoftExtensionsDiagnosticAdapterPackageVersion>
|
||||||
<MicrosoftExtensionsDiagnosticsHealthChecksAbstractionsPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsDiagnosticsHealthChecksAbstractionsPackageVersion>
|
<MicrosoftExtensionsDiagnosticsHealthChecksAbstractionsPackageVersion>3.1.0</MicrosoftExtensionsDiagnosticsHealthChecksAbstractionsPackageVersion>
|
||||||
<MicrosoftExtensionsDiagnosticsHealthChecksPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsDiagnosticsHealthChecksPackageVersion>
|
<MicrosoftExtensionsDiagnosticsHealthChecksPackageVersion>3.1.0</MicrosoftExtensionsDiagnosticsHealthChecksPackageVersion>
|
||||||
<MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>
|
<MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>3.1.0</MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>
|
||||||
<MicrosoftExtensionsFileProvidersCompositePackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsFileProvidersCompositePackageVersion>
|
<MicrosoftExtensionsFileProvidersCompositePackageVersion>3.1.0</MicrosoftExtensionsFileProvidersCompositePackageVersion>
|
||||||
<MicrosoftExtensionsFileProvidersEmbeddedPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsFileProvidersEmbeddedPackageVersion>
|
<MicrosoftExtensionsFileProvidersEmbeddedPackageVersion>3.1.0</MicrosoftExtensionsFileProvidersEmbeddedPackageVersion>
|
||||||
<MicrosoftExtensionsFileProvidersPhysicalPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsFileProvidersPhysicalPackageVersion>
|
<MicrosoftExtensionsFileProvidersPhysicalPackageVersion>3.1.0</MicrosoftExtensionsFileProvidersPhysicalPackageVersion>
|
||||||
<MicrosoftExtensionsFileSystemGlobbingPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsFileSystemGlobbingPackageVersion>
|
<MicrosoftExtensionsFileSystemGlobbingPackageVersion>3.1.0</MicrosoftExtensionsFileSystemGlobbingPackageVersion>
|
||||||
<MicrosoftExtensionsHashCodeCombinerSourcesPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsHashCodeCombinerSourcesPackageVersion>
|
<MicrosoftExtensionsHashCodeCombinerSourcesPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsHashCodeCombinerSourcesPackageVersion>
|
||||||
<MicrosoftExtensionsHostingAbstractionsPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsHostingAbstractionsPackageVersion>
|
<MicrosoftExtensionsHostingAbstractionsPackageVersion>3.1.0</MicrosoftExtensionsHostingAbstractionsPackageVersion>
|
||||||
<MicrosoftExtensionsHostingPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsHostingPackageVersion>
|
<MicrosoftExtensionsHostingPackageVersion>3.1.0</MicrosoftExtensionsHostingPackageVersion>
|
||||||
<MicrosoftExtensionsHostFactoryResolverSourcesPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsHostFactoryResolverSourcesPackageVersion>
|
<MicrosoftExtensionsHostFactoryResolverSourcesPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsHostFactoryResolverSourcesPackageVersion>
|
||||||
<MicrosoftExtensionsHttpPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsHttpPackageVersion>
|
<MicrosoftExtensionsHttpPackageVersion>3.1.0</MicrosoftExtensionsHttpPackageVersion>
|
||||||
<MicrosoftExtensionsLocalizationAbstractionsPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsLocalizationAbstractionsPackageVersion>
|
<MicrosoftExtensionsLocalizationAbstractionsPackageVersion>3.1.0</MicrosoftExtensionsLocalizationAbstractionsPackageVersion>
|
||||||
<MicrosoftExtensionsLocalizationPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsLocalizationPackageVersion>
|
<MicrosoftExtensionsLocalizationPackageVersion>3.1.0</MicrosoftExtensionsLocalizationPackageVersion>
|
||||||
<MicrosoftExtensionsLoggingAbstractionsPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsLoggingAbstractionsPackageVersion>
|
<MicrosoftExtensionsLoggingAbstractionsPackageVersion>3.1.0</MicrosoftExtensionsLoggingAbstractionsPackageVersion>
|
||||||
<MicrosoftExtensionsLoggingAzureAppServicesPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsLoggingAzureAppServicesPackageVersion>
|
<MicrosoftExtensionsLoggingAzureAppServicesPackageVersion>3.1.0</MicrosoftExtensionsLoggingAzureAppServicesPackageVersion>
|
||||||
<MicrosoftExtensionsLoggingConfigurationPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsLoggingConfigurationPackageVersion>
|
<MicrosoftExtensionsLoggingConfigurationPackageVersion>3.1.0</MicrosoftExtensionsLoggingConfigurationPackageVersion>
|
||||||
<MicrosoftExtensionsLoggingConsolePackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsLoggingConsolePackageVersion>
|
<MicrosoftExtensionsLoggingConsolePackageVersion>3.1.0</MicrosoftExtensionsLoggingConsolePackageVersion>
|
||||||
<MicrosoftExtensionsLoggingDebugPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsLoggingDebugPackageVersion>
|
<MicrosoftExtensionsLoggingDebugPackageVersion>3.1.0</MicrosoftExtensionsLoggingDebugPackageVersion>
|
||||||
<MicrosoftExtensionsLoggingEventSourcePackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsLoggingEventSourcePackageVersion>
|
<MicrosoftExtensionsLoggingEventSourcePackageVersion>3.1.0</MicrosoftExtensionsLoggingEventSourcePackageVersion>
|
||||||
<MicrosoftExtensionsLoggingEventLogPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsLoggingEventLogPackageVersion>
|
<MicrosoftExtensionsLoggingEventLogPackageVersion>3.1.0</MicrosoftExtensionsLoggingEventLogPackageVersion>
|
||||||
<MicrosoftExtensionsLoggingPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsLoggingPackageVersion>
|
<MicrosoftExtensionsLoggingPackageVersion>3.1.0</MicrosoftExtensionsLoggingPackageVersion>
|
||||||
<MicrosoftExtensionsLoggingTestingPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsLoggingTestingPackageVersion>
|
<MicrosoftExtensionsLoggingTestingPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsLoggingTestingPackageVersion>
|
||||||
<MicrosoftExtensionsLoggingTraceSourcePackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsLoggingTraceSourcePackageVersion>
|
<MicrosoftExtensionsLoggingTraceSourcePackageVersion>3.1.0</MicrosoftExtensionsLoggingTraceSourcePackageVersion>
|
||||||
<MicrosoftExtensionsObjectPoolPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsObjectPoolPackageVersion>
|
<MicrosoftExtensionsObjectPoolPackageVersion>3.1.0</MicrosoftExtensionsObjectPoolPackageVersion>
|
||||||
<MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion>
|
<MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion>3.1.0</MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion>
|
||||||
<MicrosoftExtensionsOptionsDataAnnotationsPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsOptionsDataAnnotationsPackageVersion>
|
<MicrosoftExtensionsOptionsDataAnnotationsPackageVersion>3.1.0</MicrosoftExtensionsOptionsDataAnnotationsPackageVersion>
|
||||||
<MicrosoftExtensionsOptionsPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsOptionsPackageVersion>
|
<MicrosoftExtensionsOptionsPackageVersion>3.1.0</MicrosoftExtensionsOptionsPackageVersion>
|
||||||
<MicrosoftExtensionsParameterDefaultValueSourcesPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsParameterDefaultValueSourcesPackageVersion>
|
<MicrosoftExtensionsParameterDefaultValueSourcesPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsParameterDefaultValueSourcesPackageVersion>
|
||||||
<MicrosoftExtensionsPrimitivesPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsPrimitivesPackageVersion>
|
<MicrosoftExtensionsPrimitivesPackageVersion>3.1.0</MicrosoftExtensionsPrimitivesPackageVersion>
|
||||||
<MicrosoftExtensionsTypeNameHelperSourcesPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsTypeNameHelperSourcesPackageVersion>
|
<MicrosoftExtensionsTypeNameHelperSourcesPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsTypeNameHelperSourcesPackageVersion>
|
||||||
<MicrosoftExtensionsValueStopwatchSourcesPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsValueStopwatchSourcesPackageVersion>
|
<MicrosoftExtensionsValueStopwatchSourcesPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsValueStopwatchSourcesPackageVersion>
|
||||||
<MicrosoftExtensionsWebEncodersPackageVersion>3.1.1-servicing.19604.6</MicrosoftExtensionsWebEncodersPackageVersion>
|
<MicrosoftExtensionsWebEncodersPackageVersion>3.1.0</MicrosoftExtensionsWebEncodersPackageVersion>
|
||||||
<MicrosoftInternalExtensionsRefsPackageVersion>3.1.0-rtm.19565.4</MicrosoftInternalExtensionsRefsPackageVersion>
|
<MicrosoftInternalExtensionsRefsPackageVersion>3.1.0-rtm.19565.4</MicrosoftInternalExtensionsRefsPackageVersion>
|
||||||
<MicrosoftJSInteropPackageVersion>3.1.1-servicing.19604.6</MicrosoftJSInteropPackageVersion>
|
<MicrosoftJSInteropPackageVersion>3.1.0</MicrosoftJSInteropPackageVersion>
|
||||||
<MonoWebAssemblyInteropPackageVersion>3.1.1-preview4.19604.6</MonoWebAssemblyInteropPackageVersion>
|
<MonoWebAssemblyInteropPackageVersion>3.1.0-preview4.19575.5</MonoWebAssemblyInteropPackageVersion>
|
||||||
<!-- Packages from aspnet/EntityFrameworkCore -->
|
<!-- Packages from aspnet/EntityFrameworkCore -->
|
||||||
<dotnetefPackageVersion>3.1.1-servicing.19605.1</dotnetefPackageVersion>
|
<dotnetefPackageVersion>3.1.0</dotnetefPackageVersion>
|
||||||
<MicrosoftEntityFrameworkCoreInMemoryPackageVersion>3.1.1-servicing.19605.1</MicrosoftEntityFrameworkCoreInMemoryPackageVersion>
|
<MicrosoftEntityFrameworkCoreInMemoryPackageVersion>3.1.0</MicrosoftEntityFrameworkCoreInMemoryPackageVersion>
|
||||||
<MicrosoftEntityFrameworkCoreRelationalPackageVersion>3.1.1-servicing.19605.1</MicrosoftEntityFrameworkCoreRelationalPackageVersion>
|
<MicrosoftEntityFrameworkCoreRelationalPackageVersion>3.1.0</MicrosoftEntityFrameworkCoreRelationalPackageVersion>
|
||||||
<MicrosoftEntityFrameworkCoreSqlitePackageVersion>3.1.1-servicing.19605.1</MicrosoftEntityFrameworkCoreSqlitePackageVersion>
|
<MicrosoftEntityFrameworkCoreSqlitePackageVersion>3.1.0</MicrosoftEntityFrameworkCoreSqlitePackageVersion>
|
||||||
<MicrosoftEntityFrameworkCoreSqlServerPackageVersion>3.1.1-servicing.19605.1</MicrosoftEntityFrameworkCoreSqlServerPackageVersion>
|
<MicrosoftEntityFrameworkCoreSqlServerPackageVersion>3.1.0</MicrosoftEntityFrameworkCoreSqlServerPackageVersion>
|
||||||
<MicrosoftEntityFrameworkCoreToolsPackageVersion>3.1.1-servicing.19605.1</MicrosoftEntityFrameworkCoreToolsPackageVersion>
|
<MicrosoftEntityFrameworkCoreToolsPackageVersion>3.1.0</MicrosoftEntityFrameworkCoreToolsPackageVersion>
|
||||||
<MicrosoftEntityFrameworkCorePackageVersion>3.1.1-servicing.19605.1</MicrosoftEntityFrameworkCorePackageVersion>
|
<MicrosoftEntityFrameworkCorePackageVersion>3.1.0</MicrosoftEntityFrameworkCorePackageVersion>
|
||||||
<!-- Packages from aspnet/AspNetCore-Tooling -->
|
<!-- Packages from aspnet/AspNetCore-Tooling -->
|
||||||
<MicrosoftAspNetCoreMvcRazorExtensionsPackageVersion>3.1.1-servicing.19605.6</MicrosoftAspNetCoreMvcRazorExtensionsPackageVersion>
|
<MicrosoftAspNetCoreMvcRazorExtensionsPackageVersion>3.1.0-rtm.19573.1</MicrosoftAspNetCoreMvcRazorExtensionsPackageVersion>
|
||||||
<MicrosoftAspNetCoreRazorLanguagePackageVersion>3.1.1-servicing.19605.6</MicrosoftAspNetCoreRazorLanguagePackageVersion>
|
<MicrosoftAspNetCoreRazorLanguagePackageVersion>3.1.0-rtm.19573.1</MicrosoftAspNetCoreRazorLanguagePackageVersion>
|
||||||
<MicrosoftCodeAnalysisRazorPackageVersion>3.1.1-servicing.19605.6</MicrosoftCodeAnalysisRazorPackageVersion>
|
<MicrosoftCodeAnalysisRazorPackageVersion>3.1.0-rtm.19573.1</MicrosoftCodeAnalysisRazorPackageVersion>
|
||||||
<MicrosoftNETSdkRazorPackageVersion>3.1.1-servicing.19605.6</MicrosoftNETSdkRazorPackageVersion>
|
<MicrosoftNETSdkRazorPackageVersion>3.1.0-rtm.19573.1</MicrosoftNETSdkRazorPackageVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<!--
|
<!--
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,127 @@
|
||||||
|
# This file is a temporary workaround for internal builds to be able to restore from private AzDO feeds.
|
||||||
|
# This file should be removed as part of this issue: https://github.com/dotnet/arcade/issues/4080
|
||||||
|
#
|
||||||
|
# What the script does is iterate over all package sources in the pointed NuGet.config and add a credential entry
|
||||||
|
# under <packageSourceCredentials> for each Maestro managed private feed. Two additional credential
|
||||||
|
# entries are also added for the two private static internal feeds: dotnet3-internal and dotnet3-internal-transport.
|
||||||
|
#
|
||||||
|
# This script needs to be called in every job that will restore packages and which the base repo has
|
||||||
|
# private AzDO feeds in the NuGet.config.
|
||||||
|
#
|
||||||
|
# See example YAML call for this script below. Note the use of the variable `$(dn-bot-dnceng-artifact-feeds-rw)`
|
||||||
|
# from the AzureDevOps-Artifact-Feeds-Pats variable group.
|
||||||
|
#
|
||||||
|
# - task: PowerShell@2
|
||||||
|
# displayName: Setup Private Feeds Credentials
|
||||||
|
# condition: eq(variables['Agent.OS'], 'Windows_NT')
|
||||||
|
# inputs:
|
||||||
|
# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
|
||||||
|
# arguments: -ConfigFile ${Env:BUILD_SOURCESDIRECTORY}/NuGet.config -Password $Env:Token
|
||||||
|
# env:
|
||||||
|
# Token: $(dn-bot-dnceng-artifact-feeds-rw)
|
||||||
|
|
||||||
|
[CmdletBinding()]
|
||||||
|
param (
|
||||||
|
[Parameter(Mandatory = $true)][string]$ConfigFile,
|
||||||
|
[Parameter(Mandatory = $true)][string]$Password
|
||||||
|
)
|
||||||
|
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
Set-StrictMode -Version 2.0
|
||||||
|
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||||
|
|
||||||
|
. $PSScriptRoot\tools.ps1
|
||||||
|
|
||||||
|
# Add source entry to PackageSources
|
||||||
|
function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Username, $Password) {
|
||||||
|
$packageSource = $sources.SelectSingleNode("add[@key='$SourceName']")
|
||||||
|
|
||||||
|
if ($packageSource -eq $null)
|
||||||
|
{
|
||||||
|
$packageSource = $doc.CreateElement("add")
|
||||||
|
$packageSource.SetAttribute("key", $SourceName)
|
||||||
|
$packageSource.SetAttribute("value", $SourceEndPoint)
|
||||||
|
$sources.AppendChild($packageSource) | Out-Null
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Host "Package source $SourceName already present."
|
||||||
|
}
|
||||||
|
|
||||||
|
AddCredential -Creds $creds -Source $SourceName -Username $Username -Password $Password
|
||||||
|
}
|
||||||
|
|
||||||
|
# Add a credential node for the specified source
|
||||||
|
function AddCredential($creds, $source, $username, $password) {
|
||||||
|
# Looks for credential configuration for the given SourceName. Create it if none is found.
|
||||||
|
$sourceElement = $creds.SelectSingleNode($Source)
|
||||||
|
if ($sourceElement -eq $null)
|
||||||
|
{
|
||||||
|
$sourceElement = $doc.CreateElement($Source)
|
||||||
|
$creds.AppendChild($sourceElement) | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
|
# Add the <Username> node to the credential if none is found.
|
||||||
|
$usernameElement = $sourceElement.SelectSingleNode("add[@key='Username']")
|
||||||
|
if ($usernameElement -eq $null)
|
||||||
|
{
|
||||||
|
$usernameElement = $doc.CreateElement("add")
|
||||||
|
$usernameElement.SetAttribute("key", "Username")
|
||||||
|
$sourceElement.AppendChild($usernameElement) | Out-Null
|
||||||
|
}
|
||||||
|
$usernameElement.SetAttribute("value", $Username)
|
||||||
|
|
||||||
|
# Add the <ClearTextPassword> to the credential if none is found.
|
||||||
|
# Add it as a clear text because there is no support for encrypted ones in non-windows .Net SDKs.
|
||||||
|
# -> https://github.com/NuGet/Home/issues/5526
|
||||||
|
$passwordElement = $sourceElement.SelectSingleNode("add[@key='ClearTextPassword']")
|
||||||
|
if ($passwordElement -eq $null)
|
||||||
|
{
|
||||||
|
$passwordElement = $doc.CreateElement("add")
|
||||||
|
$passwordElement.SetAttribute("key", "ClearTextPassword")
|
||||||
|
$sourceElement.AppendChild($passwordElement) | Out-Null
|
||||||
|
}
|
||||||
|
$passwordElement.SetAttribute("value", $Password)
|
||||||
|
}
|
||||||
|
|
||||||
|
function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Password) {
|
||||||
|
$maestroPrivateSources = $Sources.SelectNodes("add[contains(@key,'darc-int')]")
|
||||||
|
|
||||||
|
Write-Host "Inserting credentials for $($maestroPrivateSources.Count) Maestro's private feeds."
|
||||||
|
|
||||||
|
ForEach ($PackageSource in $maestroPrivateSources) {
|
||||||
|
Write-Host "`tInserting credential for Maestro's feed:" $PackageSource.Key
|
||||||
|
AddCredential -Creds $creds -Source $PackageSource.Key -Username $Username -Password $Password
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(Test-Path $ConfigFile -PathType Leaf)) {
|
||||||
|
Write-Host "Couldn't find the file NuGet config file: $ConfigFile"
|
||||||
|
ExitWithExitCode 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Load NuGet.config
|
||||||
|
$doc = New-Object System.Xml.XmlDocument
|
||||||
|
$filename = (Get-Item $ConfigFile).FullName
|
||||||
|
$doc.Load($filename)
|
||||||
|
|
||||||
|
# Get reference to <PackageSources> or create one if none exist already
|
||||||
|
$sources = $doc.DocumentElement.SelectSingleNode("packageSources")
|
||||||
|
if ($sources -eq $null) {
|
||||||
|
$sources = $doc.CreateElement("packageSources")
|
||||||
|
$doc.DocumentElement.AppendChild($sources) | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
|
# Looks for a <PackageSourceCredentials> node. Create it if none is found.
|
||||||
|
$creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials")
|
||||||
|
if ($creds -eq $null) {
|
||||||
|
$creds = $doc.CreateElement("packageSourceCredentials")
|
||||||
|
$doc.DocumentElement.AppendChild($creds) | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
|
# Insert credential nodes for Maestro's private feeds
|
||||||
|
InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Password $Password
|
||||||
|
|
||||||
|
AddPackageSource -Sources $sources -SourceName "dotnet3-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
|
||||||
|
AddPackageSource -Sources $sources -SourceName "dotnet3-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
|
||||||
|
|
||||||
|
$doc.Save($filename)
|
||||||
|
|
@ -0,0 +1,117 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# This file is a temporary workaround for internal builds to be able to restore from private AzDO feeds.
|
||||||
|
# This file should be removed as part of this issue: https://github.com/dotnet/arcade/issues/4080
|
||||||
|
#
|
||||||
|
# What the script does is iterate over all package sources in the pointed NuGet.config and add a credential entry
|
||||||
|
# under <packageSourceCredentials> for each Maestro's managed private feed. Two additional credential
|
||||||
|
# entries are also added for the two private static internal feeds: dotnet3-internal and dotnet3-internal-transport.
|
||||||
|
#
|
||||||
|
# This script needs to be called in every job that will restore packages and which the base repo has
|
||||||
|
# private AzDO feeds in the NuGet.config.
|
||||||
|
#
|
||||||
|
# See example YAML call for this script below. Note the use of the variable `$(dn-bot-dnceng-artifact-feeds-rw)`
|
||||||
|
# from the AzureDevOps-Artifact-Feeds-Pats variable group.
|
||||||
|
#
|
||||||
|
# - task: Bash@3
|
||||||
|
# displayName: Setup Private Feeds Credentials
|
||||||
|
# inputs:
|
||||||
|
# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
|
||||||
|
# arguments: $BUILD_SOURCESDIRECTORY/NuGet.config $Token
|
||||||
|
# condition: ne(variables['Agent.OS'], 'Windows_NT')
|
||||||
|
# env:
|
||||||
|
# Token: $(dn-bot-dnceng-artifact-feeds-rw)
|
||||||
|
|
||||||
|
ConfigFile=$1
|
||||||
|
CredToken=$2
|
||||||
|
NL='\n'
|
||||||
|
TB=' '
|
||||||
|
|
||||||
|
source="${BASH_SOURCE[0]}"
|
||||||
|
|
||||||
|
# resolve $source until the file is no longer a symlink
|
||||||
|
while [[ -h "$source" ]]; do
|
||||||
|
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
|
||||||
|
source="$(readlink "$source")"
|
||||||
|
# if $source was a relative symlink, we need to resolve it relative to the path where the
|
||||||
|
# symlink file was located
|
||||||
|
[[ $source != /* ]] && source="$scriptroot/$source"
|
||||||
|
done
|
||||||
|
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
|
||||||
|
|
||||||
|
. "$scriptroot/tools.sh"
|
||||||
|
|
||||||
|
if [ ! -f "$ConfigFile" ]; then
|
||||||
|
echo "Couldn't find the file NuGet config file: $ConfigFile"
|
||||||
|
ExitWithExitCode 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ `uname -s` == "Darwin" ]]; then
|
||||||
|
NL=$'\\\n'
|
||||||
|
TB=''
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Ensure there is a <packageSources>...</packageSources> section.
|
||||||
|
grep -i "<packageSources>" $ConfigFile
|
||||||
|
if [ "$?" != "0" ]; then
|
||||||
|
echo "Adding <packageSources>...</packageSources> section."
|
||||||
|
ConfigNodeHeader="<configuration>"
|
||||||
|
PackageSourcesTemplate="${TB}<packageSources>${NL}${TB}</packageSources>"
|
||||||
|
|
||||||
|
sed -i.bak "s|$ConfigNodeHeader|$ConfigNodeHeader${NL}$PackageSourcesTemplate|" NuGet.config
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Ensure there is a <packageSourceCredentials>...</packageSourceCredentials> section.
|
||||||
|
grep -i "<packageSourceCredentials>" $ConfigFile
|
||||||
|
if [ "$?" != "0" ]; then
|
||||||
|
echo "Adding <packageSourceCredentials>...</packageSourceCredentials> section."
|
||||||
|
|
||||||
|
PackageSourcesNodeFooter="</packageSources>"
|
||||||
|
PackageSourceCredentialsTemplate="${TB}<packageSourceCredentials>${NL}${TB}</packageSourceCredentials>"
|
||||||
|
|
||||||
|
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourcesNodeFooter${NL}$PackageSourceCredentialsTemplate|" NuGet.config
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Ensure dotnet3-internal and dotnet3-internal-transport is in the packageSources
|
||||||
|
grep -i "<add key=\"dotnet3-internal\">" $ConfigFile
|
||||||
|
if [ "$?" != "0" ]; then
|
||||||
|
echo "Adding dotnet3-internal to the packageSources."
|
||||||
|
|
||||||
|
PackageSourcesNodeFooter="</packageSources>"
|
||||||
|
PackageSourceTemplate="${TB}<add key=\"dotnet3-internal\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2\" />"
|
||||||
|
|
||||||
|
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" NuGet.config
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Ensure dotnet3-internal and dotnet3-internal-transport is in the packageSources
|
||||||
|
grep -i "<add key=\"dotnet3-internal-transport\">" $ConfigFile
|
||||||
|
if [ "$?" != "0" ]; then
|
||||||
|
echo "Adding dotnet3-internal-transport to the packageSources."
|
||||||
|
|
||||||
|
PackageSourcesNodeFooter="</packageSources>"
|
||||||
|
PackageSourceTemplate="${TB}<add key=\"dotnet3-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2\" />"
|
||||||
|
|
||||||
|
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" NuGet.config
|
||||||
|
fi
|
||||||
|
|
||||||
|
# I want things split line by line
|
||||||
|
PrevIFS=$IFS
|
||||||
|
IFS=$'\n'
|
||||||
|
PackageSources=$(grep -oh '"darc-int-[^"]*"' $ConfigFile | tr -d '"')
|
||||||
|
IFS=$PrevIFS
|
||||||
|
|
||||||
|
PackageSources+=('dotnet3-internal')
|
||||||
|
PackageSources+=('dotnet3-internal-transport')
|
||||||
|
|
||||||
|
for FeedName in ${PackageSources[@]} ; do
|
||||||
|
# Check if there is no existing credential for this FeedName
|
||||||
|
grep -i "<$FeedName>" $ConfigFile
|
||||||
|
if [ "$?" != "0" ]; then
|
||||||
|
echo "Adding credentials for $FeedName."
|
||||||
|
|
||||||
|
PackageSourceCredentialsNodeFooter="</packageSourceCredentials>"
|
||||||
|
NewCredential="${TB}${TB}<$FeedName>${NL}<add key=\"Username\" value=\"dn-bot\" />${NL}<add key=\"ClearTextPassword\" value=\"$CredToken\" />${NL}</$FeedName>"
|
||||||
|
|
||||||
|
sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" NuGet.config
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
@ -6,12 +6,12 @@ param(
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$Content = Get-Content $ReleaseConfigsPath
|
$Content = Get-Content $ReleaseConfigsPath
|
||||||
|
|
||||||
$BarId = $Content | Select -Index 0
|
$BarId = $Content | Select -Index 0
|
||||||
|
|
||||||
$Channels = ""
|
$Channels = ""
|
||||||
$Content | Select -Index 1 | ForEach-Object { $Channels += "$_ ," }
|
$Content | Select -Index 1 | ForEach-Object { $Channels += "$_ ," }
|
||||||
|
|
||||||
$IsStableBuild = $Content | Select -Index 2
|
$IsStableBuild = $Content | Select -Index 2
|
||||||
|
|
||||||
Write-PipelineSetVariable -Name 'BARBuildId' -Value $BarId
|
Write-PipelineSetVariable -Name 'BARBuildId' -Value $BarId
|
||||||
|
|
@ -23,4 +23,4 @@ catch {
|
||||||
Write-Host $_.Exception
|
Write-Host $_.Exception
|
||||||
Write-Host $_.ScriptStackTrace
|
Write-Host $_.ScriptStackTrace
|
||||||
ExitWithExitCode 1
|
ExitWithExitCode 1
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,11 @@ parameters:
|
||||||
# This can also be remedied by the caller (post-build.yml) if it does not use a nested parameter
|
# This can also be remedied by the caller (post-build.yml) if it does not use a nested parameter
|
||||||
sdlContinueOnError: false # optional: determines whether to continue the build if the step errors;
|
sdlContinueOnError: false # optional: determines whether to continue the build if the step errors;
|
||||||
dependsOn: '' # Optional: dependencies of the job
|
dependsOn: '' # Optional: dependencies of the job
|
||||||
|
artifactNames: '' # Optional: patterns supplied to DownloadBuildArtifacts
|
||||||
|
# Usage:
|
||||||
|
# artifactNames:
|
||||||
|
# - 'BlobArtifacts'
|
||||||
|
# - 'Artifacts_Windows_NT_Release'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- job: Run_SDL
|
- job: Run_SDL
|
||||||
|
|
@ -18,13 +23,22 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- checkout: self
|
- checkout: self
|
||||||
clean: true
|
clean: true
|
||||||
- task: DownloadBuildArtifacts@0
|
- ${{ if ne(parameters.artifactNames, '') }}:
|
||||||
displayName: Download Build Artifacts
|
- ${{ each artifactName in parameters.artifactNames }}:
|
||||||
inputs:
|
- task: DownloadBuildArtifacts@0
|
||||||
buildType: current
|
displayName: Download Build Artifacts
|
||||||
downloadType: specific files
|
inputs:
|
||||||
matchingPattern: "**"
|
buildType: current
|
||||||
downloadPath: $(Build.SourcesDirectory)\artifacts
|
artifactName: ${{ artifactName }}
|
||||||
|
downloadPath: $(Build.ArtifactStagingDirectory)\artifacts
|
||||||
|
- ${{ if eq(parameters.artifactNames, '') }}:
|
||||||
|
- task: DownloadBuildArtifacts@0
|
||||||
|
displayName: Download Build Artifacts
|
||||||
|
inputs:
|
||||||
|
buildType: current
|
||||||
|
downloadType: specific files
|
||||||
|
itemPattern: "**"
|
||||||
|
downloadPath: $(Build.ArtifactStagingDirectory)\artifacts
|
||||||
- powershell: eng/common/sdl/extract-artifact-packages.ps1
|
- powershell: eng/common/sdl/extract-artifact-packages.ps1
|
||||||
-InputPath $(Build.SourcesDirectory)\artifacts\BlobArtifacts
|
-InputPath $(Build.SourcesDirectory)\artifacts\BlobArtifacts
|
||||||
-ExtractPath $(Build.SourcesDirectory)\artifacts\BlobArtifacts
|
-ExtractPath $(Build.SourcesDirectory)\artifacts\BlobArtifacts
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,26 @@
|
||||||
parameters:
|
parameters:
|
||||||
|
publishInstallersAndChecksums: false
|
||||||
symbolPublishingAdditionalParameters: ''
|
symbolPublishingAdditionalParameters: ''
|
||||||
artifactsPublishingAdditionalParameters: ''
|
stageName: ''
|
||||||
|
channelName: ''
|
||||||
|
channelId: ''
|
||||||
|
transportFeed: ''
|
||||||
|
shippingFeed: ''
|
||||||
|
symbolsFeed: ''
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- stage: NetCore_30_Internal_Servicing_Publishing
|
- stage: ${{ parameters.stageName }}
|
||||||
dependsOn: validate
|
dependsOn: validate
|
||||||
variables:
|
variables:
|
||||||
- template: ../common-variables.yml
|
- template: ../common-variables.yml
|
||||||
displayName: .NET Core 3.0 Internal Servicing Publishing
|
displayName: ${{ parameters.channelName }} Publishing
|
||||||
jobs:
|
jobs:
|
||||||
- template: ../setup-maestro-vars.yml
|
- template: ../setup-maestro-vars.yml
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
displayName: Symbol Publishing
|
displayName: Symbol Publishing
|
||||||
dependsOn: setupMaestroVars
|
dependsOn: setupMaestroVars
|
||||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.InternalServicing_30_Channel_Id))
|
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} ))
|
||||||
variables:
|
variables:
|
||||||
- group: DotNet-Symbol-Server-Pats
|
- group: DotNet-Symbol-Server-Pats
|
||||||
pool:
|
pool:
|
||||||
|
|
@ -55,7 +61,7 @@ stages:
|
||||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
||||||
- name: IsStableBuild
|
- name: IsStableBuild
|
||||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
|
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
|
||||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.InternalServicing_30_Channel_Id))
|
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }}))
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'windows-2019'
|
vmImage: 'windows-2019'
|
||||||
steps:
|
steps:
|
||||||
|
|
@ -115,14 +121,15 @@ stages:
|
||||||
/p:InstallersTargetStaticFeed=$(InternalInstallersBlobFeedUrl)
|
/p:InstallersTargetStaticFeed=$(InternalInstallersBlobFeedUrl)
|
||||||
/p:InstallersAzureAccountKey=$(InternalInstallersBlobFeedKey)
|
/p:InstallersAzureAccountKey=$(InternalInstallersBlobFeedKey)
|
||||||
/p:PublishToAzureDevOpsNuGetFeeds=true
|
/p:PublishToAzureDevOpsNuGetFeeds=true
|
||||||
/p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v3/index.json'
|
/p:AzureDevOpsStaticShippingFeed='${{ parameters.shippingFeed }}'
|
||||||
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
||||||
/p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v3/index.json'
|
/p:AzureDevOpsStaticTransportFeed='${{ parameters.transportFeed }}'
|
||||||
/p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
/p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
||||||
/p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-symbols/nuget/v3/index.json'
|
/p:AzureDevOpsStaticSymbolsFeed='${{ parameters.symbolsFeed }}'
|
||||||
/p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
/p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
||||||
|
/p:PublishToMSDL=false
|
||||||
${{ parameters.artifactsPublishingAdditionalParameters }}
|
${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||||
|
|
||||||
- template: ../../steps/promote-build.yml
|
- template: ../../steps/promote-build.yml
|
||||||
parameters:
|
parameters:
|
||||||
ChannelId: ${{ variables.InternalServicing_30_Channel_Id }}
|
ChannelId: ${{ parameters.channelId }}
|
||||||
|
|
@ -1,21 +1,27 @@
|
||||||
parameters:
|
parameters:
|
||||||
symbolPublishingAdditionalParameters: ''
|
|
||||||
artifactsPublishingAdditionalParameters: ''
|
artifactsPublishingAdditionalParameters: ''
|
||||||
publishInstallersAndChecksums: false
|
publishInstallersAndChecksums: false
|
||||||
|
symbolPublishingAdditionalParameters: ''
|
||||||
|
stageName: ''
|
||||||
|
channelName: ''
|
||||||
|
channelId: ''
|
||||||
|
transportFeed: ''
|
||||||
|
shippingFeed: ''
|
||||||
|
symbolsFeed: ''
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- stage: NetCore_Release31_Publish
|
- stage: ${{ parameters.stageName }}
|
||||||
dependsOn: validate
|
dependsOn: validate
|
||||||
variables:
|
variables:
|
||||||
- template: ../common-variables.yml
|
- template: ../common-variables.yml
|
||||||
displayName: .NET Core 3.1 Release Publishing
|
displayName: ${{ parameters.channelName }} Publishing
|
||||||
jobs:
|
jobs:
|
||||||
- template: ../setup-maestro-vars.yml
|
- template: ../setup-maestro-vars.yml
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
displayName: Symbol Publishing
|
displayName: Symbol Publishing
|
||||||
dependsOn: setupMaestroVars
|
dependsOn: setupMaestroVars
|
||||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicRelease_31_Channel_Id))
|
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} ))
|
||||||
variables:
|
variables:
|
||||||
- group: DotNet-Symbol-Server-Pats
|
- group: DotNet-Symbol-Server-Pats
|
||||||
pool:
|
pool:
|
||||||
|
|
@ -33,6 +39,18 @@ stages:
|
||||||
artifactName: 'PDBArtifacts'
|
artifactName: 'PDBArtifacts'
|
||||||
continueOnError: true
|
continueOnError: true
|
||||||
|
|
||||||
|
# This is necessary whenever we want to publish/restore to an AzDO private feed
|
||||||
|
# Since sdk-task.ps1 tries to restore packages we need to do this authentication here
|
||||||
|
# otherwise it'll complain about accessing a private feed.
|
||||||
|
- task: NuGetAuthenticate@0
|
||||||
|
displayName: 'Authenticate to AzDO Feeds'
|
||||||
|
|
||||||
|
- task: PowerShell@2
|
||||||
|
displayName: Enable cross-org publishing
|
||||||
|
inputs:
|
||||||
|
filePath: eng\common\enable-cross-org-publishing.ps1
|
||||||
|
arguments: -token $(dn-bot-dnceng-artifact-feeds-rw)
|
||||||
|
|
||||||
- task: PowerShell@2
|
- task: PowerShell@2
|
||||||
displayName: Publish
|
displayName: Publish
|
||||||
inputs:
|
inputs:
|
||||||
|
|
@ -50,13 +68,11 @@ stages:
|
||||||
displayName: Publish Assets
|
displayName: Publish Assets
|
||||||
dependsOn: setupMaestroVars
|
dependsOn: setupMaestroVars
|
||||||
variables:
|
variables:
|
||||||
- group: DotNet-Blob-Feed
|
|
||||||
- group: AzureDevOps-Artifact-Feeds-Pats
|
|
||||||
- name: BARBuildId
|
- name: BARBuildId
|
||||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
||||||
- name: IsStableBuild
|
- name: IsStableBuild
|
||||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
|
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
|
||||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicRelease_31_Channel_Id))
|
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }}))
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'windows-2019'
|
vmImage: 'windows-2019'
|
||||||
steps:
|
steps:
|
||||||
|
|
@ -65,12 +81,14 @@ stages:
|
||||||
inputs:
|
inputs:
|
||||||
buildType: current
|
buildType: current
|
||||||
artifactName: PackageArtifacts
|
artifactName: PackageArtifacts
|
||||||
|
continueOnError: true
|
||||||
|
|
||||||
- task: DownloadBuildArtifacts@0
|
- task: DownloadBuildArtifacts@0
|
||||||
displayName: Download Blob Artifacts
|
displayName: Download Blob Artifacts
|
||||||
inputs:
|
inputs:
|
||||||
buildType: current
|
buildType: current
|
||||||
artifactName: BlobArtifacts
|
artifactName: BlobArtifacts
|
||||||
|
continueOnError: true
|
||||||
|
|
||||||
- task: DownloadBuildArtifacts@0
|
- task: DownloadBuildArtifacts@0
|
||||||
displayName: Download Asset Manifests
|
displayName: Download Asset Manifests
|
||||||
|
|
@ -117,14 +135,14 @@ stages:
|
||||||
/p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl)
|
/p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl)
|
||||||
/p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key)
|
/p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key)
|
||||||
/p:PublishToAzureDevOpsNuGetFeeds=true
|
/p:PublishToAzureDevOpsNuGetFeeds=true
|
||||||
/p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json'
|
/p:AzureDevOpsStaticShippingFeed='${{ parameters.shippingFeed }}'
|
||||||
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
||||||
/p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json'
|
/p:AzureDevOpsStaticTransportFeed='${{ parameters.transportFeed }}'
|
||||||
/p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
/p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
||||||
/p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json'
|
/p:AzureDevOpsStaticSymbolsFeed='${{ parameters.symbolsFeed }}'
|
||||||
/p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
/p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
||||||
${{ parameters.artifactsPublishingAdditionalParameters }}
|
${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||||
|
|
||||||
- template: ../../steps/promote-build.yml
|
- template: ../../steps/promote-build.yml
|
||||||
parameters:
|
parameters:
|
||||||
ChannelId: ${{ variables.PublicRelease_31_Channel_Id }}
|
ChannelId: ${{ parameters.channelId }}
|
||||||
|
|
@ -1,95 +0,0 @@
|
||||||
parameters:
|
|
||||||
artifactsPublishingAdditionalParameters: ''
|
|
||||||
publishInstallersAndChecksums: false
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- stage: NetCore_3_Tools_Validation_Publish
|
|
||||||
dependsOn: validate
|
|
||||||
variables:
|
|
||||||
- template: ../common-variables.yml
|
|
||||||
displayName: .NET 3 Tools - Validation Publishing
|
|
||||||
jobs:
|
|
||||||
- template: ../setup-maestro-vars.yml
|
|
||||||
|
|
||||||
- job: publish_assets
|
|
||||||
displayName: Publish Assets
|
|
||||||
dependsOn: setupMaestroVars
|
|
||||||
variables:
|
|
||||||
- group: DotNet-Blob-Feed
|
|
||||||
- group: AzureDevOps-Artifact-Feeds-Pats
|
|
||||||
- name: BARBuildId
|
|
||||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
|
||||||
- name: IsStableBuild
|
|
||||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
|
|
||||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NETCore_3_Tools_Validation_Channel_Id))
|
|
||||||
pool:
|
|
||||||
vmImage: 'windows-2019'
|
|
||||||
steps:
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
displayName: Download Package Artifacts
|
|
||||||
inputs:
|
|
||||||
buildType: current
|
|
||||||
artifactName: PackageArtifacts
|
|
||||||
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
displayName: Download Blob Artifacts
|
|
||||||
inputs:
|
|
||||||
buildType: current
|
|
||||||
artifactName: BlobArtifacts
|
|
||||||
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
displayName: Download Asset Manifests
|
|
||||||
inputs:
|
|
||||||
buildType: current
|
|
||||||
artifactName: AssetManifests
|
|
||||||
|
|
||||||
- task: NuGetToolInstaller@1
|
|
||||||
displayName: 'Install NuGet.exe'
|
|
||||||
|
|
||||||
# This is necessary whenever we want to publish/restore to an AzDO private feed
|
|
||||||
- task: NuGetAuthenticate@0
|
|
||||||
displayName: 'Authenticate to AzDO Feeds'
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: Enable cross-org publishing
|
|
||||||
inputs:
|
|
||||||
filePath: eng\common\enable-cross-org-publishing.ps1
|
|
||||||
arguments: -token $(dn-bot-dnceng-artifact-feeds-rw)
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: Publish Assets
|
|
||||||
inputs:
|
|
||||||
filePath: eng\common\sdk-task.ps1
|
|
||||||
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
|
|
||||||
/p:ArtifactsCategory=$(_DotNetValidationArtifactsCategory)
|
|
||||||
/p:IsStableBuild=$(IsStableBuild)
|
|
||||||
/p:IsInternalBuild=$(IsInternalBuild)
|
|
||||||
/p:RepositoryName=$(Build.Repository.Name)
|
|
||||||
/p:CommitSha=$(Build.SourceVersion)
|
|
||||||
/p:NugetPath=$(NuGetExeToolPath)
|
|
||||||
/p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)'
|
|
||||||
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
|
|
||||||
/p:BARBuildId=$(BARBuildId)
|
|
||||||
/p:MaestroApiEndpoint='$(MaestroApiEndPoint)'
|
|
||||||
/p:BuildAssetRegistryToken='$(MaestroApiAccessToken)'
|
|
||||||
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
|
|
||||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
|
|
||||||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/'
|
|
||||||
/p:Configuration=Release
|
|
||||||
/p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }}
|
|
||||||
/p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl)
|
|
||||||
/p:InstallersAzureAccountKey=$(dotnetcli-storage-key)
|
|
||||||
/p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl)
|
|
||||||
/p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key)
|
|
||||||
/p:PublishToAzureDevOpsNuGetFeeds=true
|
|
||||||
/p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
|
|
||||||
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
|
||||||
/p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
|
|
||||||
/p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
|
||||||
/p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json'
|
|
||||||
/p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
|
||||||
${{ parameters.artifactsPublishingAdditionalParameters }}
|
|
||||||
|
|
||||||
- template: ../../steps/promote-build.yml
|
|
||||||
parameters:
|
|
||||||
ChannelId: ${{ variables.NETCore_3_Tools_Validation_Channel_Id }}
|
|
||||||
|
|
@ -1,130 +0,0 @@
|
||||||
parameters:
|
|
||||||
symbolPublishingAdditionalParameters: ''
|
|
||||||
artifactsPublishingAdditionalParameters: ''
|
|
||||||
publishInstallersAndChecksums: false
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- stage: NetCore_3_Tools_Publish
|
|
||||||
dependsOn: validate
|
|
||||||
variables:
|
|
||||||
- template: ../common-variables.yml
|
|
||||||
displayName: .NET 3 Tools Publishing
|
|
||||||
jobs:
|
|
||||||
- template: ../setup-maestro-vars.yml
|
|
||||||
|
|
||||||
- job:
|
|
||||||
displayName: Symbol Publishing
|
|
||||||
dependsOn: setupMaestroVars
|
|
||||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_3_Tools_Channel_Id))
|
|
||||||
variables:
|
|
||||||
- group: DotNet-Symbol-Server-Pats
|
|
||||||
pool:
|
|
||||||
vmImage: 'windows-2019'
|
|
||||||
steps:
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
displayName: Download Blob Artifacts
|
|
||||||
inputs:
|
|
||||||
artifactName: 'BlobArtifacts'
|
|
||||||
continueOnError: true
|
|
||||||
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
displayName: Download PDB Artifacts
|
|
||||||
inputs:
|
|
||||||
artifactName: 'PDBArtifacts'
|
|
||||||
continueOnError: true
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: Publish
|
|
||||||
inputs:
|
|
||||||
filePath: eng\common\sdk-task.ps1
|
|
||||||
arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet
|
|
||||||
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
|
|
||||||
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
|
|
||||||
/p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/'
|
|
||||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
|
|
||||||
/p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt'
|
|
||||||
/p:Configuration=Release
|
|
||||||
${{ parameters.symbolPublishingAdditionalParameters }}
|
|
||||||
|
|
||||||
- job: publish_assets
|
|
||||||
displayName: Publish Assets
|
|
||||||
dependsOn: setupMaestroVars
|
|
||||||
variables:
|
|
||||||
- group: DotNet-Blob-Feed
|
|
||||||
- group: AzureDevOps-Artifact-Feeds-Pats
|
|
||||||
- name: BARBuildId
|
|
||||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
|
||||||
- name: IsStableBuild
|
|
||||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
|
|
||||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_3_Tools_Channel_Id))
|
|
||||||
pool:
|
|
||||||
vmImage: 'windows-2019'
|
|
||||||
steps:
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
displayName: Download Package Artifacts
|
|
||||||
inputs:
|
|
||||||
buildType: current
|
|
||||||
artifactName: PackageArtifacts
|
|
||||||
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
displayName: Download Blob Artifacts
|
|
||||||
inputs:
|
|
||||||
buildType: current
|
|
||||||
artifactName: BlobArtifacts
|
|
||||||
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
displayName: Download Asset Manifests
|
|
||||||
inputs:
|
|
||||||
buildType: current
|
|
||||||
artifactName: AssetManifests
|
|
||||||
|
|
||||||
- task: NuGetToolInstaller@1
|
|
||||||
displayName: 'Install NuGet.exe'
|
|
||||||
|
|
||||||
# This is necessary whenever we want to publish/restore to an AzDO private feed
|
|
||||||
- task: NuGetAuthenticate@0
|
|
||||||
displayName: 'Authenticate to AzDO Feeds'
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: Enable cross-org publishing
|
|
||||||
inputs:
|
|
||||||
filePath: eng\common\enable-cross-org-publishing.ps1
|
|
||||||
arguments: -token $(dn-bot-dnceng-artifact-feeds-rw)
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: Publish Assets
|
|
||||||
inputs:
|
|
||||||
filePath: eng\common\sdk-task.ps1
|
|
||||||
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
|
|
||||||
/p:ArtifactsCategory=$(_DotNetArtifactsCategory)
|
|
||||||
/p:IsStableBuild=$(IsStableBuild)
|
|
||||||
/p:IsInternalBuild=$(IsInternalBuild)
|
|
||||||
/p:RepositoryName=$(Build.Repository.Name)
|
|
||||||
/p:CommitSha=$(Build.SourceVersion)
|
|
||||||
/p:NugetPath=$(NuGetExeToolPath)
|
|
||||||
/p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)'
|
|
||||||
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
|
|
||||||
/p:BARBuildId=$(BARBuildId)
|
|
||||||
/p:MaestroApiEndpoint='$(MaestroApiEndPoint)'
|
|
||||||
/p:BuildAssetRegistryToken='$(MaestroApiAccessToken)'
|
|
||||||
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
|
|
||||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
|
|
||||||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/'
|
|
||||||
/p:Configuration=Release
|
|
||||||
/p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }}
|
|
||||||
/p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl)
|
|
||||||
/p:InstallersAzureAccountKey=$(dotnetcli-storage-key)
|
|
||||||
/p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl)
|
|
||||||
/p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key)
|
|
||||||
/p:PublishToAzureDevOpsNuGetFeeds=true
|
|
||||||
/p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
|
|
||||||
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
|
||||||
/p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
|
|
||||||
/p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
|
||||||
/p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json'
|
|
||||||
/p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
|
||||||
${{ parameters.artifactsPublishingAdditionalParameters }}
|
|
||||||
|
|
||||||
- template: ../../steps/promote-build.yml
|
|
||||||
parameters:
|
|
||||||
ChannelId: ${{ variables.NetCore_3_Tools_Channel_Id }}
|
|
||||||
|
|
@ -1,130 +0,0 @@
|
||||||
parameters:
|
|
||||||
symbolPublishingAdditionalParameters: ''
|
|
||||||
artifactsPublishingAdditionalParameters: ''
|
|
||||||
publishInstallersAndChecksums: false
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- stage: NetCore_Dev31_Publish
|
|
||||||
dependsOn: validate
|
|
||||||
variables:
|
|
||||||
- template: ../common-variables.yml
|
|
||||||
displayName: .NET Core 3.1 Dev Publishing
|
|
||||||
jobs:
|
|
||||||
- template: ../setup-maestro-vars.yml
|
|
||||||
|
|
||||||
- job:
|
|
||||||
displayName: Symbol Publishing
|
|
||||||
dependsOn: setupMaestroVars
|
|
||||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicDevRelease_31_Channel_Id))
|
|
||||||
variables:
|
|
||||||
- group: DotNet-Symbol-Server-Pats
|
|
||||||
pool:
|
|
||||||
vmImage: 'windows-2019'
|
|
||||||
steps:
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
displayName: Download Blob Artifacts
|
|
||||||
inputs:
|
|
||||||
artifactName: 'BlobArtifacts'
|
|
||||||
continueOnError: true
|
|
||||||
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
displayName: Download PDB Artifacts
|
|
||||||
inputs:
|
|
||||||
artifactName: 'PDBArtifacts'
|
|
||||||
continueOnError: true
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: Publish
|
|
||||||
inputs:
|
|
||||||
filePath: eng\common\sdk-task.ps1
|
|
||||||
arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet
|
|
||||||
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
|
|
||||||
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
|
|
||||||
/p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/'
|
|
||||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
|
|
||||||
/p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt'
|
|
||||||
/p:Configuration=Release
|
|
||||||
${{ parameters.symbolPublishingAdditionalParameters }}
|
|
||||||
|
|
||||||
- job: publish_assets
|
|
||||||
displayName: Publish Assets
|
|
||||||
dependsOn: setupMaestroVars
|
|
||||||
variables:
|
|
||||||
- group: DotNet-Blob-Feed
|
|
||||||
- group: AzureDevOps-Artifact-Feeds-Pats
|
|
||||||
- name: BARBuildId
|
|
||||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
|
||||||
- name: IsStableBuild
|
|
||||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
|
|
||||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicDevRelease_31_Channel_Id))
|
|
||||||
pool:
|
|
||||||
vmImage: 'windows-2019'
|
|
||||||
steps:
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
displayName: Download Package Artifacts
|
|
||||||
inputs:
|
|
||||||
buildType: current
|
|
||||||
artifactName: PackageArtifacts
|
|
||||||
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
displayName: Download Blob Artifacts
|
|
||||||
inputs:
|
|
||||||
buildType: current
|
|
||||||
artifactName: BlobArtifacts
|
|
||||||
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
displayName: Download Asset Manifests
|
|
||||||
inputs:
|
|
||||||
buildType: current
|
|
||||||
artifactName: AssetManifests
|
|
||||||
|
|
||||||
- task: NuGetToolInstaller@1
|
|
||||||
displayName: 'Install NuGet.exe'
|
|
||||||
|
|
||||||
# This is necessary whenever we want to publish/restore to an AzDO private feed
|
|
||||||
- task: NuGetAuthenticate@0
|
|
||||||
displayName: 'Authenticate to AzDO Feeds'
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: Enable cross-org publishing
|
|
||||||
inputs:
|
|
||||||
filePath: eng\common\enable-cross-org-publishing.ps1
|
|
||||||
arguments: -token $(dn-bot-dnceng-artifact-feeds-rw)
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: Publish Assets
|
|
||||||
inputs:
|
|
||||||
filePath: eng\common\sdk-task.ps1
|
|
||||||
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
|
|
||||||
/p:ArtifactsCategory=$(_DotNetArtifactsCategory)
|
|
||||||
/p:IsStableBuild=$(IsStableBuild)
|
|
||||||
/p:IsInternalBuild=$(IsInternalBuild)
|
|
||||||
/p:RepositoryName=$(Build.Repository.Name)
|
|
||||||
/p:CommitSha=$(Build.SourceVersion)
|
|
||||||
/p:NugetPath=$(NuGetExeToolPath)
|
|
||||||
/p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)'
|
|
||||||
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
|
|
||||||
/p:BARBuildId=$(BARBuildId)
|
|
||||||
/p:MaestroApiEndpoint='$(MaestroApiEndPoint)'
|
|
||||||
/p:BuildAssetRegistryToken='$(MaestroApiAccessToken)'
|
|
||||||
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
|
|
||||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
|
|
||||||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/'
|
|
||||||
/p:Configuration=Release
|
|
||||||
/p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }}
|
|
||||||
/p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl)
|
|
||||||
/p:InstallersAzureAccountKey=$(dotnetcli-storage-key)
|
|
||||||
/p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl)
|
|
||||||
/p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key)
|
|
||||||
/p:PublishToAzureDevOpsNuGetFeeds=true
|
|
||||||
/p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json'
|
|
||||||
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
|
||||||
/p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json'
|
|
||||||
/p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
|
||||||
/p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json'
|
|
||||||
/p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
|
||||||
${{ parameters.artifactsPublishingAdditionalParameters }}
|
|
||||||
|
|
||||||
- template: ../../steps/promote-build.yml
|
|
||||||
parameters:
|
|
||||||
ChannelId: ${{ variables.PublicDevRelease_31_Channel_Id }}
|
|
||||||
|
|
@ -1,130 +0,0 @@
|
||||||
parameters:
|
|
||||||
symbolPublishingAdditionalParameters: ''
|
|
||||||
artifactsPublishingAdditionalParameters: ''
|
|
||||||
publishInstallersAndChecksums: false
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- stage: NetCore_Dev5_Publish
|
|
||||||
dependsOn: validate
|
|
||||||
variables:
|
|
||||||
- template: ../common-variables.yml
|
|
||||||
displayName: .NET Core 5 Dev Publishing
|
|
||||||
jobs:
|
|
||||||
- template: ../setup-maestro-vars.yml
|
|
||||||
|
|
||||||
- job:
|
|
||||||
displayName: Symbol Publishing
|
|
||||||
dependsOn: setupMaestroVars
|
|
||||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_5_Dev_Channel_Id))
|
|
||||||
variables:
|
|
||||||
- group: DotNet-Symbol-Server-Pats
|
|
||||||
pool:
|
|
||||||
vmImage: 'windows-2019'
|
|
||||||
steps:
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
displayName: Download Blob Artifacts
|
|
||||||
inputs:
|
|
||||||
artifactName: 'BlobArtifacts'
|
|
||||||
continueOnError: true
|
|
||||||
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
displayName: Download PDB Artifacts
|
|
||||||
inputs:
|
|
||||||
artifactName: 'PDBArtifacts'
|
|
||||||
continueOnError: true
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: Publish
|
|
||||||
inputs:
|
|
||||||
filePath: eng\common\sdk-task.ps1
|
|
||||||
arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet
|
|
||||||
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
|
|
||||||
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
|
|
||||||
/p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/'
|
|
||||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
|
|
||||||
/p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt'
|
|
||||||
/p:Configuration=Release
|
|
||||||
${{ parameters.symbolPublishingAdditionalParameters }}
|
|
||||||
|
|
||||||
- job: publish_assets
|
|
||||||
displayName: Publish Assets
|
|
||||||
dependsOn: setupMaestroVars
|
|
||||||
variables:
|
|
||||||
- group: DotNet-Blob-Feed
|
|
||||||
- group: AzureDevOps-Artifact-Feeds-Pats
|
|
||||||
- name: BARBuildId
|
|
||||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
|
||||||
- name: IsStableBuild
|
|
||||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
|
|
||||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_5_Dev_Channel_Id))
|
|
||||||
pool:
|
|
||||||
vmImage: 'windows-2019'
|
|
||||||
steps:
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
displayName: Download Package Artifacts
|
|
||||||
inputs:
|
|
||||||
buildType: current
|
|
||||||
artifactName: PackageArtifacts
|
|
||||||
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
displayName: Download Blob Artifacts
|
|
||||||
inputs:
|
|
||||||
buildType: current
|
|
||||||
artifactName: BlobArtifacts
|
|
||||||
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
displayName: Download Asset Manifests
|
|
||||||
inputs:
|
|
||||||
buildType: current
|
|
||||||
artifactName: AssetManifests
|
|
||||||
|
|
||||||
- task: NuGetToolInstaller@1
|
|
||||||
displayName: 'Install NuGet.exe'
|
|
||||||
|
|
||||||
# This is necessary whenever we want to publish/restore to an AzDO private feed
|
|
||||||
- task: NuGetAuthenticate@0
|
|
||||||
displayName: 'Authenticate to AzDO Feeds'
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: Enable cross-org publishing
|
|
||||||
inputs:
|
|
||||||
filePath: eng\common\enable-cross-org-publishing.ps1
|
|
||||||
arguments: -token $(dn-bot-dnceng-artifact-feeds-rw)
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: Publish Assets
|
|
||||||
inputs:
|
|
||||||
filePath: eng\common\sdk-task.ps1
|
|
||||||
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
|
|
||||||
/p:ArtifactsCategory=$(_DotNetArtifactsCategory)
|
|
||||||
/p:IsStableBuild=$(IsStableBuild)
|
|
||||||
/p:IsInternalBuild=$(IsInternalBuild)
|
|
||||||
/p:RepositoryName=$(Build.Repository.Name)
|
|
||||||
/p:CommitSha=$(Build.SourceVersion)
|
|
||||||
/p:NugetPath=$(NuGetExeToolPath)
|
|
||||||
/p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)'
|
|
||||||
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
|
|
||||||
/p:BARBuildId=$(BARBuildId)
|
|
||||||
/p:MaestroApiEndpoint='$(MaestroApiEndPoint)'
|
|
||||||
/p:BuildAssetRegistryToken='$(MaestroApiAccessToken)'
|
|
||||||
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
|
|
||||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
|
|
||||||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/'
|
|
||||||
/p:Configuration=Release
|
|
||||||
/p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }}
|
|
||||||
/p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl)
|
|
||||||
/p:InstallersAzureAccountKey=$(dotnetcli-storage-key)
|
|
||||||
/p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl)
|
|
||||||
/p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key)
|
|
||||||
/p:PublishToAzureDevOpsNuGetFeeds=true
|
|
||||||
/p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json'
|
|
||||||
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
|
||||||
/p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json'
|
|
||||||
/p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
|
||||||
/p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-symbols/nuget/v3/index.json'
|
|
||||||
/p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
|
||||||
${{ parameters.artifactsPublishingAdditionalParameters }}
|
|
||||||
|
|
||||||
- template: ../../steps/promote-build.yml
|
|
||||||
parameters:
|
|
||||||
ChannelId: ${{ variables.NetCore_5_Dev_Channel_Id }}
|
|
||||||
|
|
@ -1,130 +0,0 @@
|
||||||
parameters:
|
|
||||||
symbolPublishingAdditionalParameters: ''
|
|
||||||
artifactsPublishingAdditionalParameters: ''
|
|
||||||
publishInstallersAndChecksums: false
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- stage: NetCore_Release30_Publish
|
|
||||||
dependsOn: validate
|
|
||||||
variables:
|
|
||||||
- template: ../common-variables.yml
|
|
||||||
displayName: .NET Core 3.0 Release Publishing
|
|
||||||
jobs:
|
|
||||||
- template: ../setup-maestro-vars.yml
|
|
||||||
|
|
||||||
- job:
|
|
||||||
displayName: Symbol Publishing
|
|
||||||
dependsOn: setupMaestroVars
|
|
||||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicRelease_30_Channel_Id))
|
|
||||||
variables:
|
|
||||||
- group: DotNet-Symbol-Server-Pats
|
|
||||||
pool:
|
|
||||||
vmImage: 'windows-2019'
|
|
||||||
steps:
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
displayName: Download Blob Artifacts
|
|
||||||
inputs:
|
|
||||||
artifactName: 'BlobArtifacts'
|
|
||||||
continueOnError: true
|
|
||||||
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
displayName: Download PDB Artifacts
|
|
||||||
inputs:
|
|
||||||
artifactName: 'PDBArtifacts'
|
|
||||||
continueOnError: true
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: Publish
|
|
||||||
inputs:
|
|
||||||
filePath: eng\common\sdk-task.ps1
|
|
||||||
arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet
|
|
||||||
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
|
|
||||||
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
|
|
||||||
/p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/'
|
|
||||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
|
|
||||||
/p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt'
|
|
||||||
/p:Configuration=Release
|
|
||||||
${{ parameters.symbolPublishingAdditionalParameters }}
|
|
||||||
|
|
||||||
- job: publish_assets
|
|
||||||
displayName: Publish Assets
|
|
||||||
dependsOn: setupMaestroVars
|
|
||||||
variables:
|
|
||||||
- group: DotNet-Blob-Feed
|
|
||||||
- group: AzureDevOps-Artifact-Feeds-Pats
|
|
||||||
- name: BARBuildId
|
|
||||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
|
||||||
- name: IsStableBuild
|
|
||||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
|
|
||||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicRelease_30_Channel_Id))
|
|
||||||
pool:
|
|
||||||
vmImage: 'windows-2019'
|
|
||||||
steps:
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
displayName: Download Package Artifacts
|
|
||||||
inputs:
|
|
||||||
buildType: current
|
|
||||||
artifactName: PackageArtifacts
|
|
||||||
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
displayName: Download Blob Artifacts
|
|
||||||
inputs:
|
|
||||||
buildType: current
|
|
||||||
artifactName: BlobArtifacts
|
|
||||||
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
displayName: Download Asset Manifests
|
|
||||||
inputs:
|
|
||||||
buildType: current
|
|
||||||
artifactName: AssetManifests
|
|
||||||
|
|
||||||
- task: NuGetToolInstaller@1
|
|
||||||
displayName: 'Install NuGet.exe'
|
|
||||||
|
|
||||||
# This is necessary whenever we want to publish/restore to an AzDO private feed
|
|
||||||
- task: NuGetAuthenticate@0
|
|
||||||
displayName: 'Authenticate to AzDO Feeds'
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: Enable cross-org publishing
|
|
||||||
inputs:
|
|
||||||
filePath: eng\common\enable-cross-org-publishing.ps1
|
|
||||||
arguments: -token $(dn-bot-dnceng-artifact-feeds-rw)
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: Publish Assets
|
|
||||||
inputs:
|
|
||||||
filePath: eng\common\sdk-task.ps1
|
|
||||||
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
|
|
||||||
/p:ArtifactsCategory=$(_DotNetArtifactsCategory)
|
|
||||||
/p:IsStableBuild=$(IsStableBuild)
|
|
||||||
/p:IsInternalBuild=$(IsInternalBuild)
|
|
||||||
/p:RepositoryName=$(Build.Repository.Name)
|
|
||||||
/p:CommitSha=$(Build.SourceVersion)
|
|
||||||
/p:NugetPath=$(NuGetExeToolPath)
|
|
||||||
/p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)'
|
|
||||||
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
|
|
||||||
/p:BARBuildId=$(BARBuildId)
|
|
||||||
/p:MaestroApiEndpoint='$(MaestroApiEndPoint)'
|
|
||||||
/p:BuildAssetRegistryToken='$(MaestroApiAccessToken)'
|
|
||||||
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
|
|
||||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
|
|
||||||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/'
|
|
||||||
/p:Configuration=Release
|
|
||||||
/p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }}
|
|
||||||
/p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl)
|
|
||||||
/p:InstallersAzureAccountKey=$(dotnetcli-storage-key)
|
|
||||||
/p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl)
|
|
||||||
/p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key)
|
|
||||||
/p:PublishToAzureDevOpsNuGetFeeds=true
|
|
||||||
/p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3/nuget/v3/index.json'
|
|
||||||
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
|
||||||
/p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-transport/nuget/v3/index.json'
|
|
||||||
/p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
|
||||||
/p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-symbols/nuget/v3/index.json'
|
|
||||||
/p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
|
||||||
${{ parameters.artifactsPublishingAdditionalParameters }}
|
|
||||||
|
|
||||||
- template: ../../steps/promote-build.yml
|
|
||||||
parameters:
|
|
||||||
ChannelId: ${{ variables.PublicRelease_30_Channel_Id }}
|
|
||||||
|
|
@ -1,130 +0,0 @@
|
||||||
parameters:
|
|
||||||
symbolPublishingAdditionalParameters: ''
|
|
||||||
artifactsPublishingAdditionalParameters: ''
|
|
||||||
publishInstallersAndChecksums: false
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- stage: NetCore_Tools_Latest_Publish
|
|
||||||
dependsOn: validate
|
|
||||||
variables:
|
|
||||||
- template: ../common-variables.yml
|
|
||||||
displayName: .NET Tools - Latest Publishing
|
|
||||||
jobs:
|
|
||||||
- template: ../setup-maestro-vars.yml
|
|
||||||
|
|
||||||
- job:
|
|
||||||
displayName: Symbol Publishing
|
|
||||||
dependsOn: setupMaestroVars
|
|
||||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_Tools_Latest_Channel_Id))
|
|
||||||
variables:
|
|
||||||
- group: DotNet-Symbol-Server-Pats
|
|
||||||
pool:
|
|
||||||
vmImage: 'windows-2019'
|
|
||||||
steps:
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
displayName: Download Blob Artifacts
|
|
||||||
inputs:
|
|
||||||
artifactName: 'BlobArtifacts'
|
|
||||||
continueOnError: true
|
|
||||||
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
displayName: Download PDB Artifacts
|
|
||||||
inputs:
|
|
||||||
artifactName: 'PDBArtifacts'
|
|
||||||
continueOnError: true
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: Publish
|
|
||||||
inputs:
|
|
||||||
filePath: eng\common\sdk-task.ps1
|
|
||||||
arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet
|
|
||||||
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
|
|
||||||
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
|
|
||||||
/p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/'
|
|
||||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
|
|
||||||
/p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt'
|
|
||||||
/p:Configuration=Release
|
|
||||||
${{ parameters.symbolPublishingAdditionalParameters }}
|
|
||||||
|
|
||||||
- job: publish_assets
|
|
||||||
displayName: Publish Assets
|
|
||||||
dependsOn: setupMaestroVars
|
|
||||||
variables:
|
|
||||||
- group: DotNet-Blob-Feed
|
|
||||||
- group: AzureDevOps-Artifact-Feeds-Pats
|
|
||||||
- name: BARBuildId
|
|
||||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
|
||||||
- name: IsStableBuild
|
|
||||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
|
|
||||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_Tools_Latest_Channel_Id))
|
|
||||||
pool:
|
|
||||||
vmImage: 'windows-2019'
|
|
||||||
steps:
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
displayName: Download Package Artifacts
|
|
||||||
inputs:
|
|
||||||
buildType: current
|
|
||||||
artifactName: PackageArtifacts
|
|
||||||
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
displayName: Download Blob Artifacts
|
|
||||||
inputs:
|
|
||||||
buildType: current
|
|
||||||
artifactName: BlobArtifacts
|
|
||||||
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
displayName: Download Asset Manifests
|
|
||||||
inputs:
|
|
||||||
buildType: current
|
|
||||||
artifactName: AssetManifests
|
|
||||||
|
|
||||||
- task: NuGetToolInstaller@1
|
|
||||||
displayName: 'Install NuGet.exe'
|
|
||||||
|
|
||||||
# This is necessary whenever we want to publish/restore to an AzDO private feed
|
|
||||||
- task: NuGetAuthenticate@0
|
|
||||||
displayName: 'Authenticate to AzDO Feeds'
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: Enable cross-org publishing
|
|
||||||
inputs:
|
|
||||||
filePath: eng\common\enable-cross-org-publishing.ps1
|
|
||||||
arguments: -token $(dn-bot-dnceng-artifact-feeds-rw)
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: Publish Assets
|
|
||||||
inputs:
|
|
||||||
filePath: eng\common\sdk-task.ps1
|
|
||||||
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
|
|
||||||
/p:ArtifactsCategory=$(_DotNetArtifactsCategory)
|
|
||||||
/p:IsStableBuild=$(IsStableBuild)
|
|
||||||
/p:IsInternalBuild=$(IsInternalBuild)
|
|
||||||
/p:RepositoryName=$(Build.Repository.Name)
|
|
||||||
/p:CommitSha=$(Build.SourceVersion)
|
|
||||||
/p:NugetPath=$(NuGetExeToolPath)
|
|
||||||
/p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)'
|
|
||||||
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
|
|
||||||
/p:BARBuildId=$(BARBuildId)
|
|
||||||
/p:MaestroApiEndpoint='$(MaestroApiEndPoint)'
|
|
||||||
/p:BuildAssetRegistryToken='$(MaestroApiAccessToken)'
|
|
||||||
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
|
|
||||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
|
|
||||||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/'
|
|
||||||
/p:Configuration=Release
|
|
||||||
/p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }}
|
|
||||||
/p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl)
|
|
||||||
/p:InstallersAzureAccountKey=$(dotnetcli-storage-key)
|
|
||||||
/p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl)
|
|
||||||
/p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key)
|
|
||||||
/p:PublishToAzureDevOpsNuGetFeeds=true
|
|
||||||
/p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
|
|
||||||
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
|
||||||
/p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
|
|
||||||
/p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
|
||||||
/p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json'
|
|
||||||
/p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
|
||||||
${{ parameters.artifactsPublishingAdditionalParameters }}
|
|
||||||
|
|
||||||
- template: ../../steps/promote-build.yml
|
|
||||||
parameters:
|
|
||||||
ChannelId: ${{ variables.NetCore_Tools_Latest_Channel_Id }}
|
|
||||||
|
|
@ -1,95 +0,0 @@
|
||||||
parameters:
|
|
||||||
artifactsPublishingAdditionalParameters: ''
|
|
||||||
publishInstallersAndChecksums: false
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- stage: PVR_Publish
|
|
||||||
dependsOn: validate
|
|
||||||
variables:
|
|
||||||
- template: ../common-variables.yml
|
|
||||||
displayName: .NET Tools - Validation Publishing
|
|
||||||
jobs:
|
|
||||||
- template: ../setup-maestro-vars.yml
|
|
||||||
|
|
||||||
- job: publish_assets
|
|
||||||
displayName: Publish Assets
|
|
||||||
dependsOn: setupMaestroVars
|
|
||||||
variables:
|
|
||||||
- group: DotNet-Blob-Feed
|
|
||||||
- group: AzureDevOps-Artifact-Feeds-Pats
|
|
||||||
- name: BARBuildId
|
|
||||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
|
||||||
- name: IsStableBuild
|
|
||||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
|
|
||||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_Tools_Validation_Channel_Id))
|
|
||||||
pool:
|
|
||||||
vmImage: 'windows-2019'
|
|
||||||
steps:
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
displayName: Download Package Artifacts
|
|
||||||
inputs:
|
|
||||||
buildType: current
|
|
||||||
artifactName: PackageArtifacts
|
|
||||||
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
displayName: Download Blob Artifacts
|
|
||||||
inputs:
|
|
||||||
buildType: current
|
|
||||||
artifactName: BlobArtifacts
|
|
||||||
|
|
||||||
- task: DownloadBuildArtifacts@0
|
|
||||||
displayName: Download Asset Manifests
|
|
||||||
inputs:
|
|
||||||
buildType: current
|
|
||||||
artifactName: AssetManifests
|
|
||||||
|
|
||||||
- task: NuGetToolInstaller@1
|
|
||||||
displayName: 'Install NuGet.exe'
|
|
||||||
|
|
||||||
# This is necessary whenever we want to publish/restore to an AzDO private feed
|
|
||||||
- task: NuGetAuthenticate@0
|
|
||||||
displayName: 'Authenticate to AzDO Feeds'
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: Enable cross-org publishing
|
|
||||||
inputs:
|
|
||||||
filePath: eng\common\enable-cross-org-publishing.ps1
|
|
||||||
arguments: -token $(dn-bot-dnceng-artifact-feeds-rw)
|
|
||||||
|
|
||||||
- task: PowerShell@2
|
|
||||||
displayName: Publish Assets
|
|
||||||
inputs:
|
|
||||||
filePath: eng\common\sdk-task.ps1
|
|
||||||
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
|
|
||||||
/p:ArtifactsCategory=$(_DotNetValidationArtifactsCategory)
|
|
||||||
/p:IsStableBuild=$(IsStableBuild)
|
|
||||||
/p:IsInternalBuild=$(IsInternalBuild)
|
|
||||||
/p:RepositoryName=$(Build.Repository.Name)
|
|
||||||
/p:CommitSha=$(Build.SourceVersion)
|
|
||||||
/p:NugetPath=$(NuGetExeToolPath)
|
|
||||||
/p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)'
|
|
||||||
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
|
|
||||||
/p:BARBuildId=$(BARBuildId)
|
|
||||||
/p:MaestroApiEndpoint='$(MaestroApiEndPoint)'
|
|
||||||
/p:BuildAssetRegistryToken='$(MaestroApiAccessToken)'
|
|
||||||
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
|
|
||||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
|
|
||||||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/'
|
|
||||||
/p:Configuration=Release
|
|
||||||
/p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }}
|
|
||||||
/p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl)
|
|
||||||
/p:InstallersAzureAccountKey=$(dotnetcli-storage-key)
|
|
||||||
/p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl)
|
|
||||||
/p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key)
|
|
||||||
/p:PublishToAzureDevOpsNuGetFeeds=true
|
|
||||||
/p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
|
|
||||||
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
|
||||||
/p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
|
|
||||||
/p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
|
||||||
/p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json'
|
|
||||||
/p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
|
||||||
${{ parameters.artifactsPublishingAdditionalParameters }}
|
|
||||||
|
|
||||||
- template: ../../steps/promote-build.yml
|
|
||||||
parameters:
|
|
||||||
ChannelId: ${{ variables.NetCore_Tools_Validation_Channel_Id }}
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
variables:
|
variables:
|
||||||
- group: Publish-Build-Assets
|
- group: AzureDevOps-Artifact-Feeds-Pats
|
||||||
|
- group: DotNet-Blob-Feed
|
||||||
- group: DotNet-DotNetCli-Storage
|
- group: DotNet-DotNetCli-Storage
|
||||||
- group: DotNet-MSRC-Storage
|
- group: DotNet-MSRC-Storage
|
||||||
|
- group: Publish-Build-Assets
|
||||||
|
|
||||||
# .NET Core 3.1 Dev
|
# .NET Core 3.1 Dev
|
||||||
- name: PublicDevRelease_31_Channel_Id
|
- name: PublicDevRelease_31_Channel_Id
|
||||||
|
|
@ -11,19 +13,19 @@ variables:
|
||||||
- name: NetCore_5_Dev_Channel_Id
|
- name: NetCore_5_Dev_Channel_Id
|
||||||
value: 131
|
value: 131
|
||||||
|
|
||||||
# .NET Tools - Validation
|
# .NET Eng - Validation
|
||||||
- name: NetCore_Tools_Validation_Channel_Id
|
- name: Net_Eng_Validation_Channel_Id
|
||||||
value: 9
|
value: 9
|
||||||
|
|
||||||
# .NET Tools - Latest
|
# .NET Eng - Latest
|
||||||
- name: NetCore_Tools_Latest_Channel_Id
|
- name: Net_Eng_Latest_Channel_Id
|
||||||
value: 2
|
value: 2
|
||||||
|
|
||||||
# .NET 3 Tools - Validation
|
# .NET 3 Eng - Validation
|
||||||
- name: NETCore_3_Tools_Validation_Channel_Id
|
- name: NET_3_Eng_Validation_Channel_Id
|
||||||
value: 390
|
value: 390
|
||||||
|
|
||||||
# .NET 3 Tools - Latest
|
# .NET 3 Eng
|
||||||
- name: NetCore_3_Tools_Channel_Id
|
- name: NetCore_3_Tools_Channel_Id
|
||||||
value: 344
|
value: 344
|
||||||
|
|
||||||
|
|
@ -39,6 +41,14 @@ variables:
|
||||||
- name: PublicRelease_31_Channel_Id
|
- name: PublicRelease_31_Channel_Id
|
||||||
value: 129
|
value: 129
|
||||||
|
|
||||||
|
# General Testing
|
||||||
|
- name: GeneralTesting_Channel_Id
|
||||||
|
value: 529
|
||||||
|
|
||||||
|
# .NET Core 3.1 Blazor Features
|
||||||
|
- name: NetCore_31_Blazor_Features_Channel_Id
|
||||||
|
value: 531
|
||||||
|
|
||||||
# Whether the build is internal or not
|
# Whether the build is internal or not
|
||||||
- name: IsInternalBuild
|
- name: IsInternalBuild
|
||||||
value: ${{ and(ne(variables['System.TeamProject'], 'public'), contains(variables['Build.SourceBranch'], 'internal')) }}
|
value: ${{ and(ne(variables['System.TeamProject'], 'public'), contains(variables['Build.SourceBranch'], 'internal')) }}
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ parameters:
|
||||||
enable: false
|
enable: false
|
||||||
continueOnError: false
|
continueOnError: false
|
||||||
params: ''
|
params: ''
|
||||||
|
artifactNames: ''
|
||||||
|
|
||||||
# These parameters let the user customize the call to sdk-task.ps1 for publishing
|
# These parameters let the user customize the call to sdk-task.ps1 for publishing
|
||||||
# symbols & general artifacts as well as for signing validation
|
# symbols & general artifacts as well as for signing validation
|
||||||
|
|
@ -94,54 +95,244 @@ stages:
|
||||||
parameters:
|
parameters:
|
||||||
additionalParameters: ${{ parameters.SDLValidationParameters.params }}
|
additionalParameters: ${{ parameters.SDLValidationParameters.params }}
|
||||||
continueOnError: ${{ parameters.SDLValidationParameters.continueOnError }}
|
continueOnError: ${{ parameters.SDLValidationParameters.continueOnError }}
|
||||||
|
artifactNames: ${{ parameters.SDLValidationParameters.artifactNames }}
|
||||||
|
|
||||||
- template: \eng\common\templates\post-build\channels\netcore-dev-5.yml
|
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||||
parameters:
|
parameters:
|
||||||
|
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||||
|
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||||
|
stageName: 'NetCore_Dev5_Publish'
|
||||||
|
channelName: '.NET Core 5 Dev'
|
||||||
|
channelId: 131
|
||||||
|
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json'
|
||||||
|
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json'
|
||||||
|
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-symbols/nuget/v3/index.json'
|
||||||
|
|
||||||
|
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||||
|
parameters:
|
||||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||||
|
|
||||||
- template: \eng\common\templates\post-build\channels\netcore-dev-31.yml
|
|
||||||
parameters:
|
|
||||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||||
|
stageName: 'NetCore_Dev31_Publish'
|
||||||
|
channelName: '.NET Core 3.1 Dev'
|
||||||
|
channelId: 128
|
||||||
|
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json'
|
||||||
|
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json'
|
||||||
|
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json'
|
||||||
|
|
||||||
|
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||||
|
parameters:
|
||||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||||
|
|
||||||
- template: \eng\common\templates\post-build\channels\netcore-tools-latest.yml
|
|
||||||
parameters:
|
|
||||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
stageName: 'Net_Eng_Latest_Publish'
|
||||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
channelName: '.NET Eng - Latest'
|
||||||
|
channelId: 2
|
||||||
|
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
|
||||||
|
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
|
||||||
|
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json'
|
||||||
|
|
||||||
- template: \eng\common\templates\post-build\channels\netcore-tools-validation.yml
|
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||||
parameters:
|
parameters:
|
||||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||||
|
|
||||||
- template: \eng\common\templates\post-build\channels\netcore-3-tools-validation.yml
|
|
||||||
parameters:
|
|
||||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
|
||||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
|
||||||
|
|
||||||
- template: \eng\common\templates\post-build\channels\netcore-3-tools.yml
|
|
||||||
parameters:
|
|
||||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||||
|
stageName: 'Net_Eng_Validation_Publish'
|
||||||
|
channelName: '.NET Eng - Validation'
|
||||||
|
channelId: 9
|
||||||
|
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
|
||||||
|
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
|
||||||
|
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json'
|
||||||
|
|
||||||
|
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||||
|
parameters:
|
||||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||||
|
|
||||||
- template: \eng\common\templates\post-build\channels\netcore-release-30.yml
|
|
||||||
parameters:
|
|
||||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||||
|
stageName: 'NetCore_3_Tools_Validation_Publish'
|
||||||
|
channelName: '.NET 3 Tools - Validation'
|
||||||
|
channelId: 390
|
||||||
|
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
|
||||||
|
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
|
||||||
|
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json'
|
||||||
|
|
||||||
|
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||||
|
parameters:
|
||||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||||
|
|
||||||
- template: \eng\common\templates\post-build\channels\netcore-release-31.yml
|
|
||||||
parameters:
|
|
||||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||||
|
stageName: 'NetCore_3_Tools_Publish'
|
||||||
|
channelName: '.NET 3 Tools'
|
||||||
|
channelId: 344
|
||||||
|
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
|
||||||
|
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
|
||||||
|
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json'
|
||||||
|
|
||||||
|
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||||
|
parameters:
|
||||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||||
|
|
||||||
- template: \eng\common\templates\post-build\channels\netcore-internal-30.yml
|
|
||||||
parameters:
|
|
||||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||||
|
stageName: 'NetCore_Release30_Publish'
|
||||||
|
channelName: '.NET Core 3.0 Release'
|
||||||
|
channelId: 19
|
||||||
|
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-transport/nuget/v3/index.json'
|
||||||
|
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3/nuget/v3/index.json'
|
||||||
|
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-symbols/nuget/v3/index.json'
|
||||||
|
|
||||||
|
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||||
|
parameters:
|
||||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||||
|
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||||
|
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||||
|
stageName: 'NetCore_Release31_Publish'
|
||||||
|
channelName: '.NET Core 3.1 Release'
|
||||||
|
channelId: 129
|
||||||
|
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json'
|
||||||
|
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json'
|
||||||
|
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json'
|
||||||
|
|
||||||
|
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||||
|
parameters:
|
||||||
|
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||||
|
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||||
|
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||||
|
stageName: 'NetCore_Blazor31_Features_Publish'
|
||||||
|
channelName: '.NET Core 3.1 Blazor Features'
|
||||||
|
channelId: 531
|
||||||
|
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor/nuget/v3/index.json'
|
||||||
|
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor/nuget/v3/index.json'
|
||||||
|
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor-symbols/nuget/v3/index.json'
|
||||||
|
|
||||||
|
- template: \eng\common\templates\post-build\channels\generic-internal-channel.yml
|
||||||
|
parameters:
|
||||||
|
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||||
|
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||||
|
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||||
|
stageName: 'NetCore_30_Internal_Servicing_Publishing'
|
||||||
|
channelName: '.NET Core 3.0 Internal Servicing'
|
||||||
|
channelId: 184
|
||||||
|
transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v3/index.json'
|
||||||
|
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v3/index.json'
|
||||||
|
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-symbols/nuget/v3/index.json'
|
||||||
|
|
||||||
|
- template: \eng\common\templates\post-build\channels\generic-internal-channel.yml
|
||||||
|
parameters:
|
||||||
|
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||||
|
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||||
|
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||||
|
stageName: 'NetCore_31_Internal_Servicing_Publishing'
|
||||||
|
channelName: '.NET Core 3.1 Internal Servicing'
|
||||||
|
channelId: 550
|
||||||
|
transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v3/index.json'
|
||||||
|
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v3/index.json'
|
||||||
|
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-symbols/nuget/v3/index.json'
|
||||||
|
|
||||||
|
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||||
|
parameters:
|
||||||
|
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||||
|
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||||
|
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||||
|
stageName: 'General_Testing_Publish'
|
||||||
|
channelName: 'General Testing'
|
||||||
|
channelId: 529
|
||||||
|
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing/nuget/v3/index.json'
|
||||||
|
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing/nuget/v3/index.json'
|
||||||
|
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing-symbols/nuget/v3/index.json'
|
||||||
|
|
||||||
|
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||||
|
parameters:
|
||||||
|
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||||
|
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||||
|
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||||
|
stageName: 'NETCore_Tooling_Dev_Publishing'
|
||||||
|
channelName: '.NET Core Tooling Dev'
|
||||||
|
channelId: 548
|
||||||
|
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
|
||||||
|
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
|
||||||
|
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json'
|
||||||
|
|
||||||
|
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||||
|
parameters:
|
||||||
|
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||||
|
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||||
|
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||||
|
stageName: 'NETCore_Tooling_Release_Publishing'
|
||||||
|
channelName: '.NET Core Tooling Release'
|
||||||
|
channelId: 549
|
||||||
|
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
|
||||||
|
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
|
||||||
|
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json'
|
||||||
|
|
||||||
|
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||||
|
parameters:
|
||||||
|
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||||
|
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||||
|
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||||
|
stageName: 'NETCore_SDK_301xx_Publishing'
|
||||||
|
channelName: '.NET Core SDK 3.0.1xx'
|
||||||
|
channelId: 556
|
||||||
|
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-transport/nuget/v3/index.json'
|
||||||
|
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3/nuget/v3/index.json'
|
||||||
|
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-symbols/nuget/v3/index.json'
|
||||||
|
|
||||||
|
- template: \eng\common\templates\post-build\channels\generic-internal-channel.yml
|
||||||
|
parameters:
|
||||||
|
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||||
|
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||||
|
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||||
|
stageName: 'NETCore_SDK_301xx_Internal_Publishing'
|
||||||
|
channelName: '.NET Core SDK 3.0.1xx Internal'
|
||||||
|
channelId: 555
|
||||||
|
transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v3/index.json'
|
||||||
|
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v3/index.json'
|
||||||
|
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-symbols/nuget/v3/index.json'
|
||||||
|
|
||||||
|
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||||
|
parameters:
|
||||||
|
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||||
|
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||||
|
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||||
|
stageName: 'NETCore_SDK_311xx_Publishing'
|
||||||
|
channelName: '.NET Core SDK 3.1.1xx'
|
||||||
|
channelId: 560
|
||||||
|
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json'
|
||||||
|
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json'
|
||||||
|
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json'
|
||||||
|
|
||||||
|
- template: \eng\common\templates\post-build\channels\generic-internal-channel.yml
|
||||||
|
parameters:
|
||||||
|
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||||
|
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||||
|
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||||
|
stageName: 'NETCore_SDK_311xx_Internal_Publishing'
|
||||||
|
channelName: '.NET Core SDK 3.1.1xx Internal'
|
||||||
|
channelId: 559
|
||||||
|
transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v3/index.json'
|
||||||
|
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v3/index.json'
|
||||||
|
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-symbols/nuget/v3/index.json'
|
||||||
|
|
||||||
|
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||||
|
parameters:
|
||||||
|
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||||
|
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||||
|
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||||
|
stageName: 'NETCore_SDK_312xx_Publishing'
|
||||||
|
channelName: '.NET Core SDK 3.1.2xx'
|
||||||
|
channelId: 558
|
||||||
|
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json'
|
||||||
|
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json'
|
||||||
|
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json'
|
||||||
|
|
||||||
|
- template: \eng\common\templates\post-build\channels\generic-internal-channel.yml
|
||||||
|
parameters:
|
||||||
|
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||||
|
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||||
|
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||||
|
stageName: 'NETCore_SDK_312xx_Internal_Publishing'
|
||||||
|
channelName: '.NET Core SDK 3.1.2xx Internal'
|
||||||
|
channelId: 557
|
||||||
|
transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v3/index.json'
|
||||||
|
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v3/index.json'
|
||||||
|
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-symbols/nuget/v3/index.json'
|
||||||
|
|
@ -228,7 +228,7 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
|
||||||
if ($msbuildCmd -ne $null) {
|
if ($msbuildCmd -ne $null) {
|
||||||
# Workaround for https://github.com/dotnet/roslyn/issues/35793
|
# Workaround for https://github.com/dotnet/roslyn/issues/35793
|
||||||
# Due to this issue $msbuildCmd.Version returns 0.0.0.0 for msbuild.exe 16.2+
|
# Due to this issue $msbuildCmd.Version returns 0.0.0.0 for msbuild.exe 16.2+
|
||||||
$msbuildVersion = [Version]::new((Get-Item $msbuildCmd.Path).VersionInfo.ProductVersion.Split(@('-', '+'))[0])
|
$msbuildVersion = [Version]::new((Get-Item $msbuildCmd.Path).VersionInfo.ProductVersion.Split([char[]]@('-', '+'))[0])
|
||||||
|
|
||||||
if ($msbuildVersion -ge $vsMinVersion) {
|
if ($msbuildVersion -ge $vsMinVersion) {
|
||||||
return $global:_MSBuildExe = $msbuildCmd.Path
|
return $global:_MSBuildExe = $msbuildCmd.Path
|
||||||
|
|
|
||||||
|
|
@ -161,10 +161,11 @@ try {
|
||||||
& $PSScriptRoot\GenerateReferenceAssemblies.ps1 -ci:$ci
|
& $PSScriptRoot\GenerateReferenceAssemblies.ps1 -ci:$ci
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "Re-generating package baselines"
|
# Temporarily disable package baseline generation while we stage for publishing
|
||||||
Invoke-Block {
|
# Write-Host "Re-generating package baselines"
|
||||||
& dotnet run -p "$repoRoot/eng/tools/BaselineGenerator/"
|
# Invoke-Block {
|
||||||
}
|
# & dotnet run -p "$repoRoot/eng/tools/BaselineGenerator/"
|
||||||
|
# }
|
||||||
|
|
||||||
Write-Host "Run git diff to check for pending changes"
|
Write-Host "Run git diff to check for pending changes"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
{
|
{
|
||||||
"sdk": {
|
"sdk": {
|
||||||
"version": "3.1.100-preview1-014400"
|
"version": "3.1.100"
|
||||||
},
|
},
|
||||||
"tools": {
|
"tools": {
|
||||||
"dotnet": "3.1.100-preview1-014400",
|
"dotnet": "3.1.100",
|
||||||
"runtimes": {
|
"runtimes": {
|
||||||
"dotnet/x64": [
|
"dotnet/x64": [
|
||||||
"$(MicrosoftNETCoreAppInternalPackageVersion)"
|
"$(MicrosoftNETCoreAppInternalPackageVersion)"
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
},
|
},
|
||||||
"msbuild-sdks": {
|
"msbuild-sdks": {
|
||||||
"Yarn.MSBuild": "1.15.2",
|
"Yarn.MSBuild": "1.15.2",
|
||||||
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19517.3",
|
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19577.5",
|
||||||
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19517.3"
|
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19577.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
<!-- This file is automatically generated. -->
|
<!-- This file is automatically generated. -->
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netstandard2.0</TargetFrameworks>
|
<TargetFrameworks>netstandard2.1</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
|
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1'">
|
||||||
<Compile Include="Microsoft.AspNetCore.Blazor.netstandard2.0.cs" />
|
<Compile Include="Microsoft.AspNetCore.Blazor.netstandard2.1.cs" />
|
||||||
<Reference Include="Mono.WebAssembly.Interop" />
|
<Reference Include="Mono.WebAssembly.Interop" />
|
||||||
<Reference Include="Microsoft.AspNetCore.Components.Web" />
|
<Reference Include="Microsoft.AspNetCore.Components.Web" />
|
||||||
<Reference Include="Microsoft.Extensions.Options" />
|
<Reference Include="Microsoft.Extensions.Options" />
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
<TargetFramework>netstandard2.1</TargetFramework>
|
||||||
<Description>Build client-side single-page applications (SPAs) with Blazor running under WebAssembly.</Description>
|
<Description>Build client-side single-page applications (SPAs) with Blazor running under WebAssembly.</Description>
|
||||||
<IsShippingPackage>true</IsShippingPackage>
|
<IsShippingPackage>true</IsShippingPackage>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
||||||
|
|
@ -1,61 +0,0 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.IO;
|
|
||||||
using Microsoft.Extensions.CommandLineUtils;
|
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Blazor.Build.DevServer.Commands
|
|
||||||
{
|
|
||||||
class ResolveRuntimeDependenciesCommand
|
|
||||||
{
|
|
||||||
public static void Command(CommandLineApplication command)
|
|
||||||
{
|
|
||||||
var referencesFile = command.Option("--references",
|
|
||||||
"The path to a file that lists the paths to given referenced dll files",
|
|
||||||
CommandOptionType.SingleValue);
|
|
||||||
|
|
||||||
var baseClassLibrary = command.Option("--base-class-library",
|
|
||||||
"Full path to a directory in which BCL assemblies can be found",
|
|
||||||
CommandOptionType.MultipleValue);
|
|
||||||
|
|
||||||
var outputPath = command.Option("--output",
|
|
||||||
"Path to the output file that will contain the list with the full paths of the resolved assemblies",
|
|
||||||
CommandOptionType.SingleValue);
|
|
||||||
|
|
||||||
var mainAssemblyPath = command.Argument("assembly",
|
|
||||||
"Path to the assembly containing the entry point of the application.");
|
|
||||||
|
|
||||||
command.OnExecute(() =>
|
|
||||||
{
|
|
||||||
if (string.IsNullOrEmpty(mainAssemblyPath.Value) ||
|
|
||||||
!baseClassLibrary.HasValue() || !outputPath.HasValue())
|
|
||||||
{
|
|
||||||
command.ShowHelp(command.Name);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var referencesSources = referencesFile.HasValue()
|
|
||||||
? File.ReadAllLines(referencesFile.Value())
|
|
||||||
: Array.Empty<string>();
|
|
||||||
|
|
||||||
RuntimeDependenciesResolver.ResolveRuntimeDependencies(
|
|
||||||
mainAssemblyPath.Value,
|
|
||||||
referencesSources,
|
|
||||||
baseClassLibrary.Values.ToArray(),
|
|
||||||
outputPath.Value());
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Console.WriteLine($"ERROR: {ex.Message}");
|
|
||||||
Console.WriteLine(ex.StackTrace);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,68 +0,0 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
|
||||||
|
|
||||||
using Microsoft.Extensions.CommandLineUtils;
|
|
||||||
using System;
|
|
||||||
using System.IO;
|
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Blazor.Build.DevServer.Commands
|
|
||||||
{
|
|
||||||
internal class WriteBootJsonCommand
|
|
||||||
{
|
|
||||||
public static void Command(CommandLineApplication command)
|
|
||||||
{
|
|
||||||
var referencesFile = command.Option("--references",
|
|
||||||
"The path to a file that lists the paths to given referenced dll files",
|
|
||||||
CommandOptionType.SingleValue);
|
|
||||||
|
|
||||||
var embeddedResourcesFile = command.Option("--embedded-resources",
|
|
||||||
"The path to a file that lists the paths of .NET assemblies that may contain embedded resources (typically, referenced assemblies in their pre-linked states)",
|
|
||||||
CommandOptionType.SingleValue);
|
|
||||||
|
|
||||||
var outputPath = command.Option("--output",
|
|
||||||
"Path to the output file",
|
|
||||||
CommandOptionType.SingleValue);
|
|
||||||
|
|
||||||
var mainAssemblyPath = command.Argument("assembly",
|
|
||||||
"Path to the assembly containing the entry point of the application.");
|
|
||||||
|
|
||||||
var linkerEnabledFlag = command.Option("--linker-enabled",
|
|
||||||
"If set, specifies that the application is being built with linking enabled.",
|
|
||||||
CommandOptionType.NoValue);
|
|
||||||
|
|
||||||
command.OnExecute(() =>
|
|
||||||
{
|
|
||||||
if (string.IsNullOrEmpty(mainAssemblyPath.Value) || !outputPath.HasValue())
|
|
||||||
{
|
|
||||||
command.ShowHelp(command.Name);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var referencesSources = referencesFile.HasValue()
|
|
||||||
? File.ReadAllLines(referencesFile.Value())
|
|
||||||
: Array.Empty<string>();
|
|
||||||
|
|
||||||
var embeddedResourcesSources = embeddedResourcesFile.HasValue()
|
|
||||||
? File.ReadAllLines(embeddedResourcesFile.Value())
|
|
||||||
: Array.Empty<string>();
|
|
||||||
|
|
||||||
BootJsonWriter.WriteFile(
|
|
||||||
mainAssemblyPath.Value,
|
|
||||||
referencesSources,
|
|
||||||
embeddedResourcesSources,
|
|
||||||
linkerEnabledFlag.HasValue(),
|
|
||||||
outputPath.Value());
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Console.WriteLine($"ERROR: {ex.Message}");
|
|
||||||
Console.WriteLine(ex.StackTrace);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
|
||||||
|
|
||||||
using Microsoft.AspNetCore.Blazor.Build.DevServer.Commands;
|
|
||||||
using Microsoft.Extensions.CommandLineUtils;
|
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Blazor.Build
|
|
||||||
{
|
|
||||||
static class Program
|
|
||||||
{
|
|
||||||
static int Main(string[] args)
|
|
||||||
{
|
|
||||||
var app = new CommandLineApplication
|
|
||||||
{
|
|
||||||
Name = "Microsoft.AspNetCore.Blazor.Build"
|
|
||||||
};
|
|
||||||
app.HelpOption("-?|-h|--help");
|
|
||||||
|
|
||||||
app.Command("resolve-dependencies", ResolveRuntimeDependenciesCommand.Command);
|
|
||||||
app.Command("write-boot-json", WriteBootJsonCommand.Command);
|
|
||||||
|
|
||||||
if (args.Length > 0)
|
|
||||||
{
|
|
||||||
return app.Execute(args);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
app.ShowHelp();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,95 +0,0 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text.Json;
|
|
||||||
using Microsoft.AspNetCore.Components;
|
|
||||||
using Mono.Cecil;
|
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Blazor.Build
|
|
||||||
{
|
|
||||||
internal class BootJsonWriter
|
|
||||||
{
|
|
||||||
public static void WriteFile(
|
|
||||||
string assemblyPath,
|
|
||||||
string[] assemblyReferences,
|
|
||||||
string[] embeddedResourcesSources,
|
|
||||||
bool linkerEnabled,
|
|
||||||
string outputPath)
|
|
||||||
{
|
|
||||||
var embeddedContent = EmbeddedResourcesProcessor.ExtractEmbeddedResources(
|
|
||||||
embeddedResourcesSources, Path.GetDirectoryName(outputPath));
|
|
||||||
var bootJsonText = GetBootJsonContent(
|
|
||||||
Path.GetFileName(assemblyPath),
|
|
||||||
GetAssemblyEntryPoint(assemblyPath),
|
|
||||||
assemblyReferences,
|
|
||||||
embeddedContent,
|
|
||||||
linkerEnabled);
|
|
||||||
var normalizedOutputPath = Path.GetFullPath(outputPath);
|
|
||||||
Console.WriteLine("Writing boot data to: " + normalizedOutputPath);
|
|
||||||
File.WriteAllText(normalizedOutputPath, bootJsonText);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string GetBootJsonContent(string assemblyFileName, string entryPoint, string[] assemblyReferences, IEnumerable<EmbeddedResourceInfo> embeddedContent, bool linkerEnabled)
|
|
||||||
{
|
|
||||||
var data = new BootJsonData(
|
|
||||||
assemblyFileName,
|
|
||||||
entryPoint,
|
|
||||||
assemblyReferences,
|
|
||||||
embeddedContent,
|
|
||||||
linkerEnabled);
|
|
||||||
return JsonSerializer.Serialize(data, JsonSerializerOptionsProvider.Options);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static string GetAssemblyEntryPoint(string assemblyPath)
|
|
||||||
{
|
|
||||||
using (var assemblyDefinition = AssemblyDefinition.ReadAssembly(assemblyPath))
|
|
||||||
{
|
|
||||||
var entryPoint = assemblyDefinition.EntryPoint;
|
|
||||||
if (entryPoint == null)
|
|
||||||
{
|
|
||||||
throw new ArgumentException($"The assembly at {assemblyPath} has no specified entry point.");
|
|
||||||
}
|
|
||||||
|
|
||||||
return $"{entryPoint.DeclaringType.FullName}::{entryPoint.Name}";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Defines the structure of a Blazor boot JSON file
|
|
||||||
/// </summary>
|
|
||||||
class BootJsonData
|
|
||||||
{
|
|
||||||
public string Main { get; }
|
|
||||||
public string EntryPoint { get; }
|
|
||||||
public IEnumerable<string> AssemblyReferences { get; }
|
|
||||||
public IEnumerable<string> CssReferences { get; }
|
|
||||||
public IEnumerable<string> JsReferences { get; }
|
|
||||||
public bool LinkerEnabled { get; }
|
|
||||||
|
|
||||||
public BootJsonData(
|
|
||||||
string entrypointAssemblyWithExtension,
|
|
||||||
string entryPoint,
|
|
||||||
IEnumerable<string> assemblyReferences,
|
|
||||||
IEnumerable<EmbeddedResourceInfo> embeddedContent,
|
|
||||||
bool linkerEnabled)
|
|
||||||
{
|
|
||||||
Main = entrypointAssemblyWithExtension;
|
|
||||||
EntryPoint = entryPoint;
|
|
||||||
AssemblyReferences = assemblyReferences;
|
|
||||||
LinkerEnabled = linkerEnabled;
|
|
||||||
|
|
||||||
CssReferences = embeddedContent
|
|
||||||
.Where(c => c.Kind == EmbeddedResourceKind.Css)
|
|
||||||
.Select(c => c.RelativePath);
|
|
||||||
|
|
||||||
JsReferences = embeddedContent
|
|
||||||
.Where(c => c.Kind == EmbeddedResourceKind.JavaScript)
|
|
||||||
.Select(c => c.RelativePath);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Blazor.Build
|
|
||||||
{
|
|
||||||
internal class EmbeddedResourceInfo
|
|
||||||
{
|
|
||||||
public EmbeddedResourceKind Kind { get; }
|
|
||||||
public string RelativePath { get; }
|
|
||||||
|
|
||||||
public EmbeddedResourceInfo(EmbeddedResourceKind kind, string relativePath)
|
|
||||||
{
|
|
||||||
Kind = kind;
|
|
||||||
RelativePath = relativePath;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Blazor.Build
|
|
||||||
{
|
|
||||||
internal enum EmbeddedResourceKind
|
|
||||||
{
|
|
||||||
JavaScript,
|
|
||||||
Css,
|
|
||||||
Static
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,137 +0,0 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
|
||||||
|
|
||||||
using Mono.Cecil;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Blazor.Build
|
|
||||||
{
|
|
||||||
internal class EmbeddedResourcesProcessor
|
|
||||||
{
|
|
||||||
const string ContentSubdirName = "_content";
|
|
||||||
|
|
||||||
private readonly static Dictionary<string, EmbeddedResourceKind> _knownResourceKindsByNamePrefix = new Dictionary<string, EmbeddedResourceKind>
|
|
||||||
{
|
|
||||||
{ "blazor:js:", EmbeddedResourceKind.JavaScript },
|
|
||||||
{ "blazor:css:", EmbeddedResourceKind.Css },
|
|
||||||
{ "blazor:file:", EmbeddedResourceKind.Static },
|
|
||||||
};
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Finds Blazor-specific embedded resources in the specified assemblies, writes them
|
|
||||||
/// to disk, and returns a description of those resources in dependency order.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="referencedAssemblyPaths">The paths to assemblies that may contain embedded resources.</param>
|
|
||||||
/// <param name="outputDir">The path to the directory where output is being written.</param>
|
|
||||||
/// <returns>A description of the embedded resources that were written to disk.</returns>
|
|
||||||
public static IReadOnlyList<EmbeddedResourceInfo> ExtractEmbeddedResources(
|
|
||||||
IEnumerable<string> referencedAssemblyPaths, string outputDir)
|
|
||||||
{
|
|
||||||
// Clean away any earlier state
|
|
||||||
var contentDir = Path.Combine(outputDir, ContentSubdirName);
|
|
||||||
if (Directory.Exists(contentDir))
|
|
||||||
{
|
|
||||||
Directory.Delete(contentDir, recursive: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
// First, get an ordered list of AssemblyDefinition instances
|
|
||||||
var referencedAssemblyDefinitions = referencedAssemblyPaths
|
|
||||||
.Where(path => !Path.GetFileName(path).StartsWith("System.", StringComparison.Ordinal)) // Skip System.* because they are never going to contain embedded resources that we want
|
|
||||||
.Select(path => AssemblyDefinition.ReadAssembly(path))
|
|
||||||
.ToList();
|
|
||||||
referencedAssemblyDefinitions.Sort(OrderWithReferenceSubjectFirst);
|
|
||||||
|
|
||||||
// Now process them in turn
|
|
||||||
return referencedAssemblyDefinitions
|
|
||||||
.SelectMany(def => ExtractEmbeddedResourcesFromSingleAssembly(def, outputDir))
|
|
||||||
.ToList()
|
|
||||||
.AsReadOnly();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static IEnumerable<EmbeddedResourceInfo> ExtractEmbeddedResourcesFromSingleAssembly(
|
|
||||||
AssemblyDefinition assemblyDefinition, string outputDirPath)
|
|
||||||
{
|
|
||||||
var assemblyName = assemblyDefinition.Name.Name;
|
|
||||||
foreach (var res in assemblyDefinition.MainModule.Resources)
|
|
||||||
{
|
|
||||||
if (TryExtractEmbeddedResource(assemblyName, res, outputDirPath, out var extractedResourceInfo))
|
|
||||||
{
|
|
||||||
yield return extractedResourceInfo;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static bool TryExtractEmbeddedResource(string assemblyName, Resource resource, string outputDirPath, out EmbeddedResourceInfo extractedResourceInfo)
|
|
||||||
{
|
|
||||||
if (resource is EmbeddedResource embeddedResource)
|
|
||||||
{
|
|
||||||
if (TryInterpretLogicalName(resource.Name, out var kind, out var name))
|
|
||||||
{
|
|
||||||
// Prefix the output path with the assembly name to ensure no clashes
|
|
||||||
// Also be invariant to the OS on which the package was built
|
|
||||||
name = Path.Combine(ContentSubdirName, assemblyName, EnsureHasPathSeparators(name, Path.DirectorySeparatorChar));
|
|
||||||
|
|
||||||
// Write the file content to disk, ensuring we don't try to write outside the output root
|
|
||||||
var outputPath = Path.GetFullPath(Path.Combine(outputDirPath, name));
|
|
||||||
if (!outputPath.StartsWith(outputDirPath))
|
|
||||||
{
|
|
||||||
throw new InvalidOperationException($"Cannot write embedded resource from assembly '{assemblyName}' to '{outputPath}' because it is outside the expected directory {outputDirPath}");
|
|
||||||
}
|
|
||||||
WriteResourceFile(embeddedResource, outputPath);
|
|
||||||
|
|
||||||
// The URLs we write into the boot json file need to use web-style directory separators
|
|
||||||
extractedResourceInfo = new EmbeddedResourceInfo(kind, EnsureHasPathSeparators(name, '/'));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
extractedResourceInfo = null;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void WriteResourceFile(EmbeddedResource resource, string outputPath)
|
|
||||||
{
|
|
||||||
Directory.CreateDirectory(Path.GetDirectoryName(outputPath));
|
|
||||||
using (var outputStream = File.OpenWrite(outputPath))
|
|
||||||
{
|
|
||||||
resource.GetResourceStream().CopyTo(outputStream);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static string EnsureHasPathSeparators(string name, char desiredSeparatorChar) => name
|
|
||||||
.Replace('\\', desiredSeparatorChar)
|
|
||||||
.Replace('/', desiredSeparatorChar);
|
|
||||||
|
|
||||||
private static bool TryInterpretLogicalName(string logicalName, out EmbeddedResourceKind kind, out string resolvedName)
|
|
||||||
{
|
|
||||||
foreach (var kvp in _knownResourceKindsByNamePrefix)
|
|
||||||
{
|
|
||||||
if (logicalName.StartsWith(kvp.Key, StringComparison.Ordinal))
|
|
||||||
{
|
|
||||||
kind = kvp.Value;
|
|
||||||
resolvedName = logicalName.Substring(kvp.Key.Length);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
kind = default;
|
|
||||||
resolvedName = default;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// For each assembly B that references A, we want the resources from A to be loaded before
|
|
||||||
// the references for B (because B's resources might depend on A's resources)
|
|
||||||
private static int OrderWithReferenceSubjectFirst(AssemblyDefinition a, AssemblyDefinition b)
|
|
||||||
=> AssemblyHasReference(a, b) ? 1
|
|
||||||
: AssemblyHasReference(b, a) ? -1
|
|
||||||
: 0;
|
|
||||||
|
|
||||||
private static bool AssemblyHasReference(AssemblyDefinition from, AssemblyDefinition to)
|
|
||||||
=> from.MainModule.AssemblyReferences
|
|
||||||
.Select(reference => reference.Name)
|
|
||||||
.Contains(to.Name.Name, StringComparer.Ordinal);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,165 +0,0 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using Mono.Cecil;
|
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Blazor.Build
|
|
||||||
{
|
|
||||||
internal class RuntimeDependenciesResolver
|
|
||||||
{
|
|
||||||
public static void ResolveRuntimeDependencies(
|
|
||||||
string entryPoint,
|
|
||||||
string[] applicationDependencies,
|
|
||||||
string[] monoBclDirectories,
|
|
||||||
string outputFile)
|
|
||||||
{
|
|
||||||
var paths = ResolveRuntimeDependenciesCore(entryPoint, applicationDependencies, monoBclDirectories);
|
|
||||||
File.WriteAllLines(outputFile, paths);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IEnumerable<string> ResolveRuntimeDependenciesCore(
|
|
||||||
string entryPoint,
|
|
||||||
string[] applicationDependencies,
|
|
||||||
string[] monoBclDirectories)
|
|
||||||
{
|
|
||||||
var assembly = new AssemblyEntry(entryPoint, AssemblyDefinition.ReadAssembly(entryPoint));
|
|
||||||
|
|
||||||
var dependencies = applicationDependencies
|
|
||||||
.Select(a => new AssemblyEntry(a, AssemblyDefinition.ReadAssembly(a)))
|
|
||||||
.ToArray();
|
|
||||||
|
|
||||||
var bcl = monoBclDirectories
|
|
||||||
.SelectMany(d => Directory.EnumerateFiles(d, "*.dll").Select(f => Path.Combine(d, f)))
|
|
||||||
.Select(a => new AssemblyEntry(a, AssemblyDefinition.ReadAssembly(a)))
|
|
||||||
.ToArray();
|
|
||||||
|
|
||||||
var assemblyResolutionContext = new AssemblyResolutionContext(
|
|
||||||
assembly,
|
|
||||||
dependencies,
|
|
||||||
bcl);
|
|
||||||
|
|
||||||
assemblyResolutionContext.ResolveAssemblies();
|
|
||||||
|
|
||||||
var paths = assemblyResolutionContext.Results.Select(r => r.Path);
|
|
||||||
return paths.Concat(FindPdbs(paths));
|
|
||||||
}
|
|
||||||
|
|
||||||
private static IEnumerable<string> FindPdbs(IEnumerable<string> dllPaths)
|
|
||||||
{
|
|
||||||
return dllPaths
|
|
||||||
.Select(path => Path.ChangeExtension(path, "pdb"))
|
|
||||||
.Where(path => File.Exists(path));
|
|
||||||
}
|
|
||||||
|
|
||||||
public class AssemblyResolutionContext
|
|
||||||
{
|
|
||||||
public AssemblyResolutionContext(
|
|
||||||
AssemblyEntry assembly,
|
|
||||||
AssemblyEntry[] dependencies,
|
|
||||||
AssemblyEntry[] bcl)
|
|
||||||
{
|
|
||||||
Assembly = assembly;
|
|
||||||
Dependencies = dependencies;
|
|
||||||
Bcl = bcl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public AssemblyEntry Assembly { get; }
|
|
||||||
public AssemblyEntry[] Dependencies { get; }
|
|
||||||
public AssemblyEntry[] Bcl { get; }
|
|
||||||
|
|
||||||
public IList<AssemblyEntry> Results { get; } = new List<AssemblyEntry>();
|
|
||||||
|
|
||||||
internal void ResolveAssemblies()
|
|
||||||
{
|
|
||||||
var visitedAssemblies = new HashSet<string>();
|
|
||||||
var pendingAssemblies = new Stack<AssemblyNameReference>();
|
|
||||||
pendingAssemblies.Push(Assembly.Definition.Name);
|
|
||||||
ResolveAssembliesCore();
|
|
||||||
|
|
||||||
void ResolveAssembliesCore()
|
|
||||||
{
|
|
||||||
while (pendingAssemblies.TryPop(out var current))
|
|
||||||
{
|
|
||||||
if (!visitedAssemblies.Contains(current.Name))
|
|
||||||
{
|
|
||||||
visitedAssemblies.Add(current.Name);
|
|
||||||
|
|
||||||
// Not all references will be resolvable within the Mono BCL, particularly
|
|
||||||
// when building for server-side Blazor as you will be running on CoreCLR
|
|
||||||
// and therefore may depend on System.* BCL assemblies that aren't present
|
|
||||||
// in Mono WebAssembly. Skipping unresolved assemblies here is equivalent
|
|
||||||
// to passing "--skip-unresolved true" to the Mono linker.
|
|
||||||
var resolved = Resolve(current);
|
|
||||||
if (resolved != null)
|
|
||||||
{
|
|
||||||
Results.Add(resolved);
|
|
||||||
var references = GetAssemblyReferences(resolved);
|
|
||||||
foreach (var reference in references)
|
|
||||||
{
|
|
||||||
pendingAssemblies.Push(reference);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
IEnumerable<AssemblyNameReference> GetAssemblyReferences(AssemblyEntry current) =>
|
|
||||||
current.Definition.Modules.SelectMany(m => m.AssemblyReferences);
|
|
||||||
|
|
||||||
AssemblyEntry Resolve(AssemblyNameReference current)
|
|
||||||
{
|
|
||||||
if (Assembly.Definition.Name.Name == current.Name)
|
|
||||||
{
|
|
||||||
return Assembly;
|
|
||||||
}
|
|
||||||
|
|
||||||
var referencedAssemblyCandidate = FindCandidate(current, Dependencies);
|
|
||||||
var bclAssemblyCandidate = FindCandidate(current, Bcl);
|
|
||||||
|
|
||||||
// Resolution logic. For right now, we will prefer the mono BCL version of a given
|
|
||||||
// assembly if there is a candidate assembly and an equivalent mono assembly.
|
|
||||||
if (bclAssemblyCandidate != null)
|
|
||||||
{
|
|
||||||
return bclAssemblyCandidate;
|
|
||||||
}
|
|
||||||
|
|
||||||
return referencedAssemblyCandidate;
|
|
||||||
}
|
|
||||||
|
|
||||||
AssemblyEntry FindCandidate(AssemblyNameReference current, AssemblyEntry[] candidates)
|
|
||||||
{
|
|
||||||
// Do simple name match. Assume no duplicates.
|
|
||||||
foreach (var candidate in candidates)
|
|
||||||
{
|
|
||||||
if (current.Name == candidate.Definition.Name.Name)
|
|
||||||
{
|
|
||||||
return candidate;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[DebuggerDisplay("{ToString(),nq}")]
|
|
||||||
public class AssemblyEntry
|
|
||||||
{
|
|
||||||
public AssemblyEntry(string path, AssemblyDefinition definition)
|
|
||||||
{
|
|
||||||
Path = path;
|
|
||||||
Definition = definition;
|
|
||||||
}
|
|
||||||
|
|
||||||
public string Path { get; set; }
|
|
||||||
public AssemblyDefinition Definition { get; set; }
|
|
||||||
|
|
||||||
public override string ToString() => Definition.FullName;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,41 +1,71 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
|
<TargetFrameworks>$(DefaultNetCoreTargetFramework);net46</TargetFrameworks>
|
||||||
|
<TargetName>Microsoft.AspNetCore.Blazor.Build.Tasks</TargetName>
|
||||||
|
<AssemblyName>Microsoft.AspNetCore.Blazor.Build</AssemblyName>
|
||||||
<Description>Build mechanism for ASP.NET Core Blazor applications.</Description>
|
<Description>Build mechanism for ASP.NET Core Blazor applications.</Description>
|
||||||
<OutputType>Exe</OutputType>
|
|
||||||
<IsShippingPackage>true</IsShippingPackage>
|
<IsShippingPackage>true</IsShippingPackage>
|
||||||
<HasReferenceAssembly>false</HasReferenceAssembly>
|
<HasReferenceAssembly>false</HasReferenceAssembly>
|
||||||
|
<GenerateDependencyFile>false</GenerateDependencyFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- Pack settings -->
|
<!-- Pack settings -->
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<!-- Producing this package requires building with NodeJS enabled. -->
|
<!-- Producing this package requires building with NodeJS enabled. -->
|
||||||
<IsPackable Condition="'$(BuildNodeJS)' == 'false'">false</IsPackable>
|
<IsPackable Condition="'$(BuildNodeJS)' == 'false'">false</IsPackable>
|
||||||
<GenerateNuspecDependsOn>$(GenerateNuspecDependsOn);Publish</GenerateNuspecDependsOn>
|
|
||||||
<NoPackageAnalysis>true</NoPackageAnalysis>
|
<NoPackageAnalysis>true</NoPackageAnalysis>
|
||||||
<NuspecFile>Microsoft.AspNetCore.Blazor.Build.nuspec</NuspecFile>
|
<NuspecFile>Microsoft.AspNetCore.Blazor.Build.nuspec</NuspecFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<NuspecProperty Include="configuration=$(Configuration)" />
|
<NuspecProperty Include="configuration=$(Configuration)" />
|
||||||
<NuspecProperty Include="publishDir=$(PublishDir)" />
|
<NuspecProperty Include="taskskDir=$(OutputPath)tools" />
|
||||||
<NuspecProperty Include="componentsversion=$(ComponentsPackageVersion)" />
|
<NuspecProperty Include="componentsversion=$(ComponentsPackageVersion)" />
|
||||||
<NuspecProperty Include="razorversion=$(MicrosoftAspNetCoreRazorDesignPackageVersion)" />
|
<NuspecProperty Include="razorversion=$(MicrosoftAspNetCoreRazorDesignPackageVersion)" />
|
||||||
<NuspecProperty Include="blazormonoversion=$(MicrosoftAspNetCoreBlazorMonoPackageVersion)" />
|
<NuspecProperty Include="blazormonoversion=$(MicrosoftAspNetCoreBlazorMonoPackageVersion)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Condition="'$(BuildNodeJS)' != 'false' and '$(BuildingInsideVisualStudio)' != 'true'" Include="$(RepoRoot)src\Components\Web.JS\Microsoft.AspNetCore.Components.Web.JS.npmproj" ReferenceOutputAssembly="false" />
|
<!-- Add a project dependency without reference output assemblies to enforce build order -->
|
||||||
<Reference Include="Microsoft.AspNetCore.Components" />
|
<!-- Applying workaround for https://github.com/microsoft/msbuild/issues/2661 and https://github.com/dotnet/sdk/issues/952 -->
|
||||||
<Reference Include="Microsoft.Extensions.CommandLineUtils.Sources" />
|
<ProjectReference
|
||||||
<Reference Include="Microsoft.Extensions.FileProviders.Composite" />
|
Include="$(RepoRoot)src\Components\Web.JS\Microsoft.AspNetCore.Components.Web.JS.npmproj"
|
||||||
<Reference Include="Microsoft.Extensions.FileProviders.Physical" />
|
ReferenceOutputAssemblies="false"
|
||||||
<Reference Include="Mono.Cecil" />
|
SkipGetTargetFrameworkProperties="true"
|
||||||
<Reference Include="System.CodeDom" />
|
UndefineProperties="TargetFramework"
|
||||||
|
Private="false"
|
||||||
|
Condition="'$(BuildNodeJS)' != 'false' and '$(BuildingInsideVisualStudio)' != 'true'" />
|
||||||
|
|
||||||
|
<Reference Include="Microsoft.Build.Framework" ExcludeAssets="Runtime" />
|
||||||
|
<Reference Include="Microsoft.Build.Utilities.Core" ExcludeAssets="Runtime" />
|
||||||
|
<Reference Include="System.Reflection.Metadata" Condition="'$(TargetFramework)' == 'net46'" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<Target Name="CopyBuildTask" BeforeTargets="Build" Condition="'$(DotNetBuildFromSource)' != 'true' AND '$(IsInnerBuild)' != 'true'">
|
||||||
<Compile Include="..\..\..\Shared\src\JsonSerializerOptionsProvider.cs" />
|
<!--
|
||||||
</ItemGroup>
|
The task produced by this project is referenced within this solution. When building, Visual Studio will lock up the assembly.
|
||||||
|
Any attempts to overwrite the binary with a newer version will fail. This is particularly grating if a developer "Rebuilds" the project
|
||||||
|
after an initial build since that would always attempt to overwrite the tasks dll
|
||||||
|
|
||||||
|
This target attempts to make this solution more usable at the cost of a more onerous inner-loop build of the Blazor.Build tasks.
|
||||||
|
We'll copy the tasks to a location other that than the build output and use that in the Blazor.Build.targets. In the most common
|
||||||
|
case where these tasks aren't being worked on, everything should work great. However, if you're attemping to modify these tasks,
|
||||||
|
you will need to manaully stop MSBuild.exe processes
|
||||||
|
-->
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<_NetCoreFilesToCopy Include="$(OutputPath)$(DefaultNetCoreTargetFramework)\*" TargetPath="netcoreapp\" />
|
||||||
|
<_DesktopFilesToCopy Include="$(OutputPath)net46\*" TargetPath="netfx\" />
|
||||||
|
<_AllFilesToCopy Include="@(_NetCoreFilesToCopy);@(_DesktopFilesToCopy)" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Error Text="No files found in $(OutputPath)$(DefaultNetCoreTargetFramework)" Condition="@(_NetCoreFilesToCopy->Count()) == 0" />
|
||||||
|
<Error Text="No files found in $(OutputPath)net46" Condition="@(_DesktopFilesToCopy->Count()) == 0" />
|
||||||
|
|
||||||
|
<Copy SourceFiles="@(_AllFilesToCopy)" DestinationFiles="@(_AllFilesToCopy->'$(OutputPath)tools\%(TargetPath)%(FileName)%(Extension)')" SkipUnchangedFiles="true" Retries="1" ContinueOnError="true">
|
||||||
|
<Output TaskParameter="CopiedFiles" ItemName="FileWrites" />
|
||||||
|
</Copy>
|
||||||
|
</Target>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
<file src="..\..\..\THIRD-PARTY-NOTICES.txt" />
|
<file src="..\..\..\THIRD-PARTY-NOTICES.txt" />
|
||||||
<file src="build\**" target="build" />
|
<file src="build\**" target="build" />
|
||||||
<file src="targets\**" target="targets" />
|
<file src="targets\**" target="targets" />
|
||||||
<file src="$publishdir$**\*" target="tools/" />
|
<file src="$taskskDir$\**" target="tools/" />
|
||||||
<file src="..\..\..\Web.JS\dist\$configuration$\blazor.*.js" target="tools/blazor" />
|
<file src="..\..\..\Web.JS\dist\$configuration$\blazor.webassembly.js" target="tools/blazor" />
|
||||||
</files>
|
</files>
|
||||||
</package>
|
</package>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
<Project>
|
||||||
|
<!--
|
||||||
|
Importing this file is equivalent to having:
|
||||||
|
<PackageDependency Include="Microsoft.AspNetCore.Blazor.Build" />
|
||||||
|
... except it's much more convenient when working in this repo, because it consumes the
|
||||||
|
Blazor.Build targets/exe directly without needing this project to be packed into a .nupkg.
|
||||||
|
|
||||||
|
This is only intended for use by other projects in this repo.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<ComponentsRoot Condition="'$(ComponentsRoot)'==''">$(MSBuildThisFileDirectory)..\..\..\</ComponentsRoot>
|
||||||
|
<BlazorJsPath>$(ComponentsRoot)Web.JS\dist\$(Configuration)\blazor.webassembly.js</BlazorJsPath>
|
||||||
|
<BlazorJsMapPath>$(ComponentsRoot)Web.JS\dist\$(Configuration)\blazor.webassembly.js.map</BlazorJsMapPath>
|
||||||
|
<BlazorToolsDir>$(MSBuildThisFileDirectory)bin\$(Configuration)\tools\</BlazorToolsDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<Target Name="CheckBlazorJSFiles" BeforeTargets="Build">
|
||||||
|
<Error Text="blazor.webassembly.js file could not be found at $(BlazorJsPath)" Condition="!Exists($(BlazorJsPath))" />
|
||||||
|
</Target>
|
||||||
|
|
||||||
|
<Import Project="$(MSBuildThisFileDirectory)targets/All.props" />
|
||||||
|
<Import Project="$(MSBuildThisFileDirectory)targets/All.targets" />
|
||||||
|
|
||||||
|
</Project>
|
||||||
|
|
@ -1,21 +1,6 @@
|
||||||
<Project>
|
<Project>
|
||||||
|
|
||||||
<!--
|
<Import Project="ReferenceBlazorBuildFromSource.props" />
|
||||||
Importing this file is equivalent to having:
|
|
||||||
<PackageDependency Include="Microsoft.AspNetCore.Blazor.Build" />
|
|
||||||
... except it's much more convenient when working in this repo, because it consumes the
|
|
||||||
Blazor.Build targets/exe directly without needing this project to be packed into a .nupkg.
|
|
||||||
|
|
||||||
This is only intended for use by other projects in this repo.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<BlazorBuildReferenceFromSource>true</BlazorBuildReferenceFromSource>
|
|
||||||
<BlazorJsPath>$(RepoRoot)src\Components\Web.JS\dist\$(Configuration)\blazor.*.js.*</BlazorJsPath>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<Import Project="$(MSBuildThisFileDirectory)targets/All.props" />
|
|
||||||
<Import Project="$(MSBuildThisFileDirectory)targets/All.targets" />
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Debugging support using blazor-devserver serve.
|
Debugging support using blazor-devserver serve.
|
||||||
|
|
@ -35,6 +20,14 @@
|
||||||
<Reference Include="Microsoft.AspNetCore.Blazor.Mono" />
|
<Reference Include="Microsoft.AspNetCore.Blazor.Mono" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Target Name="_BuildBlazorBuildProject" BeforeTargets="ResolveProjectReferences">
|
||||||
|
<!--
|
||||||
|
The Blazor.Build project cross-compiles and we need the output of all TFMs to be available in the build output.
|
||||||
|
We can't represent this in any good way using ProjectReference elements, but we can try and build it instead.
|
||||||
|
-->
|
||||||
|
<MSBuild Projects="$(MSBuildThisFileDirectory)Microsoft.AspNetCore.Blazor.Build.csproj" />
|
||||||
|
</Target>
|
||||||
|
|
||||||
<!-- This is used as a P2P when building the repo. Normal Blazor projects will get this as a reference through the Blazor.Build package -->
|
<!-- This is used as a P2P when building the repo. Normal Blazor projects will get this as a reference through the Blazor.Build package -->
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<!-- Ensures these projects are built before the consuming project, but without
|
<!-- Ensures these projects are built before the consuming project, but without
|
||||||
|
|
@ -42,9 +35,8 @@
|
||||||
given that the packed version of this project wouldn't add a .dll reference) -->
|
given that the packed version of this project wouldn't add a .dll reference) -->
|
||||||
<ProjectReference Include="$(MSBuildThisFileDirectory)Microsoft.AspNetCore.Blazor.Build.csproj">
|
<ProjectReference Include="$(MSBuildThisFileDirectory)Microsoft.AspNetCore.Blazor.Build.csproj">
|
||||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||||
<!-- Optimization. Do not require framework compatibility between these projects. -->
|
|
||||||
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
|
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
|
||||||
<UndefineProperties>TargetFramework</UndefineProperties>
|
<Properties>TargetFramework=$(DefaultNetCoreTargetFramework)</Properties>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="$(MSBuildThisFileDirectory)..\..\DevServer\src\Microsoft.AspNetCore.Blazor.DevServer.csproj">
|
<ProjectReference Include="$(MSBuildThisFileDirectory)..\..\DevServer\src\Microsoft.AspNetCore.Blazor.DevServer.csproj">
|
||||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,56 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Xml;
|
||||||
|
using System.Xml.Linq;
|
||||||
|
using Microsoft.Build.Framework;
|
||||||
|
using Microsoft.Build.Utilities;
|
||||||
|
|
||||||
|
namespace Microsoft.AspNetCore.Blazor.Build
|
||||||
|
{
|
||||||
|
// Based on https://github.com/mono/linker/blob/3b329b9481e300bcf4fb88a2eebf8cb5ef8b323b/src/ILLink.Tasks/CreateRootDescriptorFile.cs
|
||||||
|
public class BlazorCreateRootDescriptorFile : Task
|
||||||
|
{
|
||||||
|
[Required]
|
||||||
|
public ITaskItem[] AssemblyNames { get; set; }
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
public ITaskItem RootDescriptorFilePath { get; set; }
|
||||||
|
|
||||||
|
public override bool Execute()
|
||||||
|
{
|
||||||
|
using var fileStream = File.Create(RootDescriptorFilePath.ItemSpec);
|
||||||
|
var assemblyNames = AssemblyNames.Select(a => a.ItemSpec);
|
||||||
|
|
||||||
|
WriteRootDescriptor(fileStream, assemblyNames);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static void WriteRootDescriptor(Stream stream, IEnumerable<string> assemblyNames)
|
||||||
|
{
|
||||||
|
var roots = new XElement("linker");
|
||||||
|
foreach (var assemblyName in assemblyNames)
|
||||||
|
{
|
||||||
|
roots.Add(new XElement("assembly",
|
||||||
|
new XAttribute("fullname", assemblyName),
|
||||||
|
new XElement("type",
|
||||||
|
new XAttribute("fullname", "*"),
|
||||||
|
new XAttribute("required", "true"))));
|
||||||
|
}
|
||||||
|
|
||||||
|
var xmlWriterSettings = new XmlWriterSettings
|
||||||
|
{
|
||||||
|
Indent = true,
|
||||||
|
OmitXmlDeclaration = true
|
||||||
|
};
|
||||||
|
|
||||||
|
using var writer = XmlWriter.Create(stream, xmlWriterSettings);
|
||||||
|
var xDocument = new XDocument(roots);
|
||||||
|
|
||||||
|
xDocument.Save(writer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,189 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using Microsoft.Build.Framework;
|
||||||
|
using Microsoft.Build.Utilities;
|
||||||
|
|
||||||
|
namespace Microsoft.AspNetCore.Blazor.Build.Tasks
|
||||||
|
{
|
||||||
|
// Based on https://github.com/mono/linker/blob/3b329b9481e300bcf4fb88a2eebf8cb5ef8b323b/src/ILLink.Tasks/LinkTask.cs
|
||||||
|
public class BlazorILLink : ToolTask
|
||||||
|
{
|
||||||
|
private const string DotNetHostPathEnvironmentName = "DOTNET_HOST_PATH";
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
public string ILLinkPath { get; set; }
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
public ITaskItem[] AssemblyPaths { get; set; }
|
||||||
|
|
||||||
|
public ITaskItem[] ReferenceAssemblyPaths { get; set; }
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
public ITaskItem[] RootAssemblyNames { get; set; }
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
public ITaskItem OutputDirectory { get; set; }
|
||||||
|
|
||||||
|
public ITaskItem[] RootDescriptorFiles { get; set; }
|
||||||
|
|
||||||
|
public bool ClearInitLocals { get; set; }
|
||||||
|
|
||||||
|
public string ClearInitLocalsAssemblies { get; set; }
|
||||||
|
|
||||||
|
public string ExtraArgs { get; set; }
|
||||||
|
|
||||||
|
public bool DumpDependencies { get; set; }
|
||||||
|
|
||||||
|
private string _dotnetPath;
|
||||||
|
|
||||||
|
private string DotNetPath
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(_dotnetPath))
|
||||||
|
{
|
||||||
|
return _dotnetPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
_dotnetPath = Environment.GetEnvironmentVariable(DotNetHostPathEnvironmentName);
|
||||||
|
if (string.IsNullOrEmpty(_dotnetPath))
|
||||||
|
{
|
||||||
|
throw new InvalidOperationException($"{DotNetHostPathEnvironmentName} is not set");
|
||||||
|
}
|
||||||
|
|
||||||
|
return _dotnetPath;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override MessageImportance StandardErrorLoggingImportance => MessageImportance.High;
|
||||||
|
|
||||||
|
protected override string ToolName => Path.GetFileName(DotNetPath);
|
||||||
|
|
||||||
|
protected override string GenerateFullPathToTool() => DotNetPath;
|
||||||
|
|
||||||
|
protected override string GenerateCommandLineCommands() => ILLinkPath;
|
||||||
|
|
||||||
|
private static string Quote(string path)
|
||||||
|
{
|
||||||
|
return $"\"{path.TrimEnd('\\')}\"";
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string GenerateResponseFileCommands()
|
||||||
|
{
|
||||||
|
var args = new StringBuilder();
|
||||||
|
|
||||||
|
if (RootDescriptorFiles != null)
|
||||||
|
{
|
||||||
|
foreach (var rootFile in RootDescriptorFiles)
|
||||||
|
{
|
||||||
|
args.Append("-x ").AppendLine(Quote(rootFile.ItemSpec));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var assemblyItem in RootAssemblyNames)
|
||||||
|
{
|
||||||
|
args.Append("-a ").AppendLine(Quote(assemblyItem.ItemSpec));
|
||||||
|
}
|
||||||
|
|
||||||
|
var assemblyNames = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
|
||||||
|
foreach (var assembly in AssemblyPaths)
|
||||||
|
{
|
||||||
|
var assemblyPath = assembly.ItemSpec;
|
||||||
|
var assemblyName = Path.GetFileNameWithoutExtension(assemblyPath);
|
||||||
|
|
||||||
|
// If there are multiple paths with the same assembly name, only use the first one.
|
||||||
|
if (!assemblyNames.Add(assemblyName))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
args.Append("-reference ")
|
||||||
|
.AppendLine(Quote(assemblyPath));
|
||||||
|
|
||||||
|
var action = assembly.GetMetadata("action");
|
||||||
|
if ((action != null) && (action.Length > 0))
|
||||||
|
{
|
||||||
|
args.Append("-p ");
|
||||||
|
args.Append(action);
|
||||||
|
args.Append(" ").AppendLine(Quote(assemblyName));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ReferenceAssemblyPaths != null)
|
||||||
|
{
|
||||||
|
foreach (var assembly in ReferenceAssemblyPaths)
|
||||||
|
{
|
||||||
|
var assemblyPath = assembly.ItemSpec;
|
||||||
|
var assemblyName = Path.GetFileNameWithoutExtension(assemblyPath);
|
||||||
|
|
||||||
|
// Don't process references for which we already have
|
||||||
|
// implementation assemblies.
|
||||||
|
if (assemblyNames.Contains(assemblyName))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
args.Append("-reference ").AppendLine(Quote(assemblyPath));
|
||||||
|
|
||||||
|
// Treat reference assemblies as "skip". Ideally we
|
||||||
|
// would not even look at the IL, but only use them to
|
||||||
|
// resolve surface area.
|
||||||
|
args.Append("-p skip ").AppendLine(Quote(assemblyName));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (OutputDirectory != null)
|
||||||
|
{
|
||||||
|
args.Append("-out ").AppendLine(Quote(OutputDirectory.ItemSpec));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ClearInitLocals)
|
||||||
|
{
|
||||||
|
args.AppendLine("--enable-opt clearinitlocals");
|
||||||
|
if ((ClearInitLocalsAssemblies != null) && (ClearInitLocalsAssemblies.Length > 0))
|
||||||
|
{
|
||||||
|
args.Append("-m ClearInitLocalsAssemblies ");
|
||||||
|
args.AppendLine(ClearInitLocalsAssemblies);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ExtraArgs != null)
|
||||||
|
{
|
||||||
|
args.AppendLine(ExtraArgs);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (DumpDependencies)
|
||||||
|
{
|
||||||
|
args.AppendLine("--dump-dependencies");
|
||||||
|
}
|
||||||
|
|
||||||
|
return args.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override bool HandleTaskExecutionErrors()
|
||||||
|
{
|
||||||
|
// Show a slightly better error than the standard ToolTask message that says "dotnet" failed.
|
||||||
|
Log.LogError($"ILLink failed with exited code {ExitCode}.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void LogEventsFromTextOutput(string singleLine, MessageImportance messageImportance)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(singleLine) && singleLine.StartsWith("Unhandled exception.", StringComparison.Ordinal))
|
||||||
|
{
|
||||||
|
// The Mono linker currently prints out an entire stack trace when the linker fails.
|
||||||
|
// We want to show something actionable in the VS Error window.
|
||||||
|
Log.LogError(singleLine);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
base.LogEventsFromTextOutput(singleLine, messageImportance);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,74 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.Serialization.Json;
|
||||||
|
using Microsoft.Build.Framework;
|
||||||
|
using Microsoft.Build.Utilities;
|
||||||
|
|
||||||
|
namespace Microsoft.AspNetCore.Blazor.Build
|
||||||
|
{
|
||||||
|
public class GenerateBlazorBootJson : Task
|
||||||
|
{
|
||||||
|
[Required]
|
||||||
|
public string AssemblyPath { get; set; }
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
public ITaskItem[] References { get; set; }
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
public bool LinkerEnabled { get; set; }
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
public string OutputPath { get; set; }
|
||||||
|
|
||||||
|
public override bool Execute()
|
||||||
|
{
|
||||||
|
var entryAssemblyName = AssemblyName.GetAssemblyName(AssemblyPath).Name;
|
||||||
|
var assemblies = References.Select(c => Path.GetFileName(c.ItemSpec)).ToArray();
|
||||||
|
|
||||||
|
using var fileStream = File.Create(OutputPath);
|
||||||
|
WriteBootJson(fileStream, entryAssemblyName, assemblies, LinkerEnabled);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static void WriteBootJson(Stream stream, string entryAssemblyName, string[] assemblies, bool linkerEnabled)
|
||||||
|
{
|
||||||
|
var data = new BootJsonData
|
||||||
|
{
|
||||||
|
entryAssembly = entryAssemblyName,
|
||||||
|
assemblies = assemblies,
|
||||||
|
linkerEnabled = linkerEnabled,
|
||||||
|
};
|
||||||
|
|
||||||
|
var serializer = new DataContractJsonSerializer(typeof(BootJsonData));
|
||||||
|
serializer.WriteObject(stream, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Defines the structure of a Blazor boot JSON file
|
||||||
|
/// </summary>
|
||||||
|
#pragma warning disable IDE1006 // Naming Styles
|
||||||
|
public class BootJsonData
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the name of the assembly with the application entry point
|
||||||
|
/// </summary>
|
||||||
|
public string entryAssembly { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the closure of assemblies to be loaded by Blazor WASM. This includes the application entry assembly.
|
||||||
|
/// </summary>
|
||||||
|
public string[] assemblies { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a value that determines if the linker is enabled.
|
||||||
|
/// </summary>
|
||||||
|
public bool linkerEnabled { get; set; }
|
||||||
|
}
|
||||||
|
#pragma warning restore IDE1006 // Naming Styles
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,203 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Reflection.Metadata;
|
||||||
|
using System.Reflection.PortableExecutable;
|
||||||
|
using Microsoft.Build.Framework;
|
||||||
|
using Microsoft.Build.Utilities;
|
||||||
|
|
||||||
|
namespace Microsoft.AspNetCore.Blazor.Build
|
||||||
|
{
|
||||||
|
public class ResolveBlazorRuntimeDependencies : Task
|
||||||
|
{
|
||||||
|
[Required]
|
||||||
|
public string EntryPoint { get; set; }
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
public ITaskItem[] ApplicationDependencies { get; set; }
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
public ITaskItem[] WebAssemblyBCLAssemblies { get; set; }
|
||||||
|
|
||||||
|
[Output]
|
||||||
|
public ITaskItem[] Dependencies { get; set; }
|
||||||
|
|
||||||
|
public override bool Execute()
|
||||||
|
{
|
||||||
|
var paths = ResolveRuntimeDependenciesCore(EntryPoint, ApplicationDependencies.Select(c => c.ItemSpec), WebAssemblyBCLAssemblies.Select(c => c.ItemSpec));
|
||||||
|
Dependencies = paths.Select(p => new TaskItem(p)).ToArray();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IEnumerable<string> ResolveRuntimeDependenciesCore(
|
||||||
|
string entryPoint,
|
||||||
|
IEnumerable<string> applicationDependencies,
|
||||||
|
IEnumerable<string> monoBclAssemblies)
|
||||||
|
{
|
||||||
|
var entryAssembly = new AssemblyEntry(entryPoint, GetAssemblyName(entryPoint));
|
||||||
|
|
||||||
|
var dependencies = CreateAssemblyLookup(applicationDependencies);
|
||||||
|
|
||||||
|
var bcl = CreateAssemblyLookup(monoBclAssemblies);
|
||||||
|
|
||||||
|
var assemblyResolutionContext = new AssemblyResolutionContext(
|
||||||
|
entryAssembly,
|
||||||
|
dependencies,
|
||||||
|
bcl);
|
||||||
|
|
||||||
|
assemblyResolutionContext.ResolveAssemblies();
|
||||||
|
|
||||||
|
var paths = assemblyResolutionContext.Results.Select(r => r.Path);
|
||||||
|
return paths.Concat(FindPdbs(paths));
|
||||||
|
|
||||||
|
static Dictionary<string, AssemblyEntry> CreateAssemblyLookup(IEnumerable<string> assemblyPaths)
|
||||||
|
{
|
||||||
|
var dictionary = new Dictionary<string, AssemblyEntry>(StringComparer.Ordinal);
|
||||||
|
foreach (var path in assemblyPaths)
|
||||||
|
{
|
||||||
|
var assemblyName = AssemblyName.GetAssemblyName(path).Name;
|
||||||
|
if (dictionary.TryGetValue(assemblyName, out var previous))
|
||||||
|
{
|
||||||
|
throw new InvalidOperationException($"Multiple assemblies found with the same assembly name '{assemblyName}':" +
|
||||||
|
Environment.NewLine + string.Join(Environment.NewLine, previous, path));
|
||||||
|
}
|
||||||
|
dictionary[assemblyName] = new AssemblyEntry(path, assemblyName);
|
||||||
|
}
|
||||||
|
|
||||||
|
return dictionary;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string GetAssemblyName(string assemblyPath)
|
||||||
|
{
|
||||||
|
return AssemblyName.GetAssemblyName(assemblyPath).Name;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static IEnumerable<string> FindPdbs(IEnumerable<string> dllPaths)
|
||||||
|
{
|
||||||
|
return dllPaths
|
||||||
|
.Select(path => Path.ChangeExtension(path, "pdb"))
|
||||||
|
.Where(path => File.Exists(path));
|
||||||
|
}
|
||||||
|
|
||||||
|
public class AssemblyResolutionContext
|
||||||
|
{
|
||||||
|
public AssemblyResolutionContext(
|
||||||
|
AssemblyEntry entryAssembly,
|
||||||
|
Dictionary<string, AssemblyEntry> dependencies,
|
||||||
|
Dictionary<string, AssemblyEntry> bcl)
|
||||||
|
{
|
||||||
|
EntryAssembly = entryAssembly;
|
||||||
|
Dependencies = dependencies;
|
||||||
|
Bcl = bcl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AssemblyEntry EntryAssembly { get; }
|
||||||
|
public Dictionary<string, AssemblyEntry> Dependencies { get; }
|
||||||
|
public Dictionary<string, AssemblyEntry> Bcl { get; }
|
||||||
|
|
||||||
|
public IList<AssemblyEntry> Results { get; } = new List<AssemblyEntry>();
|
||||||
|
|
||||||
|
internal void ResolveAssemblies()
|
||||||
|
{
|
||||||
|
var visitedAssemblies = new HashSet<string>();
|
||||||
|
var pendingAssemblies = new Stack<string>();
|
||||||
|
pendingAssemblies.Push(EntryAssembly.Name);
|
||||||
|
ResolveAssembliesCore();
|
||||||
|
|
||||||
|
void ResolveAssembliesCore()
|
||||||
|
{
|
||||||
|
while (pendingAssemblies.Count > 0)
|
||||||
|
{
|
||||||
|
var current = pendingAssemblies.Pop();
|
||||||
|
if (visitedAssemblies.Add(current))
|
||||||
|
{
|
||||||
|
// Not all references will be resolvable within the Mono BCL.
|
||||||
|
// Skipping unresolved assemblies here is equivalent to passing "--skip-unresolved true" to the Mono linker.
|
||||||
|
if (Resolve(current) is AssemblyEntry resolved)
|
||||||
|
{
|
||||||
|
Results.Add(resolved);
|
||||||
|
var references = GetAssemblyReferences(resolved.Path);
|
||||||
|
foreach (var reference in references)
|
||||||
|
{
|
||||||
|
pendingAssemblies.Push(reference);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
AssemblyEntry? Resolve(string assemblyName)
|
||||||
|
{
|
||||||
|
if (EntryAssembly.Name == assemblyName)
|
||||||
|
{
|
||||||
|
return EntryAssembly;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Resolution logic. For right now, we will prefer the mono BCL version of a given
|
||||||
|
// assembly if there is a candidate assembly and an equivalent mono assembly.
|
||||||
|
if (Bcl.TryGetValue(assemblyName, out var assembly) ||
|
||||||
|
Dependencies.TryGetValue(assemblyName, out assembly))
|
||||||
|
{
|
||||||
|
return assembly;
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static IReadOnlyList<string> GetAssemblyReferences(string assemblyPath)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using var peReader = new PEReader(File.OpenRead(assemblyPath));
|
||||||
|
if (!peReader.HasMetadata)
|
||||||
|
{
|
||||||
|
return Array.Empty<string>(); // not a managed assembly
|
||||||
|
}
|
||||||
|
|
||||||
|
var metadataReader = peReader.GetMetadataReader();
|
||||||
|
|
||||||
|
var references = new List<string>();
|
||||||
|
foreach (var handle in metadataReader.AssemblyReferences)
|
||||||
|
{
|
||||||
|
var reference = metadataReader.GetAssemblyReference(handle);
|
||||||
|
var referenceName = metadataReader.GetString(reference.Name);
|
||||||
|
|
||||||
|
references.Add(referenceName);
|
||||||
|
}
|
||||||
|
|
||||||
|
return references;
|
||||||
|
}
|
||||||
|
catch (BadImageFormatException)
|
||||||
|
{
|
||||||
|
// not a PE file, or invalid metadata
|
||||||
|
}
|
||||||
|
|
||||||
|
return Array.Empty<string>(); // not a managed assembly
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[DebuggerDisplay("{ToString(),nq}")]
|
||||||
|
public readonly struct AssemblyEntry
|
||||||
|
{
|
||||||
|
public AssemblyEntry(string path, string name)
|
||||||
|
{
|
||||||
|
Path = path;
|
||||||
|
Name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Path { get; }
|
||||||
|
public string Name { get; }
|
||||||
|
|
||||||
|
public override string ToString() => Name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -6,8 +6,10 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<BlazorToolsDir Condition="'$(BlazorToolsDir)' == ''">$(MSBuildThisFileDirectory)../tools/</BlazorToolsDir>
|
<BlazorToolsDir Condition="'$(BlazorToolsDir)' == ''">$(MSBuildThisFileDirectory)..\tools\</BlazorToolsDir>
|
||||||
<BlazorBuildExe>dotnet "$(BlazorToolsDir)Microsoft.AspNetCore.Blazor.Build.dll"</BlazorBuildExe>
|
<_BlazorTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">netcoreapp</_BlazorTasksTFM>
|
||||||
|
<_BlazorTasksTFM Condition=" '$(_BlazorTasksTFM)' == ''">netfx</_BlazorTasksTFM>
|
||||||
|
<BlazorTasksPath>$(BlazorToolsDir)$(_BlazorTasksTFM)\Microsoft.AspNetCore.Blazor.Build.Tasks.dll</BlazorTasksPath>
|
||||||
|
|
||||||
<!-- The Blazor build code can only find your referenced assemblies if they are in the output directory -->
|
<!-- The Blazor build code can only find your referenced assemblies if they are in the output directory -->
|
||||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||||
|
|
@ -15,32 +17,30 @@
|
||||||
|
|
||||||
<Import Project="Blazor.MonoRuntime.targets" />
|
<Import Project="Blazor.MonoRuntime.targets" />
|
||||||
<Import Project="Publish.targets" />
|
<Import Project="Publish.targets" />
|
||||||
|
<Import Project="StaticWebAssets.targets" />
|
||||||
|
|
||||||
<Target Name="GenerateBlazorMetadataFile" BeforeTargets="GetCopyToOutputDirectoryItems">
|
<Target Name="GenerateBlazorMetadataFile"
|
||||||
|
BeforeTargets="GetCopyToOutputDirectoryItems">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<BlazorMetadataFileName>$(AssemblyName).blazor.config</BlazorMetadataFileName>
|
<BlazorMetadataFileName>$(AssemblyName).blazor.config</BlazorMetadataFileName>
|
||||||
<BlazorMetadataFilePath>$(TargetDir)$(BlazorMetadataFileName)</BlazorMetadataFilePath>
|
<BlazorMetadataFilePath>$(TargetDir)$(BlazorMetadataFileName)</BlazorMetadataFilePath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<WriteLinesToFile File="$(BlazorMetadataFilePath)" Lines="$(MSBuildProjectFullPath)" Overwrite="true" Encoding="Unicode"/>
|
|
||||||
<WriteLinesToFile File="$(BlazorMetadataFilePath)" Lines="$(OutDir)$(AssemblyName).dll" Overwrite="false" Encoding="Unicode"/>
|
<ItemGroup>
|
||||||
<WriteLinesToFile File="$(BlazorMetadataFilePath)" Condition="'$(BlazorRebuildOnFileChange)'=='true'" Lines="autorebuild:true" Overwrite="false" Encoding="Unicode"/>
|
<_BlazorConfigContent Include="$(MSBuildProjectFullPath)" />
|
||||||
<WriteLinesToFile File="$(BlazorMetadataFilePath)" Condition="'$(BlazorEnableDebugging)'=='true'" Lines="debug:true" Overwrite="false" Encoding="Unicode"/>
|
<_BlazorConfigContent Include="$(TargetPath)" />
|
||||||
|
<_BlazorConfigContent Include="debug:true" Condition="'$(BlazorEnableDebugging)'=='true'" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<WriteLinesToFile
|
||||||
|
File="$(BlazorMetadataFilePath)"
|
||||||
|
Lines="@(_BlazorConfigContent)"
|
||||||
|
Overwrite="true"
|
||||||
|
WriteOnlyWhenDifferent="True" />
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ContentWithTargetPath Include="$(BlazorMetadataFilePath)" TargetPath="$(BlazorMetadataFileName)" CopyToOutputDirectory="PreserveNewest" />
|
<ContentWithTargetPath Include="$(BlazorMetadataFilePath)" TargetPath="$(BlazorMetadataFileName)" CopyToOutputDirectory="PreserveNewest" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<GetCurrentProjectStaticWebAssetsDependsOn>
|
|
||||||
$(GetCurrentProjectStaticWebAssetsDependsOn);
|
|
||||||
_ClearCurrentStaticWebAssetsForReferenceDiscovery
|
|
||||||
</GetCurrentProjectStaticWebAssetsDependsOn>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<Target Name="_ClearCurrentStaticWebAssetsForReferenceDiscovery">
|
|
||||||
<ItemGroup>
|
|
||||||
<StaticWebAsset Remove="@(StaticWebAsset)" Condition="'%(SourceType)' == ''" />
|
|
||||||
</ItemGroup>
|
|
||||||
</Target>
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,20 @@
|
||||||
<Project>
|
<Project>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(BlazorBuildReferenceFromSource)'==''">
|
<PropertyGroup>
|
||||||
<BlazorJsPath>$(MSBuildThisFileDirectory)../tools/blazor/blazor.*.js</BlazorJsPath>
|
<BlazorJsPath Condition="'$(BlazorJsPath)' == ''">$(MSBuildThisFileDirectory)..\tools\blazor\blazor.webassembly.js</BlazorJsPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Label="Blazor build outputs">
|
<PropertyGroup Label="Blazor build outputs">
|
||||||
<MonoLinkerI18NAssemblies>none</MonoLinkerI18NAssemblies> <!-- See Mono linker docs - allows comma-separated values from: none,all,cjk,mideast,other,rare,west -->
|
<MonoLinkerI18NAssemblies>none</MonoLinkerI18NAssemblies> <!-- See Mono linker docs - allows comma-separated values from: none,all,cjk,mideast,other,rare,west -->
|
||||||
<AdditionalMonoLinkerOptions>--disable-opt unreachablebodies --verbose --strip-security true --exclude-feature com --exclude-feature sre -v false -c link -u link -b true</AdditionalMonoLinkerOptions>
|
<AdditionalMonoLinkerOptions>--disable-opt unreachablebodies --verbose --strip-security true --exclude-feature com --exclude-feature sre -v false -c link -u link -b true</AdditionalMonoLinkerOptions>
|
||||||
<BaseBlazorDistPath>dist/</BaseBlazorDistPath>
|
<BaseBlazorDistPath>dist\</BaseBlazorDistPath>
|
||||||
<BaseBlazorPackageContentOutputPath>$(BaseBlazorDistPath)_content/</BaseBlazorPackageContentOutputPath>
|
<BaseBlazorPackageContentOutputPath>$(BaseBlazorDistPath)_content\</BaseBlazorPackageContentOutputPath>
|
||||||
<BaseBlazorRuntimeOutputPath>$(BaseBlazorDistPath)_framework/</BaseBlazorRuntimeOutputPath>
|
<BaseBlazorRuntimeOutputPath>$(BaseBlazorDistPath)_framework\</BaseBlazorRuntimeOutputPath>
|
||||||
<BaseBlazorRuntimeBinOutputPath>$(BaseBlazorRuntimeOutputPath)_bin/</BaseBlazorRuntimeBinOutputPath>
|
<BlazorRuntimeBinOutputPath>$(BaseBlazorRuntimeOutputPath)_bin\</BlazorRuntimeBinOutputPath>
|
||||||
<BaseBlazorRuntimeWasmOutputPath>$(BaseBlazorRuntimeOutputPath)wasm/</BaseBlazorRuntimeWasmOutputPath>
|
<BlazorRuntimeWasmOutputPath>$(BaseBlazorRuntimeOutputPath)wasm\</BlazorRuntimeWasmOutputPath>
|
||||||
<BaseBlazorJsOutputPath>$(BaseBlazorRuntimeOutputPath)</BaseBlazorJsOutputPath>
|
<BlazorWebRootName>wwwroot\</BlazorWebRootName>
|
||||||
<BaseBlazorIntermediateOutputPath>blazor/</BaseBlazorIntermediateOutputPath>
|
|
||||||
<BlazorWebRootName>wwwroot/</BlazorWebRootName>
|
|
||||||
<BlazorBootJsonName>blazor.boot.json</BlazorBootJsonName>
|
<BlazorBootJsonName>blazor.boot.json</BlazorBootJsonName>
|
||||||
<BlazorBootJsonOutputPath>$(BaseBlazorRuntimeOutputPath)$(BlazorBootJsonName)</BlazorBootJsonOutputPath>
|
<_BlazorBuiltInBclLinkerDescriptor>$(MSBuildThisFileDirectory)BuiltInBclLinkerDescriptor.xml</_BlazorBuiltInBclLinkerDescriptor>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -1,206 +1,85 @@
|
||||||
<Project>
|
<Project>
|
||||||
|
<PropertyGroup>
|
||||||
|
<BlazorLinkOnBuild Condition="$(BlazorLinkOnBuild) == ''">true</BlazorLinkOnBuild>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<!-- Stop-gap until we can migrate Blazor.Mono package to use better naming convention -->
|
||||||
|
<DotNetWebAssemblyBCLPath Condition="'$(DotNetWebAssemblyBCLPath)' == '' AND '$(MonoBaseClassLibraryPath)' != ''">$(MonoBaseClassLibraryPath)</DotNetWebAssemblyBCLPath>
|
||||||
|
<DotNetWebAssemblyBCLFacadesPath Condition="'$(DotNetWebAssemblyBCLFacadesPath)' == '' AND '$(MonoBaseClassLibraryFacadesPath)' != ''">$(MonoBaseClassLibraryFacadesPath)</DotNetWebAssemblyBCLFacadesPath>
|
||||||
|
<DotNetWebAssemblyRuntimePath Condition="'$(DotNetWebAssemblyRuntimePath)' == '' AND '$(MonoWasmRuntimePath)' != ''">$(MonoWasmRuntimePath)</DotNetWebAssemblyRuntimePath>
|
||||||
|
<DotNetWebAssemblyFrameworkPath Condition="'$(DotNetWebAssemblyFrameworkPath)' == '' AND '$(MonoWasmFrameworkPath)' != ''">$(MonoWasmFrameworkPath)</DotNetWebAssemblyFrameworkPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$(DotNetWebAssemblyArtifactsRoot)' != ''">
|
||||||
|
<!-- Compute paths given a path to DotNet WASM artifacts. This is meant to make it easy to test WASM builds -->
|
||||||
|
<DotNetWebAssemblyBCLPath>$(DotNetWebAssemblyArtifactsRoot)\wasm-bcl\wasm\</DotNetWebAssemblyBCLPath>
|
||||||
|
<DotNetWebAssemblyBCLFacadesPath>$(DotNetWebAssemblyBCLPath)\Facades\</DotNetWebAssemblyBCLFacadesPath>
|
||||||
|
<DotNetWebAssemblyRuntimePath>$(DotNetWebAssemblyArtifactsRoot)\builds\debug\</DotNetWebAssemblyRuntimePath>
|
||||||
|
<DotNetWebAssemblyFrameworkPath>$(DotNetWebAssemblyArtifactsRoot)\framework\</DotNetWebAssemblyFrameworkPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<Target
|
<Target
|
||||||
Name="_BlazorCopyFilesToOutputDirectory"
|
Name="_BlazorCopyFilesToOutputDirectory"
|
||||||
DependsOnTargets="PrepareBlazorOutputs"
|
DependsOnTargets="PrepareBlazorOutputs"
|
||||||
Inputs="@(BlazorItemOutput)"
|
Inputs="@(BlazorOutputWithTargetPath)"
|
||||||
Outputs="@(BlazorItemOutput->'%(TargetOutputPath)')"
|
Outputs="@(BlazorOutputWithTargetPath->'$(TargetDir)%(TargetOutputPath)')"
|
||||||
AfterTargets="CopyFilesToOutputDirectory"
|
AfterTargets="CopyFilesToOutputDirectory"
|
||||||
Condition="'$(OutputType.ToLowerInvariant())'=='exe'">
|
Condition="'$(OutputType.ToLowerInvariant())'=='exe'">
|
||||||
|
|
||||||
<!-- Copy the blazor output files -->
|
<!-- Copy the blazor output files -->
|
||||||
<Copy
|
<Copy
|
||||||
SourceFiles="@(BlazorItemOutput)"
|
SourceFiles="@(BlazorOutputWithTargetPath)"
|
||||||
DestinationFiles="@(BlazorItemOutput->'%(TargetOutputPath)')"
|
DestinationFiles="@(BlazorOutputWithTargetPath->'$(TargetDir)%(TargetOutputPath)')"
|
||||||
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
|
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
|
||||||
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
|
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
|
||||||
Retries="$(CopyRetryCount)"
|
Retries="$(CopyRetryCount)"
|
||||||
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
|
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
|
||||||
UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)"
|
UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)"
|
||||||
UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible)"
|
UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible)"
|
||||||
Condition="'@(BlazorItemOutput)' != '' and '$(CopyBuildOutputToOutputDirectory)' == 'true' and '$(SkipCopyBuildProduct)' != 'true'">
|
Condition="'@(BlazorOutputWithTargetPath)' != '' and '$(CopyBuildOutputToOutputDirectory)' == 'true' and '$(SkipCopyBuildProduct)' != 'true'">
|
||||||
</Copy>
|
</Copy>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<FileWrites Include="@(BlazorItemOutput->'%(TargetOutputPath)')" />
|
<FileWrites Include="@(BlazorOutputWithTargetPath->'$(TargetDir)%(TargetOutputPath)')" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Target>
|
|
||||||
|
|
||||||
<Target Name="_BlazorTrackResolveReferencesDidRun" AfterTargets="ResolveReferences">
|
|
||||||
<PropertyGroup>
|
|
||||||
<!-- So we know we can trust @(ReferenceCopyLocalPaths) later -->
|
|
||||||
<_BlazorResolveReferencesDidRun>true</_BlazorResolveReferencesDidRun>
|
|
||||||
</PropertyGroup>
|
|
||||||
</Target>
|
|
||||||
|
|
||||||
<Target Name="_BlazorBuildReport"
|
|
||||||
AfterTargets="_BlazorCopyFilesToOutputDirectory">
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<_BlazorStatisticsOutput Include="@(BlazorItemOutput->'%(TargetOutputPath)')" />
|
<_BlazorStatisticsOutput Include="@(BlazorOutputWithTargetPath->'%(TargetOutputPath)')" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup>
|
|
||||||
<_BlazorStatisticsReportImportance Condition="'$(BlazorOutputStatistics)' == ''">normal</_BlazorStatisticsReportImportance>
|
|
||||||
<_BlazorStatisticsReportImportance Condition="'$(BlazorOutputStatistics)' != ''">high</_BlazorStatisticsReportImportance>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<Message Importance="high" Text="Blazor Build result -> @(_BlazorStatisticsOutput->Distinct()->Count()) files in $(TargetDir)dist" />
|
<Message Importance="high" Text="$(TargetName) (Blazor output) -> $(TargetDir)dist" />
|
||||||
<Message Importance="$(_BlazorStatisticsReportImportance)" Text="%(_BlazorStatisticsOutput.Identity)" />
|
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<!-- Preparing blazor files for output:
|
<Target
|
||||||
PrepareBlazorOutputs
|
Name="PrepareBlazorOutputs"
|
||||||
_PrepareBlazorOutputConfiguration
|
DependsOnTargets="_ResolveBlazorInputs;_ResolveBlazorOutputs;_GenerateBlazorBootJson">
|
||||||
_DefineBlazorCommonInputs
|
|
||||||
_BlazorResolveOutputBinaries
|
|
||||||
When link on build:
|
|
||||||
_GenerateLinkerDescriptor
|
|
||||||
_CollectBlazorLinkerDescriptors
|
|
||||||
_LinkBlazorApplication
|
|
||||||
_CollectLinkerOutputs
|
|
||||||
When don't link on build:
|
|
||||||
_CollectResolvedAssemblies
|
|
||||||
_ResolveBlazorApplicationAssemblies
|
|
||||||
_ReadResolvedBlazorApplicationAssemblies
|
|
||||||
_IntermediateCopyBlazorApplicationAssemblies
|
|
||||||
_TouchBlazorApplicationAssemblies
|
|
||||||
_GenerateBlazorBootJson
|
|
||||||
_BlazorCopyFilesToOutputDirectory
|
|
||||||
|
|
||||||
The process for doing builds goes as follows:
|
<ItemGroup>
|
||||||
Produce a hash file with the Hash SDK task and write that hash to a marker file.
|
<MonoWasmFile Include="$(DotNetWebAssemblyRuntimePath)*" />
|
||||||
Produce a marker file that saves whether we are linking or not in this build so that we can take that as
|
<BlazorJSFile Include="$(BlazorJSPath)" />
|
||||||
input in future builds and do the correct thing for incremental builds.
|
<BlazorJSFile Include="$(BlazorJSMapPath)" Condition="Exists('$(BlazorJSMapPath)')" />
|
||||||
We only produce marker files when the input changes, if the input doesn't change the marker stays the
|
|
||||||
same.
|
|
||||||
|
|
||||||
If we are linking on this build the process is as follows:
|
<BlazorOutputWithTargetPath Include="@(MonoWasmFile)">
|
||||||
1) We determine if there are linker descriptors available, if not generate one.
|
<TargetOutputPath>$(BlazorRuntimeWasmOutputPath)%(FileName)%(Extension)</TargetOutputPath>
|
||||||
2) Collect the list of linker descriptors and create a marker for the linker if it doesn't exist or changed
|
</BlazorOutputWithTargetPath>
|
||||||
from a previous build.
|
<BlazorOutputWithTargetPath Include="@(BlazorJSFile)">
|
||||||
3) Run the linker in case the linker inputs marker is newer than the linker result file.
|
<TargetOutputPath>$(BaseBlazorRuntimeOutputPath)%(FileName)%(Extension)</TargetOutputPath>
|
||||||
4) Collect the outputs from the linker.
|
</BlazorOutputWithTargetPath>
|
||||||
|
|
||||||
If we are not linking in this build the process is as follows:
|
|
||||||
1) Resolve the assemblies for the application only if the inputs marker is newer than the resolved assemblies
|
|
||||||
result file.
|
|
||||||
2) Read the result file with the resolved assemblies.
|
|
||||||
3) Copy the resolved assemblies to an intermediate folder.
|
|
||||||
4) In case we are switching from linking to not linking, touch the files in the intermediate folder to ensure
|
|
||||||
that updated versions of the files get copied to the output folder.
|
|
||||||
|
|
||||||
Once the binary outputs are resolved:
|
|
||||||
1) Create a marker file with the resolved assemblies and the boot json data as inputs.
|
|
||||||
2) If the marker file is newer than the boot json in the output folder, regenerate the
|
|
||||||
boot json
|
|
||||||
|
|
||||||
Once all the outputs are resolved (static content + binary outputs + boot json)
|
|
||||||
Copy all the files to the output folder.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<PrepareBlazorOutputs>
|
|
||||||
_PrepareBlazorOutputConfiguration;
|
|
||||||
_DefineBlazorCommonInputs;
|
|
||||||
_BlazorResolveOutputBinaries;
|
|
||||||
_GenerateBlazorBootJson;
|
|
||||||
</PrepareBlazorOutputs>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<Target Name="PrepareBlazorOutputs" DependsOnTargets="$(PrepareBlazorOutputs)" />
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Prepare blazor outputs preamble:
|
|
||||||
* Creates updated marker files (if necessary) for incremental builds.
|
|
||||||
* Computes intermediate and final output paths.
|
|
||||||
* Computes the list of static items to copy to the output folder.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<Target Name="_PrepareBlazorOutputConfiguration">
|
|
||||||
<!--
|
|
||||||
This task produces all the "final" paths for all the files we need to produce the final output.
|
|
||||||
|
|
||||||
The final folder is something like bin/<<Configuration>>/<<TargetFramework>>/dist
|
|
||||||
/_framework/_bin <- This will contain either the BCL + app assemblies or the result of linking the app.
|
|
||||||
/_framework/wasm <- This will contain the wsm runtime copied from the nuget package.
|
|
||||||
/_framework/blazor.js <- This is the blazor.js file copied from the nuget package.
|
|
||||||
/_framework/blazor.boot.json <- This is the boot json file
|
|
||||||
|
|
||||||
This task also defines some intermediate paths that we will use:
|
|
||||||
/obj/<<configuration>>/<<targetframework>>/blazor/blazor/linker <- This will be used to create the output from the linker.
|
|
||||||
/obj/<<configuration>>/<<targetframework>>/blazor/blazor/linked.assemblies.txt <- This will be used to save the output files from
|
|
||||||
the linker and use that as marker to identify whether or not we need to run the linker.
|
|
||||||
/obj/<<configuration>>/<<targetframework>>/blazor/blazor/linker.descriptor.xml <- This will be used to generate an XML descriptor
|
|
||||||
for the mono linker.
|
|
||||||
/obj/<<configuration>>/<<targetframework>>/blazor/inputs.basic.cache <- This is the marker file to track the inputs common
|
|
||||||
inputs to the output generation process.
|
|
||||||
/obj/<<configuration>>/<<targetframework>>/blazor/inputs.copylocal.txt <- Paths to all the copy-local referenced assemblies found
|
|
||||||
during the build process (i.e., the @(ReferenceCopyLocalPaths) values). We need this because when publishing, the build doesn't
|
|
||||||
necessarily also run so this is the only way we know which assemblies to include in linking/resolveassemblies.
|
|
||||||
/obj/<<configuration>>/<<targetframework>>/blazor/inputs.linkerswitch.cache <- This is the marker file to track the
|
|
||||||
switch from linking to not linking and viceversa.
|
|
||||||
/obj/<<configuration>>/<<targetframework>>/blazor/inputs.linker.cache <- This is the marker file to track the inputs
|
|
||||||
to the linker.
|
|
||||||
/obj/<<configuration>>/<<targetframework>>/blazor/resolvedassemblies/ <- This will be used to store the resolved assemblies
|
|
||||||
before copying them to the output when linking is not enabled.
|
|
||||||
/obj/<<configuration>>/<<targetframework>>/blazor/resolved.assemblies.txt <- This keeps track of all the resolved assemblies.
|
|
||||||
/obj/<<configuration>>/<<targetframework>>/blazor/blazor.boot.json <- The generated boot json file
|
|
||||||
/obj/<<configuration>>/<<targetframework>>/blazor/inputs.bootjson.cache <- The marker file that track whether boot json needs to
|
|
||||||
be regenerated.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<PropertyGroup Label="Build properties">
|
|
||||||
<_BlazorShouldLinkApplicationAssemblies Condition="$(BlazorLinkOnBuild) == 'false'"></_BlazorShouldLinkApplicationAssemblies>
|
|
||||||
<_BlazorShouldLinkApplicationAssemblies Condition="$(BlazorLinkOnBuild) == 'true'">true</_BlazorShouldLinkApplicationAssemblies>
|
|
||||||
<_BlazorBuiltInBclLinkerDescriptor>$(MSBuildThisFileDirectory)BuiltInBclLinkerDescriptor.xml</_BlazorBuiltInBclLinkerDescriptor>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup Label="Static content to copy to the output folder">
|
|
||||||
<MonoWasmFile Include="$(MonoWasmRuntimePath)**/*.*" />
|
|
||||||
<BlazorJsFile Include="$(BlazorJsPath)" />
|
|
||||||
<BlazorItemOutput Include="@(MonoWasmFile)">
|
|
||||||
<TargetOutputPath>$(TargetDir)$(BaseBlazorRuntimeWasmOutputPath)%(FileName)%(Extension)</TargetOutputPath>
|
|
||||||
<Type>WebAssembly</Type>
|
|
||||||
<IsStatic>true</IsStatic>
|
|
||||||
</BlazorItemOutput>
|
|
||||||
<BlazorItemOutput Include="@(BlazorJsFile)">
|
|
||||||
<TargetOutputPath>$(TargetDir)$(BaseBlazorJsOutputPath)%(FileName)%(Extension)</TargetOutputPath>
|
|
||||||
<Type>BlazorRuntime</Type>
|
|
||||||
<IsStatic>true</IsStatic>
|
|
||||||
</BlazorItemOutput>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Error Condition="'@(BlazorJsFile->Count())' == '0'" Text="No JS files found in '$(BlazorJsPath)'" />
|
|
||||||
|
|
||||||
<ItemGroup Label="Static content supplied by NuGet packages">
|
<ItemGroup Label="Static content supplied by NuGet packages">
|
||||||
<_BlazorPackageContentOutput Include="@(BlazorPackageContentFile)" Condition="%(SourcePackage) != ''">
|
<_BlazorPackageContentOutput Include="@(BlazorPackageContentFile)" Condition="%(SourcePackage) != ''">
|
||||||
<TargetOutputPath>$(TargetDir)$(BaseBlazorPackageContentOutputPath)%(SourcePackage)\%(RecursiveDir)\%(Filename)%(Extension)</TargetOutputPath>
|
<TargetOutputPath>$(BaseBlazorPackageContentOutputPath)%(SourcePackage)\%(RecursiveDir)\%(Filename)%(Extension)</TargetOutputPath>
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</_BlazorPackageContentOutput>
|
</_BlazorPackageContentOutput>
|
||||||
<BlazorItemOutput Include="@(_BlazorPackageContentOutput)" />
|
<BlazorOutputWithTargetPath Include="@(_BlazorPackageContentOutput)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
</Target>
|
||||||
|
|
||||||
<PropertyGroup Label="Intermediate output paths">
|
<Target Name="_ResolveBlazorInputs">
|
||||||
|
<PropertyGroup>
|
||||||
<!-- /obj/<<configuration>>/<<targetframework>>/blazor -->
|
<!-- /obj/<<configuration>>/<<targetframework>>/blazor -->
|
||||||
<BlazorIntermediateOutputPath>$(IntermediateOutputPath)$(BaseBlazorIntermediateOutputPath)</BlazorIntermediateOutputPath>
|
<BlazorIntermediateOutputPath>$(IntermediateOutputPath)blazor\</BlazorIntermediateOutputPath>
|
||||||
<BlazorIntermediateOutputPath Condition="! $([System.IO.Path]::IsPathRooted($(BlazorIntermediateOutputPath)))">$([MSBuild]::Escape($([System.IO.Path]::GetFullPath('$([System.IO.Path]::Combine('$(MSBuildProjectDirectory)', '$(BlazorIntermediateOutputPath)'))'))))</BlazorIntermediateOutputPath>
|
|
||||||
|
|
||||||
<!-- Common marker files paths -->
|
|
||||||
|
|
||||||
<!-- /obj/<<configuration>>/<<targetframework>>/blazor/inputs.basic.cache -->
|
|
||||||
<BlazorBuildCommonInputsCache>$(BlazorIntermediateOutputPath)inputs.basic.cache</BlazorBuildCommonInputsCache>
|
|
||||||
|
|
||||||
<!-- /obj/<<configuration>>/<<targetframework>>/blazor/inputs.copylocal.txt -->
|
|
||||||
<BlazorLocalReferencesOutputPath>$(BlazorIntermediateOutputPath)inputs.copylocal.txt</BlazorLocalReferencesOutputPath>
|
|
||||||
|
|
||||||
<!-- /obj/<<configuration>>/<<targetframework>>/blazor/inputs.linkerswitch.cache -->
|
|
||||||
<BlazorBuildLinkerSwitchInputsCache>$(BlazorIntermediateOutputPath)inputs.linkerswitch.cache</BlazorBuildLinkerSwitchInputsCache>
|
|
||||||
|
|
||||||
<!-- Linker paths and marker files -->
|
|
||||||
|
|
||||||
<!-- /obj/<<configuration>>/<<targetframework>>/blazor/inputs.linker.cache -->
|
|
||||||
<BlazorBuildLinkerInputsCache>$(BlazorIntermediateOutputPath)inputs.linker.cache</BlazorBuildLinkerInputsCache>
|
|
||||||
|
|
||||||
<!-- /obj/<<configuration>>/<<targetframework>>/blazor/linker.descriptor.xml -->
|
<!-- /obj/<<configuration>>/<<targetframework>>/blazor/linker.descriptor.xml -->
|
||||||
<GeneratedBlazorLinkerDescriptor>$(BlazorIntermediateOutputPath)linker.descriptor.xml</GeneratedBlazorLinkerDescriptor>
|
<GeneratedBlazorLinkerDescriptor>$(BlazorIntermediateOutputPath)linker.descriptor.xml</GeneratedBlazorLinkerDescriptor>
|
||||||
|
|
@ -208,446 +87,202 @@
|
||||||
<!-- /obj/<<configuration>>/<<targetframework>>/blazor/linker/ -->
|
<!-- /obj/<<configuration>>/<<targetframework>>/blazor/linker/ -->
|
||||||
<BlazorIntermediateLinkerOutputPath>$(BlazorIntermediateOutputPath)linker/</BlazorIntermediateLinkerOutputPath>
|
<BlazorIntermediateLinkerOutputPath>$(BlazorIntermediateOutputPath)linker/</BlazorIntermediateLinkerOutputPath>
|
||||||
|
|
||||||
<!-- /obj/<<configuration>>/<<targetframework>>/blazor/linked.assemblies.txt -->
|
|
||||||
<BlazorIntermediateLinkerResultFilePath>$(BlazorIntermediateOutputPath)linked.assemblies.txt</BlazorIntermediateLinkerResultFilePath>
|
|
||||||
|
|
||||||
<!-- Resolved assemblies paths and marker files -->
|
|
||||||
|
|
||||||
<!-- /obj/<<configuration>>/<<targetframework>>/blazor/resolvedassemblies/ -->
|
|
||||||
<BlazorIntermediateResolvedApplicationAssembliesOutputPath>$(BlazorIntermediateOutputPath)resolvedassemblies/</BlazorIntermediateResolvedApplicationAssembliesOutputPath>
|
|
||||||
|
|
||||||
<!-- /obj/<<configuration>>/<<targetframework>>/blazor/resolved.assemblies.txt -->
|
|
||||||
<BlazorResolvedAssembliesOutputPath>$(BlazorIntermediateOutputPath)resolved.assemblies.txt</BlazorResolvedAssembliesOutputPath>
|
|
||||||
|
|
||||||
<!-- boot json related paths and markers -->
|
|
||||||
|
|
||||||
<!-- /obj/<<configuration>>/<<targetframework>>/blazor/ -->
|
|
||||||
<BlazorBootJsonIntermediateOutputDir>$(BlazorIntermediateOutputPath)</BlazorBootJsonIntermediateOutputDir>
|
|
||||||
|
|
||||||
<!-- /obj/<<configuration>>/<<targetframework>>/blazor/blazor.boot.json -->
|
<!-- /obj/<<configuration>>/<<targetframework>>/blazor/blazor.boot.json -->
|
||||||
<BlazorBootJsonIntermediateOutputPath>$(BlazorBootJsonIntermediateOutputDir)$(BlazorBootJsonName)</BlazorBootJsonIntermediateOutputPath>
|
<BlazorBootJsonIntermediateOutputPath>$(BlazorIntermediateOutputPath)$(BlazorBootJsonName)</BlazorBootJsonIntermediateOutputPath>
|
||||||
|
|
||||||
<!-- /obj/<<configuration>>/<<targetframework>>/blazor/inputs.bootjson.cache -->
|
<_BlazorLinkerOutputCache>$(BlazorIntermediateOutputPath)linker.output</_BlazorLinkerOutputCache>
|
||||||
<BlazorBuildBootJsonInputsCache>$(BlazorIntermediateOutputPath)inputs.bootjson.cache</BlazorBuildBootJsonInputsCache>
|
|
||||||
|
|
||||||
<!-- /obj/<<configuration>>/<<targetframework>>/blazor/resolve-dependencies.txt -->
|
|
||||||
<BlazorResolveDependenciesFilePath>$(BlazorIntermediateOutputPath)resolve-dependencies.txt</BlazorResolveDependenciesFilePath>
|
|
||||||
|
|
||||||
<!-- /obj/<<configuration>>/<<targetframework>>/blazor/bootjson-references.txt -->
|
|
||||||
<BlazorBootJsonReferencesFilePath>$(BlazorIntermediateOutputPath)bootjson-references.txt</BlazorBootJsonReferencesFilePath>
|
|
||||||
|
|
||||||
<!-- /obj/<<configuration>>/<<targetframework>>/blazor/embedded.resources.txt -->
|
|
||||||
<BlazorEmbeddedResourcesConfigFilePath>$(BlazorIntermediateOutputPath)embedded.resources.txt</BlazorEmbeddedResourcesConfigFilePath>
|
|
||||||
|
|
||||||
|
<_BlazorApplicationAssembliesCacheFile>$(BlazorIntermediateOutputPath)unlinked.output</_BlazorApplicationAssembliesCacheFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Label="Final output paths">
|
<ItemGroup>
|
||||||
<BlazorRuntimeBinOutputPath>$(TargetDir)$(BaseBlazorRuntimeBinOutputPath)</BlazorRuntimeBinOutputPath>
|
<_BlazorDependencyInput Include="@(ReferenceCopyLocalPaths->WithMetadataValue('Extension','.dll')->'%(FullPath)')" />
|
||||||
</PropertyGroup>
|
|
||||||
|
<_WebAssemblyBCLFolder Include="
|
||||||
|
$(DotNetWebAssemblyBCLPath);
|
||||||
|
$(DotNetWebAssemblyBCLFacadesPath);
|
||||||
|
$(DotNetWebAssemblyFrameworkPath)" />
|
||||||
|
|
||||||
|
<_WebAssemblyBCLAssembly Include="%(_WebAssemblyBCLFolder.Identity)*.dll" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<MakeDir Directories="$(BlazorIntermediateOutputPath)" />
|
<MakeDir Directories="$(BlazorIntermediateOutputPath)" />
|
||||||
|
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="_DefineBlazorCommonInputs">
|
<Target Name="_ResolveBlazorOutputs" DependsOnTargets="_ResolveBlazorOutputsWhenLinked;_ResolveBlazorOutputsWhenNotLinked">
|
||||||
<!-- If ResolveReferences hasn't yet run, we must be inside a VS publish process
|
<Error
|
||||||
that doesn't also do a build, so use the stored information. -->
|
Message="Unrecongnized value for BlazorLinkOnBuild: '$(BlazorLinkOnBuild)'. Valid values are 'true' or 'false'."
|
||||||
<ReadLinesFromFile
|
Condition="'$(BlazorLinkOnBuild)' != 'true' AND '$(BlazorLinkOnBuild)' != 'false'" />
|
||||||
Condition="'$(_BlazorResolveReferencesDidRun)'!='true'"
|
|
||||||
File="$(BlazorLocalReferencesOutputPath)">
|
|
||||||
<Output TaskParameter="Lines" ItemName="_BlazorDependencyInput"/>
|
|
||||||
</ReadLinesFromFile>
|
|
||||||
<ItemGroup Condition="'$(_BlazorResolveReferencesDidRun)'=='true'">
|
|
||||||
<!-- ... otherwise we can get the fresh info from @(ReferenceCopyLocalPaths) -->
|
|
||||||
<_BlazorDependencyInput Include="@(ReferenceCopyLocalPaths->WithMetadataValue('Extension','.dll')->'%(FullPath)')" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<_BlazorCommonInput Include="@(IntermediateAssembly)" />
|
|
||||||
<_BlazorCommonInput Include="@(_BlazorDependencyInput)" />
|
|
||||||
<_BlazorCommonInput Include="$(_BlazorShouldLinkApplicationAssemblies)" />
|
|
||||||
<_BlazorCommonInput Include="$(BlazorEnableDebugging)" />
|
|
||||||
<_BlazorLinkingOption Condition="'$(_BlazorShouldLinkApplicationAssemblies)' == ''" Include="false" />
|
|
||||||
<_BlazorLinkingOption Condition="'$(_BlazorShouldLinkApplicationAssemblies)' != ''" Include="true" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<Hash ItemsToHash="@(_BlazorCommonInput)">
|
|
||||||
<Output TaskParameter="HashResult" PropertyName="_BlazorBuildBasicInputHash" />
|
|
||||||
</Hash>
|
|
||||||
|
|
||||||
<WriteLinesToFile
|
|
||||||
Lines="$(_BlazorBuildBasicInputHash)"
|
|
||||||
File="$(BlazorBuildCommonInputsCache)"
|
|
||||||
Overwrite="True"
|
|
||||||
WriteOnlyWhenDifferent="True" />
|
|
||||||
|
|
||||||
<WriteLinesToFile
|
|
||||||
Lines="@(_BlazorDependencyInput)"
|
|
||||||
File="$(BlazorLocalReferencesOutputPath)"
|
|
||||||
Overwrite="True"
|
|
||||||
WriteOnlyWhenDifferent="True" />
|
|
||||||
|
|
||||||
<!-- Switch to detect when we switch from linking to not linking and viceversa -->
|
|
||||||
<WriteLinesToFile
|
|
||||||
Lines="@(_BlazorLinkingOption)"
|
|
||||||
File="$(BlazorBuildLinkerSwitchInputsCache)"
|
|
||||||
Overwrite="True"
|
|
||||||
WriteOnlyWhenDifferent="True" />
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<FileWrites Include="$(BlazorBuildLinkerSwitchInputsCache)" />
|
|
||||||
<FileWrites Include="$(BlazorBuildCommonInputsCache)" />
|
|
||||||
<FileWrites Include="$(BlazorLocalReferencesOutputPath)" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="_BlazorResolveOutputBinaries" DependsOnTargets="_CollectLinkerOutputs;_CollectResolvedAssemblies" />
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Linker enabled part of the pipeline:
|
Linker enabled part of the pipeline:
|
||||||
|
|
||||||
* If there are no descriptors defined, generate a new linker descriptor.
|
* If there are no descriptors defined, generate a new linker descriptor.
|
||||||
* Collect the list of descriptors and produce a marker file to determine when the
|
* Invoke the linker and write linked files to a well-known directory.
|
||||||
inputs to the linker change in future builds.
|
* Collect the outputs of the linker.
|
||||||
* Invoke the linker if the linker inputs marker file is newer than the linker outputs.
|
|
||||||
* Read the outputs from the linker and add them to the list of blazor outputs.
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<_CollectLinkerOutputsDependsOn>
|
|
||||||
_GenerateLinkerDescriptor;
|
|
||||||
_CollectBlazorLinkerDescriptors;
|
|
||||||
_LinkBlazorApplication
|
|
||||||
</_CollectLinkerOutputsDependsOn>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<Target
|
<Target
|
||||||
Name="_CollectLinkerOutputs"
|
Name="_ResolveBlazorOutputsWhenLinked"
|
||||||
Condition="'$(_BlazorShouldLinkApplicationAssemblies)' != ''"
|
Condition="'$(BlazorLinkOnBuild)' == 'true'"
|
||||||
DependsOnTargets="$(_CollectLinkerOutputsDependsOn)">
|
DependsOnTargets="_GenerateBlazorLinkerDescriptor;_LinkBlazorApplication">
|
||||||
<!--
|
|
||||||
Read the outputs from the linker (from this run or a previous run) and set them in an item group for
|
<!-- _BlazorLinkerOutputCache records files linked during the last incremental build of the target. Read the contents and assign linked files to be copied to the output. -->
|
||||||
later use.
|
<ReadLinesFromFile File="$(_BlazorLinkerOutputCache)">
|
||||||
-->
|
<Output TaskParameter="Lines" ItemName="_BlazorLinkedFile"/>
|
||||||
<ReadLinesFromFile File="$(BlazorIntermediateLinkerResultFilePath)">
|
|
||||||
<Output TaskParameter="Lines" ItemName="_OptimizedFiles"/>
|
|
||||||
</ReadLinesFromFile>
|
</ReadLinesFromFile>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<BlazorItemOutput Include="@(_OptimizedFiles->WithMetadataValue('Extension','.dll'))">
|
<BlazorOutputWithTargetPath Include="%(_BlazorLinkedFile.Identity)">
|
||||||
<TargetOutputPath>$(BlazorRuntimeBinOutputPath)%(FileName)%(Extension)</TargetOutputPath>
|
<TargetOutputPath>$(BlazorRuntimeBinOutputPath)%(FileName)%(Extension)</TargetOutputPath>
|
||||||
<Type>Assembly</Type>
|
</BlazorOutputWithTargetPath>
|
||||||
<PrimaryOutput Condition="'%(FileName)' == @(IntermediateAssembly->'%(FileName)')">true</PrimaryOutput>
|
|
||||||
</BlazorItemOutput>
|
|
||||||
<BlazorItemOutput Include="@(_OptimizedFiles->WithMetadataValue('Extension','.pdb'))">
|
|
||||||
<TargetOutputPath>$(BlazorRuntimeBinOutputPath)%(FileName)%(Extension)</TargetOutputPath>
|
|
||||||
<Type>Pdb</Type>
|
|
||||||
</BlazorItemOutput>
|
|
||||||
<FileWrites Include="@(BlazorItemOutput->WithMetadataValue('Type','Assembly')->'%(TargetOutputPath)')" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="_GenerateLinkerDescriptor"
|
<UsingTask TaskName="BlazorCreateRootDescriptorFile" AssemblyFile="$(BlazorTasksPath)" />
|
||||||
Inputs="$(BlazorBuildCommonInputsCache)"
|
<Target Name="_GenerateBlazorLinkerDescriptor"
|
||||||
|
Inputs="@(IntermediateAssembly)"
|
||||||
Outputs="$(GeneratedBlazorLinkerDescriptor)"
|
Outputs="$(GeneratedBlazorLinkerDescriptor)"
|
||||||
Condition="$(_BlazorShouldLinkApplicationAssemblies) != '' and '@(BlazorLinkerDescriptor)' == ''">
|
Condition="'@(BlazorLinkerDescriptor)' == ''">
|
||||||
|
|
||||||
|
<!-- Generate linker descriptors if the project doesn't explicitly provide one. -->
|
||||||
|
|
||||||
|
<BlazorCreateRootDescriptorFile
|
||||||
|
AssemblyNames="@(IntermediateAssembly->'%(Filename)')"
|
||||||
|
RootDescriptorFilePath="$(GeneratedBlazorLinkerDescriptor)" />
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<_PrepareLinkerDescriptorAssemblyLine Include="@(IntermediateAssembly->'%(FileName)')" />
|
|
||||||
<_GeneratedLinkerDescriptorLine Include="<linker>" />
|
|
||||||
<_GeneratedLinkerDescriptorLine Include="@(_PrepareLinkerDescriptorAssemblyLine->'<assembly fullname="%(Identity)" />')" />
|
|
||||||
<_GeneratedLinkerDescriptorLine Include="</linker>" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<WriteLinesToFile
|
|
||||||
Lines="@(_GeneratedLinkerDescriptorLine)"
|
|
||||||
File="$(GeneratedBlazorLinkerDescriptor)"
|
|
||||||
Overwrite="true"
|
|
||||||
WriteOnlyWhenDifferent="True" />
|
|
||||||
|
|
||||||
</Target>
|
|
||||||
|
|
||||||
<Target Name="_CollectBlazorLinkerDescriptors">
|
|
||||||
|
|
||||||
<ItemGroup Condition="@(BlazorLinkerDescriptor) == ''">
|
|
||||||
<BlazorLinkerDescriptor Include="$(_BlazorBuiltInBclLinkerDescriptor)" />
|
|
||||||
<BlazorLinkerDescriptor Include="$(GeneratedBlazorLinkerDescriptor)" />
|
|
||||||
<FileWrites Include="$(GeneratedBlazorLinkerDescriptor)" />
|
<FileWrites Include="$(GeneratedBlazorLinkerDescriptor)" />
|
||||||
|
<BlazorLinkerDescriptor Include="$(GeneratedBlazorLinkerDescriptor)" />
|
||||||
|
<BlazorLinkerDescriptor Include="$(_BlazorBuiltInBclLinkerDescriptor)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<_BlazorLinkerInput Include="@(IntermediateAssembly)" />
|
|
||||||
<_BlazorLinkerInput Include="@(_BlazorDependencyInput)" />
|
|
||||||
<_BlazorLinkerInput Include="@(BlazorLinkerDescriptor)" />
|
|
||||||
<_BlazorLinkerInput Include="$(AdditionalMonoLinkerOptions)" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<Hash ItemsToHash="@(_BlazorLinkerInput)">
|
|
||||||
<Output TaskParameter="HashResult" PropertyName="_BlazorLinkerInputHash" />
|
|
||||||
</Hash>
|
|
||||||
|
|
||||||
<WriteLinesToFile
|
|
||||||
Lines="$(_BlazorLinkerInputHash)"
|
|
||||||
File="$(BlazorBuildLinkerInputsCache)"
|
|
||||||
Overwrite="True"
|
|
||||||
WriteOnlyWhenDifferent="True" />
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<FileWrites Include="$(BlazorBuildLinkerInputsCache)" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
<UsingTask TaskName="BlazorILLink" AssemblyFile="$(BlazorTasksPath)" />
|
||||||
|
|
||||||
<Target
|
<Target
|
||||||
Name="_LinkBlazorApplication"
|
Name="_LinkBlazorApplication"
|
||||||
Condition="$(_BlazorShouldLinkApplicationAssemblies) != ''"
|
Inputs="$(ProjectAssetsFile);
|
||||||
Inputs="$(BlazorBuildLinkerInputsCache);
|
|
||||||
@(IntermediateAssembly);
|
@(IntermediateAssembly);
|
||||||
@(_BlazorDependencyInput);
|
@(_BlazorDependencyInput);
|
||||||
@(BlazorLinkerDescriptor)"
|
@(BlazorLinkerDescriptor);
|
||||||
Outputs="$(BlazorIntermediateLinkerResultFilePath)"
|
$(MSBuildAllProjects)"
|
||||||
>
|
Outputs="$(_BlazorLinkerOutputCache)">
|
||||||
<!--
|
|
||||||
At this point we have decided to run the mono linker on the Blazor assembly and its dependencies.
|
|
||||||
The steps to run the mono linker are the following:
|
|
||||||
1) Clear the linker output directory if not clean before hand, as we don't know what the outputs of
|
|
||||||
the linker will be.
|
|
||||||
2) Run the linker on the main assembly, its dependencies and pass in the BCL folders to do the lookup
|
|
||||||
for framework assemblies.
|
|
||||||
3) Once we've run the linker we need to capture the produced output and generate a marker file containing
|
|
||||||
the list of produced files. This file will act as a marker to skip running the linker if none of the inputs
|
|
||||||
has changed.
|
|
||||||
4) Add the file we just created to the list of file writes, to support incremental builds.
|
|
||||||
-->
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<_MonoBaseClassLibraryFolder Include="$(MonoBaseClassLibraryPath);$(MonoBaseClassLibraryFacadesPath);$(MonoWasmFrameworkPath)" />
|
<_BlazorDependencyAssembly Include="@(_BlazorDependencyInput)" IsLinkable="$([System.String]::Copy('%(FileName)').StartsWith('System.'))" />
|
||||||
<_BlazorAssembliesToLink Include="@(_BlazorDependencyInput->'-a "%(Identity)"')" />
|
|
||||||
<_BlazorAssembliesToLink Include="@(IntermediateAssembly->'-a "%(FullPath)"')" />
|
<_BlazorAssemblyToLink Include="@(_WebAssemblyBCLAssembly)" />
|
||||||
<_BlazorFolderLookupPaths Include="@(_MonoBaseClassLibraryFolder->'-d "%(Identity)"')" />
|
<_BlazorAssemblyToLink Include="@(_BlazorDependencyAssembly)" Condition="'%(_BlazorDependencyAssembly.IsLinkable)' == 'true'" />
|
||||||
<_BlazorAssemblyDescriptorFiles
|
|
||||||
Include="@(BlazorLinkerDescriptor->'-x "%(FullPath)"')" Condition="'@(BlazorLinkerDescriptor)' != ''" />
|
<_BlazorLinkerRoot Include="@(IntermediateAssembly)" />
|
||||||
|
<_BlazorLinkerRoot Include="@(_BlazorDependencyAssembly)" Condition="'%(_BlazorDependencyAssembly.IsLinkable)' != 'true'" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<_BlazorLinkerAdditionalOptions>-l $(MonoLinkerI18NAssemblies) $(AdditionalMonoLinkerOptions)</_BlazorLinkerAdditionalOptions>
|
<_BlazorLinkerAdditionalOptions>-l $(MonoLinkerI18NAssemblies) $(AdditionalMonoLinkerOptions)</_BlazorLinkerAdditionalOptions>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- Clear the contents of /obj/<<configuration>>/<<targetframework>>/blazor/blazor/linker -->
|
|
||||||
<Delete Files="$(BlazorIntermediateLinkerOutputPath)*.dll" />
|
|
||||||
|
|
||||||
<!-- Run the linker and put the results in /obj/<<configuration>>/<<targetframework>>/blazor/blazor/linker -->
|
|
||||||
<Exec Command="dotnet "$(MonoLinkerPath)" $(_BlazorLinkerAdditionalOptions) @(_BlazorFolderLookupPaths, ' ') -o "$(BlazorIntermediateLinkerOutputPath)" @(_BlazorAssemblyDescriptorFiles, ' ') @(_BlazorAssembliesToLink, ' ')" />
|
|
||||||
|
|
||||||
<!-- Collect the contents of /obj/<<configuration>>/<<targetframework>>/blazor/blazor/linker/ -->
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<_BlazorLinkerOutput Include="$(BlazorIntermediateLinkerOutputPath)*.dll" />
|
<_OldLinkedFile Include="$(BlazorIntermediateLinkerOutputPath)*.dll" />
|
||||||
<_BlazorLinkerOutput Include="$(BlazorIntermediateLinkerOutputPath)*.pdb" />
|
<_OldLinkedFile Include="$(BlazorIntermediateLinkerOutputPath)*.pdb" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<!--
|
<Delete Files="@(_OldLinkedFile)" />
|
||||||
Write the list of files in /obj/<<configuration>>/<<targetframework>>/blazor/blazor/linker/ into
|
|
||||||
/obj/<<configuration>>/<<targetframework>>/blazor/blazor/linked.assemblies.txt
|
<!--
|
||||||
-->
|
When running from Desktop MSBuild, DOTNET_HOST_PATH is not set.
|
||||||
<WriteLinesToFile
|
In this case, explicitly specify the path to the dotnet host.
|
||||||
File="$(BlazorIntermediateLinkerResultFilePath)"
|
-->
|
||||||
Lines="@(_BlazorLinkerOutput)"
|
<PropertyGroup Condition=" '$(DOTNET_HOST_PATH)' == '' ">
|
||||||
Overwrite="true" />
|
<_DotNetHostDirectory>$(NetCoreRoot)</_DotNetHostDirectory>
|
||||||
|
<_DotNetHostFileName>dotnet</_DotNetHostFileName>
|
||||||
|
<_DotNetHostFileName Condition=" '$(OS)' == 'Windows_NT' ">dotnet.exe</_DotNetHostFileName>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<BlazorILLink
|
||||||
|
ILLinkPath="$(MonoLinkerPath)"
|
||||||
|
AssemblyPaths="@(_BlazorAssemblyToLink)"
|
||||||
|
RootAssemblyNames="@(_BlazorLinkerRoot)"
|
||||||
|
RootDescriptorFiles="@(BlazorLinkerDescriptor)"
|
||||||
|
OutputDirectory="$(BlazorIntermediateLinkerOutputPath)"
|
||||||
|
ExtraArgs="$(_BlazorLinkerAdditionalOptions)"
|
||||||
|
ToolExe="$(_DotNetHostFileName)"
|
||||||
|
ToolPath="$(_DotNetHostDirectory)" />
|
||||||
|
|
||||||
<!-- Add /obj/<<configuration>>/<<targetframework>>/blazor/blazor/linked.assemblies.txt to the list of written files. -->
|
|
||||||
<!-- Add /obj/<<configuration>>/<<targetframework>>/blazor/blazor/linker/*.dll to the list of written files. -->
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<FileWrites Include="$(BlazorIntermediateLinkerResultFilePath)" />
|
<_LinkerResult Include="$(BlazorIntermediateLinkerOutputPath)*.dll" />
|
||||||
<FileWrites Include="@(_BlazorLinkerOutput)" />
|
<_LinkerResult Include="$(BlazorIntermediateLinkerOutputPath)*.pdb" Condition="'$(BlazorEnableDebugging)' == 'true'" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<WriteLinesToFile File="$(_BlazorLinkerOutputCache)" Lines="@(_LinkerResult)" Overwrite="true" />
|
||||||
|
</Target>
|
||||||
|
|
||||||
|
|
||||||
|
<UsingTask TaskName="ResolveBlazorRuntimeDependencies" AssemblyFile="$(BlazorTasksPath)" />
|
||||||
|
<Target
|
||||||
|
Name="_ResolveBlazorOutputsWhenNotLinked"
|
||||||
|
DependsOnTargets="_ResolveBlazorRuntimeDependencies"
|
||||||
|
Condition="'$(BlazorLinkOnBuild)' != 'true'">
|
||||||
|
|
||||||
|
<ReadLinesFromFile File="$(_BlazorApplicationAssembliesCacheFile)" Condition="'@(_BlazorResolvedRuntimeDependencies->Count())' == '0'">
|
||||||
|
<Output TaskParameter="Lines" ItemName="_BlazorResolvedRuntimeDependencies"/>
|
||||||
|
</ReadLinesFromFile>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<BlazorOutputWithTargetPath Include="@(_BlazorResolvedRuntimeDependencies)">
|
||||||
|
<TargetOutputPath>$(BlazorRuntimeBinOutputPath)%(FileName)%(Extension)</TargetOutputPath>
|
||||||
|
</BlazorOutputWithTargetPath>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<!--
|
|
||||||
Linker disabled part of the pipeline:
|
|
||||||
|
|
||||||
* Run a CLI tool to produce the transitive closure of application references using the main application
|
|
||||||
as entry point.
|
|
||||||
* Read the list of resolved application references from the file produced by the previous step.
|
|
||||||
* Copy the resolved application references into an intermediate folder.
|
|
||||||
* If we are switching from linking to not linking
|
|
||||||
Touch the files in the intermediate folder to ensure they are copied to the output and replace
|
|
||||||
the linked versions with the same name.
|
|
||||||
* Collect the list of resolved assemblies in the intermediate output folder and prepare them to be
|
|
||||||
copied to their final destination in the output folder.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<_CollectResolvedAssembliesDependsOn>
|
|
||||||
_ResolveBlazorApplicationAssemblies;
|
|
||||||
_ReadResolvedBlazorApplicationAssemblies;
|
|
||||||
_IntermediateCopyBlazorApplicationAssemblies;
|
|
||||||
_TouchBlazorApplicationAssemblies
|
|
||||||
</_CollectResolvedAssembliesDependsOn>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<Target
|
<Target
|
||||||
Name="_CollectResolvedAssemblies"
|
Name="_ResolveBlazorRuntimeDependencies"
|
||||||
DependsOnTargets="$(_CollectResolvedAssembliesDependsOn)"
|
Inputs="$(ProjectAssetsFile);
|
||||||
Condition="'$(_BlazorShouldLinkApplicationAssemblies)' == ''">
|
@(IntermediateAssembly);
|
||||||
|
@(_BlazorDependencyInput)"
|
||||||
|
Outputs="$(_BlazorApplicationAssembliesCacheFile)">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
At this point we have decided not to run the linker and instead to just copy the assemblies
|
At this point we have decided not to run the linker and instead to just copy the assemblies
|
||||||
from the BCL referenced by the app the nuget package into the _framework/_bin folder.
|
from the BCL referenced by the app the nuget package into the _framework/_bin folder.
|
||||||
The only thing we need to do here is collect the list of items that will go into _framework/_bin.
|
The only thing we need to do here is collect the list of items that will go into _framework/_bin.
|
||||||
-->
|
-->
|
||||||
|
<ResolveBlazorRuntimeDependencies
|
||||||
|
EntryPoint="@(IntermediateAssembly)"
|
||||||
|
ApplicationDependencies="@(_BlazorDependencyInput)"
|
||||||
|
WebAssemblyBCLAssemblies="@(_WebAssemblyBCLAssembly)">
|
||||||
|
|
||||||
|
<Output TaskParameter="Dependencies" ItemName="_BlazorResolvedRuntimeDependencies" />
|
||||||
|
</ResolveBlazorRuntimeDependencies>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<BlazorItemOutput Include="@(_IntermediateResolvedRuntimeDependencies->WithMetadataValue('Extension','.dll'))">
|
<FileWrites Include="$(_BlazorApplicationAssembliesCacheFile)" />
|
||||||
<TargetOutputPath>$(BlazorRuntimeBinOutputPath)%(FileName)%(Extension)</TargetOutputPath>
|
|
||||||
<Type>Assembly</Type>
|
|
||||||
<PrimaryOutput Condition="'%(FileName)' == @(IntermediateAssembly->'%(FileName)')">true</PrimaryOutput>
|
|
||||||
</BlazorItemOutput>
|
|
||||||
<BlazorItemOutput Include="@(_IntermediateResolvedRuntimeDependencies->WithMetadataValue('Extension','.pdb'))">
|
|
||||||
<TargetOutputPath>$(BlazorRuntimeBinOutputPath)%(FileName)%(Extension)</TargetOutputPath>
|
|
||||||
<Type>Pdb</Type>
|
|
||||||
</BlazorItemOutput>
|
|
||||||
<FileWrites Include="@(BlazorItemOutput->WithMetadataValue('Type','Assembly')->'%(TargetOutputPath)')" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target
|
<UsingTask TaskName="GenerateBlazorBootJson" AssemblyFile="$(BlazorTasksPath)" />
|
||||||
Name="_ResolveBlazorApplicationAssemblies"
|
|
||||||
Condition="'$(_BlazorShouldLinkApplicationAssemblies)' == ''"
|
|
||||||
Inputs="$(BlazorBuildCommonInputsCache);
|
|
||||||
@(IntermediateAssembly);
|
|
||||||
@(_BlazorDependencyInput)"
|
|
||||||
Outputs="$(BlazorResolvedAssembliesOutputPath)"
|
|
||||||
>
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<_ReferencesArg Condition="'@(_BlazorDependencyInput)' != ''">--references "$(BlazorResolveDependenciesFilePath)"</_ReferencesArg>
|
|
||||||
<_BclParameter>--base-class-library "$(MonoBaseClassLibraryPath)" --base-class-library "$(MonoBaseClassLibraryFacadesPath)" --base-class-library "$(MonoWasmFrameworkPath)"</_BclParameter>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<WriteLinesToFile
|
|
||||||
File="$(BlazorResolveDependenciesFilePath)"
|
|
||||||
Lines="@(_BlazorDependencyInput)"
|
|
||||||
Overwrite="true" />
|
|
||||||
|
|
||||||
<Exec Command="$(BlazorBuildExe) resolve-dependencies "@(IntermediateAssembly->'%(FullPath)')" $(_ReferencesArg) $(_BclParameter) --output "$(BlazorResolvedAssembliesOutputPath)"" />
|
|
||||||
|
|
||||||
</Target>
|
|
||||||
|
|
||||||
<Target Name="_ReadResolvedBlazorApplicationAssemblies">
|
|
||||||
|
|
||||||
<ReadLinesFromFile File="$(BlazorResolvedAssembliesOutputPath)">
|
|
||||||
<Output TaskParameter="Lines" ItemName="_BlazorResolvedRuntimeDependencies"/>
|
|
||||||
</ReadLinesFromFile>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<_IntermediateResolvedRuntimeDependencies Include="@(_BlazorResolvedRuntimeDependencies->'$(BlazorIntermediateResolvedApplicationAssembliesOutputPath)%(FileName)%(Extension)')" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<FileWrites Include="$(BlazorResolvedAssembliesOutputPath)" />
|
|
||||||
<FileWrites Include="@(_IntermediateResolvedRuntimeDependencies)" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Target>
|
|
||||||
|
|
||||||
<Target
|
|
||||||
Name="_IntermediateCopyBlazorApplicationAssemblies"
|
|
||||||
Inputs="@(_BlazorResolvedRuntimeDependencies)"
|
|
||||||
Outputs="@(_BlazorResolvedRuntimeDependencies->'$(BlazorIntermediateResolvedApplicationAssembliesOutputPath)%(FileName)%(Extension)')">
|
|
||||||
|
|
||||||
<Copy
|
|
||||||
SourceFiles="@(_BlazorResolvedRuntimeDependencies)"
|
|
||||||
DestinationFiles="@(_BlazorResolvedRuntimeDependencies->'$(BlazorIntermediateResolvedApplicationAssembliesOutputPath)%(FileName)%(Extension)')"
|
|
||||||
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
|
|
||||||
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
|
|
||||||
Retries="$(CopyRetryCount)"
|
|
||||||
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
|
|
||||||
UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)"
|
|
||||||
UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible)" />
|
|
||||||
|
|
||||||
</Target>
|
|
||||||
|
|
||||||
<Target
|
|
||||||
Name="_TouchBlazorApplicationAssemblies"
|
|
||||||
Inputs="$(BlazorBuildLinkerSwitchInputsCache)"
|
|
||||||
Outputs="@(_IntermediateResolvedRuntimeDependencies)">
|
|
||||||
|
|
||||||
<Touch Files="@(_IntermediateResolvedRuntimeDependencies)" ForceTouch="true" />
|
|
||||||
|
|
||||||
</Target>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Final part of the build pipeline:
|
|
||||||
|
|
||||||
* Collect the blazor application assemblies to be copied to the output and create a marker file.
|
|
||||||
* Call our CLI tool to generate the boot json if the list of assemblies has changed.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<Target Name="_ResolveBlazorBootJsonInputs">
|
|
||||||
<ItemGroup>
|
|
||||||
<BlazorBootJsonInput Include="$(Configuration)" />
|
|
||||||
<BlazorBootJsonInput Include="@(BlazorItemOutput->WithMetadataValue('Type','Assembly')->'%(FullPath)')" />
|
|
||||||
<BlazorBootJsonInput Include="@(BlazorItemOutput->WithMetadataValue('Type','Pdb')->'%(FullPath)')" />
|
|
||||||
<BlazorBootJsonInput Include="@(_BlazorLinkingOption)" />
|
|
||||||
<BlazorBootJsonInput Include="$(BlazorEnableDebugging)" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<WriteLinesToFile
|
|
||||||
File="$(BlazorBuildBootJsonInputsCache)"
|
|
||||||
Lines="@(BlazorBootJsonInput)"
|
|
||||||
Overwrite="true"
|
|
||||||
WriteOnlyWhenDifferent="True" />
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<FileWrites Include="$(BlazorBuildBootJsonInputsCache)" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Target>
|
|
||||||
|
|
||||||
<Target
|
<Target
|
||||||
Name="_GenerateBlazorBootJson"
|
Name="_GenerateBlazorBootJson"
|
||||||
DependsOnTargets="_ResolveBlazorBootJsonInputs"
|
Inputs="@(BlazorOutputWithTargetPath)"
|
||||||
Inputs="$(BlazorBuildBootJsonInputsCache);@(_BlazorDependencyInput)"
|
|
||||||
Outputs="$(BlazorBootJsonIntermediateOutputPath)">
|
Outputs="$(BlazorBootJsonIntermediateOutputPath)">
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<_UnlinkedAppReferencesPaths Include="@(_BlazorDependencyInput)" />
|
<_AppReferences Include="@(BlazorOutputWithTargetPath->WithMetadataValue('Extension','.dll'))" />
|
||||||
<_AppReferences Include="@(BlazorItemOutput->WithMetadataValue('Type','Assembly')->WithMetadataValue('PrimaryOutput','')->'%(FileName)%(Extension)')" />
|
<_AppReferences Include="@(BlazorOutputWithTargetPath->WithMetadataValue('Extension','.pdb'))" Condition="'$(BlazorEnableDebugging)' == 'true'" />
|
||||||
<_AppReferences Include="@(BlazorItemOutput->WithMetadataValue('Type','Pdb')->'%(FileName)%(Extension)')" Condition="'$(BlazorEnableDebugging)' == 'true'" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup>
|
|
||||||
<_LinkerEnabledFlag Condition="'$(_BlazorShouldLinkApplicationAssemblies)' != ''">--linker-enabled</_LinkerEnabledFlag>
|
|
||||||
<_ReferencesArg Condition="'@(_AppReferences)' != ''">--references "$(BlazorBootJsonReferencesFilePath)"</_ReferencesArg>
|
|
||||||
<_EmbeddedResourcesArg Condition="'@(_UnlinkedAppReferencesPaths)' != ''">--embedded-resources "$(BlazorEmbeddedResourcesConfigFilePath)"</_EmbeddedResourcesArg>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<WriteLinesToFile
|
<GenerateBlazorBootJson
|
||||||
File="$(BlazorBootJsonReferencesFilePath)"
|
AssemblyPath="@(IntermediateAssembly)"
|
||||||
Lines="@(_AppReferences)"
|
References="@(_AppReferences)"
|
||||||
Overwrite="true" />
|
LinkerEnabled="$(BlazorLinkOnBuild)"
|
||||||
|
OutputPath="$(BlazorBootJsonIntermediateOutputPath)" />
|
||||||
|
|
||||||
<WriteLinesToFile
|
<ItemGroup>
|
||||||
Condition="'@(_UnlinkedAppReferencesPaths)' != ''"
|
<BlazorOutputWithTargetPath Include="$(BlazorBootJsonIntermediateOutputPath)" TargetOutputPath="$(BaseBlazorRuntimeOutputPath)$(BlazorBootJsonName)" />
|
||||||
File="$(BlazorEmbeddedResourcesConfigFilePath)"
|
|
||||||
Lines="@(_UnlinkedAppReferencesPaths)"
|
|
||||||
Overwrite="true" />
|
|
||||||
|
|
||||||
<Exec Command="$(BlazorBuildExe) write-boot-json "@(IntermediateAssembly)" $(_ReferencesArg) $(_EmbeddedResourcesArg) $(_LinkerEnabledFlag) --output "$(BlazorBootJsonIntermediateOutputPath)"" />
|
|
||||||
|
|
||||||
<ItemGroup Condition="Exists('$(BlazorBootJsonIntermediateOutputPath)')">
|
|
||||||
<_BlazorBootJson Include="$(BlazorBootJsonIntermediateOutputPath)" />
|
|
||||||
<_BlazorBootJsonEmbeddedContentFile Include="$(BlazorBootJsonIntermediateOutputDir)_content\**\*.*" />
|
|
||||||
<BlazorItemOutput Include="@(_BlazorBootJson)">
|
|
||||||
<TargetOutputPath>$(TargetDir)$(BlazorBootJsonOutputPath)</TargetOutputPath>
|
|
||||||
<Type>BootJson</Type>
|
|
||||||
</BlazorItemOutput>
|
|
||||||
<BlazorItemOutput Include="@(_BlazorBootJsonEmbeddedContentFile)">
|
|
||||||
<TargetOutputPath>$(TargetDir)dist/_content/%(RecursiveDir)%(FileName)%(Extension)</TargetOutputPath>
|
|
||||||
</BlazorItemOutput>
|
|
||||||
<FileWrites Include="$(BlazorBootJsonIntermediateOutputPath)" />
|
<FileWrites Include="$(BlazorBootJsonIntermediateOutputPath)" />
|
||||||
<FileWrites Include="@(_BlazorBootJsonEmbeddedContentFile)" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,8 @@
|
||||||
</ContentWithTargetPath>
|
</ContentWithTargetPath>
|
||||||
|
|
||||||
<!-- Publish all the 'dist' files -->
|
<!-- Publish all the 'dist' files -->
|
||||||
<_BlazorGCTPDIDistFiles Include="@(BlazorItemOutput->'%(TargetOutputPath)')" />
|
<_BlazorGCTPDI Include="%(BlazorOutputWithTargetPath.Identity)">
|
||||||
<_BlazorGCTPDI Include="@(_BlazorGCTPDIDistFiles)">
|
<TargetPath>$(AssemblyName)\%(TargetOutputPath)</TargetPath>
|
||||||
<TargetPath>$(BlazorPublishDistDir)$([MSBuild]::MakeRelative('$(TargetDir)dist\', %(Identity)))</TargetPath>
|
|
||||||
</_BlazorGCTPDI>
|
</_BlazorGCTPDI>
|
||||||
|
|
||||||
<ContentWithTargetPath Include="@(_BlazorGCTPDI)">
|
<ContentWithTargetPath Include="@(_BlazorGCTPDI)">
|
||||||
|
|
@ -41,8 +40,17 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<_BlazorConfigPath>$(OutDir)$(AssemblyName).blazor.config</_BlazorConfigPath>
|
<_BlazorConfigPath>$(OutDir)$(AssemblyName).blazor.config</_BlazorConfigPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<WriteLinesToFile File="$(_BlazorConfigPath)" Lines="." Overwrite="true" />
|
|
||||||
<WriteLinesToFile File="$(_BlazorConfigPath)" Lines="$(AssemblyName)/" Overwrite="false" />
|
<ItemGroup>
|
||||||
|
<_BlazorPublishConfigContent Include="." />
|
||||||
|
<_BlazorPublishConfigContent Include="$(AssemblyName)/" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<WriteLinesToFile
|
||||||
|
File="$(_BlazorConfigPath)"
|
||||||
|
Lines="@(_BlazorPublishConfigContent)"
|
||||||
|
Overwrite="true"
|
||||||
|
WriteOnlyWhenDifferent="true" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<!-- The following target runs only for standalone publishing -->
|
<!-- The following target runs only for standalone publishing -->
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
<Project>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<ResolveStaticWebAssetsInputsDependsOn>
|
||||||
|
$(ResolveStaticWebAssetsInputsDependsOn);
|
||||||
|
_RemoveBlazorCurrentProjectAssetsFromStaticWebAssets;
|
||||||
|
</ResolveStaticWebAssetsInputsDependsOn>
|
||||||
|
|
||||||
|
<GetCurrentProjectStaticWebAssetsDependsOn>
|
||||||
|
$(GetCurrentProjectStaticWebAssetsDependsOn);
|
||||||
|
_RemoveBlazorCurrentProjectAssetsFromStaticWebAssets;
|
||||||
|
</GetCurrentProjectStaticWebAssetsDependsOn>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
||||||
|
<Target Name="_RemoveBlazorCurrentProjectAssetsFromStaticWebAssets">
|
||||||
|
<ItemGroup>
|
||||||
|
<StaticWebAsset Remove="@(StaticWebAsset)" Condition="'%(SourceType)' == ''" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Target>
|
||||||
|
|
||||||
|
<Target Name="BlazorStaticWebAssetsComputeFilesToPublish"
|
||||||
|
AfterTargets="_StaticWebAssetsComputeFilesToPublish">
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<!-- We need to update the external static web assets to follow the blazor publish output convention that puts them inside $(TargetName)/dist instead of wwwroot -->
|
||||||
|
<_StandaloneExternalPublishStaticWebAsset Include="@(_ExternalPublishStaticWebAsset)" Condition="'%(RelativePath)' != ''">
|
||||||
|
<RelativePath>$([MSBuild]::MakeRelative('$(MSBuildProjectDirectory)', '$([MSBuild]::NormalizePath('$([System.Text.RegularExpressions.Regex]::Replace('%(RelativePath)','^wwwroot\\?\/?(.*)','$(BlazorPublishDistDir)$1'))'))'))</RelativePath>
|
||||||
|
</_StandaloneExternalPublishStaticWebAsset>
|
||||||
|
|
||||||
|
<!-- Update doesn't work inside targets so we need to remove the items and re-add them. See https://github.com/microsoft/msbuild/issues/2835 for details -->
|
||||||
|
<ResolvedFileToPublish Remove="@(_StandaloneExternalPublishStaticWebAsset)" />
|
||||||
|
<ResolvedFileToPublish Include="@(_StandaloneExternalPublishStaticWebAsset)" />
|
||||||
|
|
||||||
|
</ItemGroup>
|
||||||
|
</Target>
|
||||||
|
</Project>
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
|
using System.IO;
|
||||||
|
using System.Xml.Linq;
|
||||||
|
using Xunit;
|
||||||
|
|
||||||
|
namespace Microsoft.AspNetCore.Blazor.Build
|
||||||
|
{
|
||||||
|
public class BlazorCreateRootDescriptorFileTest
|
||||||
|
{
|
||||||
|
[Fact]
|
||||||
|
public void ProducesRootDescriptor()
|
||||||
|
{
|
||||||
|
// Arrange/Act
|
||||||
|
using var stream = new MemoryStream();
|
||||||
|
|
||||||
|
// Act
|
||||||
|
BlazorCreateRootDescriptorFile.WriteRootDescriptor(
|
||||||
|
stream,
|
||||||
|
new[] { "MyApp.dll" });
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
stream.Position = 0;
|
||||||
|
var document = XDocument.Load(stream);
|
||||||
|
var rootElement = document.Root;
|
||||||
|
|
||||||
|
var assemblyElement = Assert.Single(rootElement.Elements());
|
||||||
|
Assert.Equal("assembly", assemblyElement.Name.ToString());
|
||||||
|
Assert.Equal("MyApp.dll", assemblyElement.Attribute("fullname").Value);
|
||||||
|
|
||||||
|
var typeElement = Assert.Single(assemblyElement.Elements());
|
||||||
|
Assert.Equal("type", typeElement.Name.ToString());
|
||||||
|
Assert.Equal("*", typeElement.Attribute("fullname").Value);
|
||||||
|
Assert.Equal("true", typeElement.Attribute("required").Value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,62 +1,41 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using System.IO;
|
||||||
using Newtonsoft.Json.Linq;
|
using System.Text.Json;
|
||||||
using System;
|
using System.Threading.Tasks;
|
||||||
using System.Linq;
|
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Blazor.Build.Test
|
namespace Microsoft.AspNetCore.Blazor.Build
|
||||||
{
|
{
|
||||||
public class BootJsonWriterTest
|
public class BootJsonWriterTest
|
||||||
{
|
{
|
||||||
[Fact]
|
[Fact]
|
||||||
public void ProducesJsonReferencingAssemblyAndDependencies()
|
public async Task ProducesJsonReferencingAssemblyAndDependencies()
|
||||||
{
|
{
|
||||||
// Arrange/Act
|
// Arrange/Act
|
||||||
var assemblyReferences = new string[] { "System.Abc.dll", "MyApp.ClassLib.dll", };
|
var assemblyReferences = new string[] { "MyApp.EntryPoint.dll", "System.Abc.dll", "MyApp.ClassLib.dll", };
|
||||||
var content = BootJsonWriter.GetBootJsonContent(
|
using var stream = new MemoryStream();
|
||||||
|
|
||||||
|
// Act
|
||||||
|
GenerateBlazorBootJson.WriteBootJson(
|
||||||
|
stream,
|
||||||
"MyApp.Entrypoint.dll",
|
"MyApp.Entrypoint.dll",
|
||||||
"MyNamespace.MyType::MyMethod",
|
|
||||||
assemblyReferences,
|
assemblyReferences,
|
||||||
Enumerable.Empty<EmbeddedResourceInfo>(),
|
|
||||||
linkerEnabled: true);
|
linkerEnabled: true);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
var parsedContent = JsonConvert.DeserializeObject<JObject>(content);
|
stream.Position = 0;
|
||||||
Assert.Equal("MyApp.Entrypoint.dll", parsedContent["main"].Value<string>());
|
using var parsedContent = await JsonDocument.ParseAsync(stream);
|
||||||
Assert.Equal("MyNamespace.MyType::MyMethod", parsedContent["entryPoint"].Value<string>());
|
var rootElement = parsedContent.RootElement;
|
||||||
Assert.Equal(assemblyReferences, parsedContent["assemblyReferences"].Values<string>());
|
Assert.Equal("MyApp.Entrypoint.dll", rootElement.GetProperty("entryAssembly").GetString());
|
||||||
}
|
var assembliesElement = rootElement.GetProperty("assemblies");
|
||||||
|
Assert.Equal(assemblyReferences.Length, assembliesElement.GetArrayLength());
|
||||||
[Fact]
|
for (var i = 0; i < assemblyReferences.Length; i++)
|
||||||
public void IncludesReferencesToEmbeddedContent()
|
|
||||||
{
|
|
||||||
// Arrange/Act
|
|
||||||
var embeddedContent = new[]
|
|
||||||
{
|
{
|
||||||
new EmbeddedResourceInfo(EmbeddedResourceKind.Static, "my/static/file"),
|
Assert.Equal(assemblyReferences[i], assembliesElement[i].GetString());
|
||||||
new EmbeddedResourceInfo(EmbeddedResourceKind.Css, "css/first.css"),
|
}
|
||||||
new EmbeddedResourceInfo(EmbeddedResourceKind.JavaScript, "javascript/first.js"),
|
Assert.True(rootElement.GetProperty("linkerEnabled").GetBoolean());
|
||||||
new EmbeddedResourceInfo(EmbeddedResourceKind.Css, "css/second.css"),
|
|
||||||
new EmbeddedResourceInfo(EmbeddedResourceKind.JavaScript, "javascript/second.js"),
|
|
||||||
};
|
|
||||||
var content = BootJsonWriter.GetBootJsonContent(
|
|
||||||
"MyApp.Entrypoint",
|
|
||||||
"MyNamespace.MyType::MyMethod",
|
|
||||||
assemblyReferences: new[] { "Something.dll" },
|
|
||||||
embeddedContent: embeddedContent,
|
|
||||||
linkerEnabled: true);
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
var parsedContent = JsonConvert.DeserializeObject<JObject>(content);
|
|
||||||
Assert.Equal(
|
|
||||||
new[] { "css/first.css", "css/second.css" },
|
|
||||||
parsedContent["cssReferences"].Values<string>());
|
|
||||||
Assert.Equal(
|
|
||||||
new[] { "javascript/first.js", "javascript/second.js" },
|
|
||||||
parsedContent["jsReferences"].Values<string>());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,950 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using System.IO.Compression;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Reflection.Metadata;
|
||||||
|
using System.Reflection.PortableExecutable;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
|
namespace Microsoft.AspNetCore.Blazor.Build
|
||||||
|
{
|
||||||
|
internal class Assert : Xunit.Assert
|
||||||
|
{
|
||||||
|
// Matches `{filename}: error {code}: {message} [{project}]
|
||||||
|
// See https://stackoverflow.com/questions/3441452/msbuild-and-ignorestandarderrorwarningformat/5180353#5180353
|
||||||
|
private static readonly Regex ErrorRegex = new Regex(@"^(?'location'.+): error (?'errorcode'[A-Z0-9]+): (?'message'.+) \[(?'project'.+)\]$");
|
||||||
|
private static readonly Regex WarningRegex = new Regex(@"^(?'location'.+): warning (?'errorcode'[A-Z0-9]+): (?'message'.+) \[(?'project'.+)\]$");
|
||||||
|
private static readonly string[] AllowedBuildWarnings = new[]
|
||||||
|
{
|
||||||
|
"MSB3491" , // The process cannot access the file. As long as the build succeeds, we're ok.
|
||||||
|
"NETSDK1071", // "A PackageReference to 'Microsoft.NETCore.App' specified a Version ..."
|
||||||
|
};
|
||||||
|
|
||||||
|
public static void BuildPassed(MSBuildResult result, bool allowWarnings = false)
|
||||||
|
{
|
||||||
|
if (result == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(result));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result.ExitCode != 0)
|
||||||
|
{
|
||||||
|
throw new BuildFailedException(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
var buildWarnings = GetBuildWarnings(result)
|
||||||
|
.Where(m => !AllowedBuildWarnings.Contains(m.match.Groups["errorcode"].Value))
|
||||||
|
.Select(m => m.line);
|
||||||
|
|
||||||
|
if (!allowWarnings && buildWarnings.Any())
|
||||||
|
{
|
||||||
|
throw new BuildWarningsException(result, buildWarnings);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void BuildError(MSBuildResult result, string errorCode, string location = null)
|
||||||
|
{
|
||||||
|
if (result == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(result));
|
||||||
|
}
|
||||||
|
|
||||||
|
// We don't really need to search line by line, I'm doing this so that it's possible/easy to debug.
|
||||||
|
var lines = result.Output.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
for (var i = 0; i < lines.Length; i++)
|
||||||
|
{
|
||||||
|
var line = lines[i];
|
||||||
|
var match = ErrorRegex.Match(line);
|
||||||
|
if (match.Success)
|
||||||
|
{
|
||||||
|
if (match.Groups["errorcode"].Value != errorCode)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (location != null && match.Groups["location"].Value.Trim() != location)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// This is a match
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new BuildErrorMissingException(result, errorCode, location);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void BuildWarning(MSBuildResult result, string errorCode, string location = null)
|
||||||
|
{
|
||||||
|
if (result == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(result));
|
||||||
|
}
|
||||||
|
|
||||||
|
// We don't really need to search line by line, I'm doing this so that it's possible/easy to debug.
|
||||||
|
foreach (var (_, match) in GetBuildWarnings(result))
|
||||||
|
{
|
||||||
|
if (match.Groups["errorcode"].Value != errorCode)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (location != null && match.Groups["location"].Value.Trim() != location)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// This is a match
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new BuildErrorMissingException(result, errorCode, location);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static IEnumerable<(string line, Match match)> GetBuildWarnings(MSBuildResult result)
|
||||||
|
{
|
||||||
|
var lines = result.Output.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
for (var i = 0; i < lines.Length; i++)
|
||||||
|
{
|
||||||
|
var line = lines[i];
|
||||||
|
var match = WarningRegex.Match(line);
|
||||||
|
if (match.Success)
|
||||||
|
{
|
||||||
|
yield return (line, match);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void BuildFailed(MSBuildResult result)
|
||||||
|
{
|
||||||
|
if (result == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(result));
|
||||||
|
};
|
||||||
|
|
||||||
|
if (result.ExitCode == 0)
|
||||||
|
{
|
||||||
|
throw new BuildPassedException(result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void BuildOutputContainsLine(MSBuildResult result, string match)
|
||||||
|
{
|
||||||
|
if (result == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(result));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (match == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(match));
|
||||||
|
}
|
||||||
|
|
||||||
|
// We don't really need to search line by line, I'm doing this so that it's possible/easy to debug.
|
||||||
|
var lines = result.Output.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
for (var i = 0; i < lines.Length; i++)
|
||||||
|
{
|
||||||
|
var line = lines[i].Trim();
|
||||||
|
if (line == match)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new BuildOutputMissingException(result, match);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void BuildOutputDoesNotContainLine(MSBuildResult result, string match)
|
||||||
|
{
|
||||||
|
if (result == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(result));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (match == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(match));
|
||||||
|
}
|
||||||
|
|
||||||
|
// We don't really need to search line by line, I'm doing this so that it's possible/easy to debug.
|
||||||
|
var lines = result.Output.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
for (var i = 0; i < lines.Length; i++)
|
||||||
|
{
|
||||||
|
var line = lines[i].Trim();
|
||||||
|
if (line == match)
|
||||||
|
{
|
||||||
|
throw new BuildOutputContainsLineException(result, match);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void FileContains(MSBuildResult result, string filePath, string match)
|
||||||
|
{
|
||||||
|
if (result == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(result));
|
||||||
|
}
|
||||||
|
|
||||||
|
filePath = Path.Combine(result.Project.DirectoryPath, filePath);
|
||||||
|
FileExists(result, filePath);
|
||||||
|
|
||||||
|
var text = File.ReadAllText(filePath);
|
||||||
|
if (text.Contains(match))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new FileContentMissingException(result, filePath, File.ReadAllText(filePath), match);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void FileDoesNotContain(MSBuildResult result, string filePath, string match)
|
||||||
|
{
|
||||||
|
if (result == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(result));
|
||||||
|
}
|
||||||
|
|
||||||
|
filePath = Path.Combine(result.Project.DirectoryPath, filePath);
|
||||||
|
FileExists(result, filePath);
|
||||||
|
|
||||||
|
var text = File.ReadAllText(filePath);
|
||||||
|
if (text.Contains(match))
|
||||||
|
{
|
||||||
|
throw new FileContentFoundException(result, filePath, File.ReadAllText(filePath), match);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void FileContentEquals(MSBuildResult result, string filePath, string expected)
|
||||||
|
{
|
||||||
|
if (result == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(result));
|
||||||
|
}
|
||||||
|
|
||||||
|
filePath = Path.Combine(result.Project.DirectoryPath, filePath);
|
||||||
|
FileExists(result, filePath);
|
||||||
|
|
||||||
|
var actual = File.ReadAllText(filePath);
|
||||||
|
if (!actual.Equals(expected, StringComparison.Ordinal))
|
||||||
|
{
|
||||||
|
throw new FileContentNotEqualException(result, filePath, expected, actual);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void FileEquals(MSBuildResult result, string expected, string actual)
|
||||||
|
{
|
||||||
|
if (result == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(result));
|
||||||
|
}
|
||||||
|
|
||||||
|
expected = Path.Combine(result.Project.DirectoryPath, expected);
|
||||||
|
actual = Path.Combine(result.Project.DirectoryPath, actual);
|
||||||
|
FileExists(result, expected);
|
||||||
|
FileExists(result, actual);
|
||||||
|
|
||||||
|
if (!Enumerable.SequenceEqual(File.ReadAllBytes(expected), File.ReadAllBytes(actual)))
|
||||||
|
{
|
||||||
|
throw new FilesNotEqualException(result, expected, actual);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void FileContainsLine(MSBuildResult result, string filePath, string match)
|
||||||
|
{
|
||||||
|
if (result == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(result));
|
||||||
|
}
|
||||||
|
|
||||||
|
filePath = Path.Combine(result.Project.DirectoryPath, filePath);
|
||||||
|
FileExists(result, filePath);
|
||||||
|
|
||||||
|
var lines = File.ReadAllLines(filePath);
|
||||||
|
for (var i = 0; i < lines.Length; i++)
|
||||||
|
{
|
||||||
|
var line = lines[i].Trim();
|
||||||
|
if (line == match)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new FileContentMissingException(result, filePath, File.ReadAllText(filePath), match);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void FileDoesNotContainLine(MSBuildResult result, string filePath, string match)
|
||||||
|
{
|
||||||
|
if (result == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(result));
|
||||||
|
}
|
||||||
|
|
||||||
|
filePath = Path.Combine(result.Project.DirectoryPath, filePath);
|
||||||
|
FileExists(result, filePath);
|
||||||
|
|
||||||
|
var lines = File.ReadAllLines(filePath);
|
||||||
|
for (var i = 0; i < lines.Length; i++)
|
||||||
|
{
|
||||||
|
var line = lines[i].Trim();
|
||||||
|
if (line == match)
|
||||||
|
{
|
||||||
|
throw new FileContentFoundException(result, filePath, File.ReadAllText(filePath), match);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string FileExists(MSBuildResult result, params string[] paths)
|
||||||
|
{
|
||||||
|
if (result == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(result));
|
||||||
|
}
|
||||||
|
|
||||||
|
var filePath = Path.Combine(result.Project.DirectoryPath, Path.Combine(paths));
|
||||||
|
if (!File.Exists(filePath))
|
||||||
|
{
|
||||||
|
throw new FileMissingException(result, filePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
return filePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void FileCountEquals(MSBuildResult result, int expected, string directoryPath, string searchPattern)
|
||||||
|
{
|
||||||
|
if (result == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(result));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (directoryPath == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(directoryPath));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (searchPattern == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(searchPattern));
|
||||||
|
}
|
||||||
|
|
||||||
|
directoryPath = Path.Combine(result.Project.DirectoryPath, directoryPath);
|
||||||
|
|
||||||
|
if (Directory.Exists(directoryPath))
|
||||||
|
{
|
||||||
|
var files = Directory.GetFiles(directoryPath, searchPattern, SearchOption.AllDirectories);
|
||||||
|
if (files.Length != expected)
|
||||||
|
{
|
||||||
|
throw new FileCountException(result, expected, directoryPath, searchPattern, files);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (expected > 0)
|
||||||
|
{
|
||||||
|
// directory doesn't exist, that's OK if we expected to find nothing.
|
||||||
|
throw new FileCountException(result, expected, directoryPath, searchPattern, Array.Empty<string>());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void FileDoesNotExist(MSBuildResult result, params string[] paths)
|
||||||
|
{
|
||||||
|
if (result == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(result));
|
||||||
|
}
|
||||||
|
|
||||||
|
var filePath = Path.Combine(result.Project.DirectoryPath, Path.Combine(paths));
|
||||||
|
if (File.Exists(filePath))
|
||||||
|
{
|
||||||
|
throw new FileFoundException(result, filePath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void NuspecContains(MSBuildResult result, string nuspecPath, string expected)
|
||||||
|
{
|
||||||
|
if (result == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(result));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nuspecPath == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(nuspecPath));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (expected == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(expected));
|
||||||
|
}
|
||||||
|
|
||||||
|
nuspecPath = Path.Combine(result.Project.DirectoryPath, nuspecPath);
|
||||||
|
FileExists(result, nuspecPath);
|
||||||
|
|
||||||
|
var content = File.ReadAllText(nuspecPath);
|
||||||
|
if (!content.Contains(expected))
|
||||||
|
{
|
||||||
|
throw new NuspecException(result, nuspecPath, content, expected);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void NuspecDoesNotContain(MSBuildResult result, string nuspecPath, string expected)
|
||||||
|
{
|
||||||
|
if (result == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(result));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nuspecPath == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(nuspecPath));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (expected == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(expected));
|
||||||
|
}
|
||||||
|
|
||||||
|
nuspecPath = Path.Combine(result.Project.DirectoryPath, nuspecPath);
|
||||||
|
FileExists(result, nuspecPath);
|
||||||
|
|
||||||
|
var content = File.ReadAllText(nuspecPath);
|
||||||
|
if (content.Contains(expected))
|
||||||
|
{
|
||||||
|
throw new NuspecFoundException(result, nuspecPath, content, expected);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// This method extracts the nupkg to a fixed directory path. To avoid the extra work of
|
||||||
|
// cleaning up after each invocation, this method accepts multiple files.
|
||||||
|
public static void NupkgContains(MSBuildResult result, string nupkgPath, params string[] filePaths)
|
||||||
|
{
|
||||||
|
if (result == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(result));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nupkgPath == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(nupkgPath));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (filePaths == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(filePaths));
|
||||||
|
}
|
||||||
|
|
||||||
|
nupkgPath = Path.Combine(result.Project.DirectoryPath, nupkgPath);
|
||||||
|
FileExists(result, nupkgPath);
|
||||||
|
|
||||||
|
var unzipped = Path.Combine(result.Project.DirectoryPath, Path.GetFileNameWithoutExtension(nupkgPath));
|
||||||
|
ZipFile.ExtractToDirectory(nupkgPath, unzipped);
|
||||||
|
|
||||||
|
foreach (var filePath in filePaths)
|
||||||
|
{
|
||||||
|
if (!File.Exists(Path.Combine(unzipped, filePath)))
|
||||||
|
{
|
||||||
|
throw new NupkgFileMissingException(result, nupkgPath, filePath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// This method extracts the nupkg to a fixed directory path. To avoid the extra work of
|
||||||
|
// cleaning up after each invocation, this method accepts multiple files.
|
||||||
|
public static void NupkgDoesNotContain(MSBuildResult result, string nupkgPath, params string[] filePaths)
|
||||||
|
{
|
||||||
|
if (result == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(result));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nupkgPath == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(nupkgPath));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (filePaths == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(filePaths));
|
||||||
|
}
|
||||||
|
|
||||||
|
nupkgPath = Path.Combine(result.Project.DirectoryPath, nupkgPath);
|
||||||
|
FileExists(result, nupkgPath);
|
||||||
|
|
||||||
|
var unzipped = Path.Combine(result.Project.DirectoryPath, Path.GetFileNameWithoutExtension(nupkgPath));
|
||||||
|
ZipFile.ExtractToDirectory(nupkgPath, unzipped);
|
||||||
|
|
||||||
|
foreach (var filePath in filePaths)
|
||||||
|
{
|
||||||
|
if (File.Exists(Path.Combine(unzipped, filePath)))
|
||||||
|
{
|
||||||
|
throw new NupkgFileFoundException(result, nupkgPath, filePath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void AssemblyContainsType(MSBuildResult result, string assemblyPath, string fullTypeName)
|
||||||
|
{
|
||||||
|
if (result == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(result));
|
||||||
|
}
|
||||||
|
|
||||||
|
assemblyPath = Path.Combine(result.Project.DirectoryPath, Path.Combine(assemblyPath));
|
||||||
|
|
||||||
|
var typeNames = GetDeclaredTypeNames(assemblyPath);
|
||||||
|
Assert.Contains(fullTypeName, typeNames);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void AssemblyDoesNotContainType(MSBuildResult result, string assemblyPath, string fullTypeName)
|
||||||
|
{
|
||||||
|
if (result == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(result));
|
||||||
|
}
|
||||||
|
|
||||||
|
assemblyPath = Path.Combine(result.Project.DirectoryPath, Path.Combine(assemblyPath));
|
||||||
|
|
||||||
|
var typeNames = GetDeclaredTypeNames(assemblyPath);
|
||||||
|
Assert.DoesNotContain(fullTypeName, typeNames);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static IEnumerable<string> GetDeclaredTypeNames(string assemblyPath)
|
||||||
|
{
|
||||||
|
using (var file = File.OpenRead(assemblyPath))
|
||||||
|
{
|
||||||
|
var peReader = new PEReader(file);
|
||||||
|
var metadataReader = peReader.GetMetadataReader();
|
||||||
|
return metadataReader.TypeDefinitions.Where(t => !t.IsNil).Select(t =>
|
||||||
|
{
|
||||||
|
var type = metadataReader.GetTypeDefinition(t);
|
||||||
|
return metadataReader.GetString(type.Namespace) + "." + metadataReader.GetString(type.Name);
|
||||||
|
}).ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void AssemblyHasAttribute(MSBuildResult result, string assemblyPath, string fullTypeName)
|
||||||
|
{
|
||||||
|
if (result == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(result));
|
||||||
|
}
|
||||||
|
|
||||||
|
assemblyPath = Path.Combine(result.Project.DirectoryPath, Path.Combine(assemblyPath));
|
||||||
|
|
||||||
|
var typeNames = GetAssemblyAttributes(assemblyPath);
|
||||||
|
Assert.Contains(fullTypeName, typeNames);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static IEnumerable<string> GetAssemblyAttributes(string assemblyPath)
|
||||||
|
{
|
||||||
|
using (var file = File.OpenRead(assemblyPath))
|
||||||
|
{
|
||||||
|
var peReader = new PEReader(file);
|
||||||
|
var metadataReader = peReader.GetMetadataReader();
|
||||||
|
return metadataReader.CustomAttributes.Where(t => !t.IsNil).Select(t =>
|
||||||
|
{
|
||||||
|
var attribute = metadataReader.GetCustomAttribute(t);
|
||||||
|
var constructor = metadataReader.GetMemberReference((MemberReferenceHandle)attribute.Constructor);
|
||||||
|
var type = metadataReader.GetTypeReference((TypeReferenceHandle)constructor.Parent);
|
||||||
|
|
||||||
|
return metadataReader.GetString(type.Namespace) + "." + metadataReader.GetString(type.Name);
|
||||||
|
}).ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private abstract class MSBuildXunitException : Xunit.Sdk.XunitException
|
||||||
|
{
|
||||||
|
protected MSBuildXunitException(MSBuildResult result)
|
||||||
|
{
|
||||||
|
Result = result;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected abstract string Heading { get; }
|
||||||
|
|
||||||
|
public MSBuildResult Result { get; }
|
||||||
|
|
||||||
|
public override string Message
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var message = new StringBuilder();
|
||||||
|
message.AppendLine(Heading);
|
||||||
|
message.Append(Result.FileName);
|
||||||
|
message.Append(" ");
|
||||||
|
message.Append(Result.Arguments);
|
||||||
|
message.AppendLine();
|
||||||
|
message.AppendLine();
|
||||||
|
message.Append(Result.Output);
|
||||||
|
message.AppendLine();
|
||||||
|
message.Append("Exit Code:");
|
||||||
|
message.Append(Result.ExitCode);
|
||||||
|
return message.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class BuildErrorMissingException : MSBuildXunitException
|
||||||
|
{
|
||||||
|
public BuildErrorMissingException(MSBuildResult result, string errorCode, string location)
|
||||||
|
: base(result)
|
||||||
|
{
|
||||||
|
ErrorCode = errorCode;
|
||||||
|
Location = location;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string ErrorCode { get; }
|
||||||
|
|
||||||
|
public string Location { get; }
|
||||||
|
|
||||||
|
protected override string Heading
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return
|
||||||
|
$"Error code '{ErrorCode}' was not found." + Environment.NewLine +
|
||||||
|
$"Looking for '{Location ?? ".*"}: error {ErrorCode}: .*'";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class BuildFailedException : MSBuildXunitException
|
||||||
|
{
|
||||||
|
public BuildFailedException(MSBuildResult result)
|
||||||
|
: base(result)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string Heading => "Build failed.";
|
||||||
|
}
|
||||||
|
|
||||||
|
private class BuildWarningsException : MSBuildXunitException
|
||||||
|
{
|
||||||
|
public BuildWarningsException(MSBuildResult result, IEnumerable<string> warnings)
|
||||||
|
: base(result)
|
||||||
|
{
|
||||||
|
Warnings = warnings.ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<string> Warnings { get; }
|
||||||
|
|
||||||
|
protected override string Heading => "Build contains unexpected warnings: " + string.Join(Environment.NewLine, Warnings);
|
||||||
|
}
|
||||||
|
|
||||||
|
private class BuildPassedException : MSBuildXunitException
|
||||||
|
{
|
||||||
|
public BuildPassedException(MSBuildResult result)
|
||||||
|
: base(result)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override string Heading => "Build should have failed, but it passed.";
|
||||||
|
}
|
||||||
|
|
||||||
|
private class BuildOutputMissingException : MSBuildXunitException
|
||||||
|
{
|
||||||
|
public BuildOutputMissingException(MSBuildResult result, string match)
|
||||||
|
: base(result)
|
||||||
|
{
|
||||||
|
Match = match;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Match { get; }
|
||||||
|
|
||||||
|
protected override string Heading => $"Build did not contain the line: '{Match}'.";
|
||||||
|
}
|
||||||
|
|
||||||
|
private class BuildOutputContainsLineException : MSBuildXunitException
|
||||||
|
{
|
||||||
|
public BuildOutputContainsLineException(MSBuildResult result, string match)
|
||||||
|
: base(result)
|
||||||
|
{
|
||||||
|
Match = match;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Match { get; }
|
||||||
|
|
||||||
|
protected override string Heading => $"Build output contains the line: '{Match}'.";
|
||||||
|
}
|
||||||
|
|
||||||
|
private class FileContentFoundException : MSBuildXunitException
|
||||||
|
{
|
||||||
|
public FileContentFoundException(MSBuildResult result, string filePath, string content, string match)
|
||||||
|
: base(result)
|
||||||
|
{
|
||||||
|
FilePath = filePath;
|
||||||
|
Content = content;
|
||||||
|
Match = match;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Content { get; }
|
||||||
|
|
||||||
|
public string FilePath { get; }
|
||||||
|
|
||||||
|
public string Match { get; }
|
||||||
|
|
||||||
|
protected override string Heading
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var builder = new StringBuilder();
|
||||||
|
builder.AppendFormat("File content of '{0}' should not contain line: '{1}'.", FilePath, Match);
|
||||||
|
builder.AppendLine();
|
||||||
|
builder.AppendLine();
|
||||||
|
builder.AppendLine(Content);
|
||||||
|
return builder.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class FileContentMissingException : MSBuildXunitException
|
||||||
|
{
|
||||||
|
public FileContentMissingException(MSBuildResult result, string filePath, string content, string match)
|
||||||
|
: base(result)
|
||||||
|
{
|
||||||
|
FilePath = filePath;
|
||||||
|
Content = content;
|
||||||
|
Match = match;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Content { get; }
|
||||||
|
|
||||||
|
public string FilePath { get; }
|
||||||
|
|
||||||
|
public string Match { get; }
|
||||||
|
|
||||||
|
protected override string Heading
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var builder = new StringBuilder();
|
||||||
|
builder.AppendFormat("File content of '{0}' did not contain the line: '{1}'.", FilePath, Match);
|
||||||
|
builder.AppendLine();
|
||||||
|
builder.AppendLine();
|
||||||
|
builder.AppendLine(Content);
|
||||||
|
return builder.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class FileContentNotEqualException : MSBuildXunitException
|
||||||
|
{
|
||||||
|
public FileContentNotEqualException(MSBuildResult result, string filePath, string expected, string actual)
|
||||||
|
: base(result)
|
||||||
|
{
|
||||||
|
FilePath = filePath;
|
||||||
|
Expected = expected;
|
||||||
|
Actual = actual;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Actual { get; }
|
||||||
|
|
||||||
|
public string FilePath { get; }
|
||||||
|
|
||||||
|
public string Expected { get; }
|
||||||
|
|
||||||
|
protected override string Heading
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var builder = new StringBuilder();
|
||||||
|
builder.AppendFormat("File content of '{0}' did not match the expected content: '{1}'.", FilePath, Expected);
|
||||||
|
builder.AppendLine();
|
||||||
|
builder.AppendLine();
|
||||||
|
builder.AppendLine(Actual);
|
||||||
|
return builder.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class FilesNotEqualException : MSBuildXunitException
|
||||||
|
{
|
||||||
|
public FilesNotEqualException(MSBuildResult result, string expected, string actual)
|
||||||
|
: base(result)
|
||||||
|
{
|
||||||
|
Expected = expected;
|
||||||
|
Actual = actual;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Actual { get; }
|
||||||
|
|
||||||
|
public string Expected { get; }
|
||||||
|
|
||||||
|
protected override string Heading
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var builder = new StringBuilder();
|
||||||
|
builder.AppendFormat("File content of '{0}' did not match the contents of '{1}'.", Expected, Actual);
|
||||||
|
builder.AppendLine();
|
||||||
|
builder.AppendLine();
|
||||||
|
builder.AppendLine(Actual);
|
||||||
|
return builder.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class FileMissingException : MSBuildXunitException
|
||||||
|
{
|
||||||
|
public FileMissingException(MSBuildResult result, string filePath)
|
||||||
|
: base(result)
|
||||||
|
{
|
||||||
|
FilePath = filePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string FilePath { get; }
|
||||||
|
|
||||||
|
protected override string Heading => $"File: '{FilePath}' was not found.";
|
||||||
|
}
|
||||||
|
|
||||||
|
private class FileCountException : MSBuildXunitException
|
||||||
|
{
|
||||||
|
public FileCountException(MSBuildResult result, int expected, string directoryPath, string searchPattern, string[] files)
|
||||||
|
: base(result)
|
||||||
|
{
|
||||||
|
Expected = expected;
|
||||||
|
DirectoryPath = directoryPath;
|
||||||
|
SearchPattern = searchPattern;
|
||||||
|
Files = files;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string DirectoryPath { get; }
|
||||||
|
|
||||||
|
public int Expected { get; }
|
||||||
|
|
||||||
|
public string[] Files { get; }
|
||||||
|
|
||||||
|
public string SearchPattern { get; }
|
||||||
|
|
||||||
|
protected override string Heading
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var heading = new StringBuilder();
|
||||||
|
heading.AppendLine($"Expected {Expected} files matching {SearchPattern} in {DirectoryPath}, found {Files.Length}.");
|
||||||
|
|
||||||
|
if (Files.Length > 0)
|
||||||
|
{
|
||||||
|
heading.AppendLine("Files:");
|
||||||
|
|
||||||
|
foreach (var file in Files)
|
||||||
|
{
|
||||||
|
heading.Append("\t");
|
||||||
|
heading.Append(file);
|
||||||
|
}
|
||||||
|
|
||||||
|
heading.AppendLine();
|
||||||
|
}
|
||||||
|
|
||||||
|
return heading.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class FileFoundException : MSBuildXunitException
|
||||||
|
{
|
||||||
|
public FileFoundException(MSBuildResult result, string filePath)
|
||||||
|
: base(result)
|
||||||
|
{
|
||||||
|
FilePath = filePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string FilePath { get; }
|
||||||
|
|
||||||
|
protected override string Heading => $"File: '{FilePath}' was found, but should not exist.";
|
||||||
|
}
|
||||||
|
|
||||||
|
private class NuspecException : MSBuildXunitException
|
||||||
|
{
|
||||||
|
public NuspecException(MSBuildResult result, string filePath, string content, string expected)
|
||||||
|
: base(result)
|
||||||
|
{
|
||||||
|
FilePath = filePath;
|
||||||
|
Content = content;
|
||||||
|
Expected = expected;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Content { get; }
|
||||||
|
|
||||||
|
public string Expected { get; }
|
||||||
|
|
||||||
|
public string FilePath { get; }
|
||||||
|
|
||||||
|
protected override string Heading
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return
|
||||||
|
$"nuspec: '{FilePath}' did not contain the expected content." + Environment.NewLine +
|
||||||
|
Environment.NewLine +
|
||||||
|
$"expected: {Expected}" + Environment.NewLine +
|
||||||
|
Environment.NewLine +
|
||||||
|
$"actual: {Content}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class NuspecFoundException : MSBuildXunitException
|
||||||
|
{
|
||||||
|
public NuspecFoundException(MSBuildResult result, string filePath, string content, string expected)
|
||||||
|
: base(result)
|
||||||
|
{
|
||||||
|
FilePath = filePath;
|
||||||
|
Content = content;
|
||||||
|
Expected = expected;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Content { get; }
|
||||||
|
|
||||||
|
public string Expected { get; }
|
||||||
|
|
||||||
|
public string FilePath { get; }
|
||||||
|
|
||||||
|
protected override string Heading
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return
|
||||||
|
$"nuspec: '{FilePath}' should not contain the content {Expected}." +
|
||||||
|
Environment.NewLine +
|
||||||
|
$"actual content: {Content}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class NupkgFileMissingException : MSBuildXunitException
|
||||||
|
{
|
||||||
|
public NupkgFileMissingException(MSBuildResult result, string nupkgPath, string filePath)
|
||||||
|
: base(result)
|
||||||
|
{
|
||||||
|
NupkgPath = nupkgPath;
|
||||||
|
FilePath = filePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string FilePath { get; }
|
||||||
|
|
||||||
|
public string NupkgPath { get; }
|
||||||
|
|
||||||
|
protected override string Heading => $"File: '{FilePath}' was not found was not found in {NupkgPath}.";
|
||||||
|
}
|
||||||
|
|
||||||
|
private class NupkgFileFoundException : MSBuildXunitException
|
||||||
|
{
|
||||||
|
public NupkgFileFoundException(MSBuildResult result, string nupkgPath, string filePath)
|
||||||
|
: base(result)
|
||||||
|
{
|
||||||
|
NupkgPath = nupkgPath;
|
||||||
|
FilePath = filePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string FilePath { get; }
|
||||||
|
|
||||||
|
public string NupkgPath { get; }
|
||||||
|
|
||||||
|
protected override string Heading => $"File: '{FilePath}' was found in {NupkgPath}.";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Xunit;
|
||||||
|
|
||||||
|
namespace Microsoft.AspNetCore.Blazor.Build
|
||||||
|
{
|
||||||
|
public class BuildIncrementalismTest
|
||||||
|
{
|
||||||
|
[Fact]
|
||||||
|
public async Task Build_WithLinker_IsIncremental()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
using var project = ProjectDirectory.Create("standalone");
|
||||||
|
var result = await MSBuildProcessManager.DotnetMSBuild(project);
|
||||||
|
|
||||||
|
Assert.BuildPassed(result);
|
||||||
|
|
||||||
|
var buildOutputDirectory = project.BuildOutputDirectory;
|
||||||
|
|
||||||
|
// Act
|
||||||
|
var thumbPrint = FileThumbPrint.CreateFolderThumbprint(project, project.BuildOutputDirectory);
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
for (var i = 0; i < 3; i++)
|
||||||
|
{
|
||||||
|
result = await MSBuildProcessManager.DotnetMSBuild(project);
|
||||||
|
Assert.BuildPassed(result);
|
||||||
|
|
||||||
|
var newThumbPrint = FileThumbPrint.CreateFolderThumbprint(project, project.BuildOutputDirectory);
|
||||||
|
Assert.Equal(thumbPrint.Count, newThumbPrint.Count);
|
||||||
|
for (var j = 0; j < thumbPrint.Count; j++)
|
||||||
|
{
|
||||||
|
Assert.Equal(thumbPrint[j], newThumbPrint[j]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,74 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Xunit;
|
||||||
|
|
||||||
|
namespace Microsoft.AspNetCore.Blazor.Build
|
||||||
|
{
|
||||||
|
public class BuildIntegrationTest
|
||||||
|
{
|
||||||
|
[Fact]
|
||||||
|
public async Task Build_WithDefaultSettings_Works()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
using var project = ProjectDirectory.Create("standalone");
|
||||||
|
var result = await MSBuildProcessManager.DotnetMSBuild(project);
|
||||||
|
|
||||||
|
Assert.BuildPassed(result);
|
||||||
|
|
||||||
|
var buildOutputDirectory = project.BuildOutputDirectory;
|
||||||
|
|
||||||
|
Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "blazor.boot.json");
|
||||||
|
Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "blazor.webassembly.js");
|
||||||
|
Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "wasm", "mono.wasm");
|
||||||
|
Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "wasm", "mono.js");
|
||||||
|
Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "standalone.dll");
|
||||||
|
Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output.
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task Build_Hosted_Works()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
using var project = ProjectDirectory.Create("blazorhosted", additionalProjects: new[] { "standalone", "razorclasslibrary", });
|
||||||
|
project.TargetFramework = "netcoreapp3.1";
|
||||||
|
var result = await MSBuildProcessManager.DotnetMSBuild(project);
|
||||||
|
|
||||||
|
Assert.BuildPassed(result);
|
||||||
|
|
||||||
|
var buildOutputDirectory = project.BuildOutputDirectory;
|
||||||
|
var blazorConfig = Path.Combine(buildOutputDirectory, "standalone.blazor.config");
|
||||||
|
Assert.FileExists(result, blazorConfig);
|
||||||
|
|
||||||
|
var path = Path.GetFullPath(Path.Combine(project.SolutionPath, "standalone", "bin", project.Configuration, "netstandard2.1", "standalone.dll"));
|
||||||
|
Assert.FileContains(result, blazorConfig, path);
|
||||||
|
Assert.FileDoesNotExist(result, buildOutputDirectory, "dist", "_framework", "_bin", "standalone.dll");
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task Build_WithLinkOnBuildDisabled_Works()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
using var project = ProjectDirectory.Create("standalone");
|
||||||
|
project.AddProjectFileContent(
|
||||||
|
@"<PropertyGroup>
|
||||||
|
<BlazorLinkOnBuild>false</BlazorLinkOnBuild>
|
||||||
|
</PropertyGroup>");
|
||||||
|
|
||||||
|
var result = await MSBuildProcessManager.DotnetMSBuild(project);
|
||||||
|
|
||||||
|
Assert.BuildPassed(result);
|
||||||
|
|
||||||
|
var buildOutputDirectory = project.BuildOutputDirectory;
|
||||||
|
|
||||||
|
Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "blazor.boot.json");
|
||||||
|
Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "blazor.webassembly.js");
|
||||||
|
Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "wasm", "mono.wasm");
|
||||||
|
Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "wasm", "mono.js");
|
||||||
|
Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "standalone.dll");
|
||||||
|
Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,74 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Security.Cryptography;
|
||||||
|
|
||||||
|
namespace Microsoft.AspNetCore.Blazor.Build
|
||||||
|
{
|
||||||
|
internal class FileThumbPrint : IEquatable<FileThumbPrint>
|
||||||
|
{
|
||||||
|
private FileThumbPrint(string path, DateTime lastWriteTimeUtc, string hash)
|
||||||
|
{
|
||||||
|
FilePath = path;
|
||||||
|
LastWriteTimeUtc = lastWriteTimeUtc;
|
||||||
|
Hash = hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string FilePath { get; }
|
||||||
|
|
||||||
|
public DateTime LastWriteTimeUtc { get; }
|
||||||
|
|
||||||
|
public string Hash { get; }
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return $"{Path.GetFileName(FilePath)}, {LastWriteTimeUtc.ToString("u")}, {Hash}";
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a list of thumbprints for all files (recursive) in the specified directory, sorted by file paths.
|
||||||
|
/// </summary>
|
||||||
|
public static List<FileThumbPrint> CreateFolderThumbprint(ProjectDirectory project, string directoryPath, params string[] filesToIgnore)
|
||||||
|
{
|
||||||
|
directoryPath = Path.Combine(project.DirectoryPath, directoryPath);
|
||||||
|
var files = Directory.GetFiles(directoryPath).Where(p => !filesToIgnore.Contains(p));
|
||||||
|
var thumbprintLookup = new List<FileThumbPrint>();
|
||||||
|
foreach (var file in files)
|
||||||
|
{
|
||||||
|
var thumbprint = Create(file);
|
||||||
|
thumbprintLookup.Add(thumbprint);
|
||||||
|
}
|
||||||
|
|
||||||
|
thumbprintLookup.Sort(Comparer<FileThumbPrint>.Create((a, b) => StringComparer.Ordinal.Compare(a.FilePath, b.FilePath)));
|
||||||
|
return thumbprintLookup;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static FileThumbPrint Create(string path)
|
||||||
|
{
|
||||||
|
byte[] hashBytes;
|
||||||
|
using (var sha1 = SHA1.Create())
|
||||||
|
using (var fileStream = File.OpenRead(path))
|
||||||
|
{
|
||||||
|
hashBytes = sha1.ComputeHash(fileStream);
|
||||||
|
}
|
||||||
|
|
||||||
|
var hash = Convert.ToBase64String(hashBytes);
|
||||||
|
var lastWriteTimeUtc = File.GetLastWriteTimeUtc(path);
|
||||||
|
return new FileThumbPrint(path, lastWriteTimeUtc, hash);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Equals(FileThumbPrint other)
|
||||||
|
{
|
||||||
|
return
|
||||||
|
string.Equals(FilePath, other.FilePath, StringComparison.Ordinal) &&
|
||||||
|
LastWriteTimeUtc == other.LastWriteTimeUtc &&
|
||||||
|
string.Equals(Hash, other.Hash, StringComparison.Ordinal);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode() => LastWriteTimeUtc.GetHashCode();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,282 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.Extensions.CommandLineUtils;
|
||||||
|
|
||||||
|
namespace Microsoft.AspNetCore.Blazor.Build
|
||||||
|
{
|
||||||
|
internal static class MSBuildProcessManager
|
||||||
|
{
|
||||||
|
public static Task<MSBuildResult> DotnetMSBuild(
|
||||||
|
ProjectDirectory project,
|
||||||
|
string target = "Build",
|
||||||
|
string args = null)
|
||||||
|
{
|
||||||
|
var buildArgumentList = new List<string>
|
||||||
|
{
|
||||||
|
// Disable node-reuse. We don't want msbuild processes to stick around
|
||||||
|
// once the test is completed.
|
||||||
|
"/nr:false",
|
||||||
|
|
||||||
|
// Always generate a bin log for debugging purposes
|
||||||
|
"/bl",
|
||||||
|
};
|
||||||
|
|
||||||
|
buildArgumentList.Add($"/t:{target}");
|
||||||
|
buildArgumentList.Add($"/p:Configuration={project.Configuration}");
|
||||||
|
buildArgumentList.Add(args);
|
||||||
|
|
||||||
|
var buildArguments = string.Join(" ", buildArgumentList);
|
||||||
|
|
||||||
|
return MSBuildProcessManager.RunProcessAsync(project, buildArguments);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static async Task<MSBuildResult> RunProcessAsync(
|
||||||
|
ProjectDirectory project,
|
||||||
|
string arguments,
|
||||||
|
TimeSpan? timeout = null)
|
||||||
|
{
|
||||||
|
var processStartInfo = new ProcessStartInfo()
|
||||||
|
{
|
||||||
|
WorkingDirectory = project.DirectoryPath,
|
||||||
|
UseShellExecute = false,
|
||||||
|
RedirectStandardError = true,
|
||||||
|
RedirectStandardOutput = true,
|
||||||
|
};
|
||||||
|
|
||||||
|
processStartInfo.FileName = DotNetMuxer.MuxerPathOrDefault();
|
||||||
|
processStartInfo.Arguments = $"msbuild {arguments}";
|
||||||
|
|
||||||
|
// Suppresses the 'Welcome to .NET Core!' output that times out tests and causes locked file issues.
|
||||||
|
// When using dotnet we're not guarunteed to run in an environment where the dotnet.exe has had its first run experience already invoked.
|
||||||
|
processStartInfo.EnvironmentVariables["DOTNET_SKIP_FIRST_TIME_EXPERIENCE"] = "true";
|
||||||
|
|
||||||
|
var processResult = await RunProcessCoreAsync(processStartInfo, timeout);
|
||||||
|
|
||||||
|
return new MSBuildResult(project, processResult.FileName, processResult.Arguments, processResult.ExitCode, processResult.Output);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static Task<ProcessResult> RunProcessCoreAsync(
|
||||||
|
ProcessStartInfo processStartInfo,
|
||||||
|
TimeSpan? timeout = null)
|
||||||
|
{
|
||||||
|
timeout = timeout ?? TimeSpan.FromSeconds(5 * 60);
|
||||||
|
|
||||||
|
var process = new Process()
|
||||||
|
{
|
||||||
|
StartInfo = processStartInfo,
|
||||||
|
EnableRaisingEvents = true,
|
||||||
|
};
|
||||||
|
|
||||||
|
var output = new StringBuilder();
|
||||||
|
var outputLock = new object();
|
||||||
|
|
||||||
|
var diagnostics = new StringBuilder();
|
||||||
|
diagnostics.AppendLine("Process execution diagnostics:");
|
||||||
|
|
||||||
|
process.ErrorDataReceived += Process_ErrorDataReceived;
|
||||||
|
process.OutputDataReceived += Process_OutputDataReceived;
|
||||||
|
|
||||||
|
process.Start();
|
||||||
|
process.BeginOutputReadLine();
|
||||||
|
process.BeginErrorReadLine();
|
||||||
|
|
||||||
|
var timeoutTask = GetTimeoutForProcess(process, timeout, diagnostics);
|
||||||
|
|
||||||
|
var waitTask = Task.Run(() =>
|
||||||
|
{
|
||||||
|
// We need to use two WaitForExit calls to ensure that all of the output/events are processed. Previously
|
||||||
|
// this code used Process.Exited, which could result in us missing some output due to the ordering of
|
||||||
|
// events.
|
||||||
|
//
|
||||||
|
// See the remarks here: https://msdn.microsoft.com/en-us/library/ty0d8k56(v=vs.110).aspx
|
||||||
|
if (!process.WaitForExit(Int32.MaxValue))
|
||||||
|
{
|
||||||
|
// unreachable - the timeoutTask will kill the process before this happens.
|
||||||
|
throw new TimeoutException();
|
||||||
|
}
|
||||||
|
|
||||||
|
process.WaitForExit();
|
||||||
|
|
||||||
|
|
||||||
|
string outputString;
|
||||||
|
lock (outputLock)
|
||||||
|
{
|
||||||
|
// This marks the end of the diagnostic info which we collect when something goes wrong.
|
||||||
|
diagnostics.AppendLine("Process output:");
|
||||||
|
|
||||||
|
// Expected output
|
||||||
|
// Process execution diagnostics:
|
||||||
|
// ...
|
||||||
|
// Process output:
|
||||||
|
outputString = diagnostics.ToString();
|
||||||
|
outputString += output.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
var result = new ProcessResult(process.StartInfo.FileName, process.StartInfo.Arguments, process.ExitCode, outputString);
|
||||||
|
return result;
|
||||||
|
});
|
||||||
|
|
||||||
|
return Task.WhenAny<ProcessResult>(waitTask, timeoutTask).Unwrap();
|
||||||
|
|
||||||
|
void Process_ErrorDataReceived(object sender, DataReceivedEventArgs e)
|
||||||
|
{
|
||||||
|
lock (outputLock)
|
||||||
|
{
|
||||||
|
output.AppendLine(e.Data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Process_OutputDataReceived(object sender, DataReceivedEventArgs e)
|
||||||
|
{
|
||||||
|
lock (outputLock)
|
||||||
|
{
|
||||||
|
output.AppendLine(e.Data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async Task<ProcessResult> GetTimeoutForProcess(Process process, TimeSpan? timeout, StringBuilder diagnostics)
|
||||||
|
{
|
||||||
|
await Task.Delay(timeout.Value);
|
||||||
|
|
||||||
|
// Don't timeout during debug sessions
|
||||||
|
while (Debugger.IsAttached)
|
||||||
|
{
|
||||||
|
Thread.Sleep(TimeSpan.FromSeconds(1));
|
||||||
|
}
|
||||||
|
if (!process.HasExited)
|
||||||
|
{
|
||||||
|
await CollectDumps(process, timeout, diagnostics);
|
||||||
|
|
||||||
|
// This is a timeout.
|
||||||
|
process.Kill();
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new TimeoutException($"command '${process.StartInfo.FileName} {process.StartInfo.Arguments}' timed out after {timeout}. Output: {output.ToString()}");
|
||||||
|
}
|
||||||
|
|
||||||
|
static async Task CollectDumps(Process process, TimeSpan? timeout, StringBuilder diagnostics)
|
||||||
|
{
|
||||||
|
var procDumpProcess = await CaptureDump(process, timeout, diagnostics);
|
||||||
|
var allDotNetProcesses = Process.GetProcessesByName("dotnet");
|
||||||
|
|
||||||
|
var allDotNetChildProcessCandidates = allDotNetProcesses
|
||||||
|
.Where(p => p.StartTime >= process.StartTime && p.Id != process.Id);
|
||||||
|
|
||||||
|
if (!allDotNetChildProcessCandidates.Any())
|
||||||
|
{
|
||||||
|
diagnostics.AppendLine("Couldn't find any candidate child process.");
|
||||||
|
foreach (var dotnetProcess in allDotNetProcesses)
|
||||||
|
{
|
||||||
|
diagnostics.AppendLine($"Found dotnet process with PID {dotnetProcess.Id} and start time {dotnetProcess.StartTime}.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var childProcess in allDotNetChildProcessCandidates)
|
||||||
|
{
|
||||||
|
diagnostics.AppendLine($"Found child process candidate '{childProcess.Id}'.");
|
||||||
|
}
|
||||||
|
|
||||||
|
var childrenProcessDumpProcesses = await Task.WhenAll(allDotNetChildProcessCandidates.Select(d => CaptureDump(d, timeout, diagnostics)));
|
||||||
|
foreach (var childProcess in childrenProcessDumpProcesses)
|
||||||
|
{
|
||||||
|
if (childProcess != null && childProcess.HasExited)
|
||||||
|
{
|
||||||
|
diagnostics.AppendLine($"ProcDump failed to run for child dotnet process candidate '{process.Id}'.");
|
||||||
|
childProcess.Kill();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (procDumpProcess != null && procDumpProcess.HasExited)
|
||||||
|
{
|
||||||
|
diagnostics.AppendLine($"ProcDump failed to run for '{process.Id}'.");
|
||||||
|
procDumpProcess.Kill();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static async Task<Process> CaptureDump(Process process, TimeSpan? timeout, StringBuilder diagnostics)
|
||||||
|
{
|
||||||
|
var metadataAttributes = Assembly.GetExecutingAssembly()
|
||||||
|
.GetCustomAttributes<AssemblyMetadataAttribute>();
|
||||||
|
|
||||||
|
var procDumpPath = metadataAttributes
|
||||||
|
.SingleOrDefault(ama => ama.Key == "ProcDumpToolPath")?.Value;
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(procDumpPath))
|
||||||
|
{
|
||||||
|
diagnostics.AppendLine("ProcDumpPath not defined.");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
var procDumpExePath = Path.Combine(procDumpPath, "procdump.exe");
|
||||||
|
if (!File.Exists(procDumpExePath))
|
||||||
|
{
|
||||||
|
diagnostics.AppendLine($"Can't find procdump.exe in '{procDumpPath}'.");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
var dumpDirectory = metadataAttributes
|
||||||
|
.SingleOrDefault(ama => ama.Key == "ArtifactsLogDir")?.Value;
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(dumpDirectory))
|
||||||
|
{
|
||||||
|
diagnostics.AppendLine("ArtifactsLogDir not defined.");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Directory.Exists(dumpDirectory))
|
||||||
|
{
|
||||||
|
diagnostics.AppendLine($"'{dumpDirectory}' does not exist.");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
var procDumpPattern = Path.Combine(dumpDirectory, "HangingProcess_PROCESSNAME_PID_YYMMDD_HHMMSS.dmp");
|
||||||
|
var procDumpStartInfo = new ProcessStartInfo(
|
||||||
|
procDumpExePath,
|
||||||
|
$"-accepteula -ma {process.Id} {procDumpPattern}")
|
||||||
|
{
|
||||||
|
CreateNoWindow = true,
|
||||||
|
UseShellExecute = false,
|
||||||
|
RedirectStandardOutput = true,
|
||||||
|
RedirectStandardError = true
|
||||||
|
};
|
||||||
|
|
||||||
|
var procDumpProcess = Process.Start(procDumpStartInfo);
|
||||||
|
var tcs = new TaskCompletionSource<object>();
|
||||||
|
|
||||||
|
procDumpProcess.Exited += (s, a) => tcs.TrySetResult(null);
|
||||||
|
procDumpProcess.EnableRaisingEvents = true;
|
||||||
|
|
||||||
|
await Task.WhenAny(tcs.Task, Task.Delay(timeout ?? TimeSpan.FromSeconds(30)));
|
||||||
|
return procDumpProcess;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class ProcessResult
|
||||||
|
{
|
||||||
|
public ProcessResult(string fileName, string arguments, int exitCode, string output)
|
||||||
|
{
|
||||||
|
FileName = fileName;
|
||||||
|
Arguments = arguments;
|
||||||
|
ExitCode = exitCode;
|
||||||
|
Output = output;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Arguments { get; }
|
||||||
|
|
||||||
|
public string FileName { get; }
|
||||||
|
|
||||||
|
public int ExitCode { get; }
|
||||||
|
|
||||||
|
public string Output { get; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
|
namespace Microsoft.AspNetCore.Blazor.Build
|
||||||
|
{
|
||||||
|
internal class MSBuildResult
|
||||||
|
{
|
||||||
|
public MSBuildResult(ProjectDirectory project, string fileName, string arguments, int exitCode, string output)
|
||||||
|
{
|
||||||
|
Project = project;
|
||||||
|
FileName = fileName;
|
||||||
|
Arguments = arguments;
|
||||||
|
ExitCode = exitCode;
|
||||||
|
Output = output;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProjectDirectory Project { get; }
|
||||||
|
|
||||||
|
public string Arguments { get; }
|
||||||
|
|
||||||
|
public string FileName { get; }
|
||||||
|
|
||||||
|
public int ExitCode { get; }
|
||||||
|
|
||||||
|
public string Output { get; }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,211 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
|
namespace Microsoft.AspNetCore.Blazor.Build
|
||||||
|
{
|
||||||
|
internal class ProjectDirectory : IDisposable
|
||||||
|
{
|
||||||
|
public bool PreserveWorkingDirectory { get; set; } = false;
|
||||||
|
|
||||||
|
private static readonly string RepoRoot = GetTestAttribute("Testing.RepoRoot");
|
||||||
|
|
||||||
|
public static ProjectDirectory Create(string projectName, string baseDirectory = "", string[] additionalProjects = null)
|
||||||
|
{
|
||||||
|
var destinationPath = Path.Combine(Path.GetTempPath(), "BlazorBuild", baseDirectory, Path.GetRandomFileName());
|
||||||
|
Directory.CreateDirectory(destinationPath);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (Directory.EnumerateFiles(destinationPath).Any())
|
||||||
|
{
|
||||||
|
throw new InvalidOperationException($"{destinationPath} should be empty");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(RepoRoot))
|
||||||
|
{
|
||||||
|
throw new InvalidOperationException("RepoRoot was not specified.");
|
||||||
|
}
|
||||||
|
|
||||||
|
var testAppsRoot = Path.Combine(RepoRoot, "src", "Components", "Blazor", "Build", "testassets");
|
||||||
|
foreach (var project in new string[] { projectName, }.Concat(additionalProjects ?? Array.Empty<string>()))
|
||||||
|
{
|
||||||
|
var projectRoot = Path.Combine(testAppsRoot, project);
|
||||||
|
if (!Directory.Exists(projectRoot))
|
||||||
|
{
|
||||||
|
throw new InvalidOperationException($"Could not find project at '{projectRoot}'");
|
||||||
|
}
|
||||||
|
|
||||||
|
var projectDestination = Path.Combine(destinationPath, project);
|
||||||
|
var projectDestinationDir = Directory.CreateDirectory(projectDestination);
|
||||||
|
CopyDirectory(new DirectoryInfo(projectRoot), projectDestinationDir);
|
||||||
|
SetupDirectoryBuildFiles(RepoRoot, testAppsRoot, projectDestination);
|
||||||
|
}
|
||||||
|
|
||||||
|
var directoryPath = Path.Combine(destinationPath, projectName);
|
||||||
|
var projectPath = Path.Combine(directoryPath, projectName + ".csproj");
|
||||||
|
|
||||||
|
CopyRepositoryAssets(destinationPath);
|
||||||
|
|
||||||
|
return new ProjectDirectory(
|
||||||
|
destinationPath,
|
||||||
|
directoryPath,
|
||||||
|
projectPath);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
CleanupDirectory(destinationPath);
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void CopyDirectory(DirectoryInfo source, DirectoryInfo destination, bool recursive = true)
|
||||||
|
{
|
||||||
|
foreach (var file in source.EnumerateFiles())
|
||||||
|
{
|
||||||
|
file.CopyTo(Path.Combine(destination.FullName, file.Name));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!recursive)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var directory in source.EnumerateDirectories())
|
||||||
|
{
|
||||||
|
if (directory.Name == "bin")
|
||||||
|
{
|
||||||
|
// Just in case someone has opened the project in an IDE or built it. We don't want to copy
|
||||||
|
// these folders.
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
var created = destination.CreateSubdirectory(directory.Name);
|
||||||
|
if (directory.Name == "obj")
|
||||||
|
{
|
||||||
|
// Copy NuGet restore assets (viz all the files at the root of the obj directory, but stop there.)
|
||||||
|
CopyDirectory(directory, created, recursive: false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CopyDirectory(directory, created);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void SetupDirectoryBuildFiles(string repoRoot, string testAppsRoot, string projectDestination)
|
||||||
|
{
|
||||||
|
var beforeDirectoryPropsContent =
|
||||||
|
$@"<Project>
|
||||||
|
<PropertyGroup>
|
||||||
|
<RepoRoot>{repoRoot}</RepoRoot>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>";
|
||||||
|
File.WriteAllText(Path.Combine(projectDestination, "Before.Directory.Build.props"), beforeDirectoryPropsContent);
|
||||||
|
|
||||||
|
new List<string> { "Directory.Build.props", "Directory.Build.targets", }
|
||||||
|
.ForEach(file =>
|
||||||
|
{
|
||||||
|
var source = Path.Combine(testAppsRoot, file);
|
||||||
|
var destination = Path.Combine(projectDestination, file);
|
||||||
|
File.Copy(source, destination);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
static void CopyRepositoryAssets(string projectRoot)
|
||||||
|
{
|
||||||
|
const string GlobalJsonFileName = "global.json";
|
||||||
|
var globalJsonPath = Path.Combine(RepoRoot, GlobalJsonFileName);
|
||||||
|
|
||||||
|
var destinationFile = Path.Combine(projectRoot, GlobalJsonFileName);
|
||||||
|
File.Copy(globalJsonPath, destinationFile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected ProjectDirectory(string solutionPath, string directoryPath, string projectFilePath)
|
||||||
|
{
|
||||||
|
SolutionPath = solutionPath;
|
||||||
|
DirectoryPath = directoryPath;
|
||||||
|
ProjectFilePath = projectFilePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string DirectoryPath { get; }
|
||||||
|
|
||||||
|
public string ProjectFilePath { get; }
|
||||||
|
|
||||||
|
public string SolutionPath { get; }
|
||||||
|
|
||||||
|
public string TargetFramework { get; set; } = "netstandard2.1";
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
public string Configuration => "Debug";
|
||||||
|
#elif RELEASE
|
||||||
|
public string Configuration => "Release";
|
||||||
|
#else
|
||||||
|
#error Configuration not supported
|
||||||
|
#endif
|
||||||
|
|
||||||
|
public string IntermediateOutputDirectory => Path.Combine("obj", Configuration, TargetFramework);
|
||||||
|
|
||||||
|
public string BuildOutputDirectory => Path.Combine("bin", Configuration, TargetFramework);
|
||||||
|
|
||||||
|
public string PublishOutputDirectory => Path.Combine(BuildOutputDirectory, "publish");
|
||||||
|
|
||||||
|
internal void AddProjectFileContent(string content)
|
||||||
|
{
|
||||||
|
if (content == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(content));
|
||||||
|
}
|
||||||
|
|
||||||
|
var existing = File.ReadAllText(ProjectFilePath);
|
||||||
|
var updated = existing.Replace("<!-- Test Placeholder -->", content);
|
||||||
|
File.WriteAllText(ProjectFilePath, updated);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
if (PreserveWorkingDirectory)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"Skipping deletion of working directory {SolutionPath}");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CleanupDirectory(SolutionPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static void CleanupDirectory(string filePath)
|
||||||
|
{
|
||||||
|
var tries = 5;
|
||||||
|
var sleep = TimeSpan.FromSeconds(3);
|
||||||
|
|
||||||
|
for (var i = 0; i < tries; i++)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Directory.Delete(filePath, recursive: true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
catch when (i < tries - 1)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"Failed to delete directory {filePath}, trying again.");
|
||||||
|
Thread.Sleep(sleep);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string GetTestAttribute(string key)
|
||||||
|
{
|
||||||
|
return typeof(ProjectDirectory).Assembly
|
||||||
|
.GetCustomAttributes<AssemblyMetadataAttribute>()
|
||||||
|
.FirstOrDefault(f => f.Key == key)
|
||||||
|
?.Value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
|
using Xunit;
|
||||||
|
|
||||||
|
namespace Microsoft.AspNetCore.Blazor.Build
|
||||||
|
{
|
||||||
|
public class ProjectDirectoryTest
|
||||||
|
{
|
||||||
|
[Fact]
|
||||||
|
public void ProjectDirectory_IsNotSetToBePreserved()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
using var project = ProjectDirectory.Create("standalone");
|
||||||
|
|
||||||
|
// Act & Assert
|
||||||
|
// This flag is only meant for local debugging and should not be set when checking in.
|
||||||
|
Assert.False(project.PreserveWorkingDirectory);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,195 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Xunit;
|
||||||
|
|
||||||
|
namespace Microsoft.AspNetCore.Blazor.Build
|
||||||
|
{
|
||||||
|
public class PublishIntegrationTest
|
||||||
|
{
|
||||||
|
[Fact]
|
||||||
|
public async Task Publish_WithDefaultSettings_Works()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
using var project = ProjectDirectory.Create("standalone", additionalProjects: new [] { "razorclasslibrary" });
|
||||||
|
var result = await MSBuildProcessManager.DotnetMSBuild(project, "Publish");
|
||||||
|
|
||||||
|
Assert.BuildPassed(result);
|
||||||
|
|
||||||
|
var publishDirectory = project.PublishOutputDirectory;
|
||||||
|
var blazorPublishDirectory = Path.Combine(publishDirectory, Path.GetFileNameWithoutExtension(project.ProjectFilePath));
|
||||||
|
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.boot.json");
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.webassembly.js");
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.wasm");
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.js");
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "standalone.dll");
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output.
|
||||||
|
|
||||||
|
// Verify referenced static web assets
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_content", "RazorClassLibrary", "wwwroot", "exampleJsInterop.js");
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_content", "RazorClassLibrary", "styles.css");
|
||||||
|
|
||||||
|
// Verify static assets are in the publish directory
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html");
|
||||||
|
|
||||||
|
// Verify web.config
|
||||||
|
Assert.FileExists(result, publishDirectory, "web.config");
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task Publish_WithNoBuild_Works()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
using var project = ProjectDirectory.Create("standalone", additionalProjects: new[] { "razorclasslibrary" });
|
||||||
|
var result = await MSBuildProcessManager.DotnetMSBuild(project, "Build");
|
||||||
|
|
||||||
|
Assert.BuildPassed(result);
|
||||||
|
|
||||||
|
result = await MSBuildProcessManager.DotnetMSBuild(project, "Publish", "/p:NoBuild=true");
|
||||||
|
|
||||||
|
Assert.BuildPassed(result);
|
||||||
|
|
||||||
|
var publishDirectory = project.PublishOutputDirectory;
|
||||||
|
var blazorPublishDirectory = Path.Combine(publishDirectory, Path.GetFileNameWithoutExtension(project.ProjectFilePath));
|
||||||
|
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.boot.json");
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.webassembly.js");
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.wasm");
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.js");
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "standalone.dll");
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output.
|
||||||
|
|
||||||
|
// Verify static assets are in the publish directory
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html");
|
||||||
|
|
||||||
|
// Verify static web assets from referenced projects are copied.
|
||||||
|
// Uncomment once https://github.com/aspnet/AspNetCore/issues/17426 is resolved.
|
||||||
|
// Assert.FileExists(result, blazorPublishDirectory, "dist", "_content", "RazorClassLibrary", "wwwroot", "exampleJsInterop.js");
|
||||||
|
// Assert.FileExists(result, blazorPublishDirectory, "dist", "_content", "RazorClassLibrary", "styles.css");
|
||||||
|
|
||||||
|
// Verify static assets are in the publish directory
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html");
|
||||||
|
|
||||||
|
// Verify web.config
|
||||||
|
Assert.FileExists(result, publishDirectory, "web.config");
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task Publish_WithLinkOnBuildDisabled_Works()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
using var project = ProjectDirectory.Create("standalone", additionalProjects: new [] { "razorclasslibrary" });
|
||||||
|
project.AddProjectFileContent(
|
||||||
|
@"<PropertyGroup>
|
||||||
|
<BlazorLinkOnBuild>false</BlazorLinkOnBuild>
|
||||||
|
</PropertyGroup>");
|
||||||
|
|
||||||
|
var result = await MSBuildProcessManager.DotnetMSBuild(project, "Publish");
|
||||||
|
|
||||||
|
Assert.BuildPassed(result);
|
||||||
|
|
||||||
|
var publishDirectory = project.PublishOutputDirectory;
|
||||||
|
var blazorPublishDirectory = Path.Combine(publishDirectory, Path.GetFileNameWithoutExtension(project.ProjectFilePath));
|
||||||
|
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.boot.json");
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.webassembly.js");
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.wasm");
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.js");
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "standalone.dll");
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output.
|
||||||
|
|
||||||
|
// Verify static assets are in the publish directory
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html");
|
||||||
|
|
||||||
|
// Verify referenced static web assets
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_content", "RazorClassLibrary", "wwwroot", "exampleJsInterop.js");
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_content", "RazorClassLibrary", "styles.css");
|
||||||
|
|
||||||
|
// Verify web.config
|
||||||
|
Assert.FileExists(result, publishDirectory, "web.config");
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task Publish_HostedApp_Works()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
using var project = ProjectDirectory.Create("blazorhosted", additionalProjects: new[] { "standalone", "razorclasslibrary", });
|
||||||
|
project.TargetFramework = "netcoreapp3.1";
|
||||||
|
var result = await MSBuildProcessManager.DotnetMSBuild(project, "Publish");
|
||||||
|
|
||||||
|
Assert.BuildPassed(result);
|
||||||
|
|
||||||
|
var publishDirectory = project.PublishOutputDirectory;
|
||||||
|
// Make sure the main project exists
|
||||||
|
Assert.FileExists(result, publishDirectory, "blazorhosted.dll");
|
||||||
|
|
||||||
|
var blazorPublishDirectory = Path.Combine(publishDirectory, "standalone");
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.boot.json");
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.webassembly.js");
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.wasm");
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.js");
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "standalone.dll");
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output.
|
||||||
|
|
||||||
|
// Verify static assets are in the publish directory
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html");
|
||||||
|
|
||||||
|
// Verify static web assets from referenced projects are copied.
|
||||||
|
Assert.FileExists(result, publishDirectory, "wwwroot", "_content", "RazorClassLibrary", "wwwroot", "exampleJsInterop.js");
|
||||||
|
Assert.FileExists(result, publishDirectory, "wwwroot", "_content", "RazorClassLibrary", "styles.css");
|
||||||
|
|
||||||
|
// Verify static assets are in the publish directory
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html");
|
||||||
|
|
||||||
|
// Verify web.config
|
||||||
|
Assert.FileExists(result, publishDirectory, "web.config");
|
||||||
|
|
||||||
|
var blazorConfig = Path.Combine(result.Project.DirectoryPath, publishDirectory, "standalone.blazor.config");
|
||||||
|
var blazorConfigLines = File.ReadAllLines(blazorConfig);
|
||||||
|
Assert.Equal(".", blazorConfigLines[0]);
|
||||||
|
Assert.Equal("standalone/", blazorConfigLines[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task Publish_HostedApp_WithNoBuild_Works()
|
||||||
|
{
|
||||||
|
// Arrange
|
||||||
|
using var project = ProjectDirectory.Create("blazorhosted", additionalProjects: new[] { "standalone", "razorclasslibrary", });
|
||||||
|
project.TargetFramework = "netcoreapp3.1";
|
||||||
|
var result = await MSBuildProcessManager.DotnetMSBuild(project, "Build");
|
||||||
|
|
||||||
|
Assert.BuildPassed(result);
|
||||||
|
|
||||||
|
result = await MSBuildProcessManager.DotnetMSBuild(project, "Publish", "/p:NoBuild=true");
|
||||||
|
|
||||||
|
var publishDirectory = project.PublishOutputDirectory;
|
||||||
|
// Make sure the main project exists
|
||||||
|
Assert.FileExists(result, publishDirectory, "blazorhosted.dll");
|
||||||
|
|
||||||
|
var blazorPublishDirectory = Path.Combine(publishDirectory, "standalone");
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.boot.json");
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.webassembly.js");
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.wasm");
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.js");
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "standalone.dll");
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output.
|
||||||
|
|
||||||
|
// Verify static assets are in the publish directory
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html");
|
||||||
|
|
||||||
|
// Verify static web assets from referenced projects are copied.
|
||||||
|
// Uncomment once https://github.com/aspnet/AspNetCore/issues/17426 is resolved.
|
||||||
|
// Assert.FileExists(result, publishDirectory, "wwwroot", "_content", "RazorClassLibrary", "wwwroot", "exampleJsInterop.js");
|
||||||
|
// Assert.FileExists(result, publishDirectory, "wwwroot", "_content", "RazorClassLibrary", "styles.css");
|
||||||
|
|
||||||
|
// Verify static assets are in the publish directory
|
||||||
|
Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html");
|
||||||
|
|
||||||
|
// Verify web.config
|
||||||
|
Assert.FileExists(result, publishDirectory, "web.config");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -25,16 +25,40 @@
|
||||||
<Reference Include="Microsoft.AspNetCore.Blazor.Mono" />
|
<Reference Include="Microsoft.AspNetCore.Blazor.Mono" />
|
||||||
<Reference Include="Microsoft.AspNetCore.Mvc.Razor.Extensions" />
|
<Reference Include="Microsoft.AspNetCore.Mvc.Razor.Extensions" />
|
||||||
<Reference Include="Microsoft.AspNetCore.Razor.Language" />
|
<Reference Include="Microsoft.AspNetCore.Razor.Language" />
|
||||||
|
<Reference Include="Microsoft.Build.Framework" />
|
||||||
|
<Reference Include="Microsoft.Build.Utilities.Core" />
|
||||||
<Reference Include="Microsoft.CodeAnalysis.Razor" />
|
<Reference Include="Microsoft.CodeAnalysis.Razor" />
|
||||||
|
<Reference Include="Microsoft.Extensions.CommandLineUtils.Sources" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\testassets\StandaloneApp\StandaloneApp.csproj" />
|
<ProjectReference Include="..\..\testassets\StandaloneApp\StandaloneApp.csproj" />
|
||||||
<Compile Include="$(SharedSourceRoot)test\SkipOnHelixAttribute.cs" />
|
<Compile Include="$(SharedSourceRoot)test\SkipOnHelixAttribute.cs" />
|
||||||
|
|
||||||
<Compile Include="$(ComponentsSharedSourceRoot)test\**\*.cs" LinkBase="Helpers" />
|
<Compile Include="$(ComponentsSharedSourceRoot)test\**\*.cs" LinkBase="Helpers" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute">
|
||||||
|
<_Parameter1>Testing.RepoRoot</_Parameter1>
|
||||||
|
<_Parameter2>$(RepoRoot)</_Parameter2>
|
||||||
|
</AssemblyAttribute>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Target Name="RestoreTestAssets" AfterTargets="Restore;Build" Condition="'$(DotNetBuildFromSource)' != 'true'">
|
||||||
|
<ItemGroup>
|
||||||
|
<_TestAsset Include="..\testassets\standalone\standalone.csproj" />
|
||||||
|
<_TestAsset Include="..\testassets\blazorhosted\blazorhosted.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<MSBuild
|
||||||
|
Projects="@(_TestAsset)"
|
||||||
|
Targets="Restore"
|
||||||
|
Properties="
|
||||||
|
RepoRoot=$(RepoRoot);
|
||||||
|
MicrosoftNetCompilersToolsetPackageVersion=$(MicrosoftNetCompilersToolsetPackageVersion);
|
||||||
|
MicrosoftNETSdkRazorPackageVersion=$(MicrosoftNETSdkRazorPackageVersion)" />
|
||||||
|
</Target>
|
||||||
|
|
||||||
<!-- A bit of msbuild magic to support reference resolver tests -->
|
<!-- A bit of msbuild magic to support reference resolver tests -->
|
||||||
<Target Name="CreateReferenceHintPathsList" AfterTargets="Build">
|
<Target Name="CreateReferenceHintPathsList" AfterTargets="Build">
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ using System.Text;
|
||||||
using Microsoft.AspNetCore.Testing;
|
using Microsoft.AspNetCore.Testing;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Blazor.Build.Test
|
namespace Microsoft.AspNetCore.Blazor.Build
|
||||||
{
|
{
|
||||||
public class RuntimeDependenciesResolverTest
|
public class RuntimeDependenciesResolverTest
|
||||||
{
|
{
|
||||||
|
|
@ -109,7 +109,7 @@ namespace Microsoft.AspNetCore.Blazor.Build.Test
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
|
|
||||||
var paths = RuntimeDependenciesResolver
|
var paths = ResolveBlazorRuntimeDependencies
|
||||||
.ResolveRuntimeDependenciesCore(
|
.ResolveRuntimeDependenciesCore(
|
||||||
mainAssemblyLocation,
|
mainAssemblyLocation,
|
||||||
references,
|
references,
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
<Project>
|
||||||
|
<Import Project="Before.Directory.Build.props" Condition="Exists('Before.Directory.Build.props')" />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<RepoRoot Condition="'$(RepoRoot)' ==''">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), global.json))\</RepoRoot>
|
||||||
|
<ComponentsRoot>$(RepoRoot)src\Components\</ComponentsRoot>
|
||||||
|
<BlazorBuildRoot>$(ComponentsRoot)Blazor\Build\src\</BlazorBuildRoot>
|
||||||
|
<ReferenceBlazorBuildFromSourceProps>$(BlazorBuildRoot)ReferenceBlazorBuildFromSource.props</ReferenceBlazorBuildFromSourceProps>
|
||||||
|
|
||||||
|
<!-- Workaround for https://github.com/aspnet/AspNetCore/issues/17308 -->
|
||||||
|
<DefaultNetCoreTargetFramework>netcoreapp3.1</DefaultNetCoreTargetFramework>
|
||||||
|
|
||||||
|
<EnableSourceLink>false</EnableSourceLink>
|
||||||
|
<DeterministicSourcePaths>false</DeterministicSourcePaths>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<Import Project="$(RepoRoot)eng\Versions.props" />
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<!-- Use the sample compiler \ SDK that the rest of our build uses-->
|
||||||
|
<PackageReference Include="Microsoft.Net.Compilers.Toolset"
|
||||||
|
Version="$(MicrosoftNetCompilersToolsetPackageVersion)"
|
||||||
|
PrivateAssets="all"
|
||||||
|
IsImplicitlyDefined="true" />
|
||||||
|
|
||||||
|
<PackageReference Include="Microsoft.NET.Sdk.Razor"
|
||||||
|
Version="$(MicrosoftNETSdkRazorPackageVersion)"
|
||||||
|
PrivateAssets="All"
|
||||||
|
IsImplicitlyDefined="true" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
<Project>
|
||||||
|
</Project>
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
using System;
|
||||||
|
using Microsoft.AspNetCore;
|
||||||
|
using Microsoft.AspNetCore.Hosting;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
|
||||||
|
namespace blazorhosted.Server
|
||||||
|
{
|
||||||
|
public class Program
|
||||||
|
{
|
||||||
|
public static void Main(string[] args)
|
||||||
|
{
|
||||||
|
Console.WriteLine(typeof(IWebHost));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||||
|
<DisableImplicitComponentsAnalyzers>true</DisableImplicitComponentsAnalyzers>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\standalone\standalone.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
<Project Sdk="Microsoft.NET.Sdk.Razor">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>netstandard2.1</TargetFramework>
|
||||||
|
<RazorLangVersion>3.0</RazorLangVersion>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
<Router AppAssembly="@typeof(Program).Assembly">
|
||||||
|
<Found Context="routeData">
|
||||||
|
<RouteView RouteData="@routeData"/>
|
||||||
|
</Found>
|
||||||
|
<NotFound>
|
||||||
|
<p>Sorry, there's nothing at this address.</p>
|
||||||
|
</NotFound>
|
||||||
|
</Router>
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
@page "/"
|
||||||
|
|
||||||
|
<h1>Hello, world!</h1>
|
||||||
|
|
||||||
|
Welcome to your new app.
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
|
||||||
|
namespace standalone
|
||||||
|
{
|
||||||
|
public class Program
|
||||||
|
{
|
||||||
|
public static void Main(string[] args)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
@using Microsoft.AspNetCore.Components.Routing
|
||||||
|
@using standalone
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
<Import Project="$(ReferenceBlazorBuildFromSourceProps)" />
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>netstandard2.1</TargetFramework>
|
||||||
|
<RazorLangVersion>3.0</RazorLangVersion>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<!-- Test Placeholder -->
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.Components" Version="3.0.0" />
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.Blazor.Mono" Version="$(MicrosoftAspNetCoreBlazorMonoPackageVersion)" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\razorclasslibrary\RazorClassLibrary.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width" />
|
||||||
|
<title>standalone</title>
|
||||||
|
<base href="/" />
|
||||||
|
<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet" />
|
||||||
|
<link href="css/site.css" rel="stylesheet" />
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<app>Loading...</app>
|
||||||
|
|
||||||
|
<div id="blazor-error-ui">
|
||||||
|
An unhandled error has occurred.
|
||||||
|
<a href="" class="reload">Reload</a>
|
||||||
|
<a class="dismiss">🗙</a>
|
||||||
|
</div>
|
||||||
|
<script src="_framework/blazor.webassembly.js"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
|
|
@ -11,15 +11,14 @@
|
||||||
<Description>Development server for use when building Blazor applications.</Description>
|
<Description>Development server for use when building Blazor applications.</Description>
|
||||||
<!-- Set this to false because assemblies should not reference this assembly directly, (except for tests, of course). -->
|
<!-- Set this to false because assemblies should not reference this assembly directly, (except for tests, of course). -->
|
||||||
<IsProjectReferenceProvider>false</IsProjectReferenceProvider>
|
<IsProjectReferenceProvider>false</IsProjectReferenceProvider>
|
||||||
|
|
||||||
|
<!-- This is so that we add the FrameworkReference to Microsoft.AspNetCore.App -->
|
||||||
|
<UseLatestAspNetCoreReference>true</UseLatestAspNetCoreReference>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Microsoft.AspNetCore.Blazor.Server" />
|
<Reference Include="Microsoft.AspNetCore.Blazor.Server" />
|
||||||
<Reference Include="Microsoft.AspNetCore.Components.Server" />
|
|
||||||
<Reference Include="Microsoft.AspNetCore.ResponseCompression" />
|
|
||||||
<Reference Include="Microsoft.AspNetCore" />
|
|
||||||
<Reference Include="Microsoft.Extensions.CommandLineUtils.Sources" />
|
<Reference Include="Microsoft.Extensions.CommandLineUtils.Sources" />
|
||||||
<Reference Include="Microsoft.Extensions.Hosting" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<!-- Pack settings -->
|
<!-- Pack settings -->
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,12 @@
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" />
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<!-- Override prerelease label and use preview 4, even in the final build -->
|
<!-- Override version labels -->
|
||||||
<PreReleaseVersionLabel>$(BlazorClientPreReleaseVersionLabel)</PreReleaseVersionLabel>
|
<VersionPrefix>3.1.0</VersionPrefix>
|
||||||
<!-- These packages ship from the blazor-wasm branch -->
|
<PreReleaseVersionLabel>preview4</PreReleaseVersionLabel>
|
||||||
<IsShipping>false</IsShipping>
|
<DotNetFinalVersionKind />
|
||||||
<DotNetFinalVersionKind></DotNetFinalVersionKind>
|
<!-- This property points to the latest released Microsoft.AspNetCore.App version it needs to be updated to
|
||||||
|
target the latest patch before a preview release. -->
|
||||||
|
<LatestAspNetCoreReferenceVersion>3.1.0</LatestAspNetCoreReferenceVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -4,4 +4,5 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ComponentsPackageVersion>$(PackageVersion)</ComponentsPackageVersion>
|
<ComponentsPackageVersion>$(PackageVersion)</ComponentsPackageVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
<!-- This file is automatically generated. -->
|
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFrameworks>netstandard2.0</TargetFrameworks>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
|
|
||||||
<Compile Include="Microsoft.AspNetCore.Blazor.HttpClient.netstandard2.0.cs" />
|
|
||||||
<Reference Include="System.Text.Json" />
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Components
|
|
||||||
{
|
|
||||||
public static partial class HttpClientJsonExtensions
|
|
||||||
{
|
|
||||||
[System.Diagnostics.DebuggerStepThroughAttribute]
|
|
||||||
public static System.Threading.Tasks.Task<T> GetJsonAsync<T>(this System.Net.Http.HttpClient httpClient, string requestUri) { throw null; }
|
|
||||||
public static System.Threading.Tasks.Task PostJsonAsync(this System.Net.Http.HttpClient httpClient, string requestUri, object content) { throw null; }
|
|
||||||
public static System.Threading.Tasks.Task<T> PostJsonAsync<T>(this System.Net.Http.HttpClient httpClient, string requestUri, object content) { throw null; }
|
|
||||||
public static System.Threading.Tasks.Task PutJsonAsync(this System.Net.Http.HttpClient httpClient, string requestUri, object content) { throw null; }
|
|
||||||
public static System.Threading.Tasks.Task<T> PutJsonAsync<T>(this System.Net.Http.HttpClient httpClient, string requestUri, object content) { throw null; }
|
|
||||||
public static System.Threading.Tasks.Task SendJsonAsync(this System.Net.Http.HttpClient httpClient, System.Net.Http.HttpMethod method, string requestUri, object content) { throw null; }
|
|
||||||
[System.Diagnostics.DebuggerStepThroughAttribute]
|
|
||||||
public static System.Threading.Tasks.Task<T> SendJsonAsync<T>(this System.Net.Http.HttpClient httpClient, System.Net.Http.HttpMethod method, string requestUri, object content) { throw null; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
<TargetFramework>netstandard2.0</TargetFramework>
|
||||||
<Description>Provides experimental support for using System.Text.Json with HttpClient. Intended for use with Blazor running under WebAssembly.</Description>
|
<Description>Provides experimental support for using System.Text.Json with HttpClient. Intended for use with Blazor running under WebAssembly.</Description>
|
||||||
<IsShippingPackage>true</IsShippingPackage>
|
<IsShippingPackage>true</IsShippingPackage>
|
||||||
|
<HasReferenceAssembly>false</HasReferenceAssembly>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
|
namespace WebAssembly.JSInterop
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Methods that map to the functions compiled into the Mono WebAssembly runtime,
|
||||||
|
/// as defined by 'mono_add_internal_call' calls in driver.c
|
||||||
|
/// </summary>
|
||||||
|
internal class InternalCalls
|
||||||
|
{
|
||||||
|
// The exact namespace, type, and method names must match the corresponding entries
|
||||||
|
// in driver.c in the Mono distribution
|
||||||
|
|
||||||
|
// We're passing asyncHandle by ref not because we want it to be writable, but so it gets
|
||||||
|
// passed as a pointer (4 bytes). We can pass 4-byte values, but not 8-byte ones.
|
||||||
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||||
|
public static extern string InvokeJSMarshalled(out string exception, ref long asyncHandle, string functionIdentifier, string argsJson);
|
||||||
|
|
||||||
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||||
|
public static extern TRes InvokeJSUnmarshalled<T0, T1, T2, TRes>(out string exception, string functionIdentifier, T0 arg0, T1 arg1, T2 arg2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>netstandard2.1</TargetFramework>
|
||||||
|
<Description>Abstractions and features for interop between Mono WebAssembly and JavaScript code.</Description>
|
||||||
|
<PackageTags>wasm;javascript;interop</PackageTags>
|
||||||
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
|
<IsPackable>true</IsPackable>
|
||||||
|
<IsShipping>true</IsShipping>
|
||||||
|
<HasReferenceAssembly>false</HasReferenceAssembly>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="Microsoft.JSInterop" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
|
|
@ -0,0 +1,157 @@
|
||||||
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Text.Json;
|
||||||
|
using Microsoft.JSInterop;
|
||||||
|
using Microsoft.JSInterop.Infrastructure;
|
||||||
|
using WebAssembly.JSInterop;
|
||||||
|
|
||||||
|
namespace Mono.WebAssembly.Interop
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Provides methods for invoking JavaScript functions for applications running
|
||||||
|
/// on the Mono WebAssembly runtime.
|
||||||
|
/// </summary>
|
||||||
|
public class MonoWebAssemblyJSRuntime : JSInProcessRuntime
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the <see cref="MonoWebAssemblyJSRuntime"/> used to perform operations using <see cref="DotNetDispatcher"/>.
|
||||||
|
/// </summary>
|
||||||
|
private static MonoWebAssemblyJSRuntime Instance { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes the <see cref="MonoWebAssemblyJSRuntime"/> to be used to perform operations using <see cref="DotNetDispatcher"/>.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="jsRuntime">The <see cref="MonoWebAssemblyJSRuntime"/> instance.</param>
|
||||||
|
protected static void Initialize(MonoWebAssemblyJSRuntime jsRuntime)
|
||||||
|
{
|
||||||
|
if (Instance != null)
|
||||||
|
{
|
||||||
|
throw new InvalidOperationException("MonoWebAssemblyJSRuntime has already been initialized.");
|
||||||
|
}
|
||||||
|
|
||||||
|
Instance = jsRuntime ?? throw new ArgumentNullException(nameof(jsRuntime));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override string InvokeJS(string identifier, string argsJson)
|
||||||
|
{
|
||||||
|
var noAsyncHandle = default(long);
|
||||||
|
var result = InternalCalls.InvokeJSMarshalled(out var exception, ref noAsyncHandle, identifier, argsJson);
|
||||||
|
return exception != null
|
||||||
|
? throw new JSException(exception)
|
||||||
|
: result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void BeginInvokeJS(long asyncHandle, string identifier, string argsJson)
|
||||||
|
{
|
||||||
|
InternalCalls.InvokeJSMarshalled(out _, ref asyncHandle, identifier, argsJson);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Invoked via Mono's JS interop mechanism (invoke_method)
|
||||||
|
private static string InvokeDotNet(string assemblyName, string methodIdentifier, string dotNetObjectId, string argsJson)
|
||||||
|
{
|
||||||
|
var callInfo = new DotNetInvocationInfo(assemblyName, methodIdentifier, dotNetObjectId == null ? default : long.Parse(dotNetObjectId), callId: null);
|
||||||
|
return DotNetDispatcher.Invoke(Instance, callInfo, argsJson);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Invoked via Mono's JS interop mechanism (invoke_method)
|
||||||
|
private static void EndInvokeJS(string argsJson)
|
||||||
|
=> DotNetDispatcher.EndInvokeJS(Instance, argsJson);
|
||||||
|
|
||||||
|
// Invoked via Mono's JS interop mechanism (invoke_method)
|
||||||
|
private static void BeginInvokeDotNet(string callId, string assemblyNameOrDotNetObjectId, string methodIdentifier, string argsJson)
|
||||||
|
{
|
||||||
|
// Figure out whether 'assemblyNameOrDotNetObjectId' is the assembly name or the instance ID
|
||||||
|
// We only need one for any given call. This helps to work around the limitation that we can
|
||||||
|
// only pass a maximum of 4 args in a call from JS to Mono WebAssembly.
|
||||||
|
string assemblyName;
|
||||||
|
long dotNetObjectId;
|
||||||
|
if (char.IsDigit(assemblyNameOrDotNetObjectId[0]))
|
||||||
|
{
|
||||||
|
dotNetObjectId = long.Parse(assemblyNameOrDotNetObjectId);
|
||||||
|
assemblyName = null;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dotNetObjectId = default;
|
||||||
|
assemblyName = assemblyNameOrDotNetObjectId;
|
||||||
|
}
|
||||||
|
|
||||||
|
var callInfo = new DotNetInvocationInfo(assemblyName, methodIdentifier, dotNetObjectId, callId);
|
||||||
|
DotNetDispatcher.BeginInvokeDotNet(Instance, callInfo, argsJson);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void EndInvokeDotNet(DotNetInvocationInfo callInfo, in DotNetInvocationResult dispatchResult)
|
||||||
|
{
|
||||||
|
// For failures, the common case is to call EndInvokeDotNet with the Exception object.
|
||||||
|
// For these we'll serialize as something that's useful to receive on the JS side.
|
||||||
|
// If the value is not an Exception, we'll just rely on it being directly JSON-serializable.
|
||||||
|
var resultOrError = dispatchResult.Success ? dispatchResult.Result : dispatchResult.Exception.ToString();
|
||||||
|
|
||||||
|
// We pass 0 as the async handle because we don't want the JS-side code to
|
||||||
|
// send back any notification (we're just providing a result for an existing async call)
|
||||||
|
var args = JsonSerializer.Serialize(new[] { callInfo.CallId, dispatchResult.Success, resultOrError }, JsonSerializerOptions);
|
||||||
|
BeginInvokeJS(0, "DotNet.jsCallDispatcher.endInvokeDotNetFromJS", args);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Custom MonoWebAssemblyJSRuntime methods
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Invokes the JavaScript function registered with the specified identifier.
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="TRes">The .NET type corresponding to the function's return value type.</typeparam>
|
||||||
|
/// <param name="identifier">The identifier used when registering the target function.</param>
|
||||||
|
/// <returns>The result of the function invocation.</returns>
|
||||||
|
public TRes InvokeUnmarshalled<TRes>(string identifier)
|
||||||
|
=> InvokeUnmarshalled<object, object, object, TRes>(identifier, null, null, null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Invokes the JavaScript function registered with the specified identifier.
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="T0">The type of the first argument.</typeparam>
|
||||||
|
/// <typeparam name="TRes">The .NET type corresponding to the function's return value type.</typeparam>
|
||||||
|
/// <param name="identifier">The identifier used when registering the target function.</param>
|
||||||
|
/// <param name="arg0">The first argument.</param>
|
||||||
|
/// <returns>The result of the function invocation.</returns>
|
||||||
|
public TRes InvokeUnmarshalled<T0, TRes>(string identifier, T0 arg0)
|
||||||
|
=> InvokeUnmarshalled<T0, object, object, TRes>(identifier, arg0, null, null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Invokes the JavaScript function registered with the specified identifier.
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="T0">The type of the first argument.</typeparam>
|
||||||
|
/// <typeparam name="T1">The type of the second argument.</typeparam>
|
||||||
|
/// <typeparam name="TRes">The .NET type corresponding to the function's return value type.</typeparam>
|
||||||
|
/// <param name="identifier">The identifier used when registering the target function.</param>
|
||||||
|
/// <param name="arg0">The first argument.</param>
|
||||||
|
/// <param name="arg1">The second argument.</param>
|
||||||
|
/// <returns>The result of the function invocation.</returns>
|
||||||
|
public TRes InvokeUnmarshalled<T0, T1, TRes>(string identifier, T0 arg0, T1 arg1)
|
||||||
|
=> InvokeUnmarshalled<T0, T1, object, TRes>(identifier, arg0, arg1, null);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Invokes the JavaScript function registered with the specified identifier.
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="T0">The type of the first argument.</typeparam>
|
||||||
|
/// <typeparam name="T1">The type of the second argument.</typeparam>
|
||||||
|
/// <typeparam name="T2">The type of the third argument.</typeparam>
|
||||||
|
/// <typeparam name="TRes">The .NET type corresponding to the function's return value type.</typeparam>
|
||||||
|
/// <param name="identifier">The identifier used when registering the target function.</param>
|
||||||
|
/// <param name="arg0">The first argument.</param>
|
||||||
|
/// <param name="arg1">The second argument.</param>
|
||||||
|
/// <param name="arg2">The third argument.</param>
|
||||||
|
/// <returns>The result of the function invocation.</returns>
|
||||||
|
public TRes InvokeUnmarshalled<T0, T1, T2, TRes>(string identifier, T0 arg0, T1 arg1, T2 arg2)
|
||||||
|
{
|
||||||
|
var result = InternalCalls.InvokeJSUnmarshalled<T0, T1, T2, TRes>(out var exception, identifier, arg0, arg1, arg2);
|
||||||
|
return exception != null
|
||||||
|
? throw new JSException(exception)
|
||||||
|
: result;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
<!-- This file is automatically generated. -->
|
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFrameworks>$(DefaultNetCoreTargetFramework)</TargetFrameworks>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)'">
|
|
||||||
<Compile Include="Microsoft.AspNetCore.Blazor.Server.netcoreapp.cs" />
|
|
||||||
<Reference Include="Microsoft.AspNetCore.Hosting.Abstractions" />
|
|
||||||
<Reference Include="Microsoft.AspNetCore.SpaServices.Extensions" />
|
|
||||||
<Reference Include="Microsoft.AspNetCore.StaticFiles" />
|
|
||||||
<Reference Include="Microsoft.AspNetCore.WebSockets" />
|
|
||||||
<Reference Include="Microsoft.Extensions.FileProviders.Embedded" />
|
|
||||||
<Reference Include="Newtonsoft.Json" />
|
|
||||||
<Reference Include="Mono.Cecil" />
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Builder
|
|
||||||
{
|
|
||||||
public static partial class BlazorHostingApplicationBuilderExtensions
|
|
||||||
{
|
|
||||||
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseClientSideBlazorFiles(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, string clientAssemblyFilePath) { throw null; }
|
|
||||||
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseClientSideBlazorFiles<TClientApp>(this Microsoft.AspNetCore.Builder.IApplicationBuilder app) { throw null; }
|
|
||||||
}
|
|
||||||
public static partial class BlazorHostingEndpointRouteBuilderExtensions
|
|
||||||
{
|
|
||||||
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToClientSideBlazor(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string clientAssemblyFilePath, string filePath) { throw null; }
|
|
||||||
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToClientSideBlazor(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string clientAssemblyFilePath, string pattern, string filePath) { throw null; }
|
|
||||||
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToClientSideBlazor<TClientApp>(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string filePath) { throw null; }
|
|
||||||
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToClientSideBlazor<TClientApp>(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, string filePath) { throw null; }
|
|
||||||
}
|
|
||||||
public static partial class BlazorMonoDebugProxyAppBuilderExtensions
|
|
||||||
{
|
|
||||||
public static void UseBlazorDebugging(this Microsoft.AspNetCore.Builder.IApplicationBuilder app) { }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -4,6 +4,9 @@
|
||||||
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
|
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
|
||||||
<Description>Runtime server features for ASP.NET Core Blazor applications.</Description>
|
<Description>Runtime server features for ASP.NET Core Blazor applications.</Description>
|
||||||
<IsShippingPackage>true</IsShippingPackage>
|
<IsShippingPackage>true</IsShippingPackage>
|
||||||
|
<HasReferenceAssembly>false</HasReferenceAssembly>
|
||||||
|
<!-- This is so that we add the FrameworkReference to Microsoft.AspNetCore.App -->
|
||||||
|
<UseLatestAspNetCoreReference>true</UseLatestAspNetCoreReference>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
@ -11,11 +14,6 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Microsoft.AspNetCore.Hosting.Abstractions" />
|
|
||||||
<Reference Include="Microsoft.AspNetCore.SpaServices.Extensions" />
|
|
||||||
<Reference Include="Microsoft.AspNetCore.StaticFiles" />
|
|
||||||
<Reference Include="Microsoft.AspNetCore.WebSockets" />
|
|
||||||
<Reference Include="Microsoft.Extensions.FileProviders.Embedded" />
|
|
||||||
<Reference Include="Newtonsoft.Json" />
|
<Reference Include="Newtonsoft.Json" />
|
||||||
|
|
||||||
<!-- Used by ws-proxy sources only. Remove this once we're able to consume ws-proxy as a NuGet package. -->
|
<!-- Used by ws-proxy sources only. Remove this once we're able to consume ws-proxy as a NuGet package. -->
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,9 @@ using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Text.Json;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Newtonsoft.Json;
|
|
||||||
using WsProxy;
|
using WsProxy;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Builder
|
namespace Microsoft.AspNetCore.Builder
|
||||||
|
|
@ -21,6 +21,15 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static class BlazorMonoDebugProxyAppBuilderExtensions
|
public static class BlazorMonoDebugProxyAppBuilderExtensions
|
||||||
{
|
{
|
||||||
|
private static JsonSerializerOptions JsonOptions = new JsonSerializerOptions
|
||||||
|
{
|
||||||
|
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
|
||||||
|
PropertyNameCaseInsensitive = true,
|
||||||
|
IgnoreNullValues = true
|
||||||
|
};
|
||||||
|
|
||||||
|
private static string DefaultDebuggerHost = "http://localhost:9222";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds middleware for needed for debugging Blazor applications
|
/// Adds middleware for needed for debugging Blazor applications
|
||||||
/// inside Chromium dev tools.
|
/// inside Chromium dev tools.
|
||||||
|
|
@ -29,6 +38,8 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
{
|
{
|
||||||
app.UseWebSockets();
|
app.UseWebSockets();
|
||||||
|
|
||||||
|
app.UseVisualStudioDebuggerConnectionRequestHandlers();
|
||||||
|
|
||||||
app.Use((context, next) =>
|
app.Use((context, next) =>
|
||||||
{
|
{
|
||||||
var requestPath = context.Request.Path;
|
var requestPath = context.Request.Path;
|
||||||
|
|
@ -52,6 +63,85 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static string GetDebuggerHost()
|
||||||
|
{
|
||||||
|
var envVar = Environment.GetEnvironmentVariable("ASPNETCORE_WEBASSEMBLYDEBUGHOST");
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(envVar))
|
||||||
|
{
|
||||||
|
return DefaultDebuggerHost;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return envVar;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static int GetDebuggerPort()
|
||||||
|
{
|
||||||
|
var host = GetDebuggerHost();
|
||||||
|
return new Uri(host).Port;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void UseVisualStudioDebuggerConnectionRequestHandlers(this IApplicationBuilder app)
|
||||||
|
{
|
||||||
|
// Unfortunately VS doesn't send any deliberately distinguishing information so we know it's
|
||||||
|
// not a regular browser or API client. The closest we can do is look for the *absence* of a
|
||||||
|
// User-Agent header. In the future, we should try to get VS to send a special header to indicate
|
||||||
|
// this is a debugger metadata request.
|
||||||
|
app.Use(async (context, next) =>
|
||||||
|
{
|
||||||
|
var request = context.Request;
|
||||||
|
var requestPath = request.Path;
|
||||||
|
if (requestPath.StartsWithSegments("/json")
|
||||||
|
&& !request.Headers.ContainsKey("User-Agent"))
|
||||||
|
{
|
||||||
|
if (requestPath.Equals("/json", StringComparison.OrdinalIgnoreCase) || requestPath.Equals("/json/list", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
var availableTabs = await GetOpenedBrowserTabs();
|
||||||
|
|
||||||
|
// Filter the list to only include tabs displaying the requested app,
|
||||||
|
// but only during the "choose application to debug" phase. We can't apply
|
||||||
|
// the same filter during the "connecting" phase (/json/list), nor do we need to.
|
||||||
|
if (requestPath.Equals("/json"))
|
||||||
|
{
|
||||||
|
availableTabs = availableTabs.Where(tab => tab.Url.StartsWith($"{request.Scheme}://{request.Host}{request.PathBase}/"));
|
||||||
|
}
|
||||||
|
|
||||||
|
var proxiedTabInfos = availableTabs.Select(tab =>
|
||||||
|
{
|
||||||
|
var underlyingV8Endpoint = tab.WebSocketDebuggerUrl;
|
||||||
|
var proxiedV8Endpoint = $"ws://{request.Host}{request.PathBase}/_framework/debug/ws-proxy?browser={WebUtility.UrlEncode(underlyingV8Endpoint)}";
|
||||||
|
return new
|
||||||
|
{
|
||||||
|
description = "",
|
||||||
|
devtoolsFrontendUrl = "",
|
||||||
|
id = tab.Id,
|
||||||
|
title = tab.Title,
|
||||||
|
type = tab.Type,
|
||||||
|
url = tab.Url,
|
||||||
|
webSocketDebuggerUrl = proxiedV8Endpoint
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
context.Response.ContentType = "application/json";
|
||||||
|
await context.Response.WriteAsync(JsonSerializer.Serialize(proxiedTabInfos));
|
||||||
|
}
|
||||||
|
else if (requestPath.Equals("/json/version", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
var browserVersionJson = await GetBrowserVersionInfoAsync();
|
||||||
|
|
||||||
|
context.Response.ContentType = "application/json";
|
||||||
|
await context.Response.WriteAsync(browserVersionJson);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
await next();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
private static async Task DebugWebSocketProxyRequest(HttpContext context)
|
private static async Task DebugWebSocketProxyRequest(HttpContext context)
|
||||||
{
|
{
|
||||||
if (!context.WebSockets.IsWebSocketRequest)
|
if (!context.WebSockets.IsWebSocketRequest)
|
||||||
|
|
@ -81,13 +171,13 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
|
|
||||||
// TODO: Allow overriding port (but not hostname, as we're connecting to the
|
// TODO: Allow overriding port (but not hostname, as we're connecting to the
|
||||||
// local browser, not to the webserver serving the app)
|
// local browser, not to the webserver serving the app)
|
||||||
var debuggerHost = "http://localhost:9222";
|
var debuggerHost = GetDebuggerHost();
|
||||||
var debuggerTabsListUrl = $"{debuggerHost}/json";
|
var debuggerTabsListUrl = $"{debuggerHost}/json";
|
||||||
IEnumerable<BrowserTab> availableTabs;
|
IEnumerable<BrowserTab> availableTabs;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
availableTabs = await GetOpenedBrowserTabs(debuggerHost);
|
availableTabs = await GetOpenedBrowserTabs();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
@ -147,28 +237,30 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
var underlyingV8Endpoint = tabToDebug.WebSocketDebuggerUrl;
|
var underlyingV8Endpoint = tabToDebug.WebSocketDebuggerUrl;
|
||||||
var proxyEndpoint = $"{request.Host}{request.PathBase}/_framework/debug/ws-proxy?browser={WebUtility.UrlEncode(underlyingV8Endpoint)}";
|
var proxyEndpoint = $"{request.Host}{request.PathBase}/_framework/debug/ws-proxy?browser={WebUtility.UrlEncode(underlyingV8Endpoint)}";
|
||||||
var devToolsUrlAbsolute = new Uri(debuggerHost + tabToDebug.DevtoolsFrontendUrl);
|
var devToolsUrlAbsolute = new Uri(debuggerHost + tabToDebug.DevtoolsFrontendUrl);
|
||||||
var devToolsUrlWithProxy = $"{devToolsUrlAbsolute.Scheme}://{devToolsUrlAbsolute.Authority}{devToolsUrlAbsolute.AbsolutePath}?ws={proxyEndpoint}";
|
var wsParamName = request.IsHttps ? "wss" : "ws";
|
||||||
|
var devToolsUrlWithProxy = $"{devToolsUrlAbsolute.Scheme}://{devToolsUrlAbsolute.Authority}{devToolsUrlAbsolute.AbsolutePath}?{wsParamName}={proxyEndpoint}";
|
||||||
context.Response.Redirect(devToolsUrlWithProxy);
|
context.Response.Redirect(devToolsUrlWithProxy);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string GetLaunchChromeInstructions(string appRootUrl)
|
private static string GetLaunchChromeInstructions(string appRootUrl)
|
||||||
{
|
{
|
||||||
var profilePath = Path.Combine(Path.GetTempPath(), "blazor-edge-debug");
|
var profilePath = Path.Combine(Path.GetTempPath(), "blazor-chrome-debug");
|
||||||
|
var debuggerPort = GetDebuggerPort();
|
||||||
|
|
||||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||||
{
|
{
|
||||||
return $@"<p>Press Win+R and enter the following:</p>
|
return $@"<p>Press Win+R and enter the following:</p>
|
||||||
<p><strong><code>chrome --remote-debugging-port=9222 --user-data-dir=""{profilePath}"" {appRootUrl}</code></strong></p>";
|
<p><strong><code>chrome --remote-debugging-port={debuggerPort} --user-data-dir=""{profilePath}"" {appRootUrl}</code></strong></p>";
|
||||||
}
|
}
|
||||||
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
||||||
{
|
{
|
||||||
return $@"<p>In a terminal window execute the following:</p>
|
return $@"<p>In a terminal window execute the following:</p>
|
||||||
<p><strong><code>google-chrome --remote-debugging-port=9222 --user-data-dir={profilePath} {appRootUrl}</code></strong></p>";
|
<p><strong><code>google-chrome --remote-debugging-port={debuggerPort} --user-data-dir={profilePath} {appRootUrl}</code></strong></p>";
|
||||||
}
|
}
|
||||||
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
|
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
|
||||||
{
|
{
|
||||||
return $@"<p>Execute the following:</p>
|
return $@"<p>Execute the following:</p>
|
||||||
<p><strong><code>open /Applications/Google\ Chrome.app --args --remote-debugging-port=9222 --user-data-dir={profilePath} {appRootUrl}</code></strong></p>";
|
<p><strong><code>open /Applications/Google\ Chrome.app --args --remote-debugging-port={debuggerPort} --user-data-dir={profilePath} {appRootUrl}</code></strong></p>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -178,17 +270,18 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
|
|
||||||
private static string GetLaunchEdgeInstructions(string appRootUrl)
|
private static string GetLaunchEdgeInstructions(string appRootUrl)
|
||||||
{
|
{
|
||||||
var profilePath = Path.Combine(Path.GetTempPath(), "blazor-chrome-debug");
|
var profilePath = Path.Combine(Path.GetTempPath(), "blazor-edge-debug");
|
||||||
|
var debugggerPort = GetDebuggerPort();
|
||||||
|
|
||||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||||
{
|
{
|
||||||
return $@"<p>Press Win+R and enter the following:</p>
|
return $@"<p>Press Win+R and enter the following:</p>
|
||||||
<p><strong><code>msedge --remote-debugging-port=9222 --user-data-dir=""{profilePath}"" {appRootUrl}</code></strong></p>";
|
<p><strong><code>msedge --remote-debugging-port={debugggerPort} --user-data-dir=""{profilePath}"" --no-first-run {appRootUrl}</code></strong></p>";
|
||||||
}
|
}
|
||||||
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
|
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
|
||||||
{
|
{
|
||||||
return $@"<p>In a terminal window execute the following:</p>
|
return $@"<p>In a terminal window execute the following:</p>
|
||||||
<p><strong><code>open /Applications/Microsoft\ Edge\ Dev.app --args --remote-debugging-port=9222 --user-data-dir={profilePath} {appRootUrl}</code></strong></p>";
|
<p><strong><code>open /Applications/Microsoft\ Edge\ Dev.app --args --remote-debugging-port={debugggerPort} --user-data-dir={profilePath} {appRootUrl}</code></strong></p>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -196,17 +289,24 @@ namespace Microsoft.AspNetCore.Builder
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static async Task<IEnumerable<BrowserTab>> GetOpenedBrowserTabs(string debuggerHost)
|
private static async Task<string> GetBrowserVersionInfoAsync()
|
||||||
{
|
{
|
||||||
using (var httpClient = new HttpClient { Timeout = TimeSpan.FromSeconds(5) })
|
using var httpClient = new HttpClient { Timeout = TimeSpan.FromSeconds(5) };
|
||||||
{
|
var debuggerHost = GetDebuggerHost();
|
||||||
var jsonResponse = await httpClient.GetStringAsync($"{debuggerHost}/json");
|
return await httpClient.GetStringAsync($"{debuggerHost}/json/version");
|
||||||
return JsonConvert.DeserializeObject<BrowserTab[]>(jsonResponse);
|
}
|
||||||
}
|
|
||||||
|
private static async Task<IEnumerable<BrowserTab>> GetOpenedBrowserTabs()
|
||||||
|
{
|
||||||
|
using var httpClient = new HttpClient { Timeout = TimeSpan.FromSeconds(5) };
|
||||||
|
var debuggerHost = GetDebuggerHost();
|
||||||
|
var jsonResponse = await httpClient.GetStringAsync($"{debuggerHost}/json");
|
||||||
|
return JsonSerializer.Deserialize<BrowserTab[]>(jsonResponse, JsonOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
class BrowserTab
|
class BrowserTab
|
||||||
{
|
{
|
||||||
|
public string Id { get; set; }
|
||||||
public string Type { get; set; }
|
public string Type { get; set; }
|
||||||
public string Url { get; set; }
|
public string Url { get; set; }
|
||||||
public string Title { get; set; }
|
public string Title { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
<Project>
|
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" />
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<GenerateDocumentationFile>false</GenerateDocumentationFile>
|
|
||||||
<IncludeSymbols>false</IncludeSymbols>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<PropertyGroup Label="Package Versions">
|
|
||||||
<!-- Used only in development when running the template contents directly from source -->
|
|
||||||
<TemplateBlazorPackageVersion>0.8.0-preview-19064-0339</TemplateBlazorPackageVersion>
|
|
||||||
<TemplateComponentsPackageVersion>3.0.0-preview-19064-0339</TemplateComponentsPackageVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
<Project>
|
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.targets))\Directory.Build.targets" />
|
|
||||||
|
|
||||||
<Target Name="SetTemplateJsonSymbolReplacements">
|
|
||||||
<PropertyGroup>
|
|
||||||
<!--
|
|
||||||
Properties here will be injected into the template config *.json files
|
|
||||||
during the build, replacing tokens of the form ${PropertyName}
|
|
||||||
-->
|
|
||||||
<GeneratedContentProperties>
|
|
||||||
TemplateBlazorVersion=$(PackageVersion);
|
|
||||||
TemplateComponentsVersion=$(ComponentsPackageVersion);
|
|
||||||
RepositoryCommit=$(SourceRevisionId);
|
|
||||||
</GeneratedContentProperties>
|
|
||||||
</PropertyGroup>
|
|
||||||
</Target>
|
|
||||||
</Project>
|
|
||||||
|
|
@ -1,64 +0,0 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
|
||||||
<NuspecFile>Microsoft.AspNetCore.Blazor.Templates.nuspec</NuspecFile>
|
|
||||||
<IsShippingPackage>true</IsShippingPackage>
|
|
||||||
<EnableDefaultItems>False</EnableDefaultItems>
|
|
||||||
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
|
|
||||||
<IncludeBuildOutput>False</IncludeBuildOutput>
|
|
||||||
<CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
|
|
||||||
<DebugType>none</DebugType>
|
|
||||||
<GenerateDocumentationFile>false</GenerateDocumentationFile>
|
|
||||||
<NoWarn>$(NoWarn);2008</NoWarn>
|
|
||||||
<Description>Templates for ASP.NET Core Blazor projects.</Description>
|
|
||||||
<PackageTags>aspnet;templates;blazor;spa</PackageTags>
|
|
||||||
<IsProjectReferenceProvider>false</IsProjectReferenceProvider>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<UpToDateCheckInput Include="content\**\.template.config.src\**\*.*" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<Target Name="PrepareFileLists" AfterTargets="PrepareForBuild">
|
|
||||||
<ItemGroup>
|
|
||||||
<_TemplateConfigMainFile Include="content\**\.template.config.src\template.json" />
|
|
||||||
<_TemplateConfigDir Include="@(_TemplateConfigMainFile->'$([System.IO.Path]::GetDirectoryName('%(_TemplateConfigMainFile.FullPath)'))')" />
|
|
||||||
<_TemplateConfigFileToCopy Include="%(_TemplateConfigDir.Identity)\**\*.*">
|
|
||||||
<DestDir>$([System.IO.Path]::GetDirectoryName('%(_TemplateConfigDir.Identity)'))\.template.config\</DestDir>
|
|
||||||
</_TemplateConfigFileToCopy>
|
|
||||||
</ItemGroup>
|
|
||||||
</Target>
|
|
||||||
|
|
||||||
<Target
|
|
||||||
Name="TransformTemplateConfigs"
|
|
||||||
BeforeTargets="CoreBuild"
|
|
||||||
DependsOnTargets="SetTemplateJsonSymbolReplacements"
|
|
||||||
Inputs="@(_TemplateConfigFileToCopy)"
|
|
||||||
Outputs="@(_TemplateConfigFileToCopy->'%(DestDir)%(FileName)%(Extension)')">
|
|
||||||
|
|
||||||
<!--
|
|
||||||
For each template, copy its '.template.config.src' directory to '.template.config',
|
|
||||||
removing any earlier output at that location
|
|
||||||
-->
|
|
||||||
<RemoveDir Directories="%(_TemplateConfigFileToCopy.DestDir)" />
|
|
||||||
<Copy SourceFiles="%(_TemplateConfigFileToCopy.Identity)" DestinationFolder="%(_TemplateConfigFileToCopy.DestDir)" />
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Modify the .json files in the .template.config dirs to stamp MSBuild properties into them
|
|
||||||
-->
|
|
||||||
<ItemGroup>
|
|
||||||
<GeneratedContent Include="@(_TemplateConfigFileToCopy->WithMetadataValue('Extension','.json'))">
|
|
||||||
<OutputPath>%(DestDir)%(RecursiveDir)%(Filename)%(Extension)</OutputPath>
|
|
||||||
<Properties>$(GeneratedContentProperties)</Properties>
|
|
||||||
</GeneratedContent>
|
|
||||||
</ItemGroup>
|
|
||||||
<GenerateFileFromTemplate
|
|
||||||
TemplateFile="%(GeneratedContent.Identity)"
|
|
||||||
Properties="%(GeneratedContent.Properties)"
|
|
||||||
OutputPath="%(GeneratedContent.OutputPath)">
|
|
||||||
|
|
||||||
<Output TaskParameter="OutputPath" ItemName="FileWrites" />
|
|
||||||
<Output TaskParameter="OutputPath" ItemName="Content" />
|
|
||||||
</GenerateFileFromTemplate>
|
|
||||||
</Target>
|
|
||||||
</Project>
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
|
||||||
<metadata>
|
|
||||||
$CommonMetadataElements$
|
|
||||||
<packageTypes>
|
|
||||||
<packageType name="Template" />
|
|
||||||
</packageTypes>
|
|
||||||
</metadata>
|
|
||||||
<files>
|
|
||||||
$CommonFileElements$
|
|
||||||
<file
|
|
||||||
src="content/**"
|
|
||||||
exclude="**/bin/**;**/obj/**;**/.template.config.src/**;content/Directory.Build.props;content/Directory.Build.targets;"
|
|
||||||
target="Content" />
|
|
||||||
</files>
|
|
||||||
</package>
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
|
||||||
<LangVersion>7.3</LangVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
<TargetFramework>netstandard2.1</TargetFramework>
|
||||||
<Description>Provides experimental support for validation using DataAnnotations.</Description>
|
<Description>Provides experimental support for validation using DataAnnotations.</Description>
|
||||||
<IsShippingPackage>true</IsShippingPackage>
|
<IsShippingPackage>true</IsShippingPackage>
|
||||||
<HasReferenceAssembly>false</HasReferenceAssembly>
|
<HasReferenceAssembly>false</HasReferenceAssembly>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
<TargetFramework>netstandard2.1</TargetFramework>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<ReferenceBlazorBuildLocally>true</ReferenceBlazorBuildLocally>
|
<ReferenceBlazorBuildLocally>true</ReferenceBlazorBuildLocally>
|
||||||
<RazorLangVersion>3.0</RazorLangVersion>
|
<RazorLangVersion>3.0</RazorLangVersion>
|
||||||
|
|
@ -11,17 +11,4 @@
|
||||||
<Reference Include="Microsoft.AspNetCore.Blazor" />
|
<Reference Include="Microsoft.AspNetCore.Blazor" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<GetCurrentProjectStaticWebAssetsDependsOn>
|
|
||||||
$(GetCurrentProjectStaticWebAssetsDependsOn);
|
|
||||||
_ClearCurrentStaticWebAssetsForReferenceDiscovery
|
|
||||||
</GetCurrentProjectStaticWebAssetsDependsOn>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<Target Name="_ClearCurrentStaticWebAssetsForReferenceDiscovery">
|
|
||||||
<ItemGroup>
|
|
||||||
<StaticWebAsset Remove="@(StaticWebAsset)" Condition="'%(SourceType)' == ''" />
|
|
||||||
</ItemGroup>
|
|
||||||
</Target>
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
|
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
|
||||||
|
<!-- This is so that we add the FrameworkReference to Microsoft.AspNetCore.App -->
|
||||||
|
<UseLatestAspNetCoreReference>true</UseLatestAspNetCoreReference>
|
||||||
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
@ -10,8 +13,6 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Microsoft.AspNetCore.Blazor.Server" />
|
<Reference Include="Microsoft.AspNetCore.Blazor.Server" />
|
||||||
<Reference Include="Microsoft.AspNetCore" />
|
|
||||||
<Reference Include="Microsoft.Extensions.Hosting" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
<TargetFramework>netstandard2.1</TargetFramework>
|
||||||
<ReferenceBlazorBuildLocally>true</ReferenceBlazorBuildLocally>
|
<ReferenceBlazorBuildLocally>true</ReferenceBlazorBuildLocally>
|
||||||
<RazorLangVersion>3.0</RazorLangVersion>
|
<RazorLangVersion>3.0</RazorLangVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
|
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
|
||||||
|
<!-- This is so that we add the FrameworkReference to Microsoft.AspNetCore.App -->
|
||||||
|
<UseLatestAspNetCoreReference>true</UseLatestAspNetCoreReference>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
@ -9,9 +11,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Microsoft.AspNetCore" />
|
|
||||||
<Reference Include="Microsoft.AspNetCore.Blazor.Server" />
|
<Reference Include="Microsoft.AspNetCore.Blazor.Server" />
|
||||||
<Reference Include="Microsoft.Extensions.Hosting" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk.Razor" TreatAsLocalProperty="BlazorLinkOnBuild">
|
<Project Sdk="Microsoft.NET.Sdk.Razor" TreatAsLocalProperty="BlazorLinkOnBuild">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
<TargetFramework>netstandard2.1</TargetFramework>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
<BlazorLinkOnBuild>false</BlazorLinkOnBuild>
|
<BlazorLinkOnBuild>false</BlazorLinkOnBuild>
|
||||||
<OutputType>exe</OutputType>
|
<OutputType>exe</OutputType>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
<TargetFramework>netstandard2.1</TargetFramework>
|
||||||
<ReferenceBlazorBuildLocally>true</ReferenceBlazorBuildLocally>
|
<ReferenceBlazorBuildLocally>true</ReferenceBlazorBuildLocally>
|
||||||
<RazorLangVersion>3.0</RazorLangVersion>
|
<RazorLangVersion>3.0</RazorLangVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue