From 11ac23c65d595657d728a8eb61ac1a24c4fb66a7 Mon Sep 17 00:00:00 2001
From: Pranav K <prkrishn@hotmail.com>
Date: Mon, 8 Jun 2020 17:44:13 -0700
Subject: [PATCH] Changes per PR

---
 .azure/pipelines/blazor-daily-tests.yml       | 59 -------------------
 .azure/pipelines/ci.yml                       |  2 +
 .azure/pipelines/jobs/default-build.yml       |  7 +++
 ...oft.Authentication.WebAssembly.Msal.csproj |  3 -
 .../testassets/Directory.Build.props          |  6 --
 .../Driver/Wasm.Performance.Driver.csproj     |  1 -
 .../Wasm.Performance/benchmarks.compose.json  |  4 +-
 .../benchmarkapps/Wasm.Performance/dockerfile |  2 +-
 ...soft.AspNetCore.Components.E2ETests.csproj |  3 -
 .../test/E2ETest/e2eTestSettings.json         |  2 +-
 10 files changed, 13 insertions(+), 76 deletions(-)
 delete mode 100644 .azure/pipelines/blazor-daily-tests.yml
 delete mode 100644 src/Components/WebAssembly/testassets/Directory.Build.props

diff --git a/.azure/pipelines/blazor-daily-tests.yml b/.azure/pipelines/blazor-daily-tests.yml
deleted file mode 100644
index 537751bfed6..00000000000
--- a/.azure/pipelines/blazor-daily-tests.yml
+++ /dev/null
@@ -1,59 +0,0 @@
-# Uses Scheduled Triggers, which aren't supported in YAML yet.
-# https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers?view=vsts&tabs=yaml#scheduled
-
-# Daily Tests for Blazor
-# These use Sauce Labs resources, hence they run daily rather than per-commit.
-
-# We just need one Windows machine because all it does is trigger SauceLabs.
-variables:
-  SAUCE_CONNECT_DOWNLOAD_ON_INSTALL: true
-  E2ETESTS_SauceTest: true
-  E2ETESTS_Sauce__TunnelIdentifier: 'blazor-e2e-sc-proxy-tunnel'
-  E2ETESTS_Sauce__HostName: 'sauce.local'
-jobs:
-- template: jobs/default-build.yml
-  parameters:
-    buildDirectory: src/Components
-    isTestingJob: true
-    agentOs: Windows
-    jobName: BlazorDailyTests
-    jobDisplayName: "Blazor Daily Tests"
-    afterBuild:
-
-    # macOS/Safari
-    - script: 'dotnet test --filter "StandaloneAppTest"'
-      workingDirectory: 'src/Components/test/E2ETest'
-      displayName: 'Run Blazor tests - macOS/Safari'
-      condition: succeededOrFailed()
-      env:
-        # Secrets need to be explicitly mapped to env variables.
-        E2ETESTS_Sauce__Username: '$(asplab-sauce-labs-username)'
-        E2ETESTS_Sauce__AccessKey: '$(asplab-sauce-labs-access-key)'
-        # Set platform/browser configuration.
-        E2ETESTS_Sauce__TestName: 'Blazor Daily Tests - macOS/Safari'
-        E2ETESTS_Sauce__PlatformName: 'macOS 10.14'
-        E2ETESTS_Sauce__BrowserName: 'Safari'
-        # Need to explicitly set version here because some older versions don't support timeouts in Safari.
-        E2ETESTS_Sauce__SeleniumVersion: '3.4.0'
-
-    # Android/Chrome
-    - script: 'dotnet test --filter "StandaloneAppTest"'
-      workingDirectory: 'src/Components/test/E2ETest'
-      displayName: 'Run Blazor tests - Android/Chrome'
-      condition: succeededOrFailed()
-      env:
-        # Secrets need to be explicitly mapped to env variables.
-        E2ETESTS_Sauce__Username: '$(asplab-sauce-labs-username)'
-        E2ETESTS_Sauce__AccessKey: '$(asplab-sauce-labs-access-key)'
-        # Set platform/browser configuration.
-        E2ETESTS_Sauce__TestName: 'Blazor Daily Tests - Android/Chrome'
-        E2ETESTS_Sauce__PlatformName: 'Android'
-        E2ETESTS_Sauce__PlatformVersion: '10.0'
-        E2ETESTS_Sauce__BrowserName: 'Chrome'
-        E2ETESTS_Sauce__DeviceName: 'Android GoogleAPI Emulator'
-        E2ETESTS_Sauce__DeviceOrientation: 'portrait'
-        E2ETESTS_Sauce__AppiumVersion: '1.9.1'
-    artifacts:
-    - name: Windows_Logs
-      path: ../../artifacts/log/
-      publishOnError: true
\ No newline at end of file
diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml
index 87d067bb569..cadffb60647 100644
--- a/.azure/pipelines/ci.yml
+++ b/.azure/pipelines/ci.yml
@@ -664,6 +664,8 @@ stages:
       vmImage: 'ubuntu-16.04'
     variables:
       DotNetCoreSdkDir: $(Agent.ToolsDirectory)/dotnet
+      # This isn't needed in the path because build does not need to _use_ global tools.
+      DOTNET_CLI_HOME: $(System.DefaultWorkingDirectory)
       DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: true
     steps:
     - script: |
diff --git a/.azure/pipelines/jobs/default-build.yml b/.azure/pipelines/jobs/default-build.yml
index 700b0cd7d05..302f36d3e15 100644
--- a/.azure/pipelines/jobs/default-build.yml
+++ b/.azure/pipelines/jobs/default-build.yml
@@ -113,6 +113,7 @@ jobs:
     - _BuildConfig: ${{ parameters.configuration }}
     - BuildConfiguration: ${{ parameters.configuration }}
     - BuildDirectory: ${{ parameters.buildDirectory }}
+    - DOTNET_CLI_HOME: $(System.DefaultWorkingDirectory)
     - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
     - TeamName: AspNetCore
     - ${{ if and(eq(parameters.installJdk, 'true'), eq(parameters.agentOs, 'Windows')) }}:
@@ -155,6 +156,12 @@ jobs:
     - ${{ if and(eq(parameters.installTar, 'true'), eq(parameters.agentOs, 'Windows')) }}:
       - powershell: ./eng/scripts/InstallTar.ps1
         displayName: Find or install Tar
+    - ${{ if eq(parameters.agentOs, 'Windows') }}:
+      - powershell: Write-Host "##vso[task.prependpath]$(DOTNET_CLI_HOME)\.dotnet\tools"
+        displayName: Add dotnet tools to path
+    - ${{ if ne(parameters.agentOs, 'Windows') }}:
+      - script: echo "##vso[task.prependpath]$(DOTNET_CLI_HOME)/.dotnet/tools"
+        displayName: Add dotnet tools to path
 
     - ${{ parameters.beforeBuild }}
 
diff --git a/src/Components/WebAssembly/Authentication.Msal/src/Microsoft.Authentication.WebAssembly.Msal.csproj b/src/Components/WebAssembly/Authentication.Msal/src/Microsoft.Authentication.WebAssembly.Msal.csproj
index e74311cb938..36eec6b93a8 100644
--- a/src/Components/WebAssembly/Authentication.Msal/src/Microsoft.Authentication.WebAssembly.Msal.csproj
+++ b/src/Components/WebAssembly/Authentication.Msal/src/Microsoft.Authentication.WebAssembly.Msal.csproj
@@ -5,10 +5,7 @@
   <PropertyGroup>
     <TargetFramework>netstandard2.1</TargetFramework>
     <Description>Authenticate your Blazor webassembly applications with Azure Active Directory and Azure Active Directory B2C</Description>
-    <IsShippingPackage>true</IsShippingPackage>
-    <HasReferenceAssembly>false</HasReferenceAssembly>
     <RazorLangVersion>3.0</RazorLangVersion>
-    <GenerateDocumentationFile>true</GenerateDocumentationFile>
   </PropertyGroup>
 
   <ItemGroup>
diff --git a/src/Components/WebAssembly/testassets/Directory.Build.props b/src/Components/WebAssembly/testassets/Directory.Build.props
deleted file mode 100644
index 4f91e12ae4c..00000000000
--- a/src/Components/WebAssembly/testassets/Directory.Build.props
+++ /dev/null
@@ -1,6 +0,0 @@
-<Project>
-  <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" />
-  <PropertyGroup>
-    <IsPackable>false</IsPackable>
-  </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/src/Components/benchmarkapps/Wasm.Performance/Driver/Wasm.Performance.Driver.csproj b/src/Components/benchmarkapps/Wasm.Performance/Driver/Wasm.Performance.Driver.csproj
index 6a080c57333..beeac56bcdb 100644
--- a/src/Components/benchmarkapps/Wasm.Performance/Driver/Wasm.Performance.Driver.csproj
+++ b/src/Components/benchmarkapps/Wasm.Performance/Driver/Wasm.Performance.Driver.csproj
@@ -3,7 +3,6 @@
   <PropertyGroup>
     <TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
 
-    <UseLatestAspNetCoreReference>true</UseLatestAspNetCoreReference>
     <OutputType>exe</OutputType>
 
     <!-- WebDriver is not strong-named, so this test project cannot be strong named either. -->
diff --git a/src/Components/benchmarkapps/Wasm.Performance/benchmarks.compose.json b/src/Components/benchmarkapps/Wasm.Performance/benchmarks.compose.json
index 442346e79cd..9e4f4cac71c 100644
--- a/src/Components/benchmarkapps/Wasm.Performance/benchmarks.compose.json
+++ b/src/Components/benchmarkapps/Wasm.Performance/benchmarks.compose.json
@@ -11,11 +11,11 @@
     "blazorwasmbenchmark": {
       "source": {
         "repository": "https://github.com/dotnet/AspNetCore.git",
-        "branchOrCommit": "blazor-wasm",
+        "branchOrCommit": "release/3.1",
         "dockerfile": "src/Components/benchmarkapps/Wasm.Performance/dockerfile"
       },
       "buildArguments": [
-        "gitBranch=blazor-wasm"
+        "gitBranch=release/3.1"
       ],
       "waitForExit": true,
       "readyStateText": "Application started."
diff --git a/src/Components/benchmarkapps/Wasm.Performance/dockerfile b/src/Components/benchmarkapps/Wasm.Performance/dockerfile
index 843a0eed216..e4c132e455e 100644
--- a/src/Components/benchmarkapps/Wasm.Performance/dockerfile
+++ b/src/Components/benchmarkapps/Wasm.Performance/dockerfile
@@ -12,7 +12,7 @@ RUN apt-get update \
     nodejs \
     git
 
-ARG gitBranch=blazor-wasm
+ARG gitBranch=release/3.1
 
 WORKDIR /src
 ADD https://api.github.com/repos/dotnet/aspnetcore/git/ref/heads/${gitBranch} /aspnetcore.commit
diff --git a/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj b/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj
index 6869d34f780..abfdec36e1e 100644
--- a/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj
+++ b/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj
@@ -7,9 +7,6 @@
     <TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
     <TestGroupName>Components.E2ETests</TestGroupName>
 
-    <!-- This is so that we add the FrameworkReference to Microsoft.AspNetCore.App -->
-    <UseLatestAspNetCoreReference>true</UseLatestAspNetCoreReference>
-
     <!-- https://github.com/aspnet/AspNetCore/issues/6857 -->
     <BuildHelixPayload>false</BuildHelixPayload>
 
diff --git a/src/Components/test/E2ETest/e2eTestSettings.json b/src/Components/test/E2ETest/e2eTestSettings.json
index 1a7155db309..809f33f0465 100644
--- a/src/Components/test/E2ETest/e2eTestSettings.json
+++ b/src/Components/test/E2ETest/e2eTestSettings.json
@@ -1,4 +1,4 @@
 {
   "DefaultWaitTimeoutInSeconds": 20,
-  "ScreenShotsPath": "../../screenshots",
+  "ScreenShotsPath": "../../screenshots"
 }
-- 
GitLab