diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index 02082f03bd..cb73aafae5 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -13,34 +13,36 @@ jobs: jobName: Windows_Build jobDisplayName: "Build and test: Windows" agentOs: Windows + buildScript: ./eng/scripts/cibuild.cmd beforeBuild: - - powershell: "& ./src/IISIntegration/tools/UpdateIISExpressCertificate.ps1; & ./src/IISIntegration/tools/update_schema.ps1" + - powershell: "& ./src/Servers/IIS/tools/UpdateIISExpressCertificate.ps1; & ./src/Servers/IIS/tools/update_schema.ps1" displayName: Setup IISExpress test certificates and schema + buildArgs: "/p:SkipIISBackwardsCompatibilityTests=true /p:SkipIISTests=true /p:SkipIISExpressTests=true /p:SkipIISForwardsCompatibilityTests=true" +- template: jobs/default-build.yml + parameters: + jobName: MacOs_Build + jobDisplayName: "Build and test: macOS" + agentOs: macOs + buildScript: ./eng/scripts/cibuild.sh +- template: jobs/default-build.yml + parameters: + jobName: Linux_Build + jobDisplayName: "Build and test: Linux" + agentOs: Linux + buildScript: ./eng/scripts/cibuild.sh - template: jobs/iisintegration-job.yml parameters: TestGroupName: IIS - SkipIISTests: false - SkipIISExpressTests: true - SkipIISForwardsCompatibilityTests: true - SkipIISBackwardsCompatibilityTests: true + skipArgs: " /p:SkipIISBackwardsCompatibilityTests=true /p:SkipIISTests=false /p:SkipIISExpressTests=true /p:SkipIISForwardsCompatibilityTests=true" - template: jobs/iisintegration-job.yml parameters: TestGroupName: IISExpress - SkipIISTests: true - SkipIISExpressTests: false - SkipIISForwardsCompatibilityTests: true - SkipIISBackwardsCompatibilityTests: true + skipArgs: "/p:SkipIISBackwardsCompatibilityTests=true /p:SkipIISTests=true /p:SkipIISExpressTests=false /p:SkipIISForwardsCompatibilityTests=true" - template: jobs/iisintegration-job.yml parameters: TestGroupName: IISForwardCompat - SkipIISTests: true - SkipIISExpressTests: true - SkipIISForwardsCompatibilityTests: false - SkipIISBackwardsCompatibilityTests: true + skipArgs: "/p:SkipIISBackwardsCompatibilityTests=true /p:SkipIISTests=true /p:SkipIISExpressTests=true /p:SkipIISForwardsCompatibilityTests=false" - template: jobs/iisintegration-job.yml parameters: TestGroupName: IISBackCompat - SkipIISTests: true - SkipIISExpressTests: true - SkipIISForwardsCompatibilityTests: true - SkipIISBackwardsCompatibilityTests: false + skipArgs: "/p:SkipIISBackwardsCompatibilityTests=false /p:SkipIISTests=true /p:SkipIISExpressTests=true /p:SkipIISForwardsCompatibilityTests=true" \ No newline at end of file diff --git a/.azure/pipelines/jobs/default-build.yml b/.azure/pipelines/jobs/default-build.yml index 1ed9dd4501..234e7c00c2 100644 --- a/.azure/pipelines/jobs/default-build.yml +++ b/.azure/pipelines/jobs/default-build.yml @@ -27,14 +27,14 @@ # A map of custom variables # matrix: { string: { string: string } } # A map of matrix configurations and variables. https://docs.microsoft.com/en-us/vsts/pipelines/yaml-schema?view=vsts#matrix -# demands: string | [ string ] -# A list of agent demands. https://docs.microsoft.com/en-us/vsts/pipelines/yaml-schema?view=vsts#demands # dependsOn: string | [ string ] # For fan-out/fan-in. https://docs.microsoft.com/en-us/vsts/pipelines/yaml-schema?view=vsts#phase # codeSign: boolean # This build definition is enabled for code signing. (Only applies to Windows) # buildDirectory: string # Specifies what directory to run build.sh/cmd +# buildScript: string +# Specifies the build script to run. Defaults to build.sh or build.cmd. # # See https://docs.microsoft.com/en-us/vsts/pipelines/yaml-schema for details @@ -45,7 +45,6 @@ parameters: poolName: '' buildArgs: '' configuration: 'Release' - demands: [] beforeBuild: [] afterBuild: [] codeSign: false @@ -58,6 +57,7 @@ parameters: publish: true path: 'artifacts/' buildDirectory: '' + buildScript: '' jobs: - job: ${{ coalesce(parameters.jobName, parameters.agentOs) }} @@ -71,6 +71,7 @@ jobs: maxParallel: 8 matrix: ${{ parameters.matrix }} # Map friendly OS names to the right queue + # See https://github.com/dotnet/arcade/blob/master/Documentation/ChoosingAMachinePool.md pool: ${{ if ne(parameters.poolName, '') }}: name: ${{ parameters.poolName }} @@ -81,48 +82,59 @@ jobs: name: Hosted Ubuntu 1604 vmImage: ubuntu-16.04 ${{ if and(eq(parameters.poolName, ''), eq(parameters.agentOs, 'Windows')) }}: - ${{ if ne(parameters.codeSign, 'true') }}: - name: Hosted VS2017 - vmImage: vs2017-win2016 - ${{ if eq(parameters.codeSign, 'true') }}: - name: DotNetCore-Windows + ${{ if eq(variables['System.TeamProject'], 'internal') }}: + name: dotnet-internal-temp + ${{ if ne(variables['System.TeamProject'], 'internal') }}: + name: dotnet-external-temp variables: AgentOsName: ${{ parameters.agentOs }} ASPNETCORE_TEST_LOG_MAXPATH: "200" # Keep test log file name length low enough for artifact zipping - DOTNET_HOME: $(Agent.WorkFolder)/.dotnet + DOTNET_HOME: $(Agent.BuildDirectory)/.dotnet + BuildScript: ${{ parameters.buildScript }} BuildScriptArgs: ${{ parameters.buildArgs }} BuildConfiguration: ${{ parameters.configuration }} BuildDirectory: ${{ parameters.buildDirectory }} - VSTS_OVERWRITE_TEMP: false # Workaround for https://github.com/dotnet/core-eng/issues/2812 - ${{ if eq(parameters.codeSign, 'true') }}: + ${{ if eq(parameters.agentOs, 'Windows') }}: + JAVA_HOME: $(Agent.BuildDirectory)\.tools\jdk + ${{ if or(ne(parameters.codeSign, 'true'), ne(variables['System.TeamProject'], 'internal')) }}: + _SignType: + ${{ if and(eq(parameters.codeSign, 'true'), eq(variables['System.TeamProject'], 'internal')) }}: TeamName: AspNetCore _SignType: real - ${{ if ne(parameters.codeSign, 'true') }}: - _SignType: ${{ insert }}: ${{ parameters.variables }} steps: - checkout: self clean: true - task: NodeTool@0 + displayName: Install Node 10.x inputs: versionSpec: 10.x - - ${{ if and(eq(parameters.agentOs, 'Windows'), eq(parameters.codeSign, 'true')) }}: + - ${{ if eq(parameters.agentOs, 'Windows') }}: + - powershell: ./eng/scripts/InstallJdk.ps1 '11.0.1' + displayName: Install JDK 11 + - ${{ if and(eq(variables['System.TeamProject'], 'internal'), eq(parameters.agentOs, 'Windows'), eq(parameters.codeSign, 'true')) }}: - task: MicroBuildSigningPlugin@1 displayName: Install MicroBuild Signing plugin condition: and(succeeded(), in(variables['_SignType'], 'test', 'real')) inputs: signType: $(_SignType) zipSources: false + feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json - ${{ parameters.beforeBuild }} - - ${{ if eq(parameters.agentOs, 'Windows') }}: - - script: .\$(BuildDirectory)\build.cmd -ci /p:SignType=$(_SignType) /p:Configuration=$(BuildConfiguration) $(BuildScriptArgs) - displayName: Run build.cmd - - ${{ if ne(parameters.agentOs, 'Windows') }}: - - script: ./$(BuildDirectory)/build.sh -ci -p:Configuration=$(BuildConfiguration) $(BuildScriptArgs) - displayName: Run build.sh + - ${{ if eq(parameters.buildScript, '') }}: + - ${{ if eq(parameters.agentOs, 'Windows') }}: + - script: .\$(BuildDirectory)\build.cmd -ci /p:SignType=$(_SignType) /p:Configuration=$(BuildConfiguration) $(BuildScriptArgs) + displayName: Run build.cmd + - ${{ if ne(parameters.agentOs, 'Windows') }}: + - script: ./$(BuildDirectory)/build.sh -ci -p:Configuration=$(BuildConfiguration) $(BuildScriptArgs) + displayName: Run build.sh + - ${{ if ne(parameters.buildScript, '') }}: + - script: $(BuildScript) /p:Configuration=$(BuildConfiguration) $(BuildScriptArgs) + displayName: run $(BuildScript) - task: PublishTestResults@2 displayName: Publish test results condition: always() + continueOnError: true inputs: testRunTitle: $(AgentOsName)-$(BuildConfiguration) testRunner: vstest @@ -132,6 +144,7 @@ jobs: - task: PublishBuildArtifacts@1 displayName: Upload artifacts condition: eq(variables['system.pullrequest.isfork'], false) + continueOnError: true inputs: ${{ if eq(parameters.buildDirectory, '') }}: pathtoPublish: ${{ parameters.artifacts.path }} @@ -144,7 +157,7 @@ jobs: artifactType: Container parallel: true - ${{ parameters.afterBuild }} - - ${{ if and(eq(parameters.agentOs, 'Windows'), eq(parameters.codeSign, 'true')) }}: + - ${{ if and(eq(variables['System.TeamProject'], 'internal'), eq(parameters.agentOs, 'Windows')) }}: - task: MicroBuildCleanup@1 displayName: Cleanup MicroBuild tasks condition: always() diff --git a/.azure/pipelines/jobs/iisintegration-job.yml b/.azure/pipelines/jobs/iisintegration-job.yml index 01ce2d0ebe..3ee3a2a307 100644 --- a/.azure/pipelines/jobs/iisintegration-job.yml +++ b/.azure/pipelines/jobs/iisintegration-job.yml @@ -1,22 +1,14 @@ jobs: - template: default-build.yml parameters: + buildScript: ./build.cmd + buildArgs: "-ci -restore -build -test -projects src/Servers/IIS/**/*.csproj ${{ parameters.skipArgs }}" beforeBuild: - - powershell: "& ./src/IISIntegration/tools/UpdateIISExpressCertificate.ps1; & ./src/IISIntegration/tools/update_schema.ps1; & ./src/IISIntegration/tools/SetupTestEnvironment.ps1 Setup" + - powershell: "& ./src/Servers/IIS/tools/UpdateIISExpressCertificate.ps1; & ./src/Servers/IIS/tools/update_schema.ps1; & ./src/Servers/IIS/tools/SetupTestEnvironment.ps1 Setup" displayName: Prepare repo afterBuild: - - powershell: "& ./src/IISIntegration/tools/SetupTestEnvironment.ps1 Shutdown" + - powershell: "& ./src/Servers/IIS/tools/SetupTestEnvironment.ps1 Shutdown" displayName: Stop AppVerifier condition: always() - - task: PublishBuildArtifacts@1 - displayName: Upload logs - condition: eq(variables['system.pullrequest.isfork'], false) - inputs: - artifactName: logs - artifactType: Container - pathtoPublish: src/IISIntegration/artifacts/logs - buildDirectory: src/IISIntegration - buildArgs: "/p:SkipIISBackwardsCompatibilityTests=${{ parameters.SkipIISBackwardsCompatibilityTests }} /p:SkipIISTests=${{ parameters.SkipIISTests }} /p:SkipIISExpressTests=${{ parameters.SkipIISExpressTests }} /p:SkipIISForwardsCompatibilityTests=${{ parameters.SkipIISBackwardsCompatibilityTests }}" - jobName: IISIntegration_${{ parameters.TestGroupName }} - jobDisplayName: IISIntegration_${{ parameters.TestGroupName }} - + jobName: ANCM_${{ parameters.TestGroupName }} + jobDisplayName: "Build and test: ANCM ${{ parameters.TestGroupName }}" diff --git a/.azure/pipelines/pr-validation-temp.yml b/.azure/pipelines/pr-validation-temp.yml index b190d7c0c4..218598aaeb 100644 --- a/.azure/pipelines/pr-validation-temp.yml +++ b/.azure/pipelines/pr-validation-temp.yml @@ -15,16 +15,24 @@ jobs: jobName: Windows_Build jobDisplayName: "Build only : Windows" agentOs: Windows - buildArgs: '/p:SkipTests=true' + buildArgs: -all -pack - template: jobs/default-build.yml parameters: jobName: macOs_Build jobDisplayName: "Build only : macOS" agentOs: macOS - buildArgs: '/p:SkipTests=true' + buildArgs: --all --pack - template: jobs/default-build.yml parameters: jobName: Linux_Build jobDisplayName: "Build only : Linux" agentOs: Linux - buildArgs: '/p:SkipTests=true' + buildArgs: --all --pack +- job: Code_check + displayName: Code check + workspace: + clean: all + pool: + vmImage: vs2017-win2016 + steps: + - powershell: ./eng/scripts/CodeCheck.ps1 -ci diff --git a/.azure/pipelines/site-extensions.yml b/.azure/pipelines/site-extensions.yml index c909102670..3d1359e56a 100644 --- a/.azure/pipelines/site-extensions.yml +++ b/.azure/pipelines/site-extensions.yml @@ -29,13 +29,13 @@ phases: inputs: signType: $(_SignType) zipSources: false - - script: src/SiteExtensions/build.cmd -ci - displayName: Run src/SiteExtensions/build.cmd + - script: src/SiteExtensions/LoggingAggregate/build.cmd -ci + displayName: Run src/SiteExtensions/LoggingAggregate/build.cmd - task: PublishBuildArtifacts@1 displayName: Upload artifacts condition: eq(variables['system.pullrequest.isfork'], false) inputs: - pathtoPublish: ./src/SiteExtensions/artifacts/ + pathtoPublish: ./src/SiteExtensions/LoggingAggregate/artifacts/ artifactName: artifacts-Windows-Release artifactType: Container - task: MicroBuildCleanup@1 diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000000..7594b269a8 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,11 @@ +# Users referenced in this file will automatically be requested as reviewers for PRs that modify the given paths. +# See https://help.github.com/articles/about-code-owners/ + +/build/ @natemcmaster +/eng/ @natemcmaster +/src/DefaultBuilder/ @tratcher +/src/Hosting/ @tratcher +/src/Http/ @tratcher +/src/Middleware/ @tratcher +/src/Security/ @tratcher +/src/Servers/ @tratcher diff --git a/.gitignore b/.gitignore index f65b085bce..469825be56 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ bin/ obj/ .vs/ +.vscode/ *.suo *.user _ReSharper.* @@ -28,3 +29,6 @@ src/**/global.json launchSettings.json BenchmarkDotNet.Artifacts/ korebuild-lock.txt +.gradle/ +src/SignalR/clients/**/dist/ +modules/ diff --git a/.gitmodules b/.gitmodules index ff5d81656b..964aad14a7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "src/IISIntegration/test/gtest/googletest"] - path = src/IISIntegration/test/gtest/googletest +[submodule "googletest"] + path = src/submodules/googletest url = https://github.com/google/googletest diff --git a/Directory.Build.props b/Directory.Build.props index eb0f47403f..a213e4ada3 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -9,6 +9,9 @@ .NET Foundation © Microsoft Corporation. All rights reserved. en-US + + + https://raw.githubusercontent.com/aspnet/AspNetCore/2.0.0/LICENSE.txt Apache-2.0 @@ -28,19 +31,28 @@ true true - $(MSBuildThisFileDirectory) - https://github.com/aspnet/AspNetCore - git + false + true $(Product) $(PackageVersion) Shared Framework Shared Framework for hosting of Microsoft ASP.NET Core applications. It is open source, cross-platform and is supported by Microsoft. We hope you enjoy using it! If you do, please consider joining the active community of developers that are contributing to the project on GitHub ($(RepositoryUrl)). We happily accept issues and PRs. - + + + $(MSBuildThisFileDirectory) + https://github.com/aspnet/AspNetCore + git + $(MSBuildThisFileDirectory)src\Shared\ + $(RepositoryRoot)src\submodules\googletest\ + + + $(MSBuildThisFileDirectory)eng\AspNetCore.snk true true + Debug SHA256 @@ -64,33 +76,42 @@ - + - $(RepositoryRoot)artifacts\ + $(MSBuildThisFileDirectory)artifacts\ $(ArtifactsDir)obj\ - Debug $(ArtifactsDir)$(Configuration)\ - $(ArtifactsConfigurationDir)bin\ + $(ArtifactsConfigurationDir)packages\ + $(BasePackageOutputPath)product\ + $(BasePackageOutputPath)internal\ $(ArtifactsConfigurationDir)installers\ - $(ArtifactsDir)build\ + + + $(RepositoryRoot)bin\$(Configuration)\$(MSBuildProjectName)\ + $(BaseOutputPath) + $(RepositoryRoot)obj\$(MSBuildProjectName)\ + $(BaseIntermediateOutputPath)$(Configuration)\ + $(OutputPath)$(Platform)\ + $(IntermediateOutputPath)$(Platform)\ + + + + $([MSBuild]::MakeRelative($(RepositoryRoot), $(MSBuildProjectDirectory))) - true + true true true true - - false - true - - $(MSBuildThisFileDirectory)src\Shared\ - - true + true + + - netcoreapp2.2;net461 + + $(MSBuildThisFileDirectory)src\Mvc\src\Microsoft.AspNetCore.Mvc.Testing\Microsoft.AspNetCore.Mvc.Testing.targets @@ -100,5 +121,6 @@ + diff --git a/Directory.Build.targets b/Directory.Build.targets index 47fc0c1fb9..de6e19d8e2 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,5 +1,17 @@ + + + + false + + $(ProductPackageOutputPath) + $(InternalPackageOutputPath) + + $(AssemblyName) false @@ -22,7 +34,8 @@ - $(BaselinePackageVersion).0 + $(BaselinePackageVersion.Substring(0, $(BaselinePackageVersion.IndexOf('-')))).0 + $(BaselinePackageVersion).0 true + + true + false @@ -45,14 +61,13 @@ true false - $(MicrosoftNETCoreApp20PackageVersion) - $(MicrosoftNETCoreApp21PackageVersion) - $(MicrosoftNETCoreApp22PackageVersion) - $(MicrosoftNETCoreApp30PackageVersion) - $(NETStandardLibrary20PackageVersion) + $(MicrosoftNETCoreAppPackageVersion) + + + diff --git a/build.cmd b/build.cmd index c0050bda12..b6c8d24864 100644 --- a/build.cmd +++ b/build.cmd @@ -1,2 +1,2 @@ @ECHO OFF -PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0run.ps1' default-build %*; exit $LASTEXITCODE" +PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0build.ps1' %*; exit $LASTEXITCODE" diff --git a/build.ps1 b/build.ps1 new file mode 100644 index 0000000000..fc4830731a --- /dev/null +++ b/build.ps1 @@ -0,0 +1,276 @@ +#requires -version 5 + +<# +.SYNOPSIS +Builds this repository. + +.DESCRIPTION +This build script installs required tools and runs an MSBuild command on this repository. +This script can be used to invoke various targets, such as targets to produce packages, +build projects, run tests, and generate code. + +.PARAMETER RepoPath +The folder to build. Defaults to the folder containing this script. This will be removed soon. + +.PARAMETER CI +Sets up CI specific settings and variables. + +.PARAMETER Restore +Run restore on projects. + +.PARAMETER Build +Compile projects. + +.PARAMETER Pack +Produce packages. + +.PARAMETER Test +Run tests. + +.PARAMETER Sign +Run code signing. + +.PARAMETER Projects +A list of projects to build. Globbing patterns are supported, such as "$(pwd)/**/*.csproj" + +.PARAMETER All +Build all project types. + +.PARAMETER Managed +Build managed projects (C#, F#, VB). + +.PARAMETER Native +Build native projects (C++). + +.PARAMETER NodeJS +Build NodeJS projects (TypeScript, JS). + +.PARAMETER Installers +Build Windows Installers. Required .NET 3.5 to be installed (WiX toolset requirement). + +.PARAMETER MSBuildArguments +Additional MSBuild arguments to be passed through. + +.EXAMPLE +Building both native and managed projects. + + build.ps1 -managed -native + +.EXAMPLE +Building a subfolder of code. + + build.ps1 "$(pwd)/src/SomeFolder/**/*.csproj" + +.EXAMPLE +Running tests. + + build.ps1 -test + +.LINK +Online version: https://github.com/aspnet/AspNetCore/blob/master/docs/BuildFromSource.md +#> +[CmdletBinding(PositionalBinding = $false, DefaultParameterSetName='Groups')] +param( + # Bootstrapper options + [Obsolete('This parameter will be removed when we finish https://github.com/aspnet/AspNetCore/issues/4246')] + [string]$RepoRoot = $PSScriptRoot, + + [switch]$CI, + + # Build lifecycle options + [switch]$Restore = $True, # Run tests + [switch]$Build = $True, # Compile + [switch]$Pack, # Produce packages + [switch]$Test, # Run tests + [switch]$Sign, # Code sign + + # Project selection + [Parameter(ParameterSetName = 'All')] + [switch]$All, # Build everything + + # A list of projects which should be built. + [Parameter(ParameterSetName = 'Projects')] + [string]$Projects, + + # Build a specified set of project groups + [Parameter(ParameterSetName = 'Groups')] + [switch]$Managed, + [Parameter(ParameterSetName = 'Groups')] + [switch]$Native, + [Parameter(ParameterSetName = 'Groups')] + [switch]$NodeJS, + [Parameter(ParameterSetName = 'Groups')] + [switch]$Installers, + + # Other lifecycle targets + [switch]$Help, # Show help + + # Capture the rest + [Parameter(ValueFromRemainingArguments = $true)] + [string[]]$MSBuildArguments +) + +Set-StrictMode -Version 2 +$ErrorActionPreference = 'Stop' + +# +# Functions +# + +function Get-KoreBuild { + + if (!(Test-Path $LockFile)) { + Get-RemoteFile "$ToolsSource/korebuild/channels/$Channel/latest.txt" $LockFile + } + + $version = Get-Content $LockFile | Where-Object { $_ -like 'version:*' } | Select-Object -first 1 + if (!$version) { + Write-Error "Failed to parse version from $LockFile. Expected a line that begins with 'version:'" + } + $version = $version.TrimStart('version:').Trim() + $korebuildPath = Join-Paths $DotNetHome ('buildtools', 'korebuild', $version) + + if (!(Test-Path $korebuildPath)) { + Write-Host -ForegroundColor Magenta "Downloading KoreBuild $version" + New-Item -ItemType Directory -Path $korebuildPath | Out-Null + $remotePath = "$ToolsSource/korebuild/artifacts/$version/korebuild.$version.zip" + + try { + $tmpfile = Join-Path ([IO.Path]::GetTempPath()) "KoreBuild-$([guid]::NewGuid()).zip" + Get-RemoteFile $remotePath $tmpfile + if (Get-Command -Name 'Expand-Archive' -ErrorAction Ignore) { + # Use built-in commands where possible as they are cross-plat compatible + Expand-Archive -Path $tmpfile -DestinationPath $korebuildPath + } + else { + # Fallback to old approach for old installations of PowerShell + Add-Type -AssemblyName System.IO.Compression.FileSystem + [System.IO.Compression.ZipFile]::ExtractToDirectory($tmpfile, $korebuildPath) + } + } + catch { + Remove-Item -Recurse -Force $korebuildPath -ErrorAction Ignore + throw + } + finally { + Remove-Item $tmpfile -ErrorAction Ignore + } + } + + return $korebuildPath +} + +function Join-Paths([string]$path, [string[]]$childPaths) { + $childPaths | ForEach-Object { $path = Join-Path $path $_ } + return $path +} + +function Get-RemoteFile([string]$RemotePath, [string]$LocalPath) { + if ($RemotePath -notlike 'http*') { + Copy-Item $RemotePath $LocalPath + return + } + + $retries = 10 + while ($retries -gt 0) { + $retries -= 1 + try { + $ProgressPreference = 'SilentlyContinue' # Workaround PowerShell/PowerShell#2138 + Invoke-WebRequest -UseBasicParsing -Uri $RemotePath -OutFile $LocalPath + return + } + catch { + Write-Verbose "Request failed. $retries retries remaining" + } + } + + Write-Error "Download failed: '$RemotePath'." +} + +# +# Main +# + +# Load configuration or set defaults + +if ($Help) { + Get-Help $PSCommandPath + exit 1 +} + +$RepoRoot = Resolve-Path $RepoRoot +$Channel = 'master' +$ToolsSource = 'https://aspnetcore.blob.core.windows.net/buildtools' +$ConfigFile = Join-Path $PSScriptRoot 'korebuild.json' +$LockFile = Join-Path $PSScriptRoot 'korebuild-lock.txt' + +if (Test-Path $ConfigFile) { + try { + $config = Get-Content -Raw -Encoding UTF8 -Path $ConfigFile | ConvertFrom-Json + if ($config) { + if (!($Channel) -and (Get-Member -Name 'channel' -InputObject $config)) { [string] $Channel = $config.channel } + if (!($ToolsSource) -and (Get-Member -Name 'toolsSource' -InputObject $config)) { [string] $ToolsSource = $config.toolsSource} + } + } catch { + Write-Warning "$ConfigFile could not be read. Its settings will be ignored." + Write-Warning $Error[0] + } +} + +$DotNetHome = if ($env:DOTNET_HOME) { $env:DOTNET_HOME } ` + elseif ($CI) { Join-Path $PSScriptRoot '.dotnet' } ` + elseif ($env:USERPROFILE) { Join-Path $env:USERPROFILE '.dotnet'} ` + elseif ($env:HOME) {Join-Path $env:HOME '.dotnet'}` + else { Join-Path $PSScriptRoot '.dotnet'} + +$env:DOTNET_HOME = $DotNetHome + +# Execute + +$korebuildPath = Get-KoreBuild + +# Project selection +if ($All) { + $MSBuildArguments += '/p:BuildAllProjects=true' +} +elseif ($Projects) { + if (![System.IO.Path]::IsPathRooted($Projects)) + { + $Projects = Join-Path (Get-Location) $Projects + } + $MSBuildArguments += "/p:Projects=$Projects" +} +else { + # When adding new sub-group build flags, add them to this check. + if((-not $Native) -and (-not $Managed) -and (-not $NodeJS) -and (-not $Installers)) { + Write-Warning "No default group of projects was specified, so building the 'managed' and 'native' subsets of projects. Run ``build.cmd -help`` for more details." + + # This goal of this is to pick a sensible default for `build.cmd` with zero arguments. + # Now that we support subfolder invokations of build.cmd, we will be pushing to have build.cmd build everything (-all) by default + + $Managed = $true + $Native = $true + } + + $MSBuildArguments += "/p:BuildManaged=$Managed" + $MSBuildArguments += "/p:BuildNative=$Native" + $MSBuildArguments += "/p:BuildNodeJS=$NodeJS" + $MSBuildArguments += "/p:BuildWindowsInstallers=$Installers" +} + +# Target selection +$MSBuildArguments += "/p:_RunRestore=$Restore" +$MSBuildArguments += "/p:_RunBuild=$Build" +$MSBuildArguments += "/p:_RunPack=$Pack" +$MSBuildArguments += "/p:_RunTests=$Test" +$MSBuildArguments += "/p:_RunSign=$Sign" + +Import-Module -Force -Scope Local (Join-Path $korebuildPath 'KoreBuild.psd1') + +try { + Set-KoreBuildSettings -ToolsSource $ToolsSource -DotNetHome $DotNetHome -RepoPath $RepoRoot -ConfigFile $ConfigFile -CI:$CI + Invoke-KoreBuildCommand 'default-build' @MSBuildArguments +} +finally { + Remove-Module 'KoreBuild' -ErrorAction Ignore +} diff --git a/build.sh b/build.sh index 98a4b22765..3f99fddf97 100755 --- a/build.sh +++ b/build.sh @@ -1,8 +1,284 @@ #!/usr/bin/env bash set -euo pipefail -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -# Call "sync" between "chmod" and execution to prevent "text file busy" error in Docker (aufs) -chmod +x "$DIR/run.sh"; sync -"$DIR/run.sh" default-build "$@" +# +# variables +# + +RESET="\033[0m" +RED="\033[0;31m" +YELLOW="\033[0;33m" +MAGENTA="\033[0;95m" +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +verbose=false +update=false +reinstall=false +repo_path="$DIR" +lockfile_path="$DIR/korebuild-lock.txt" +config_file="$DIR/korebuild.json" +channel='master' +tools_source='https://aspnetcore.blob.core.windows.net/buildtools' +ci=false +run_restore=true +run_build=true +run_pack=false +run_tests=false +build_all=false +build_managed=false +build_nodejs=false +build_projects='' +msbuild_args=() + +# +# Functions +# +__usage() { + echo "Usage: $(basename "${BASH_SOURCE[0]}") [options] [[--] ...] + +Arguments: + ... Arguments passed to the command. Variable number of arguments allowed. + +Options: + --[no-]restore Run restore. + --[no-]build Compile projects + --[no-]pack Produce packages. + --[no-]test Run tests. + + --projects A list of projects to build. (Must be an absolute path.) + Globbing patterns are supported, such as \"$(pwd)/**/*.csproj\". + + --all Build all project types. + --managed Build managed projects (C#, F#, VB). + --nodejs Build NodeJS projects (TypeScript, JS). + + --ci Apply CI specific settings and environment variables. + --verbose Show verbose output. + +Description: + This build script installs required tools and runs an MSBuild command on this repository + This script can be used to invoke various targets, such as targets to produce packages + build projects, run tests, and generate code. +" + + if [[ "${1:-}" != '--no-exit' ]]; then + exit 2 + fi +} + +get_korebuild() { + local version + if [ ! -f "$lockfile_path" ]; then + __get_remote_file "$tools_source/korebuild/channels/$channel/latest.txt" "$lockfile_path" + fi + version="$(grep 'version:*' -m 1 "$lockfile_path")" + if [[ "$version" == '' ]]; then + __error "Failed to parse version from $lockfile_path. Expected a line that begins with 'version:'" + return 1 + fi + version="$(echo "${version#version:}" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')" + local korebuild_path="$DOTNET_HOME/buildtools/korebuild/$version" + + { + if [ ! -d "$korebuild_path" ]; then + mkdir -p "$korebuild_path" + local remote_path="$tools_source/korebuild/artifacts/$version/korebuild.$version.zip" + tmpfile="$(mktemp)" + echo -e "${MAGENTA}Downloading KoreBuild ${version}${RESET}" + if __get_remote_file "$remote_path" "$tmpfile"; then + unzip -q -d "$korebuild_path" "$tmpfile" + fi + rm "$tmpfile" || true + fi + + source "$korebuild_path/KoreBuild.sh" + } || { + if [ -d "$korebuild_path" ]; then + echo "Cleaning up after failed installation" + rm -rf "$korebuild_path" || true + fi + return 1 + } +} + +__error() { + echo -e "${RED}error: $*${RESET}" 1>&2 +} + +__warn() { + echo -e "${YELLOW}warning: $*${RESET}" +} + +__machine_has() { + hash "$1" > /dev/null 2>&1 + return $? +} + +__get_remote_file() { + local remote_path=$1 + local local_path=$2 + + if [[ "$remote_path" != 'http'* ]]; then + cp "$remote_path" "$local_path" + return 0 + fi + + local failed=false + if __machine_has wget; then + wget --tries 10 --quiet -O "$local_path" "$remote_path" || failed=true + else + failed=true + fi + + if [ "$failed" = true ] && __machine_has curl; then + failed=false + curl --retry 10 -sSL -f --create-dirs -o "$local_path" "$remote_path" || failed=true + fi + + if [ "$failed" = true ]; then + __error "Download failed: $remote_path" 1>&2 + return 1 + fi +} + +# +# main +# + +while [[ $# -gt 0 ]]; do + case $1 in + -\?|-h|--help) + __usage --no-exit + exit 0 + ;; + --repo-root|-RepoRoot) + shift + __warn '--repo-root is obsolete and will be removed when we finish https://github.com/aspnet/AspNetCore/issues/4246' + repo_path="${1:-}" + [ -z "$repo_path" ] && __error "Missing value for parameter --repo-root" && __usage + ;; + --restore|-[Rr]estore) + run_restore=true + ;; + --no-restore) + run_restore=false + ;; + --build|-[Bb]build) + run_build=true + ;; + --no-build) + run_build=false + ;; + --pack|-[Pp]ack) + run_pack=true + ;; + --no-pack) + run_pack=false + ;; + --test|-[Tt]est) + run_tests=true + ;; + --no-test) + run_tests=false + ;; + --projects|-[Pp]rojects) + shift + build_projects="${1:-}" + [ -z "$build_projects" ] && __error "Missing value for parameter --projects" && __usage + ;; + --all|-[Aa]ll) + build_all=true + ;; + --managed|-[Mm]anaged) + build_managed=true + ;; + --nodejs|-[Nn]ode[Jj][Ss]) + build_nodejs=true + ;; + --native|-[Nn]ative) + __warn 'The C++ projects in this repo only build on Windows. The --native flag will be ignored.' + ;; + --ci|-[Cc][Ii]) + ci=true + if [[ -z "${DOTNET_HOME:-}" ]]; then + DOTNET_HOME="$DIR/.dotnet" + fi + ;; + --verbose|-[Vv]erbose) + verbose=true + ;; + *) + msbuild_args[${#msbuild_args[*]}]="$1" + ;; + esac + shift +done + +if ! __machine_has unzip; then + __error 'Missing required command: unzip' + exit 1 +fi + +if ! __machine_has curl && ! __machine_has wget; then + __error 'Missing required command. Either wget or curl is required.' + exit 1 +fi + +if [ -f "$config_file" ]; then + if __machine_has jq ; then + if jq '.' "$config_file" >/dev/null ; then + config_channel="$(jq -r 'select(.channel!=null) | .channel' "$config_file")" + config_tools_source="$(jq -r 'select(.toolsSource!=null) | .toolsSource' "$config_file")" + else + __error "$config_file is invalid JSON. Its settings will be ignored." + exit 1 + fi + elif __machine_has python ; then + if python -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'))" >/dev/null ; then + config_channel="$(python -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['channel'] if 'channel' in obj else '')")" + config_tools_source="$(python -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['toolsSource'] if 'toolsSource' in obj else '')")" + else + __error "$config_file is invalid JSON. Its settings will be ignored." + exit 1 + fi + else + __error 'Missing required command: jq or python. Could not parse the JSON file. Its settings will be ignored.' + exit 1 + fi + + [ ! -z "${config_channel:-}" ] && channel="$config_channel" + [ ! -z "${config_tools_source:-}" ] && tools_source="$config_tools_source" +fi + +[ -z "${DOTNET_HOME:-}" ] && DOTNET_HOME="$HOME/.dotnet" +export DOTNET_HOME="$DOTNET_HOME" + +get_korebuild + +if [ "$build_all" = true ]; then + msbuild_args[${#msbuild_args[*]}]="-p:BuildAllProjects=true" +elif [ ! -z "$build_projects" ]; then + msbuild_args[${#msbuild_args[*]}]="-p:Projects=$build_projects" +else + # When adding new sub-group build flags, add them to this check + if [ "$build_managed" = false ] && [ "$build_nodejs" = false ]; then + # This goal of this is to pick a sensible default for `build.sh` with zero arguments. + # We believe the most common thing our contributors will work on is C#, so if no other build group was picked, build the C# projects. + __warn "No default group of projects was specified, so building the 'managed' subset of projects. Run ``build.sh -help`` for more details." + build_managed=true + fi + + msbuild_args[${#msbuild_args[*]}]="-p:BuildManaged=$build_managed" + msbuild_args[${#msbuild_args[*]}]="-p:BuildNodeJS=$build_nodejs" +fi + +msbuild_args[${#msbuild_args[*]}]="-p:_RunRestore=$run_restore" +msbuild_args[${#msbuild_args[*]}]="-p:_RunBuild=$run_build" +msbuild_args[${#msbuild_args[*]}]="-p:_RunPack=$run_pack" +msbuild_args[${#msbuild_args[*]}]="-p:_RunTests=$run_tests" + +set_korebuildsettings "$tools_source" "$DOTNET_HOME" "$repo_path" "$config_file" "$ci" + +# This incantation avoids unbound variable issues if msbuild_args is empty +# https://stackoverflow.com/questions/7577052/bash-empty-array-expansion-with-set-u +invoke_korebuild_command 'default-build' ${msbuild_args[@]+"${msbuild_args[@]}"} diff --git a/build/AzureIntegration.targets b/build/AzureIntegration.targets index 76ab436c8f..bf9fbc0389 100644 --- a/build/AzureIntegration.targets +++ b/build/AzureIntegration.targets @@ -25,7 +25,7 @@ - + diff --git a/build/CodeSign.props b/build/CodeSign.props index 49e56f34c3..6aef3ba9c4 100644 --- a/build/CodeSign.props +++ b/build/CodeSign.props @@ -1,5 +1,10 @@ + + + + + @@ -22,7 +27,6 @@ - @@ -35,6 +39,7 @@ + @@ -49,19 +54,25 @@ + + + + + + + + + + + + + - - - - - - - diff --git a/build/CodeSign.targets b/build/CodeSign.targets index dcbc68c5f2..fecc25ee41 100644 --- a/build/CodeSign.targets +++ b/build/CodeSign.targets @@ -1,8 +1,6 @@ - - true $(CodeSignDependsOn);CollectFileSignInfo @@ -28,8 +26,7 @@ PackageSigningCertName=$(PackageSigningCertName); VsixSigningCertName=$(VsixSigningCertName); JarSigningCertName=$(JarSigningCertName); - ArtifactsDir=$(ArtifactsDir); - BuildDir=$(BuildDir) + ArtifactsDir=$(ArtifactsDir) diff --git a/build/PackageArchive.targets b/build/PackageArchive.targets deleted file mode 100644 index a660b6c317..0000000000 --- a/build/PackageArchive.targets +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcesPropsPath); - DotNetPackageVersionPropsPath=$(GeneratedPackageVersionPropsPath); - OutputPath=$(ArtifactsDir)lzma\; - _BuildToolsAssembly=$(_BuildToolsAssembly) - - - - - - - - - - diff --git a/build/Publish.targets b/build/Publish.targets index 19d87fb73f..54d9b39641 100644 --- a/build/Publish.targets +++ b/build/Publish.targets @@ -1,19 +1,8 @@ - $(RepositoryRoot).deps\assets\ - $(RepositoryRoot).deps\packages\ - - aspnetcore_base_runtime.version - $(IntermediateDir)$(BaseRuntimeVersionFileName) - latest.version - $(IntermediateDir)$(LatestRuntimeVersionFileName) - - ResolveCommitHash; - PrepareOutputPaths; GetFilesToPublish; - PublishToLocalFolder; PublishToAzureFeed; PublishToMyGet; @@ -21,167 +10,60 @@ - - - - - - - - - + - <_AllSharedFxRIDs Include="$(SupportedRuntimeIdentifiers)" /> - - - - - - - - - aspnetcore/Runtime/$(PackageVersion)/ - aspnetcore/npm/ - aspnetcore/jar/ - aspnetcore/Runtime/$(SharedFxCliBlobChannel)/ - aspnetcore-runtime-$(PackageVersion) - aspnetcore-runtime-latest - aspnetcore-runtime-internal-$(PackageVersion) - dotnet-hosting-$(PackageVersion)-win.exe - - - - - - $(BlobBasePath)$(WindowsHostingBundleInstallerFileName) - - - - - $(BlobBasePath)nuGetPackagesArchive-ci-server-$(PackageVersion).zip - - - - - $(BlobBasePath)nuGetPackagesArchive-ci-server-$(PackageVersion).patch.zip - - - - - $(BlobBasePath)nuGetPackagesArchive-ci-server-compat-$(PackageVersion).patch.zip - - - - - $(BlobBasePath)nuGetPackagesArchive-$(PackageVersion).lzma - - - - $(BlobBasePath)$(IntermediateInstallerBaseFileName)-%(IntermediateInstaller.Identity)%(IntermediateInstaller.FileExt) - - - - $(BlobBasePath)$(BaseRuntimeVersionFileName) + + <_FilesToPublish Include="$(InstallersOutputPath)*.txt"> text/plain - + - - - $(BlobBasePath)$(InstallerBaseFileName)-%(NativeInstaller.Identity)%(NativeInstaller.FileExt) - + <_FilesToPublish Include="$(InstallersOutputPath)*.version"> + text/plain + no-cache, no-store, must-revalidate + - - - $(AliasBlobBasePath)$(InstallerAliasBaseFileName)-%(NativeInstaller.Identity)%(NativeInstaller.FileExt) - true - - true - - - - $(AliasBlobBasePath)%(SharedFxVersionBadge.FileName)%(SharedFxVersionBadge.Extension) + <_FilesToPublish Include="$(InstallersOutputPath)*.svg"> no-cache, no-store, must-revalidate image/svg+xml - true + + + + <_FilesToPublish Include="$(InstallersOutputPath)*" Exclude="@(_FilesToPublish)" /> + + + <_FilesToPublish Include="$(ProductPackageOutputPath)*.jar;$(ProductPackageOutputPath)*.pom"> + aspnetcore/jar/$(PackageVersion)/ + + + + + %(_FilesToPublish.BlobBasePath)%(_FilesToPublish.FileName)%(_FilesToPublish.Extension) + aspnetcore/Runtime/$(PackageVersion)/%(_FilesToPublish.FileName)%(_FilesToPublish.Extension) + <_FilesToPublish Remove="@(_FilesToPublish)" /> - - $(AliasBlobBasePath)$(LatestRuntimeVersionFileName) - no-cache, no-store, must-revalidate - text/plain - true - + + - - <_PackageArtifactInfo - Include="@(ArtifactInfo)" - ArtifactPath="$(DependencyPackagesDir)%(ArtifactInfo.PackageId).%(ArtifactInfo.Version).nupkg" - Condition="'%(ArtifactInfo.ArtifactType)' == 'NuGetPackage'" /> - - <_SymbolsPackageArtifactInfo - Include="@(ArtifactInfo)" - ArtifactPath="$(DependencyPackagesDir)%(ArtifactInfo.PackageId).%(ArtifactInfo.Version).symbols.nupkg" - Condition="'%(ArtifactInfo.ArtifactType)' == 'NuGetSymbolsPackage'" /> - - - $(JarBlobBasePath)%(ArtifactInfo.FileName)%(ArtifactInfo.Extension) - - - - $(JarBlobBasePath)%(ArtifactInfo.FileName)%(ArtifactInfo.Extension) - - - - $(NpmBlobBasePath)%(ArtifactInfo.PackageId)/%(ArtifactInfo.FileName)%(ArtifactInfo.Extension) - application/tar+gzip - + + - - - - - - - <_RidSpecificPackages Include="$(SupportedRuntimeIdentifiers)" Exclude="$(SharedFxRid)" /> - + + + + NonShipping=true + + + NonShipping=true + - - - - - - - - - <_MissingArtifactFile Include="@(FilesToPublish)" Condition="!Exists(%(FilesToPublish.Identity))" /> - <_MissingArtifactFile Include="@(NpmPackageToPublish)" Condition="!Exists(%(NpmPackageToPublish.Identity))" /> - <_MissingArtifactFile Include="@(PackageToPublish)" Condition="!Exists(%(PackageToPublish.Identity))" /> - - - - - - - - - - - - $(AzureBlobRelativePathBase)/ - - - - - - true $(RepositoryBuildArguments) -ci - $(RepositoryBuildArguments) -DotNetHome '$(DOTNET_HOME)' $(RepositoryBuildArguments) /p:AspNetUniverseBuildOffline=true $(RepositoryBuildArguments) /p:IsUniverseBuild=true @@ -87,48 +86,27 @@ $(RepositoryBuildArguments) /p:BuildNumberSuffix=$(BuildNumberSuffix) $(RepositoryBuildArguments) /p:Configuration=$(Configuration) $(RepositoryBuildArguments) /p:IsFinalBuild=$(IsFinalBuild) + + $(RepositoryBuildArguments) /p:DisablePackageReferenceRestrictions=true $(RepositoryBuildArguments) /p:DisableCodeSigning=true $(RepositoryBuildArguments) '/p:DotNetAssetRootAccessTokenSuffix=$(DotNetAssetRootAccessTokenSuffix)' $(RepositoryBuildArguments) '/p:DotNetAssetRootUrl=$(DotNetAssetRootUrl)' $(RepositoryBuildArguments) /p:SkipAspNetCoreRuntimeInstall=true - - $(RepositoryRoot)korebuild-lock.txt - $(BuildRepositoryRoot)korebuild-lock.txt - $(IntermediateDir)$(RepositoryToBuild)-korebuild-lock.txt - $(BuildRepositoryRoot)global.json - $(IntermediateDir)$(RepositoryToBuild)-global.json - - - - - - - - - - - - - - - - + /t:CleanArtifacts /t:Build /p:SkipTests=true $(RepositoryBuildArguments) $(BuildArguments) /bl:$(LogOutputDir)$(RepositoryToBuild).build.binlog - $(BuildRepositoryRoot)artifacts\ - $(RepositoryArtifactsRoot)build\ - $(RepositoryArtifactsRoot)msbuild\ + $(BuildRepositoryRoot)artifacts\msbuild\ - - - - - @@ -157,7 +128,7 @@ - + /t:Test /p:NoBuild=$(_NoBuildRepos) $(RepositoryBuildArguments) @@ -172,15 +143,13 @@ - - diff --git a/build/SharedFrameworkOnly.props b/build/SharedFrameworkOnly.props index 6f9fcda556..4c3969a169 100644 --- a/build/SharedFrameworkOnly.props +++ b/build/SharedFrameworkOnly.props @@ -15,6 +15,7 @@ + diff --git a/build/SharedFx.targets b/build/SharedFx.targets index d5439003ac..08f15d775f 100644 --- a/build/SharedFx.targets +++ b/build/SharedFx.targets @@ -2,12 +2,11 @@ $(RepositoryRoot)src\Framework\test\Microsoft.AspNetCore.App.UnitTests.csproj $([MSBuild]::NormalizePath($(UnitTestFxProject))) - $(CodeSignDependsOn);GetSharedFxFilesToSign + $(CodeSignDependsOn);GetSharedFxFilesToSign _BuildSharedFxProjects;TestSharedFx $(BuildSharedFxDependsOn);CodeSign $(IntermediateDir)ar\$(SharedFxRid)\ $(GetArtifactInfo);GetFxProjectArtifactInfo - true @@ -15,21 +14,25 @@ - + + + + - - - - - - + + + + + + + @@ -62,11 +65,11 @@ - + diff --git a/build/artifacts.props b/build/artifacts.props index 82149d61bd..756194a28b 100644 --- a/build/artifacts.props +++ b/build/artifacts.props @@ -1,3 +1,7 @@ + @@ -13,22 +17,27 @@ + + + + + + - @@ -39,6 +48,7 @@ + @@ -71,7 +81,7 @@ - + @@ -83,39 +93,25 @@ - - - - - - - - - - - - - - @@ -126,7 +122,6 @@ - @@ -140,9 +135,9 @@ - + diff --git a/build/buildorder.props b/build/buildorder.props index 512cca0827..4cef7bf246 100644 --- a/build/buildorder.props +++ b/build/buildorder.props @@ -7,19 +7,6 @@ - - - - - - - - - - - - - diff --git a/build/dependencies.folderbuilds.props b/build/dependencies.folderbuilds.props deleted file mode 100644 index 5902d23ff3..0000000000 --- a/build/dependencies.folderbuilds.props +++ /dev/null @@ -1,27 +0,0 @@ - - - - 3.0.0-build-20181120.4 - 3.0.0-preview-18606-0098 - 3.0.0-preview-18606-0098 - 3.0.0-preview-18606-0098 - 3.0.0-preview-18606-0098 - 3.0.0-preview-18606-0098 - 3.0.0-preview-18606-0098 - 3.0.0-preview-18606-0098 - 3.0.0-preview-18606-0098 - 3.0.0-preview-18606-0098 - 3.0.0-preview-18606-0098 - 3.0.0-preview-18606-0098 - 3.0.0-preview-18606-0098 - 3.0.0-preview-18606-0098 - 0.3.0-preview-18606-0098 - 3.0.0-preview-18606-0098 - 3.0.0-preview-18606-0098 - 3.0.0-preview-18606-0098 - 3.0.0-preview-18606-0098 - 3.0.0-preview-18606-0098 - 3.0.0-preview-18606-0098 - 3.0.0-preview-18606-0098 - - diff --git a/build/dependencies.props b/build/dependencies.props deleted file mode 100644 index cb6c0d1206..0000000000 --- a/build/dependencies.props +++ /dev/null @@ -1,264 +0,0 @@ - - - - - 3.0.0-preview-27122-01 - 3.0.0-preview-27122-01 - 3.0.0-preview-27122-01 - 3.0.0-preview-27122-01 - $(MicrosoftNETCoreAppPackageVersion) - - - 4.6.0-preview.18571.3 - 4.6.0-preview.18571.3 - 1.6.0-preview.18571.3 - 4.6.0-preview.18571.3 - 4.7.0-preview.18571.3 - 4.6.0-preview.18571.3 - 4.6.0-preview.18571.3 - 4.6.0-preview.18571.3 - 4.5.2-servicing-27114-05 - 4.6.0-preview.18571.3 - 4.6.0-preview.18571.3 - 4.6.0-preview.18571.3 - 1.7.0-preview.18571.3 - 4.6.0-preview.18571.3 - 4.6.0-preview.18571.3 - 4.6.0-preview.18571.3 - 4.6.0-preview.18571.3 - 4.6.0-preview.18571.3 - 4.6.0-preview.18571.3 - 4.6.0-preview.18571.3 - 4.6.0-preview.18571.3 - 4.6.0-preview.18571.3 - 4.6.0-preview.18571.3 - 4.10.0-preview.18571.3 - 4.6.0-preview.18571.3 - - - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - 3.0.0-preview.18605.1 - - - 3.0.0-preview.18604.3 - 3.0.0-preview.18604.3 - 3.0.0-preview.18604.3 - 3.0.0-preview.18604.3 - 3.0.0-preview.18604.3 - 3.0.0-preview.18604.3 - 3.0.0-preview.18604.3 - 3.0.0-preview.18604.3 - 3.0.0-preview.18604.3 - - - - - - - - $(KoreBuildVersion) - $(KoreBuildVersion) - 3.0.0-build-20181120.4 - - - - - - 0.9.9 - 0.10.13 - - - 2.1.1 - 2.1.1 - 2.1.1 - 0.43.0 - 2.1.1.1 - 2.1.1 - - 4.2.1 - 2.1.0 - 8.7.0 - 4.2.1 - 2.3.0-preview1-update2 - 2.3.0-preview1-update2 - 2.3.0-preview1-update1 - 3.1.0 - 1.10.0 - 1.7.3.4 - 2.1.1 - 2.2.1 - 5.2.6 - 2.3.2 - 1.1.3 - 1.0.3 - 15.8.166 - 15.8.166 - 15.8.166 - 15.8.166 - 15.8.166 - 2.8.0 - 2.8.0 - 2.8.0 - 1.7.0 - 0.2.0-beta-63019-01 - 1.0.0-rc3-003121 - 1.1.0 - 3.19.8 - 5.3.0 - 5.3.0 - 5.3.0 - 5.3.0 - 5.3.0 - 5.3.0 - 2.1.1 - 1.0.12 - 1.1.9 - 2.0.9 - 2.1.3 - 2.2.0-rtm-27105-02 - $(MicrosoftNETCoreApp21PackageVersion) - $(MicrosoftNETCoreApp22PackageVersion) - 1.0.1 - 1.0.0-alpha-004 - 15.6.1 - 3.0.1 - 3.0.1 - 3.0.1 - 15.8.525 - 16.0.142-g25b7188c54 - 15.8.28010 - 16.0.142-g25b7188c54 - 16.0.142-g25b7188c54 - 7.10.6071 - 16.0.201-pre-g7d366164d0 - 2.0.6142705 - 16.0.201-pre-g7d366164d0 - 15.8.28010 - 10.0.30320 - 11.0.61031 - 12.0.30111 - 8.0.50728 - 9.0.30730 - 7.10.6072 - 16.0.142-g25b7188c54 - 15.8.168 - 11.1.0 - 1.4.0 - 1.3.8 - 1.0.1 - 4.10.0 - 1.6.1 - 2.0.3 - 1.0.1 - 11.0.2 - 0.20.0 - 3.12.1 - 2.43.0 - 17.17134.0 - 3.12.1 - 1.4.0 - 4.0.0 - 2.0.513 - 1.3.23 - 1.0.0 - 4.5.0 - 5.3.0 - 4.3.2 - 3.1.1 - 4.3.0 - 4.3.0 - 4.5.0 - 1.3.7 - 9.0.1 - 2.11.0-beta1-63430-03 - 2.11.0-beta1-63430-03 - 2.11.0-beta1-63430-03 - 2.11.0-beta1-63430-03 - 2.11.0-beta1-63430-03 - 2.11.0-beta1-63430-03 - 2.11.0-beta1-63430-03 - 2.11.0-beta1-63430-03 - 2.11.0-beta1-63430-03 - 2.11.0-beta1-63430-03 - 8.1.4 - 2.0.1 - 0.10.0 - 2.3.1 - 2.3.1 - 2.3.1 - 2.3.1 - 2.3.1 - 2.4.0 - - diff --git a/build/external-dependencies.props b/build/external-dependencies.props index 491fb7f2e5..494ba861db 100644 --- a/build/external-dependencies.props +++ b/build/external-dependencies.props @@ -1,5 +1,5 @@ - + @@ -10,31 +10,14 @@ - - - - - - - - - - - - - - - - - @@ -42,220 +25,36 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/repo.props b/build/repo.props index 6d0bae2aaf..f50b7d4f03 100644 --- a/build/repo.props +++ b/build/repo.props @@ -7,93 +7,146 @@ true true false + true + + false - false - true false $(RepositoryRoot)src\ - $(RepositoryRoot).deps\build\ - $(RepositoryRoot).deps\Signed\Packages\ + $(ArtifactsDir)$(Configuration)\packages\product\ + $(ArtifactsDir)$(Configuration)\packages\internal\ + $(ArtifactsDir)$(Configuration)\installers\ + $(RepositoryRoot)eng\signcheck.exclusions.txt - + true - + $(RepositoryRoot)src\Shared\ + + true + true + true + true + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - + $(RepositoryRoot)src\Tools\dotnet-watch\test\TestProjects\**\*.csproj; + $(RepositoryRoot)src\Razor\Razor.Design\test\testassets\**\*.*proj; + $(RepositoryRoot)src\SignalR\clients\cpp\**\*.*proj; + $(RepositoryRoot)src\SignalR\clients\ts\**\node_modules\**\*.*proj; + " /> - - - - true - - true - + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Platform=x64 + Platform=x86 + + + + + + + + + + + + diff --git a/build/repo.targets b/build/repo.targets index d1e52fbb0c..0e3872ef1b 100644 --- a/build/repo.targets +++ b/build/repo.targets @@ -1,6 +1,5 @@ - @@ -13,41 +12,47 @@ $(IntermediateDir)dependencies.g.props $(IntermediateDir)sources.g.props - $(IntermediateDir)branding.g.props + + + Prepare + + $(BuildDependsOn);Restore + $(BuildDependsOn);Compile + $(BuildDependsOn);Package + $(BuildDependsOn);Test;Verify + true + true SetTeamCityBuildNumberToVersion;$(PrepareDependsOn) - $(PrepareDependsOn);VerifyPackageArtifactConfig;VerifyExternalDependencyConfig;PrepareOutputPaths + $(PrepareDependsOn);VerifyPackageArtifactConfig;VerifyExternalDependencyConfig;PrepareOutputPaths + $(CleanDependsOn);CleanArtifacts;CleanRepoArtifacts - $(RestoreDependsOn);RestoreNpm + $(RestoreDependsOn);InstallDotNet;RestoreProjects + + + Restore $(CompileDependsOn);BuildProjects;PackSharedSources - $(CompileDependsOn);PackProjects;BuildRepositories;BuildSharedFx - $(PackageDependsOn);PackProjects - $(PackageDependsOn);RemoveSharedFrameworkOnlyRefsFromNuspec - $(PackageDependsOn);CodeSign + $(CompileDependsOn);PackProjects;BuildRepositories;BuildSharedFx + + $(PackageDependsOn);PackProjects + $(PackageDependsOn);RemoveSharedFrameworkOnlyRefsFromNuspec + + + $(TestDependsOn);Compile $(TestDependsOn);TestProjects - $(TestDependsOn);_TestRepositories + $(TestDependsOn);_TestRepositories + $(GetArtifactInfoDependsOn);GetProjectArtifactInfo $(GetArtifactInfoDependsOn);ResolveSharedSourcesPackageInfo - $(GetArtifactInfoDependsOn);ResolveRepoInfo + $(GetArtifactInfoDependsOn);ResolveRepoInfo $(CodeSignDependsOn);RemoveSharedFrameworkOnlyRefsFromNuspec - - - - - install --no-optional - ci - - - - - - + @@ -64,7 +69,11 @@ $(MSBuildThisFileDirectory)..\eng\ProjectReferences.props + @(_ProjectReferenceProvider->'', '%0A ') @@ -88,10 +97,6 @@ $(BuildProperties);MicrosoftNETCoreAppPackageVersion=$(MicrosoftNETCoreAppPackageVersion); - $(DesignTimeBuildProps);MicrosoftNETCoreApp30PackageVersion=$(MicrosoftNETCoreApp30PackageVersion); - $(DesignTimeBuildProps);MicrosoftNETCoreApp22PackageVersion=$(MicrosoftNETCoreApp22PackageVersion); - $(DesignTimeBuildProps);MicrosoftNETCoreApp21PackageVersion=$(MicrosoftNETCoreApp21PackageVersion); - $(DesignTimeBuildProps);MicrosoftNETCoreApp20PackageVersion=$(MicrosoftNETCoreApp20PackageVersion); @@ -108,14 +113,6 @@ - - - - - - + <_PackageArtifactWithoutMatchingInfo Include="@(_Temp)" Exclude="@(PackageArtifact)" /> @@ -195,9 +192,8 @@ <_LineupPackages Include="@(ExternalDependency)" /> <_LineupPackages Include="%(ArtifactInfo.PackageId)" Version="%(ArtifactInfo.Version)" Condition=" '%(ArtifactInfo.ArtifactType)' == 'NuGetPackage' " /> - <_RestoreSources Include="$(DependencyPackageDir)" Condition="'$(DependencyPackageDir)' != '' AND Exists('$(DependencyPackageDir)')" /> - <_RestoreSources Include="$(SignedDependencyPackageDir)" Condition="'$(SignedDependencyPackageDir)' != '' AND Exists('$(SignedDependencyPackageDir)')" /> - <_RestoreSources Include="$(BuildDir)" /> + <_RestoreSources Include="$(ProductPackageOutputPath)" /> + <_RestoreSources Include="$(InternalPackageOutputPath)" /> <_RestoreSources Include="$(RestoreSources)" /> @@ -205,34 +201,9 @@ Packages="@(_LineupPackages)" OutputPath="$(GeneratedPackageVersionPropsPath)" /> - - - - - - - - - - $(AspNetCoreMajorVersion) - $(AspNetCoreMinorVersion) - $(AspNetCorePatchVersion) - $(PreReleaseLabel) - $(BuildNumber) - $(PackageBrandingVersion) - - -]]> - - - - - - @@ -254,10 +225,6 @@ - - - - <_UndeclaredPackageArtifact Include="%(ArtifactInfo.PackageId)" Condition="'%(ArtifactInfo.ArtifactType)' == 'NuGetPackage'" /> @@ -288,7 +255,7 @@ - <_BuildOutput Include="$(BuildDir)%(PackageArtifact.Identity).*.nupkg" + <_BuildOutput Include="$(ProductPackageOutputPath)%(PackageArtifact.Identity).*.nupkg" Condition=" '%(PackageArtifact.Category)' == 'ship' " /> @@ -305,11 +272,6 @@ - - - - + DependsOnTargets="ComputeGraph;VerifyPackageArtifactConfig" /> diff --git a/build/runtimes.props b/build/runtimes.props index 95bbefcd5f..469097305f 100644 --- a/build/runtimes.props +++ b/build/runtimes.props @@ -5,10 +5,6 @@ Feed="$(DotNetAssetRootUrl)" FeedCredential="$(DotNetAssetRootAccessTokenSuffix)" /> - - - - - - - - - - - - - - - - - diff --git a/build/tasks/CreateLzma.cs b/build/tasks/CreateLzma.cs deleted file mode 100644 index 96e3d403b7..0000000000 --- a/build/tasks/CreateLzma.cs +++ /dev/null @@ -1,70 +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 System.Threading; -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using Microsoft.DotNet.Archive; - -namespace RepoTasks -{ - public class CreateLzma : Task, ICancelableTask - { - private readonly CancellationTokenSource _cts = new CancellationTokenSource(); - - [Required] - public string OutputPath { get; set; } - - [Required] - public string[] Sources { get; set; } - - public void Cancel() => _cts.Cancel(); - - public override bool Execute() - { - var progress = new MSBuildProgressReport(Log, _cts.Token); - using (var archive = new IndexedArchive()) - { - foreach (var source in Sources) - { - if (Directory.Exists(source)) - { - var trimmedSource = source.TrimEnd(new []{ '\\', '/' }); - Log.LogMessage(MessageImportance.High, $"Adding directory: {trimmedSource}"); - archive.AddDirectory(trimmedSource, progress); - } - else - { - Log.LogMessage(MessageImportance.High, $"Adding file: {source}"); - archive.AddFile(source, Path.GetFileName(source)); - } - } - - archive.Save(OutputPath, progress); - } - - return !Log.HasLoggedErrors; - } - - private class MSBuildProgressReport : IProgress - { - private TaskLoggingHelper _log; - private readonly CancellationToken _cancellationToken; - - public MSBuildProgressReport(TaskLoggingHelper log, CancellationToken cancellationToken) - { - _log = log; - _cancellationToken = cancellationToken; - } - - public void Report(ProgressReport value) - { - var complete = (double)value.Ticks / value.Total; - _log.LogMessage(MessageImportance.Low, $"Progress: {value.Phase} - {complete:P}"); - _cancellationToken.ThrowIfCancellationRequested(); // because LZMA apis don't take a cancellation token, throw from the logger (yes, its ugly, but it works.) - } - } - } -} diff --git a/src/Installers/Windows/tasks/GenerateGuid.cs b/build/tasks/GenerateGuid.cs similarity index 100% rename from src/Installers/Windows/tasks/GenerateGuid.cs rename to build/tasks/GenerateGuid.cs diff --git a/build/tasks/GetDocXmlFiles.cs b/build/tasks/GetDocXmlFiles.cs deleted file mode 100644 index 9053f0c6ad..0000000000 --- a/build/tasks/GetDocXmlFiles.cs +++ /dev/null @@ -1,64 +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.Build.Framework; -using System; -using System.Collections.Concurrent; -using System.IO; -using System.Threading.Tasks; -using System.Xml.Linq; - -namespace RepoTasks -{ - /// - /// Filters a list of .xml files to only those that are .NET Xml docs files - /// - public class GetDocXmlFiles : Microsoft.Build.Utilities.Task - { - [Required] - public ITaskItem[] Files { get; set; } - - [Output] - public ITaskItem[] XmlDocFiles { get; set; } - - public override bool Execute() - { - var xmlDocs = new ConcurrentBag(); - Parallel.ForEach(Files, f => - { - try - { - using (var file = File.OpenRead(f.ItemSpec)) - using (var reader = new StreamReader(file)) - { - string line; - for (var i = 0; i < 2; i++) - { - line = reader.ReadLine(); - if (i == 0 && line.StartsWith("") + 2); - } - - if (line.StartsWith("", StringComparison.OrdinalIgnoreCase) || line.StartsWith(" - netcoreapp2.1 + netcoreapp2.2 net461 + $(DefineConstants);BUILD_MSI_TASKS - - - + + + + + + + + + $(WiXSdkPath)\Microsoft.Deployment.WindowsInstaller.dll + + + $(WiXSdkPath)\Microsoft.Deployment.WindowsInstaller.Package.dll + diff --git a/build/tasks/RepoTasks.tasks b/build/tasks/RepoTasks.tasks index 1da0b59154..43323cf2e2 100644 --- a/build/tasks/RepoTasks.tasks +++ b/build/tasks/RepoTasks.tasks @@ -3,10 +3,10 @@ <_RepoTaskAssembly>$(MSBuildThisFileDirectory)bin\publish\RepoTasks.dll - - - + + + diff --git a/src/Installers/Windows/tasks/Uuid.cs b/build/tasks/Uuid.cs similarity index 100% rename from src/Installers/Windows/tasks/Uuid.cs rename to build/tasks/Uuid.cs diff --git a/docs/Artifacts.md b/docs/Artifacts.md new file mode 100644 index 0000000000..a9378c4672 --- /dev/null +++ b/docs/Artifacts.md @@ -0,0 +1,20 @@ +Artifacts +========= + +Building this repo produces build artifacts in the directory structure described below. Build outputs are organized into logical groups based on artifact type and the intended usage of the artifacts. + +``` +artifacts/ + $(Configuration)/ + installers/ + *.msi = Windows installers + *.deb, *.rpm = Linux installers + *.zip, *.tar.gz = archives versions of installers + packages/ + product/ = Packages which are intended for use by customers. These, along with installers, represent the 'product'. + *.nupkg = NuGet packages which ship to nuget.org + *.jar = Java packages which ship to Maven Central and others + *.tgz = NPM packages which ship to npmjs.org + internal/ + *.nupkg = NuGet packages for internal use only. Used to hand off bits to Microsoft partner teams. Not intended for use by customers. +``` diff --git a/docs/BuildFromSource.md b/docs/BuildFromSource.md index f7bea99466..624d4ce185 100644 --- a/docs/BuildFromSource.md +++ b/docs/BuildFromSource.md @@ -3,8 +3,6 @@ Build ASP.NET Core from Source Building ASP.NET Core from source allows you tweak and customize ASP.NET Core, and to contribute your improvements back to the project. -:warning: We are currently in the middle of restructing our source code. These instructions will likely change rapidly during November and December 2018. - See https://github.com/aspnet/AspNetCore/labels/area-infrastructure for known issues and to track ongoing work. ## Install pre-requistes @@ -16,9 +14,13 @@ Building ASP.NET Core on Windows requires: * Windows 7 or higher * At least 10 GB of disk space and a good internet connection (our build scripts download a lot of tools and dependencies) * Visual Studio 2017. + * To install the exact required components, run [eng/scripts/InstallVisualStudio.ps1](/eng/scripts/InstallVisualStudio.ps1). This will use VS2017. + ```ps1 + PS> ./eng/scripts/InstallVisualStudio.ps1 -Edition Community + ``` * Git. * (Optional) some optional components, like the SignalR Java client, may require - * NodeJS + * NodeJS. LTS version of 10.14.2 or newer recommended * Java Development Kit 10 or newer. Either: * OpenJDK * Oracle's JDK @@ -32,7 +34,7 @@ Building ASP.NET Core on macOS or Linux requires: * At least 10 GB of disk space and a good internet connection (our build scripts download a lot of tools and dependencies) * Git * (Optional) some optional components, like the SignalR Java client, may require - * NodeJS + * NodeJS. LTS version of 10.14.2 or newer recommended * Java Development Kit 10 or newer. Either: * OpenJDK * Oracle's JDK @@ -57,13 +59,14 @@ Before opening our .sln files in Visual Studio or VS Code, you need to perform t 1. Executing the following on command-line: ``` - .\build.cmd /p:SkipTests=true /p:_ProjectsOnly=true + .\restore.cmd ``` This will download required tools and build the entire repository once. At that point, you should be able to open .sln files to work on the projects you care about. - -2. Update your `PATH` environment variable. (See [below for details](#path).) -> :bulb: Pro tip: you will also want to run this command after pulling large sets of changes. Visual Studio will only build projects in a solution file, and makes a best effort to use other files on disk. If you pull many changes, the files on disk may be stale and will need to re-build. + > :bulb: Pro tip: you will also want to run this command after pulling large sets of changes. On the master branch, we regularly update the versions of .NET Core SDK required to build the repo. + > You will need to restart Visual Studio every time we update the .NET Core SDK. + +2. Use the `startvs.cmd` script to open Visual Studio .sln files. This script first sets required environment variables. ### Solution files @@ -84,20 +87,35 @@ Opening solution files may produce an error code NU1105 with a message such This is a known issue in NuGet () and we are working with them for a solution. See also to track progress on this. -**The workaround** for now is to disable NuGet restore in Visual Studio. +**The workaround** for now is to add all projects to the solution. + + dotnet sln add C:\src\AspNetCore\src\Hosting\Abstractions\src\Microsoft.AspNetCore.Hosting.Abstractions.csproj -![screenshot](https://i.imgur.com/cTKP381.png) #### PATH -For VS Code and Visual Studio to work correctly, you must place the following location in your PATH. -``` -Windows: %USERPROFILE%\.dotnet\x64 -Linux/macOS: $HOME/.dotnet -``` -This must come **before** any other installation of `dotnet`. In Windows, we recommend removing `C:\Program Files\dotnet` from PATH in system variables and adding `%USERPROFILE%\.dotnet\x64` to PATH in user variables. +For VS Code and Visual Studio and `dotnet` commands to work correctly, you must place the following location in your PATH. +Use the following commands to update the PATH variable in a command line window. - +Windows (Command Prompt) + +```batch +set PATH=%USERPROFILE%\.dotnet\x64;%PATH% +``` + +Windows (Powershell) + +```ps1 +$env:PATH="$env:USERPROFILE\.dotnet\x64;$env:PATH" +``` + +Linux/macOS: + +```sh +export PATH="$HOME/.dotnet:$PATH" +``` + +On Windows, we recommend using the `startvs.cmd` command to launch Visual Studio. ## Building on command-line @@ -113,15 +131,27 @@ On macOS/Linux: ./build.sh ``` -### Building a subset of the code +## Running tests on command-line + +Tests are not run by default. Use the `-test` option to run tests in addition to building. + +On Windows: +``` +.\build.cmd -test +``` + +On macOS/Linux: +``` +./build.sh --test +``` + +## Building a subset of the code This repository is large. Look for `build.cmd`/`.sh` scripts in subfolders. These scripts can be used to invoke build and test on a smaller set of projects. -#### Known issue: not every subfolder has a build.cmd script +Furthermore, you can use flags on `build.cmd`/`.sh` to build subsets based on language type, like C++, TypeScript, or C#. Run `build.sh --help` or `build.cmd -help` for details. -We'll be adding more. See https://github.com/aspnet/AspNetCore/issues/4247. - -#### Build properties +## Build properties Additional properties can be added as an argument in the form `/property:$name=$value`, or `/p:$name=$value` for short. For example: ``` @@ -134,12 +164,12 @@ Property | Description -------------------------|------------------------------------------------------------------------------------------------------------- BuildNumberSuffix | (string). A specific build number, typically from a CI counter, which is appended to the pre-release label. Configuration | `Debug` or `Release`. Default = `Debug`. -SkipTests | `true` or `false`. When true, builds without running tests. -NoBuild | `true` or `false`. Runs tests without rebuilding. +SharedFxRID | The runtime identifier of the shared framework. ## Use the result of your build After building ASP.NET Core from source, you will need to install and use your local version of ASP.NET Core. +See ["Artifacts"](./Artifacts.md) for more explanation of the different folders produced by a build. - Run the installers produced in `artifacts/{Debug, Release}/installers/` for your platform. - Add a NuGet.Config to your project directory with the following content: @@ -149,7 +179,7 @@ After building ASP.NET Core from source, you will need to install and use your l - + @@ -164,6 +194,9 @@ After building ASP.NET Core from source, you will need to install and use your l ``` - Some features, such as new target frameworks, may require prerelease tooling builds for Visual Studio. These are available in the [Visual Studio Preview](https://www.visualstudio.com/vs/preview/). + +## Resx files + +If you need to make changes to a .resx file, run `dotnet msbuild /t:Resx `. This will update the generated C#. diff --git a/docs/DailyBuilds.md b/docs/DailyBuilds.md index c1c04db7ee..0ad337b7d8 100644 --- a/docs/DailyBuilds.md +++ b/docs/DailyBuilds.md @@ -26,7 +26,7 @@ These are available in the [Visual Studio Preview](https://www.visualstudio.com/ ## NuGet packages -Daily builds of ackages can be found on . This feed may include +Daily builds of packages can be found on . This feed may include packages that will not be supported in a officially released build. Commonly referenced packages: diff --git a/docs/ProjectProperties.md b/docs/ProjectProperties.md new file mode 100644 index 0000000000..98332931b9 --- /dev/null +++ b/docs/ProjectProperties.md @@ -0,0 +1,8 @@ +Project Properties +================== + +In addition to the standard set of MSBuild properties supported by Microsoft.NET.Sdk, projects in this repo often use these additional properties. + +Property name | Meaning +-------------------|-------------------------------------------------------------------------------------------- +IsProductPackage | When set to `true`, the package produced by from project is intended for use by customers. Defaults to `false`, which means the package is intended for internal use only by Microsoft teams. diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000000..f055ea32b5 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,5 @@ +Contributor documentation +========================= + +The primary audience for documentation in this folder is contributors to ASP.NET Core. +If you are looking for documentation on how to *use* ASP.NET Core, go to . diff --git a/docs/ReferenceResolution.md b/docs/ReferenceResolution.md new file mode 100644 index 0000000000..e0c3dbf6f4 --- /dev/null +++ b/docs/ReferenceResolution.md @@ -0,0 +1,34 @@ +`` resolution +======================== + +Most project files in this repo should use `` instead of `` or ``. +This was done to enable ASP.NET Core's unique requirements without requiring most ASP.NET Core contributors +to understand the complex rules for how versions and references should work. The build system will resolve +Reference items to the correct type and version of references based on our servicing and update rules. + +See [ResolveReferences.targets](/eng/targets/ResolveReferences.targets) for the exact implementation of custom +`` resolutions. + +The requirements that led to this system are: + +* Versions of external dependencies should be consistent. +* Servicing updates of ASP.NET Core should minimize the number of assemblies which need to re-build and re-ship. +* Newer versions of packages should not have lower dependency versions than previous releases. +* Minimize the cascading effect of servicing updates where possible by keeping a consistent baseline of dependencies. + +## Recommendations for writing a .csproj + +* Use `` +* Do not use `` +* Only use `` in test projects +* Name the .csproj file to match the assembly name. +* Run `build.cmd /t:GenerateProjectList` when adding new projects +* Use [eng/tools/BaseLineGenerator/](/eng/tools/BaselineGenerator/README.md) if you need to update baselines. + +## Important files + +* [eng/Baseline.xml](/eng/Baseline.xml) - this contains the 'baseline' of the latest servicing release for this branch. It should be modified and used to update the generated file, Baseline.Designer.props. +* [eng/Dependencies.props](/eng/Dependencies.props) - contains a list of all package references that might be used in the repo. +* [eng/PatchConfig.props](/eng/PatchConfig.props) - lists which assemblies or packages are patching in the current build. +* [eng/ProjectReferences.props](/eng/ProjectReferences.props) - lists which assemblies or packages might be available to be referenced as a local project +* [eng/Versions.props](/eng/Versions.props) - contains a list of versions which may be updated by automation. diff --git a/eng/Baseline.Designer.props b/eng/Baseline.Designer.props index 4c1e38844d..bd9ac16d8b 100644 --- a/eng/Baseline.Designer.props +++ b/eng/Baseline.Designer.props @@ -2,7 +2,23 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.2.0 + 2.2.1 + + + + 2.2.0 + + + + 2.2.0 + + + + 2.2.0 + + + + 2.2.0 @@ -15,6 +31,58 @@ + + + 2.2.0-preview-35687 + + + + + + + + + + + + + 2.2.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.2.1 + + + + 2.2.1 + 2.2.0 @@ -24,6 +92,33 @@ + + + 2.2.0 + + + + + + + + + + 2.2.0 + + + + + + + + + + 2.2.0 + + + + 2.2.0 @@ -33,6 +128,120 @@ + + + 2.2.0 + + + + + + + 2.2.0 + + + + + + + 2.2.0 + + + + + + + + 2.2.0 + + + + + + + 2.2.0 + + + + + + + + 2.2.0 + + + + + + + + 2.2.0 + + + + + + + 2.2.0 + + + + + + + + + 2.2.0 + + + + + + + + + + + + + 2.2.0 + + + + + + + + 2.2.0 + + + + + + + + 2.2.0 + + + + + + + + + + + + + + + + 2.2.0 + + + + + 2.2.0 @@ -41,6 +250,15 @@ + + + 2.2.0 + + + + + + 2.2.0 @@ -143,7 +361,7 @@ - 2.2.0 + 2.2.1 @@ -246,6 +464,51 @@ + + + 1.1.0 + + + + + + + + + + + + 1.1.0 + + + + + + + + + 1.1.0 + + + + + + + + + + + + + + + + + + + + + 2.2.0 @@ -294,6 +557,48 @@ + + + 2.2.0 + + + + + + + + + 2.2.0 + + + + + + + + + + + + 2.2.0 + + + + + + + + + + + 2.2.0 + + + + + + + 2.2.0 @@ -329,6 +634,193 @@ + + + 2.2.0 + + + + + + + + 2.2.0 + + + + + 2.2.0 + + + + + + + 2.2.0 + + + + + + + + + + + + + + + + + + + + + 2.2.0 + + + + + + + + 2.2.0 + + + + + + + + + 2.2.0 + + + + + + + + 2.2.0 + + + + + + + 2.2.0 + + + + + + + + + + 2.2.0 + + + + + + + + + + + + 2.2.0 + + + + + + + + + + + + + + + + + + + + + + + 2.2.0 + + + + + + + 2.2.0 + + + + + + + + + + + + 2.2.0 + + + + + + + + 2.2.0 + + + + + + + + + + + + + + 2.2.0 + + + + + + + + + + + + + + + + + + + 2.2.0 + + + + + + 2.2.0 @@ -336,6 +828,32 @@ + + + 2.2.0 + + + + + 2.2.0 + + + + + + 2.2.0 + + + + + + + + 2.2.0 + + + + 2.2.0 @@ -421,6 +939,36 @@ + + + 2.2.1 + + + + + + + + + + + 2.2.1 + + + + + + + + + + + + + + + + 2.2.0 @@ -487,16 +1035,16 @@ - 2.2.0 + 2.2.1 - + - + @@ -509,6 +1057,146 @@ + + + 2.2.0 + + + + + + + + + + + 1.1.0 + + + + + + + + + + + 1.1.0 + + + + + + + + 1.1.0 + + + + + + + + + + + + + + + + 1.1.0 + + + + + + + + + + + + + 1.1.0 + + + + + + + + 1.1.0 + + + + + + + + 1.1.0 + + + + + + + + + + 1.1.0 + + + + + + + + + + + + + + + + + + 1.1.0 + + + + + + + + + + 1.1.0 + + + + + + + + 2.2.0 + + + + + + + + + + 2.2.0 + + + + + + 2.2.0 @@ -530,13 +1218,13 @@ - 2.2.0 + 2.2.1 - + @@ -546,6 +1234,45 @@ + + + 2.2.0 + + + + + + + + + + + + + + + + + + + + + + + + 2.2.0 + + + + + + + + + + + + 2.2.0 @@ -555,6 +1282,25 @@ + + + 2.2.0 + + + + + + + + + + 2.2.0 + + + + + + 2.2.0 @@ -563,4 +1309,18 @@ + + + 2.2.0 + + + + + + 2.2.0 + + + + + \ No newline at end of file diff --git a/eng/Baseline.xml b/eng/Baseline.xml index d88dbac121..c5a8a2d133 100644 --- a/eng/Baseline.xml +++ b/eng/Baseline.xml @@ -1,12 +1,39 @@ - + + + + + + + + + + + + + + + + + + + + + + + @@ -19,7 +46,7 @@ - + @@ -29,16 +56,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -46,16 +101,37 @@ + + - + + + + + + + + + + + + + + - + + + + + + + diff --git a/eng/Dependencies.props b/eng/Dependencies.props index 29f0b9978d..5bb5c428db 100644 --- a/eng/Dependencies.props +++ b/eng/Dependencies.props @@ -1,25 +1,47 @@ - + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - + + + + + + + - + - + + + + + + + + + - + + @@ -29,42 +51,56 @@ - + + + + + + + + + - - - - + - + + + + + + + + + + @@ -76,43 +112,42 @@ - + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + diff --git a/eng/PatchConfig.props b/eng/PatchConfig.props index dcda7bfa6e..976bc15c0f 100644 --- a/eng/PatchConfig.props +++ b/eng/PatchConfig.props @@ -1,15 +1,24 @@ + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - + + + + + - Microsoft.AspNetCore.Server.IIS; - Microsoft.AspNetCore.Server.IISIntegration; - Microsoft.AspNetCore.Server.IntegrationTesting.IIS; - Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets; - Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore; diff --git a/eng/ProjectReferences.props b/eng/ProjectReferences.props index a62827520f..cfc816fe0f 100644 --- a/eng/ProjectReferences.props +++ b/eng/ProjectReferences.props @@ -1,7 +1,11 @@ - + - + @@ -12,7 +16,7 @@ - + @@ -31,8 +35,18 @@ + + + + + + + + + + @@ -40,11 +54,21 @@ - - - - + + + + + + + + + + + + + + @@ -56,12 +80,50 @@ + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml new file mode 100644 index 0000000000..810775dee9 --- /dev/null +++ b/eng/Version.Details.xml @@ -0,0 +1,367 @@ + + + + + https://github.com/aspnet/AspNetCore-Tooling + 000000 + + + https://github.com/aspnet/EntityFrameworkCore + 000000 + + + https://github.com/aspnet/EntityFrameworkCore + 000000 + + + https://github.com/aspnet/EntityFrameworkCore + 000000 + + + https://github.com/aspnet/EntityFrameworkCore + 000000 + + + https://github.com/aspnet/EntityFrameworkCore + 000000 + + + https://github.com/aspnet/EntityFrameworkCore + 000000 + + + https://github.com/aspnet/EntityFrameworkCore + 000000 + + + https://github.com/aspnet/EntityFrameworkCore + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/dotnet/corefx + 000000 + + + https://github.com/dotnet/corefx + 000000 + + + https://github.com/dotnet/corefx + 000000 + + + https://github.com/dotnet/corefx + 000000 + + + https://github.com/dotnet/corefx + 000000 + + + https://github.com/dotnet/corefx + 000000 + + + https://github.com/dotnet/corefx + 000000 + + + https://github.com/dotnet/corefx + 000000 + + + https://github.com/dotnet/corefx + 000000 + + + https://github.com/dotnet/corefx + 000000 + + + https://github.com/dotnet/corefx + 000000 + + + https://github.com/dotnet/corefx + 000000 + + + https://github.com/dotnet/corefx + 000000 + + + https://github.com/dotnet/corefx + 000000 + + + https://github.com/dotnet/corefx + 000000 + + + https://github.com/dotnet/corefx + 000000 + + + https://github.com/dotnet/corefx + 000000 + + + https://github.com/dotnet/corefx + 000000 + + + https://github.com/dotnet/corefx + 000000 + + + https://github.com/dotnet/corefx + 000000 + + + https://github.com/dotnet/core-setup + 000000 + + + https://github.com/dotnet/core-setup + 000000 + + + https://github.com/dotnet/core-setup + 000000 + + + + + https://github.com/aspnet/Extensions + 000000 + + + https://github.com/aspnet/Extensions + 000000 + + + diff --git a/eng/Versions.props b/eng/Versions.props new file mode 100644 index 0000000000..d0e0fa9d3e --- /dev/null +++ b/eng/Versions.props @@ -0,0 +1,181 @@ + + + + + + 3.0.0-preview-27219-3 + 3.0.0-preview-27219-3 + 3.0.0-preview-27219-3 + + + 4.6.0-preview.18619.1 + 4.6.0-preview.18619.1 + 4.6.0-preview.18619.1 + 4.7.0-preview.18619.1 + 4.6.0-preview.18619.1 + 4.6.0-preview.18619.1 + 4.6.0-preview.18619.1 + 4.6.0-preview.18619.1 + 4.6.0-preview.18619.1 + 4.6.0-preview.18619.1 + 1.7.0-preview.18619.1 + 4.6.0-preview.18619.1 + 4.6.0-preview.18619.1 + 4.6.0-preview.18619.1 + 4.6.0-preview.18619.1 + 4.6.0-preview.18619.1 + 4.6.0-preview.18619.1 + 4.6.0-preview.18619.1 + 4.6.0-preview.18619.1 + 4.6.0-preview.18619.1 + + + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + 3.0.0-preview.19059.4 + + + 3.0.0-preview.18604.3 + 3.0.0-preview.18604.3 + 3.0.0-preview.18604.3 + 3.0.0-preview.18604.3 + 3.0.0-preview.18604.3 + 3.0.0-preview.18604.3 + 3.0.0-preview.18604.3 + 3.0.0-preview.18604.3 + + + 3.0.0-preview-19057-06 + + + + $(KoreBuildVersion) + 3.0.0-build-20190110.4 + 1.0.0-alpha-004 + 15.9.0 + + + + + + 4.5.0 + 4.5.2 + 4.5.2 + 4.3.2 + + + 1.10.0 + 5.2.6 + + + 2.3.2 + 15.8.166 + 15.8.166 + 2.8.0 + 2.8.0 + 2.8.0 + 3.19.8 + 5.3.0 + 5.3.0 + 5.3.0 + 2.1.1 + 1.0.1 + 3.0.1 + 3.0.1 + 11.1.0 + 1.4.0 + 5.3.0 + 8.1.4 + + + 0.9.9 + 0.10.13 + 4.2.1 + 4.2.1 + 2.3.0 + 2.3.0 + 2.3.0 + 3.1.0 + 1.7.3.4 + 4.10.0 + 1.0.2 + 12.0.1 + 3.12.1 + 17.17134.0 + 2.43.0 + 3.12.1 + 1.4.0 + 4.0.0 + 2.0.513 + 3.1.1 + 1.3.7 + 2.0.1 + 0.10.0 + 2.3.1 + 2.3.1 + 2.3.1 + 2.4.0 + 2.4.0 + + + diff --git a/eng/dependencies.temp.props b/eng/dependencies.temp.props deleted file mode 100644 index 2f48702aac..0000000000 --- a/eng/dependencies.temp.props +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - diff --git a/eng/scripts/CodeCheck.ps1 b/eng/scripts/CodeCheck.ps1 new file mode 100644 index 0000000000..f9db3a159b --- /dev/null +++ b/eng/scripts/CodeCheck.ps1 @@ -0,0 +1,100 @@ +#requires -version 5 +<# +.SYNOPSIS +This script runs a quick check for common errors, such as checking that Visual Studio solutions are up to date or that generated code has been committed to source. +#> +param( + [switch]$ci +) + +$ErrorActionPreference = 'Stop' +Set-StrictMode -Version 1 +Import-Module -Scope Local -Force "$PSScriptRoot/common.psm1" + +$repoRoot = Resolve-Path "$PSScriptRoot/../../" + +[string[]] $errors = @() + +function LogError([string]$message) { + Write-Host -f Red "error: $message" + $script:errors += $message +} + +try { + # + # Solutions + # + + if ($ci) { + & $repoRoot/build.cmd /t:InstallDotNet + } + + Write-Host "Checking that solutions are up to date" + + Get-ChildItem "$repoRoot/*.sln" -Recurse ` + | ? { + # This .sln file is used by the templating engine. + $_.Name -ne "RazorComponentsWeb-CSharp.sln" + } ` + | % { + Write-Host " Checking $(Split-Path -Leaf $_)" + $slnDir = Split-Path -Parent $_ + $sln = $_ + & dotnet sln $_ list ` + | ? { $_ -ne 'Project(s)' -and $_ -ne '----------' } ` + | % { + $proj = Join-Path $slnDir $_ + if (-not (Test-Path $proj)) { + LogError "Missing project. Solution references a project which does not exist: $proj. [$sln] " + } + } + } + + # + # Generated code check + # + + Write-Host "Re-running code generation" + + Write-Host "Re-generating ProjectReference.props" + Invoke-Block { + [string[]] $generateArgs = @() + if ($ci) { + $generateArgs += '-ci' + } + & $repoRoot/build.cmd /t:GenerateProjectList @generateArgs + } + + Write-Host "Re-generating package baselines" + $dotnet = 'dotnet' + if ($ci) { + $dotnet = "$repoRoot/.dotnet/x64/dotnet.exe" + } + Invoke-Block { + & $dotnet run -p "$repoRoot/eng/tools/BaselineGenerator/" + } + + Write-Host "git diff" + & git diff --ignore-space-at-eol --exit-code + if ($LastExitCode -ne 0) { + $status = git status -s | Out-String + $status = $status -replace "`n","`n " + LogError "Generated code is not up to date." + } +} +finally { + Write-Host "" + Write-Host "Summary:" + Write-Host "" + Write-Host " $($errors.Length) error(s)" + Write-Host "" + + foreach ($err in $errors) { + + Write-Host -f Red "error : $err" + } + + if ($errors) { + exit 1 + } +} diff --git a/eng/scripts/InstallJdk.ps1 b/eng/scripts/InstallJdk.ps1 new file mode 100644 index 0000000000..ba76964e17 --- /dev/null +++ b/eng/scripts/InstallJdk.ps1 @@ -0,0 +1,27 @@ + +param( + [Parameter(Mandatory = $true)] + $JdkVersion + ) + +$ErrorActionPreference = 'Stop' +$ProgressPreference = 'SilentlyContinue' # Workaround PowerShell/PowerShell#2138 + +Set-StrictMode -Version 1 + +if (-not $env:JAVA_HOME) { + throw 'You must set the JAVA_HOME environment variable to the destination of the JDK.' +} + +$repoRoot = Resolve-Path "$PSScriptRoot/../.." +$tempDir = "$repoRoot/obj" +mkdir $tempDir -ea Ignore | out-null +Write-Host "Starting download of JDK ${JdkVersion}" +Invoke-WebRequest -UseBasicParsing -Uri "https://netcorenativeassets.blob.core.windows.net/resource-packages/external/windows/java/jdk-${JdkVersion}_windows-x64_bin.zip" -Out "$tempDir/jdk.zip" +Write-Host "Done downloading JDK ${JdkVersion}" +Expand-Archive "$tempDir/jdk.zip" -d "$tempDir/jdk/" +Write-Host "Expanded JDK to $tempDir" +mkdir (split-path -parent $env:JAVA_HOME) -ea ignore | out-null +Write-Host "Installing JDK to $env:JAVA_HOME" +Move-Item "$tempDir/jdk/jdk-${jdkVersion}" $env:JAVA_HOME +Write-Host "Done installing JDK to $env:JAVA_HOME" diff --git a/eng/scripts/InstallVisualStudio.ps1 b/eng/scripts/InstallVisualStudio.ps1 new file mode 100644 index 0000000000..310508f395 --- /dev/null +++ b/eng/scripts/InstallVisualStudio.ps1 @@ -0,0 +1,82 @@ +<# +.SYNOPSIS + Installs or updates Visual Studio on a local developer machine. +.DESCRIPTION + This installs Visual Studio along with all the workloads required to contribute to this repository. +.PARAMETER Edition + Must be one of these values: + + Community + Professional + Enterprise + + Selects which 'offering' of Visual Studio to install. + +.PARAMETER InstallPath + The location of Visual Studio +.PARAMETER Passive + Run the installer without requiring interaction. +.LINK + https://visualstudio.com + https://github.com/aspnet/AspNetCore/blob/master/docs/BuildFromSource.md +.EXAMPLE + To install VS 2017 Community, run + + InstallVisualStudio.ps1 -Edition Community +#> +[CmdletBinding(DefaultParameterSetName = 'Default')] +param( + [ValidateSet('Community', 'Professional', 'Enterprise')] + [string]$Edition, + [string]$InstallPath, + [switch]$Passive +) + +if (-not $Edition) { + Write-Host "You must specify a value for the -Edition parameter which selects the kind of Visual Studio to install." -f Red + Write-Host "Run ``Get-Help $PSCommandPath`` for more details." -f Red + Write-Host "" + Write-Host "Example: ./InstallVisualStudio -Edition Community" -f Red + Write-Host "" + exit 1 +} + +$ErrorActionPreference = 'Stop' +Set-StrictMode -Version 1 + +$intermedateDir = "$PSScriptRoot\obj" +mkdir $intermedateDir -ErrorAction Ignore | Out-Null + +$bootstrapper = "$intermedateDir\vsinstaller.exe" +$ProgressPreference = 'SilentlyContinue' # Workaround PowerShell/PowerShell#2138 +Invoke-WebRequest -Uri "https://aka.ms/vs/15/release/vs_$($Edition.ToLowerInvariant()).exe" -OutFile $bootstrapper + +if (-not $InstallPath) { + $InstallPath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\2017\$Edition" +} + +# no backslashes - this breaks the installer +$InstallPath = $InstallPath.TrimEnd('\') + +[string[]] $arguments = @() + +if (Test-path $InstallPath) { + $arguments += 'modify' +} + +$arguments += ` + '--productId', "Microsoft.VisualStudio.Product.$Edition", ` + '--installPath', "`"$InstallPath`"", ` + '--in', "$PSScriptRoot\vs.json", ` + '--norestart' + +if ($Passive) { + $arguments += '--passive' +} + +Write-Host "" +Write-Host "Installing Visual Studio 2017 $Edition" -f Magenta +Write-Host "" +Write-Host "Running '$bootstrapper $arguments'" + +& $bootstrapper @arguments diff --git a/eng/scripts/cibuild.cmd b/eng/scripts/cibuild.cmd new file mode 100644 index 0000000000..b1048279a3 --- /dev/null +++ b/eng/scripts/cibuild.cmd @@ -0,0 +1,3 @@ +@ECHO OFF +SET RepoRoot=%~dp0..\.. +%RepoRoot%\build.cmd -ci -all -restore -build -pack -test -sign %* diff --git a/eng/scripts/cibuild.sh b/eng/scripts/cibuild.sh new file mode 100755 index 0000000000..6eab1faa2f --- /dev/null +++ b/eng/scripts/cibuild.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -euo pipefail + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +repo_root="$DIR/../.." +"$repo_root/build.sh" --ci --all --restore --build --pack --test "$@" diff --git a/eng/scripts/common.psm1 b/eng/scripts/common.psm1 new file mode 100644 index 0000000000..42c36bd09e --- /dev/null +++ b/eng/scripts/common.psm1 @@ -0,0 +1,75 @@ +$ErrorActionPreference = 'Stop' +# Update the default TLS support to 1.2 +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 + +function Invoke-Block([scriptblock]$cmd, [string]$WorkingDir = $null) { + if ($WorkingDir) { + Push-Location $WorkingDir + } + + try { + + $cmd | Out-String | Write-Verbose + & $cmd + + # Need to check both of these cases for errors as they represent different items + # - $?: did the powershell script block throw an error + # - $lastexitcode: did a windows command executed by the script block end in error + if ((-not $?) -or ($lastexitcode -ne 0)) { + if ($error -ne $null) + { + Write-Warning $error[0] + } + throw "Command failed to execute: $cmd" + } + } + finally { + if ($WorkingDir) { + Pop-Location + } + } +} + +function SaveXml([xml]$xml, [string]$path) { + Write-Verbose "Saving to $path" + $ErrorActionPreference = 'stop' + + $settings = New-Object System.XML.XmlWriterSettings + $settings.OmitXmlDeclaration = $true + $settings.Encoding = New-Object System.Text.UTF8Encoding( $true ) + $writer = [System.XML.XMLTextWriter]::Create($path, $settings) + $xml.Save($writer) + $writer.Close() +} + +function LoadXml([string]$path) { + Write-Verbose "Reading from $path" + + $ErrorActionPreference = 'stop' + $obj = new-object xml + $obj.PreserveWhitespace = $true + $obj.Load($path) + return $obj +} + +function Get-RemoteFile([string]$RemotePath, [string]$LocalPath) { + if ($RemotePath -notlike 'http*') { + Copy-Item $RemotePath $LocalPath + return + } + + $retries = 10 + while ($retries -gt 0) { + $retries -= 1 + try { + $ProgressPreference = 'SilentlyContinue' # Workaround PowerShell/PowerShell#2138 + Invoke-WebRequest -UseBasicParsing -Uri $RemotePath -OutFile $LocalPath + return + } + catch { + Write-Verbose "Request failed. $retries retries remaining" + } + } + + Write-Error "Download failed: '$RemotePath'." +} diff --git a/eng/scripts/vs.json b/eng/scripts/vs.json new file mode 100644 index 0000000000..af9903867a --- /dev/null +++ b/eng/scripts/vs.json @@ -0,0 +1,30 @@ +{ + "channelUri": "https://aka.ms/vs/15/release/channel", + "channelId": "VisualStudio.15.Release", + "includeRecommended": false, + "addProductLang": [ + "en-US" + ], + "add": [ + "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", + "Microsoft.VisualStudio.Component.Windows81SDK", + "Microsoft.Net.Component.4.7.2.TargetingPack", + "Microsoft.Net.Component.4.7.2.SDK", + "Microsoft.Net.Component.4.7.1.TargetingPack", + "Microsoft.Net.Component.4.7.TargetingPack", + "Microsoft.Net.Component.4.6.2.TargetingPack", + "Microsoft.Net.Component.4.6.1.TargetingPack", + "Microsoft.Net.Component.4.6.TargetingPack", + "Microsoft.Net.Component.4.5.2.TargetingPack", + "Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Win81", + "Microsoft.VisualStudio.Component.Azure.Storage.Emulator", + "Microsoft.VisualStudio.Component.VC.ATL", + "Microsoft.VisualStudio.Component.Windows10SDK.15063.Desktop", + "Microsoft.VisualStudio.Component.Windows10SDK.17134", + "Microsoft.VisualStudio.Workload.ManagedDesktop", + "Microsoft.VisualStudio.Workload.NetWeb", + "Microsoft.VisualStudio.Workload.NetCoreTools", + "Microsoft.VisualStudio.Workload.NativeDesktop", + "Microsoft.VisualStudio.Workload.VisualStudioExtension" + ] +} diff --git a/eng/targets/CSharp.Common.props b/eng/targets/CSharp.Common.props index fe72087c07..8e774beb44 100644 --- a/eng/targets/CSharp.Common.props +++ b/eng/targets/CSharp.Common.props @@ -11,8 +11,17 @@ - + + + + + + + + + + diff --git a/eng/targets/CSharp.Common.targets b/eng/targets/CSharp.Common.targets index a7f7b610b6..8df4213c62 100644 --- a/eng/targets/CSharp.Common.targets +++ b/eng/targets/CSharp.Common.targets @@ -1,5 +1,11 @@ + + + net$(TargetFrameworkVersion.Substring(1).Replace('.','')) + .NETFramework + + diff --git a/eng/targets/Cpp.Common.props b/eng/targets/Cpp.Common.props index f295dbafad..f827506c4f 100644 --- a/eng/targets/Cpp.Common.props +++ b/eng/targets/Cpp.Common.props @@ -3,6 +3,7 @@ true + false diff --git a/eng/targets/Cpp.Common.targets b/eng/targets/Cpp.Common.targets index f2cad0d8c0..b833c62ea2 100644 --- a/eng/targets/Cpp.Common.targets +++ b/eng/targets/Cpp.Common.targets @@ -3,4 +3,13 @@ + + + + + + + + + diff --git a/eng/targets/FSharp.Common.targets b/eng/targets/FSharp.Common.targets new file mode 100644 index 0000000000..d631e77830 --- /dev/null +++ b/eng/targets/FSharp.Common.targets @@ -0,0 +1,4 @@ + + + + diff --git a/eng/targets/Npm.Common.props b/eng/targets/Npm.Common.props new file mode 100644 index 0000000000..3308ca9ee0 --- /dev/null +++ b/eng/targets/Npm.Common.props @@ -0,0 +1,7 @@ + + + test + Release + Debug + + diff --git a/eng/targets/Npm.Common.targets b/eng/targets/Npm.Common.targets new file mode 100644 index 0000000000..2bbed5f9be --- /dev/null +++ b/eng/targets/Npm.Common.targets @@ -0,0 +1,84 @@ + + + + $(PackageId.Replace('@','').Replace('/','-')) + $(NormalizedPackageId)-$(PackageVersion).tgz + $(MSBuildProjectDirectory)\package.json + $(MSBuildProjectDirectory)\obj\ + $([MSBuild]::NormalizeDirectory('$(BaseIntermediateOutputPath)'))$(Configuration)\ + + + + + + + + + + + + + + + + + + + + + + + + + + + $(PackDependsOn); + PrepareForBuild + + + $(PackDependsOn); + Build + + + + + + <_BackupPackageJson>$(IntermediateOutputPath)$(MSBuildProjectName).package.json.bak + <_PackageTargetPath>$(MSBuildProjectDirectory)\$(PackageFileName) + + + + + + + + + + + + + + + + + + + + + + + + + + + NpmPackage + $(PackageId) + $(PackageVersion) + + + + + + + diff --git a/eng/targets/Packaging.targets b/eng/targets/Packaging.targets index fefa42496b..a49a65b988 100644 --- a/eng/targets/Packaging.targets +++ b/eng/targets/Packaging.targets @@ -27,4 +27,16 @@ + + + + + <_ProjectPathWithVersion Include="$(MSBuildProjectFullPath)"> + $(MSBuildProjectName) + $(PackageVersion) + + + + diff --git a/eng/targets/ResolveIisReferences.targets b/eng/targets/ResolveIisReferences.targets new file mode 100644 index 0000000000..ba0ae8fc46 --- /dev/null +++ b/eng/targets/ResolveIisReferences.targets @@ -0,0 +1,44 @@ + + + + + + + + + + Platform=%(Platform) + + %(Platform)\%(HandlerPath)\ + + false + + NativeContent + + Build;BuiltProjectOutputGroup;DebugSymbolsProjectOutputGroup + + true + TargetFramework + + All + + true + + + + + + + + + + + + diff --git a/eng/targets/ResolveReferences.targets b/eng/targets/ResolveReferences.targets index 897a906869..03d40146ca 100644 --- a/eng/targets/ResolveReferences.targets +++ b/eng/targets/ResolveReferences.targets @@ -1,3 +1,21 @@ + @@ -31,26 +49,44 @@ + <_ImplicitPackageReference Include="@(PackageReference->WithMetadataValue('IsImplicitlyDefined', 'true'))" /> + <_ExplicitPackageReference Include="@(PackageReference)" Exclude="@(_ImplicitPackageReference)" /> + <_ExplicitPackageReference Remove="Internal.AspNetCore.Sdk" /> <_ExplicitPackageReference Remove="Microsoft.NETFramework.ReferenceAssemblies" /> - + <_UnusedProjectReferenceProvider Include="@(ProjectReferenceProvider)" Exclude="@(Reference)" /> - + <_ProjectReferenceByAssemblyName Condition="'$(UseProjectReferences)' == 'true'" Include="@(ProjectReferenceProvider)" - Exclude="@(UnusedProjectReferenceProvider)" /> + Exclude="@(_UnusedProjectReferenceProvider)" /> + + + <_ReferenceTemp Include="@(Reference)" /> + + - + + <_ReferenceTemp Remove="@(_ReferenceTemp)" /> + + + @@ -112,6 +149,7 @@ Text="Could not resolve this reference. Could not locate the package or project for "%(Reference.Identity)"" /> + <_TargetFramework Remove="@(_TargetFramework)" /> @@ -127,7 +165,7 @@ - + $([MSBuild]::MakeRelative($(RepositoryRoot), $(MSBuildProjectFullPath))) diff --git a/eng/targets/Wix.Common.props b/eng/targets/Wix.Common.props index d958514aba..9875352599 100644 --- a/eng/targets/Wix.Common.props +++ b/eng/targets/Wix.Common.props @@ -12,7 +12,9 @@ net461 $(BaseIntermediateOutputPath) $(MSBuildProjectDir)\obj\ - $(MSBuildExtensionsPath)\..\Common7\IDE\CommonExtensions\Microsoft\NuGet\NuGet.targets + + $(MSBuildToolsPath32)\..\..\..\Common7\IDE\CommonExtensions\Microsoft\NuGet\NuGet.targets + $(MSBuildToolsPath)\NuGet.targets diff --git a/eng/targets/Wix.Common.targets b/eng/targets/Wix.Common.targets index 4b07606e19..7ff9e39fd6 100644 --- a/eng/targets/Wix.Common.targets +++ b/eng/targets/Wix.Common.targets @@ -17,11 +17,6 @@ - - - - - yes $(OutputName.Replace('-', '_')).cab @@ -46,5 +41,4 @@ - diff --git a/eng/tools/BaselineGenerator/BaselineGenerator.csproj b/eng/tools/BaselineGenerator/BaselineGenerator.csproj index 8e7d5913a6..2f43472aeb 100644 --- a/eng/tools/BaselineGenerator/BaselineGenerator.csproj +++ b/eng/tools/BaselineGenerator/BaselineGenerator.csproj @@ -3,7 +3,7 @@ Exe netcoreapp2.1 - -o "$(MSBuildThisFileDirectory)../../Baseline.Designer.props" + -o "$(MSBuildThisFileDirectory)../../Baseline.Designer.props" --v3 -s https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer $(MSBuildThisFileDirectory)../../ diff --git a/eng/tools/BaselineGenerator/Program.cs b/eng/tools/BaselineGenerator/Program.cs index 4a6177ebec..bf9ee83687 100644 --- a/eng/tools/BaselineGenerator/Program.cs +++ b/eng/tools/BaselineGenerator/Program.cs @@ -96,20 +96,15 @@ namespace PackageBaselineGenerator using (var reader = new PackageArchiveReader(nupkgPath)) { - var first = true; + doc.Root.Add(new XComment($" Package: {id}")); + + var propertyGroup = new XElement("PropertyGroup", + new XAttribute("Condition", $" '$(PackageId)' == '{id}' "), + new XElement("BaselinePackageVersion", version)); + doc.Root.Add(propertyGroup); + foreach (var group in reader.NuspecReader.GetDependencyGroups()) { - if (first) - { - first = false; - doc.Root.Add(new XComment($" Package: {id}")); - - var propertyGroup = new XElement("PropertyGroup", - new XAttribute("Condition", $" '$(PackageId)' == '{id}' "), - new XElement("BaselinePackageVersion", version)); - doc.Root.Add(propertyGroup); - } - var itemGroup = new XElement("ItemGroup", new XAttribute("Condition", $" '$(PackageId)' == '{id}' AND '$(TargetFramework)' == '{group.TargetFramework.GetShortFolderName()}' ")); doc.Root.Add(itemGroup); @@ -131,7 +126,7 @@ namespace PackageBaselineGenerator { doc.Save(writer); } - + Console.WriteLine($"Generated file in {output}"); return 0; } } diff --git a/global.json b/global.json index 5db9ff96a9..93b9880dae 100644 --- a/global.json +++ b/global.json @@ -3,6 +3,6 @@ "version": "3.0.100-preview-009750" }, "msbuild-sdks": { - "Internal.AspNetCore.Sdk": "3.0.0-build-20181206.3" + "Internal.AspNetCore.Sdk": "3.0.0-build-20190110.4" } } diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 817bd1a035..7800fa1cf7 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:3.0.0-build-20181206.3 -commithash:96a199c48729398e013355167c21dd61ff0c574c +version:3.0.0-build-20190110.4 +commithash:356f6ce74815523dfda61e3da6e652ad52f536be diff --git a/korebuild.json b/korebuild.json index 5b5fdb21dd..0352210994 100644 --- a/korebuild.json +++ b/korebuild.json @@ -4,7 +4,7 @@ "msbuildType": "full", "toolsets": { "nodejs": { - "minVersion": "8.0", + "minVersion": "10.0", "required": true }, "visualstudio": { @@ -14,10 +14,9 @@ "includePrerelease": true, "versionRange": "[15.8, 16.0)", "requiredWorkloads": [ - "Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Win81", "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", "Microsoft.VisualStudio.Component.VC.ATL", - "Microsoft.VisualStudio.Component.Windows10SDK.15063.Desktop" + "Microsoft.VisualStudio.Component.Windows10SDK.17134" ] } } diff --git a/run.cmd b/restore.cmd similarity index 71% rename from run.cmd rename to restore.cmd index d52d5c7e68..e6275ff5d1 100644 --- a/run.cmd +++ b/restore.cmd @@ -1,2 +1,2 @@ @ECHO OFF -PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0run.ps1' %*; exit $LASTEXITCODE" +PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0build.ps1' -all -restore:$true -build:$False %*; exit $LASTEXITCODE" diff --git a/restore.sh b/restore.sh new file mode 100644 index 0000000000..0dee0a4a03 --- /dev/null +++ b/restore.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -euo pipefail + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +repo_root="$DIR/../.." +"$repo_root/build.sh" --all --restore --no-build "$@" diff --git a/run.ps1 b/run.ps1 deleted file mode 100644 index aa08c6485b..0000000000 --- a/run.ps1 +++ /dev/null @@ -1,207 +0,0 @@ -#!/usr/bin/env powershell -#requires -version 4 - -<# -.SYNOPSIS -Executes KoreBuild commands. - -.DESCRIPTION -Downloads korebuild if required. Then executes the KoreBuild command. To see available commands, execute with `-Command help`. - -.PARAMETER Command -The KoreBuild command to run. - -.PARAMETER Path -The folder to build. Defaults to the folder containing this script. - -.PARAMETER LockFile -The path to the korebuild-lock.txt file. Defaults to $Path/korebuild-lock.txt - -.PARAMETER Channel -The channel of KoreBuild to download. Overrides the value from the config file. - -.PARAMETER DotNetHome -The directory where .NET Core tools will be stored. - -.PARAMETER ToolsSource -The base url where build tools can be downloaded. Overrides the value from the config file. - -.PARAMETER Update -Updates KoreBuild to the latest version even if a lock file is present. - -.PARAMETER Reinstall -Re-installs KoreBuild - -.PARAMETER ConfigFile -The path to the configuration file that stores values. Defaults to korebuild.json. - -.PARAMETER CI -Sets up CI specific settings and variables. - -.PARAMETER MSBuildArguments -Additional MSBuild arguments to be passed through. - -.NOTES -This function will create a file $PSScriptRoot/korebuild-lock.txt. This lock file can be committed to source, but does not have to be. -When the lockfile is not present, KoreBuild will create one using latest available version from $Channel. - -The $ConfigFile is expected to be an JSON file. It is optional, and the configuration values in it are optional as well. Any options set -in the file are overridden by command line parameters. - -.EXAMPLE -Example config file: -```json -{ - "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/master/tools/korebuild.schema.json", - "channel": "master", - "toolsSource": "https://aspnetcore.blob.core.windows.net/buildtools" -} -``` -#> -[CmdletBinding(PositionalBinding = $false)] -param( - [Parameter(Mandatory=$true, Position = 0)] - [string]$Command, - [string]$Path = $PSScriptRoot, - [string]$LockFile, - [Alias('c')] - [string]$Channel, - [Alias('d')] - [string]$DotNetHome, - [Alias('s')] - [string]$ToolsSource, - [Alias('u')] - [switch]$Update, - [switch]$Reinstall, - [string]$ConfigFile = $null, - [switch]$CI, - [Parameter(ValueFromRemainingArguments = $true)] - [string[]]$MSBuildArguments -) - -Set-StrictMode -Version 2 -$ErrorActionPreference = 'Stop' - -# -# Functions -# - -function Get-KoreBuild { - - if (!(Test-Path $LockFile) -or $Update) { - Get-RemoteFile "$ToolsSource/korebuild/channels/$Channel/latest.txt" $LockFile - } - - $version = Get-Content $LockFile | Where-Object { $_ -like 'version:*' } | Select-Object -first 1 - if (!$version) { - Write-Error "Failed to parse version from $LockFile. Expected a line that begins with 'version:'" - } - $version = $version.TrimStart('version:').Trim() - $korebuildPath = Join-Paths $DotNetHome ('buildtools', 'korebuild', $version) - - if ($Reinstall -and (Test-Path $korebuildPath)) { - Remove-Item -Force -Recurse $korebuildPath - } - - if (!(Test-Path $korebuildPath)) { - Write-Host -ForegroundColor Magenta "Downloading KoreBuild $version" - New-Item -ItemType Directory -Path $korebuildPath | Out-Null - $remotePath = "$ToolsSource/korebuild/artifacts/$version/korebuild.$version.zip" - - try { - $tmpfile = Join-Path ([IO.Path]::GetTempPath()) "KoreBuild-$([guid]::NewGuid()).zip" - Get-RemoteFile $remotePath $tmpfile - if (Get-Command -Name 'Expand-Archive' -ErrorAction Ignore) { - # Use built-in commands where possible as they are cross-plat compatible - Expand-Archive -Path $tmpfile -DestinationPath $korebuildPath - } - else { - # Fallback to old approach for old installations of PowerShell - Add-Type -AssemblyName System.IO.Compression.FileSystem - [System.IO.Compression.ZipFile]::ExtractToDirectory($tmpfile, $korebuildPath) - } - } - catch { - Remove-Item -Recurse -Force $korebuildPath -ErrorAction Ignore - throw - } - finally { - Remove-Item $tmpfile -ErrorAction Ignore - } - } - - return $korebuildPath -} - -function Join-Paths([string]$path, [string[]]$childPaths) { - $childPaths | ForEach-Object { $path = Join-Path $path $_ } - return $path -} - -function Get-RemoteFile([string]$RemotePath, [string]$LocalPath) { - if ($RemotePath -notlike 'http*') { - Copy-Item $RemotePath $LocalPath - return - } - - $retries = 10 - while ($retries -gt 0) { - $retries -= 1 - try { - Invoke-WebRequest -UseBasicParsing -Uri $RemotePath -OutFile $LocalPath - return - } - catch { - Write-Verbose "Request failed. $retries retries remaining" - } - } - - Write-Error "Download failed: '$RemotePath'." -} - -# -# Main -# - -# Load configuration or set defaults - -$Path = Resolve-Path $Path -if (!$ConfigFile) { $ConfigFile = Join-Path $Path 'korebuild.json' } - -if (Test-Path $ConfigFile) { - try { - $config = Get-Content -Raw -Encoding UTF8 -Path $ConfigFile | ConvertFrom-Json - if ($config) { - if (!($Channel) -and (Get-Member -Name 'channel' -InputObject $config)) { [string] $Channel = $config.channel } - if (!($ToolsSource) -and (Get-Member -Name 'toolsSource' -InputObject $config)) { [string] $ToolsSource = $config.toolsSource} - } - } catch { - Write-Warning "$ConfigFile could not be read. Its settings will be ignored." - Write-Warning $Error[0] - } -} - -if (!$DotNetHome) { - $DotNetHome = if ($env:DOTNET_HOME) { $env:DOTNET_HOME } ` - elseif ($CI) { Join-Path $PSScriptRoot '.dotnet' } ` - elseif ($env:USERPROFILE) { Join-Path $env:USERPROFILE '.dotnet'} ` - elseif ($env:HOME) {Join-Path $env:HOME '.dotnet'}` - else { Join-Path $PSScriptRoot '.dotnet'} -} - -if (!$LockFile) { $LockFile = Join-Path $Path 'korebuild-lock.txt' } -if (!$Channel) { $Channel = 'master' } -if (!$ToolsSource) { $ToolsSource = 'https://aspnetcore.blob.core.windows.net/buildtools' } - -# Execute - -$korebuildPath = Get-KoreBuild -Import-Module -Force -Scope Local (Join-Path $korebuildPath 'KoreBuild.psd1') - -try { - Set-KoreBuildSettings -ToolsSource $ToolsSource -DotNetHome $DotNetHome -RepoPath $Path -ConfigFile $ConfigFile -CI:$CI - Invoke-KoreBuildCommand $Command @MSBuildArguments -} -finally { - Remove-Module 'KoreBuild' -ErrorAction Ignore -} diff --git a/run.sh b/run.sh deleted file mode 100755 index e23cd4620a..0000000000 --- a/run.sh +++ /dev/null @@ -1,250 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -# -# variables -# - -RESET="\033[0m" -RED="\033[0;31m" -YELLOW="\033[0;33m" -MAGENTA="\033[0;95m" -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -verbose=false -update=false -reinstall=false -repo_path="$DIR" -lockfile_path='' -channel='' -tools_source='' -ci=false -msbuild_args=() - -# -# Functions -# -__usage() { - echo "Usage: $(basename "${BASH_SOURCE[0]}") command [options] [[--] ...]" - echo "" - echo "Arguments:" - echo " command The command to be run." - echo " ... Arguments passed to the command. Variable number of arguments allowed." - echo "" - echo "Options:" - echo " --verbose Show verbose output." - echo " -c|--channel The channel of KoreBuild to download. Overrides the value from the config file.." - echo " --config-file The path to the configuration file that stores values. Defaults to korebuild.json." - echo " -d|--dotnet-home The directory where .NET Core tools will be stored. Defaults to '\$DOTNET_HOME' or '\$HOME/.dotnet." - echo " --path The directory to build. Defaults to the directory containing the script." - echo " --lockfile The path to the korebuild-lock.txt file. Defaults to \$repo_path/korebuild-lock.txt" - echo " -s|--tools-source|-ToolsSource The base url where build tools can be downloaded. Overrides the value from the config file." - echo " -u|--update Update to the latest KoreBuild even if the lock file is present." - echo " --reinstall Reinstall KoreBuild." - echo " --ci Apply CI specific settings and environment variables." - echo "" - echo "Description:" - echo " This function will create a file \$DIR/korebuild-lock.txt. This lock file can be committed to source, but does not have to be." - echo " When the lockfile is not present, KoreBuild will create one using latest available version from \$channel." - - if [[ "${1:-}" != '--no-exit' ]]; then - exit 2 - fi -} - -get_korebuild() { - local version - if [ ! -f "$lockfile_path" ] || [ "$update" = true ]; then - __get_remote_file "$tools_source/korebuild/channels/$channel/latest.txt" "$lockfile_path" - fi - version="$(grep 'version:*' -m 1 "$lockfile_path")" - if [[ "$version" == '' ]]; then - __error "Failed to parse version from $lockfile_path. Expected a line that begins with 'version:'" - return 1 - fi - version="$(echo "${version#version:}" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')" - local korebuild_path="$DOTNET_HOME/buildtools/korebuild/$version" - - if [ "$reinstall" = true ] && [ -d "$korebuild_path" ]; then - rm -rf "$korebuild_path" - fi - - { - if [ ! -d "$korebuild_path" ]; then - mkdir -p "$korebuild_path" - local remote_path="$tools_source/korebuild/artifacts/$version/korebuild.$version.zip" - tmpfile="$(mktemp)" - echo -e "${MAGENTA}Downloading KoreBuild ${version}${RESET}" - if __get_remote_file "$remote_path" "$tmpfile"; then - unzip -q -d "$korebuild_path" "$tmpfile" - fi - rm "$tmpfile" || true - fi - - source "$korebuild_path/KoreBuild.sh" - } || { - if [ -d "$korebuild_path" ]; then - echo "Cleaning up after failed installation" - rm -rf "$korebuild_path" || true - fi - return 1 - } -} - -__error() { - echo -e "${RED}error: $*${RESET}" 1>&2 -} - -__warn() { - echo -e "${YELLOW}warning: $*${RESET}" -} - -__machine_has() { - hash "$1" > /dev/null 2>&1 - return $? -} - -__get_remote_file() { - local remote_path=$1 - local local_path=$2 - - if [[ "$remote_path" != 'http'* ]]; then - cp "$remote_path" "$local_path" - return 0 - fi - - local failed=false - if __machine_has wget; then - wget --tries 10 --quiet -O "$local_path" "$remote_path" || failed=true - else - failed=true - fi - - if [ "$failed" = true ] && __machine_has curl; then - failed=false - curl --retry 10 -sSL -f --create-dirs -o "$local_path" "$remote_path" || failed=true - fi - - if [ "$failed" = true ]; then - __error "Download failed: $remote_path" 1>&2 - return 1 - fi -} - -# -# main -# - -command="${1:-}" -shift - -while [[ $# -gt 0 ]]; do - case $1 in - -\?|-h|--help) - __usage --no-exit - exit 0 - ;; - -c|--channel|-Channel) - shift - channel="${1:-}" - [ -z "$channel" ] && __error "Missing value for parameter --channel" && __usage - ;; - --config-file|-ConfigFile) - shift - config_file="${1:-}" - [ -z "$config_file" ] && __error "Missing value for parameter --config-file" && __usage - if [ ! -f "$config_file" ]; then - __error "Invalid value for --config-file. $config_file does not exist." - exit 1 - fi - ;; - -d|--dotnet-home|-DotNetHome) - shift - DOTNET_HOME="${1:-}" - [ -z "$DOTNET_HOME" ] && __error "Missing value for parameter --dotnet-home" && __usage - ;; - --path|-Path) - shift - repo_path="${1:-}" - [ -z "$repo_path" ] && __error "Missing value for parameter --path" && __usage - ;; - --[Ll]ock[Ff]ile) - shift - lockfile_path="${1:-}" - [ -z "$lockfile_path" ] && __error "Missing value for parameter --lockfile" && __usage - ;; - -s|--tools-source|-ToolsSource) - shift - tools_source="${1:-}" - [ -z "$tools_source" ] && __error "Missing value for parameter --tools-source" && __usage - ;; - -u|--update|-Update) - update=true - ;; - --reinstall|-Reinstall) - reinstall=true - ;; - --ci|-[Cc][Ii]) - ci=true - if [[ -z "${DOTNET_HOME:-}" ]]; then - DOTNET_HOME="$DIR/.dotnet" - fi - ;; - --verbose|-Verbose) - verbose=true - ;; - *) - msbuild_args[${#msbuild_args[*]}]="$1" - ;; - esac - shift -done - -if ! __machine_has unzip; then - __error 'Missing required command: unzip' - exit 1 -fi - -if ! __machine_has curl && ! __machine_has wget; then - __error 'Missing required command. Either wget or curl is required.' - exit 1 -fi - -[ -z "${config_file:-}" ] && config_file="$repo_path/korebuild.json" -if [ -f "$config_file" ]; then - if __machine_has jq ; then - if jq '.' "$config_file" >/dev/null ; then - config_channel="$(jq -r 'select(.channel!=null) | .channel' "$config_file")" - config_tools_source="$(jq -r 'select(.toolsSource!=null) | .toolsSource' "$config_file")" - else - __error "$config_file is invalid JSON. Its settings will be ignored." - exit 1 - fi - elif __machine_has python ; then - if python -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'))" >/dev/null ; then - config_channel="$(python -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['channel'] if 'channel' in obj else '')")" - config_tools_source="$(python -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['toolsSource'] if 'toolsSource' in obj else '')")" - else - __error "$config_file is invalid JSON. Its settings will be ignored." - exit 1 - fi - else - __error 'Missing required command: jq or python. Could not parse the JSON file. Its settings will be ignored.' - exit 1 - fi - - [ ! -z "${config_channel:-}" ] && channel="$config_channel" - [ ! -z "${config_tools_source:-}" ] && tools_source="$config_tools_source" -fi - -[ -z "${DOTNET_HOME:-}" ] && DOTNET_HOME="$HOME/.dotnet" -[ -z "$lockfile_path" ] && lockfile_path="$repo_path/korebuild-lock.txt" -[ -z "$channel" ] && channel='master' -[ -z "$tools_source" ] && tools_source='https://aspnetcore.blob.core.windows.net/buildtools' - -get_korebuild -set_korebuildsettings "$tools_source" "$DOTNET_HOME" "$repo_path" "$config_file" "$ci" - -# This incantation avoids unbound variable issues if msbuild_args is empty -# https://stackoverflow.com/questions/7577052/bash-empty-array-expansion-with-set-u -invoke_korebuild_command "$command" ${msbuild_args[@]+"${msbuild_args[@]}"} diff --git a/scripts/Tag-TeamCityBuild.ps1 b/scripts/Tag-TeamCityBuild.ps1 deleted file mode 100755 index d624d4f50c..0000000000 --- a/scripts/Tag-TeamCityBuild.ps1 +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env pwsh - -<# -.SYNOPSIS - Tags the given TeamCity build with the given tag. -.PARAMETER BuildId - The BuildId of the build to be tagged. -.PARAMETER Tag - The tag to put on this build. -#> - -[cmdletbinding(SupportsShouldProcess = $true)] -param( - [Parameter(Mandatory = $true)] - [string]$BuildId, - [Parameter(Mandatory = $true)] - [string]$Tag, - [Parameter(Mandatory = $true)] - [string]$UserName, - [Parameter(Mandatory = $true)] - [string]$Password -) - -$ErrorActionPreference = 'Stop' -Set-StrictMode -Version 2 - -$authInfo = "${UserName}:$Password" -$authEncoded = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($authInfo)) -$basicAuthValue = "Basic $authEncoded" - -$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" -$headers.Add("Authorization", $basicAuthValue) -$headers.Add("Content-Type", "text/plain") - -$uri = "http://aspnetci/app/rest/builds/$BuildId/tags/" - -Invoke-WebRequest -Uri $uri -Method 'POST' -Headers $headers -Body $Tag -ErrorAction SilentlyContinue diff --git a/scripts/UpdateBuildTools.ps1 b/scripts/UpdateBuildTools.ps1 deleted file mode 100755 index efcda1e03b..0000000000 --- a/scripts/UpdateBuildTools.ps1 +++ /dev/null @@ -1,99 +0,0 @@ -#!/usr/bin/env pwsh - -<# -.SYNOPSIS - Updates the build tools version and generates a commit message with the list of changes -.PARAMETER RepoRoot - The directory containing the repo -.PARAMETER GitAuthorName - The author name to use in the commit message. (Optional) -.PARAMETER GitAuthorEmail - The author email to use in the commit message. (Optional) -.PARAMETER GitCommitArgs - Additional arguments to pass into git-commit -.PARAMETER NoCommit - Make changes without executing git-commit -.PARAMETER ToolsSource - The location of the build tools -.PARAMETER Force - Specified this to make a commit with any changes -#> -[cmdletbinding(SupportsShouldProcess = $true)] -param( - [string]$RepoRoot, - [string]$GitAuthorName = $null, - [string]$GitAuthorEmail = $null, - [string[]]$GitCommitArgs = @(), - [string]$ToolsSource = 'https://aspnetcore.blob.core.windows.net/buildtools', - [switch]$NoCommit, - [switch]$Force -) - -$ErrorActionPreference = 'Stop' -Set-StrictMode -Version 2 - -if (-not $RepoRoot) { - $RepoRoot = Resolve-Path "$PSScriptRoot\.." -} - -Import-Module "$PSScriptRoot/common.psm1" -Scope Local -Force - -function Get-KoreBuildVersion { - $lockFile = "$RepoRoot/korebuild-lock.txt" - if (!(Test-Path $lockFile)) { - return '' - } - $version = Get-Content $lockFile | Where-Object { $_ -like 'version:*' } | Select-Object -first 1 - if (!$version) { - Write-Error "Failed to parse version from $lockFile. Expected a line that begins with 'version:'" - } - $version = $version.TrimStart('version:').Trim() - return $version -} - -Push-Location $RepoRoot -try { - Assert-Git - - $oldVersion = Get-KoreBuildVersion - - & "$RepoRoot/run.ps1" -Update -ToolsSource $ToolsSource -Command noop | Out-Null - - $newVersion = Get-KoreBuildVersion - - if ($oldVersion -eq $newVersion) { - Write-Host -ForegroundColor Magenta 'No changes to build tools' - exit 0 - } - - Invoke-Block { git add "$RepoRoot/global.json" } - Invoke-Block { git add "$RepoRoot/korebuild-lock.txt" } - Invoke-Block { git add "$RepoRoot/build/dependencies.props" } - - $shortMessage = "Updating BuildTools from $oldVersion to $newVersion" - # add this to the commit message to make it possible to filter commit triggers based on message - $message = "$shortMessage`n`n[auto-updated: buildtools]" - - if (-not $NoCommit -and ($Force -or ($PSCmdlet.ShouldContinue($shortMessage, 'Create a new commit with these changes?')))) { - - $gitConfigArgs = @() - if ($GitAuthorName) { - $gitConfigArgs += '-c', "user.name=$GitAuthorName" - } - - if ($GitAuthorEmail) { - $gitConfigArgs += '-c', "user.email=$GitAuthorEmail" - } - - Invoke-Block { git @gitConfigArgs commit -m $message @GitCommitArgs } - } - else { - # If composing this script with others, return the message that would have been used - return @{ - message = $message - } - } -} -finally { - Pop-Location -} diff --git a/scripts/UpdateDependencies.ps1 b/scripts/UpdateDependencies.ps1 deleted file mode 100755 index 6adaea833e..0000000000 --- a/scripts/UpdateDependencies.ps1 +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/env pwsh -c -<# -.PARAMETER BuildXml - The URL or file path to a build.xml file that defines package versions to be used -#> -[CmdletBinding()] -param( - [Parameter(Mandatory = $true)] - $BuildXml, - [switch]$NoCommit, - [string]$GithubUpstreamBranch, - [string]$GithubEmail, - [string]$GithubUsername, - [string]$GithubToken -) - -$ErrorActionPreference = 'Stop' -Import-Module -Scope Local -Force "$PSScriptRoot/common.psm1" -Set-StrictMode -Version 1 -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -if (-not $NoCommit) { - Set-GitHubInfo $GithubToken $GithubUsername $GithubEmail -} - -$depsPath = Resolve-Path "$PSScriptRoot/../build/dependencies.props" -[xml] $dependencies = LoadXml $depsPath - -if ($BuildXml -like 'http*') { - $url = $BuildXml - New-Item -Type Directory "$PSScriptRoot/../obj/" -ErrorAction Ignore - $BuildXml = "$PSScriptRoot/../obj/build.xml" - Write-Verbose "Downloading from $url to $BuildXml" - Invoke-WebRequest -OutFile $BuildXml $url -} - -[xml] $remoteDeps = LoadXml $BuildXml - -$variables = @{} - -foreach ($package in $remoteDeps.SelectNodes('//Package')) { - $packageId = $package.Id - $packageVersion = $package.Version - $varName = PackageIdVarName $packageId - Write-Verbose "Found {id: $packageId, version: $packageVersion, varName: $varName }" - - if ($variables[$varName]) { - if ($variables[$varName].Where( {$_ -eq $packageVersion}, 'First').Count -eq 0) { - $variables[$varName] += $packageVersion - } - } - else { - $variables[$varName] = @($packageVersion) - } -} - -if (-not $NoCommit) { - $currentBranch = Invoke-Block { & git rev-parse --abbrev-ref HEAD } - $destinationBranch = "dotnetbot/UpdateDeps" - Invoke-Block { & git checkout -tb $destinationBranch "origin/$GithubUpstreamBranch" } -} - -try { - $updatedVars = UpdateVersions $variables $dependencies $depsPath - - if ($NoCommit) { - exit 0 - } - - $body = CommitUpdatedVersions $updatedVars $dependencies $depsPath - - if ($body) { - CreatePR "aspnet" $GithubUsername $GithubUpstreamBranch $destinationBranch $body $GithubToken - } -} -finally { - if (-not $NoCommit) { - Invoke-Block { & git checkout $currentBranch } - } -} diff --git a/scripts/UpdateSubmodules.ps1 b/scripts/UpdateSubmodules.ps1 deleted file mode 100755 index 11058328f0..0000000000 --- a/scripts/UpdateSubmodules.ps1 +++ /dev/null @@ -1,144 +0,0 @@ -#!/usr/bin/env pwsh -c - -<# -.SYNOPSIS - Updates git submodules and generates a commit message with the list of changes -.PARAMETER GitAuthorName - The author name to use in the commit message. (Optional) -.PARAMETER GitAuthorEmail - The author email to use in the commit message. (Optional) -.PARAMETER GitCommitArgs - Additional arguments to pass into git-commit -.PARAMETER NoCommit - Make changes without executing git-commit -.PARAMETER Force - Specified this to make a commit with any changes -.PARAMETER IgnoredRepos - Repos to not update (likely because they are temporarily broken). -#> -[cmdletbinding(SupportsShouldProcess = $true)] -param( - [string]$GitAuthorName = $null, - [string]$GitAuthorEmail = $null, - [string[]]$GitCommitArgs = @(), - [switch]$NoCommit, - [switch]$Force, - [string[]]$IgnoredRepos = @() -) - -$ErrorActionPreference = 'Stop' -Set-StrictMode -Version 2 - -$RepoRoot = Resolve-Path "$PSScriptRoot\.." -$ModuleDirectory = Join-Path $RepoRoot "modules" - -Import-Module "$PSScriptRoot/common.psm1" -Scope Local -Force - -function Get-GitChanges([string]$Path) { - Write-Verbose "git diff --cached --quiet $Path" - & git diff --cached --quiet $Path | Out-Null - if ($LastExitCode -ne 0) { - return $true - } - Write-Verbose "git diff --quiet $Path" - & git diff --quiet $Path | Out-Null - return $LastExitCode -ne 0 -} - -Push-Location $RepoRoot | Out-Null -try { - Assert-Git - - Write-Host "Checking that submodules are in a clean state first..." - if (Get-GitChanges $ModuleDirectory) { - Write-Error "$RepoRoot/modules is in an unclean state. Reset submodules first by running ``git submodule update``" - exit 1 - } - - $submodules = Get-Submodules $RepoRoot -Verbose:$VerbosePreference - - foreach ($submodule in $submodules) { - $submoduleName = $submodule.module - if ($IgnoredRepos.Contains($submoduleName)) - { - Write-Host "Skipping $submoduleName due to IgnoredRepos." - continue - } - - $submodulePath = $submodule.path - Write-Host "Updating $submodulePath" - - $vcs_name = "BUILD_VCS_NUMBER_" + ($submodule.module -replace '\.','_') - $newCommit = [environment]::GetEnvironmentVariable($vcs_name) - - if (-not $newCommit) { - if ($env:TEAMCITY_PROJECT_NAME) { - throw "TeamCity env variable '$vcs_name' not found. Make sure to configure a VCS root for $submodulePath" - } - Invoke-Block { & git submodule update --remote $submodulePath } - Push-Location $submodulePath | Out-Null - try { - $newCommit = $(git rev-parse HEAD) - } - finally { - Pop-Location | Out-Null - } - } - else { - Push-Location $submodulePath | Out-Null - try { - Invoke-Block { & git checkout $newCommit } - } - finally { - Pop-Location | Out-Null - } - } - - $submodule.newCommit = $newCommit - if ($newCommit -ne $submodule.commit) { - $submodule.changed = $true - Write-Host -ForegroundColor Cyan "`t=> $($submodule.module) updated to $($submodule.newCommit)" - } - else { - Write-Host -ForegroundColor Magenta "`t$($submodule.module) did not change" - } - } - - $changes = $submodules ` - | ? { $_.changed } ` - | % { - Invoke-Block { & git add $_.path } - "$($_.module) => $($_.newCommit)" - } - - if ($changes) { - $shortMessage = "Updating submodule(s) `n`n$( $changes -join "`n" )" - # add this to the commit message to make it possible to filter commit triggers based on message - $message = "$shortMessage`n`n[auto-updated: submodules]" - if (-not $NoCommit -and ($Force -or ($PSCmdlet.ShouldContinue($shortMessage, 'Create a new commit with these changes?')))) { - - $gitConfigArgs = @() - if ($GitAuthorName) { - $gitConfigArgs += '-c',"user.name=$GitAuthorName" - } - - if ($GitAuthorEmail) { - $gitConfigArgs += '-c',"user.email=$GitAuthorEmail" - } - - Invoke-Block { & git @gitConfigArgs commit -m $message @GitCommitArgs } - } - else { - # If composing this script with others, return the message that would have been used - return @{ - message = $message - } - } - } - else { - Write-Host -ForegroundColor Magenta 'No changes detected in git submodules' - } -} -finally { - Pop-Location -} diff --git a/scripts/common.psm1 b/scripts/common.psm1 deleted file mode 100644 index c547cba9a9..0000000000 --- a/scripts/common.psm1 +++ /dev/null @@ -1,314 +0,0 @@ -$ErrorActionPreference = 'Stop' -# Update the default TLS support to 1.2 -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -function Assert-Git { - if (!(Get-Command git -ErrorAction Ignore)) { - Write-Error 'git is required to execute this script' - exit 1 - } -} - -function Invoke-Block([scriptblock]$cmd, [string]$WorkingDir = $null) { - if ($WorkingDir) { - Push-Location $WorkingDir - } - - try { - - $cmd | Out-String | Write-Verbose - & $cmd - - # Need to check both of these cases for errors as they represent different items - # - $?: did the powershell script block throw an error - # - $lastexitcode: did a windows command executed by the script block end in error - if ((-not $?) -or ($lastexitcode -ne 0)) { - if ($error -ne $null) - { - Write-Warning $error[0] - } - throw "Command failed to execute: $cmd" - } - } - finally { - if ($WorkingDir) { - Pop-Location - } - } -} - -function Get-Submodules { - param( - [Parameter(Mandatory = $true)] - [string]$RepoRoot, - [switch]$Shipping - ) - - $moduleConfigFile = Join-Path $RepoRoot ".gitmodules" - $submodules = @() - - [xml] $submoduleConfig = Get-Content "$RepoRoot/build/submodules.props" - $repos = $submoduleConfig.Project.ItemGroup.Repository | % { $_.Include } - - Get-ChildItem "$RepoRoot/modules/*" -Directory ` - | ? { (-not $Shipping) -or $($repos -contains $($_.Name)) -or $_.Name -eq 'Templating' } ` - | % { - Push-Location $_ | Out-Null - Write-Verbose "Attempting to get submodule info for $_" - - if (Test-Path 'version.props') { - [xml] $versionXml = Get-Content 'version.props' - $versionPrefix = $versionXml.Project.PropertyGroup.VersionPrefix | select-object -first 1 - $versionSuffix = $versionXml.Project.PropertyGroup.VersionSuffix | select-object -first 1 - } - else { - $versionPrefix = '' - $versionSuffix = '' - } - - try { - $data = [PSCustomObject] @{ - path = $_ - module = $_.Name - commit = $(git rev-parse HEAD) - newCommit = $null - changed = $false - remote = $(git config remote.origin.url) - branch = $(git config -f $moduleConfigFile --get submodule.modules/$($_.Name).branch ) - versionPrefix = $versionPrefix - versionSuffix = $versionSuffix - } - - $submodules += $data - } - finally { - Pop-Location | Out-Null - } - } - - return $submodules -} - -function SaveXml([xml]$xml, [string]$path) { - Write-Verbose "Saving to $path" - $ErrorActionPreference = 'stop' - - $settings = New-Object System.XML.XmlWriterSettings - $settings.OmitXmlDeclaration = $true - $settings.Encoding = New-Object System.Text.UTF8Encoding( $true ) - $writer = [System.XML.XMLTextWriter]::Create($path, $settings) - $xml.Save($writer) - $writer.Close() -} - -function LoadXml([string]$path) { - Write-Verbose "Reading from $path" - - $ErrorActionPreference = 'stop' - $obj = new-object xml - $obj.PreserveWhitespace = $true - $obj.Load($path) - return $obj -} - -function PackageIdVarName([string]$packageId) { - $canonicalVarName = '' - $upperCaseNext = $true - for ($i = 0; $i -lt $packageId.Length; $i++) { - $ch = $packageId[$i] - if (-not [System.Char]::IsLetterOrDigit(($ch))) { - $upperCaseNext = $true - continue - } - if ($upperCaseNext) { - $ch = [System.Char]::ToUpperInvariant($ch) - $upperCaseNext = $false - } - $canonicalVarName += $ch - } - $canonicalVarName += "PackageVersion" - return $canonicalVarName -} - -function Ensure-Hub() { - $tmpDir = "$PSScriptRoot\tmp" - $zipDir = "$tmpDir\Hub" - $hubLocation = "$zipDir\bin\hub.exe" - - if (-Not (Test-Path $hubLocation) ) { - $source = "https://github.com/github/hub/releases/download/v2.3.0-pre9/hub-windows-amd64-2.3.0-pre9.zip" - $zipLocation = "$tmpDir\hub.zip" - - mkdir -Path $tmpDir -ErrorAction Ignore | Out-Null - - Invoke-WebRequest -OutFile $zipLocation -Uri $source - - Expand-Archive -Path $zipLocation -DestinationPath $zipDir -Force - if (-Not (Test-Path $hubLocation)) { - throw "Hub couldn't be downloaded" - } - } - - return $hubLocation -} - -function CreatePR( - [string]$baseFork, - [string]$headFork, - [string]$baseBranch, - [string]$destinationBranch, - [string]$body, - [string]$gitHubToken) { - $hubLocation = Ensure-Hub - - Invoke-Block { git push -f https://$gitHubToken@github.com/$headFork/AspNetCore.git $destinationBranch } - & $hubLocation pull-request -f -b "${baseFork}:$baseBranch" -h "${headFork}:$destinationBranch" -m $body -} - -function Set-GithubInfo( - [string]$GitHubPassword, - [string]$GitHubUser, - [string]$GitHubEmail) -{ - $Env:GITHUB_TOKEN = $GitHubPassword - $Env:GITHUB_USER = $GitHubUser - $Env:GITHUB_EMAIL = $GitHubEmail -} -function CommitUpdatedVersions( - [hashtable]$updatedVars, - [xml]$dependencies, - [string]$depsPath, - [string]$subject = 'Updating external dependencies') -{ - $count = $updatedVars.Count - if ($count -gt 0) { - & git add build\dependencies.props - - $gitConfigArgs = @() - if ($env:GITHUB_USER) { - $gitConfigArgs += '-c',"user.name=$env:GITHUB_USER" - } - - if ($env:GITHUB_EMAIL) { - $gitConfigArgs += '-c',"user.email=$env:GITHUB_EMAIL" - } - - Invoke-Block { & git @gitConfigArgs commit -m $subject } | Out-Null - - $body = "$subject`n`n" - - $body += "New versions:`n" - - foreach ($var in $updatedVars.GetEnumerator()) { - $body += " $($var.Name)`n" - } - - return $body - } -} - -function UpdateVersions([hashtable]$variables, [xml]$dependencies, [string]$depsPath) { - $updatedVars = @{} - - foreach ($varName in ($variables.Keys | sort)) { - $packageVersions = $variables[$varName] - if ($packageVersions.Length -gt 1) { - Write-Warning "Skipped $varName. Multiple version found. { $($packageVersions -join ', ') }." - continue - } - - $packageVersion = $packageVersions | Select-Object -First 1 - - $depVarNode = $dependencies.SelectSingleNode("//PropertyGroup[`@Label=`"Package Versions: Auto`"]/$varName") - if ($depVarNode -and $depVarNode.InnerText -ne $packageVersion) { - $depVarNode.InnerText = $packageVersion - Write-Host -f DarkGray " Updating $varName to $packageVersion" - $updatedVars[$varName] = $packageVersion - } - elseif ($depVarNode) { - Write-Host -f DarkBlue " Didn't update $varName to $packageVersion because it was $($depVarNode.InnerText)" - } - else { - # This isn't a dependency we use - } - } - - if ($updatedVars.Count -gt 0) { - Write-Host -f Cyan "Updating version variables in $depsPath" - SaveXml $dependencies $depsPath - } - else { - Write-Host -f Green "No changes found" - } - - return $updatedVars -} - -function Get-MSBuildPath { - param( - [switch]$Prerelease, - [string[]]$Requires - ) - - $vsInstallDir = $null - if ($env:VSINSTALLDIR -and (Test-Path $env:VSINSTALLDIR)) { - $vsInstallDir = $env:VSINSTALLDIR - Write-Verbose "Using VSINSTALLDIR=$vsInstallDir" - } - else { - $vswhere = "${env:ProgramFiles(x86)}/Microsoft Visual Studio/Installer/vswhere.exe" - Write-Verbose "Using vswhere.exe from $vswhere" - - if (-not (Test-Path $vswhere)) { - Write-Error "Missing prerequisite: could not find vswhere" - } - - [string[]] $vswhereArgs = @() - - if ($Prerelease) { - $vswhereArgs += '-prerelease' - } - - if ($Requires) { - foreach ($r in $Requires) { - $vswhereArgs += '-requires', $r - } - } - - $installs = & $vswhere -format json -version '[15.0, 16.0)' -latest -products * @vswhereArgs | ConvertFrom-Json - if (!$installs) { - Write-Error "Missing prerequisite: could not find any installations of Visual Studio" - } - - $vs = $installs | Select-Object -First 1 - $vsInstallDir = $vs.installationPath - Write-Host "Using $($vs.displayName)" - } - - $msbuild = Join-Path $vsInstallDir 'MSBuild/15.0/bin/msbuild.exe' - if (!(Test-Path $msbuild)) { - Write-Error "Missing prerequisite: could not find msbuild.exe" - } - return $msbuild -} - -function Get-RemoteFile([string]$RemotePath, [string]$LocalPath) { - if ($RemotePath -notlike 'http*') { - Copy-Item $RemotePath $LocalPath - return - } - - $retries = 10 - while ($retries -gt 0) { - $retries -= 1 - try { - Invoke-WebRequest -UseBasicParsing -Uri $RemotePath -OutFile $LocalPath - return - } - catch { - Write-Verbose "Request failed. $retries retries remaining" - } - } - - Write-Error "Download failed: '$RemotePath'." -} diff --git a/src/AADIntegration/.gitignore b/src/AADIntegration/.gitignore deleted file mode 100644 index e38f0aa101..0000000000 --- a/src/AADIntegration/.gitignore +++ /dev/null @@ -1,43 +0,0 @@ -[Oo]bj/ -[Bb]in/ -TestResults/ -.nuget/ -.build/ -.testPublish/ -*.sln.ide/ -_ReSharper.*/ -packages/ -artifacts/ -PublishProfiles/ -.vs/ -bower_components/ -node_modules/ -debugSettings.json -project.lock.json -*.user -*.suo -*.cache -*.docstates -_ReSharper.* -nuget.exe -*net45.csproj -*net451.csproj -*k10.csproj -*.psess -*.vsp -*.pidb -*.userprefs -*DS_Store -*.ncrunchsolution -*.*sdf -*.ipch -.settings -*.sln.ide -node_modules -*launchSettings.json -*.orig -.vscode/ -global.json -BenchmarkDotNet.Artifacts/ -.idea/ -msbuild.binlog diff --git a/src/AADIntegration/AADIntegration.sln b/src/AADIntegration/AADIntegration.sln deleted file mode 100644 index 2ed6ef8876..0000000000 --- a/src/AADIntegration/AADIntegration.sln +++ /dev/null @@ -1,79 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26124.0 -MinimumVisualStudioVersion = 15.0.26124.0 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{75A812B0-D98C-45F3-B2A9-357BBDF7331A}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{8CF63E1D-F9F7-4CB4-AD90-88C4077F7BFF}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{57F46508-E53D-4F6B-B77C-2EFE95925AEF}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AzureADB2CSample", "samples\AzureADB2CSample\AzureADB2CSample.csproj", "{5D2378D4-9DDA-468F-82C6-AE4DAA54E96C}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Authentication.AzureADB2C.UI", "src\Microsoft.AspNetCore.Authentication.AzureADB2C.UI\Microsoft.AspNetCore.Authentication.AzureADB2C.UI.csproj", "{16912327-C9B3-49FC-87E0-49FEDED0A065}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Test", "test\Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Test\Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Test.csproj", "{454089F9-ED16-4A11-9C52-2BA74DCF5D35}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Authentication.AzureAD.UI", "src\Microsoft.AspNetCore.Authentication.AzureAD.UI\Microsoft.AspNetCore.Authentication.AzureAD.UI.csproj", "{1762840C-A14A-4498-9883-CC671956F0F2}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Authentication.AzureAD.UI.Test", "test\Microsoft.AspNetCore.Authentication.AzureAD.UI.Test\Microsoft.AspNetCore.Authentication.AzureAD.UI.Test.csproj", "{3D0CF896-3A9D-4A8F-A343-A2E1A131C861}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNetCore.Authentication.AzureAD.FunctionalTests", "test\Microsoft.AspNetCore.Authentication.AzureAD.FunctionalTests\Microsoft.AspNetCore.Authentication.AzureAD.FunctionalTests.csproj", "{1967296B-614B-43E5-B1BA-A601579961D5}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WebSites", "WebSites", "{2AEF59C3-7ADA-404D-B965-26B700FBD03F}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AzureAD.WebSite", "test\WebSites\AzureAD.WebSite\AzureAD.WebSite.csproj", "{4DB3C5B2-9FBF-42BC-80B2-2190EB1AE316}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {5D2378D4-9DDA-468F-82C6-AE4DAA54E96C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5D2378D4-9DDA-468F-82C6-AE4DAA54E96C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5D2378D4-9DDA-468F-82C6-AE4DAA54E96C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5D2378D4-9DDA-468F-82C6-AE4DAA54E96C}.Release|Any CPU.Build.0 = Release|Any CPU - {16912327-C9B3-49FC-87E0-49FEDED0A065}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {16912327-C9B3-49FC-87E0-49FEDED0A065}.Debug|Any CPU.Build.0 = Debug|Any CPU - {16912327-C9B3-49FC-87E0-49FEDED0A065}.Release|Any CPU.ActiveCfg = Release|Any CPU - {16912327-C9B3-49FC-87E0-49FEDED0A065}.Release|Any CPU.Build.0 = Release|Any CPU - {454089F9-ED16-4A11-9C52-2BA74DCF5D35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {454089F9-ED16-4A11-9C52-2BA74DCF5D35}.Debug|Any CPU.Build.0 = Debug|Any CPU - {454089F9-ED16-4A11-9C52-2BA74DCF5D35}.Release|Any CPU.ActiveCfg = Release|Any CPU - {454089F9-ED16-4A11-9C52-2BA74DCF5D35}.Release|Any CPU.Build.0 = Release|Any CPU - {1762840C-A14A-4498-9883-CC671956F0F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1762840C-A14A-4498-9883-CC671956F0F2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1762840C-A14A-4498-9883-CC671956F0F2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1762840C-A14A-4498-9883-CC671956F0F2}.Release|Any CPU.Build.0 = Release|Any CPU - {3D0CF896-3A9D-4A8F-A343-A2E1A131C861}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3D0CF896-3A9D-4A8F-A343-A2E1A131C861}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3D0CF896-3A9D-4A8F-A343-A2E1A131C861}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3D0CF896-3A9D-4A8F-A343-A2E1A131C861}.Release|Any CPU.Build.0 = Release|Any CPU - {1967296B-614B-43E5-B1BA-A601579961D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1967296B-614B-43E5-B1BA-A601579961D5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1967296B-614B-43E5-B1BA-A601579961D5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1967296B-614B-43E5-B1BA-A601579961D5}.Release|Any CPU.Build.0 = Release|Any CPU - {4DB3C5B2-9FBF-42BC-80B2-2190EB1AE316}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4DB3C5B2-9FBF-42BC-80B2-2190EB1AE316}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4DB3C5B2-9FBF-42BC-80B2-2190EB1AE316}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4DB3C5B2-9FBF-42BC-80B2-2190EB1AE316}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {5D2378D4-9DDA-468F-82C6-AE4DAA54E96C} = {8CF63E1D-F9F7-4CB4-AD90-88C4077F7BFF} - {16912327-C9B3-49FC-87E0-49FEDED0A065} = {75A812B0-D98C-45F3-B2A9-357BBDF7331A} - {454089F9-ED16-4A11-9C52-2BA74DCF5D35} = {57F46508-E53D-4F6B-B77C-2EFE95925AEF} - {1762840C-A14A-4498-9883-CC671956F0F2} = {75A812B0-D98C-45F3-B2A9-357BBDF7331A} - {3D0CF896-3A9D-4A8F-A343-A2E1A131C861} = {57F46508-E53D-4F6B-B77C-2EFE95925AEF} - {1967296B-614B-43E5-B1BA-A601579961D5} = {57F46508-E53D-4F6B-B77C-2EFE95925AEF} - {2AEF59C3-7ADA-404D-B965-26B700FBD03F} = {57F46508-E53D-4F6B-B77C-2EFE95925AEF} - {4DB3C5B2-9FBF-42BC-80B2-2190EB1AE316} = {2AEF59C3-7ADA-404D-B965-26B700FBD03F} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {C6DBF56C-E862-46EA-A4E0-993D2950D78D} - EndGlobalSection -EndGlobal diff --git a/src/AADIntegration/Directory.Build.props b/src/AADIntegration/Directory.Build.props deleted file mode 100644 index 1cc732270e..0000000000 --- a/src/AADIntegration/Directory.Build.props +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - Microsoft ASP.NET Core AAD Integration - https://github.com/aspnet/AspNetCore - git - $(MSBuildThisFileDirectory) - $(MSBuildThisFileDirectory)..\..\eng\AspNetCore.snk - true - true - - - diff --git a/src/AADIntegration/Directory.Build.targets b/src/AADIntegration/Directory.Build.targets deleted file mode 100644 index 7e3f8df92e..0000000000 --- a/src/AADIntegration/Directory.Build.targets +++ /dev/null @@ -1,6 +0,0 @@ - - - $(MicrosoftNETCoreAppPackageVersion) - $(NETStandardLibrary20PackageVersion) - - diff --git a/src/AADIntegration/NuGetPackageVerifier.json b/src/AADIntegration/NuGetPackageVerifier.json deleted file mode 100644 index 66afb69831..0000000000 --- a/src/AADIntegration/NuGetPackageVerifier.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "Default": { - "rules": [ - "DefaultCompositeRule" - ], - "packages": { - "Microsoft.AspNetCore.Authentication.AzureADB2C.UI": { - "Exclusions": { - "DOC_MISSING": { - "lib/netcoreapp3.0/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Views.dll": "This library contains precompiled views." - } - } - }, - "Microsoft.AspNetCore.Authentication.AzureAD.UI": { - "Exclusions": { - "DOC_MISSING": { - "lib/netcoreapp3.0/Microsoft.AspNetCore.Authentication.AzureAD.UI.Views.dll": "This library contains precompiled views." - } - } - } - } - } -} \ No newline at end of file diff --git a/src/AADIntegration/README.md b/src/AADIntegration/README.md deleted file mode 100644 index 5155df07d9..0000000000 --- a/src/AADIntegration/README.md +++ /dev/null @@ -1,14 +0,0 @@ -ASP.NET Core Azure Active Directory Integration -=== - - - -ASP.NET Core Azure Active Directory Integration provides seamless authentication integration with different Azure Active Directory services like Azure Active Directory and Azure Active Directory B2C for ASP.NET Core applications. - -This project is part of ASP.NET Core. You can find samples, documentation and getting started instructions for ASP.NET Core at the [Home](https://github.com/aspnet/home) repo. - -## Building from source - -To run a complete build on command line only, execute `build.cmd` or `build.sh` without arguments. See [developer documentation](https://github.com/aspnet/Home/wiki) for more details. diff --git a/src/AADIntegration/build/dependencies.props b/src/AADIntegration/build/dependencies.props deleted file mode 100644 index 08ac3b8428..0000000000 --- a/src/AADIntegration/build/dependencies.props +++ /dev/null @@ -1,40 +0,0 @@ - - - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - - - 3.0.0-build-20181114.5 - 3.0.0-alpha1-10742 - 3.0.0-alpha1-10742 - 3.0.0-alpha1-10742 - 3.0.0-alpha1-10742 - 3.0.0-alpha1-10742 - 3.0.0-alpha1-10742 - 3.0.0-alpha1-10742 - 3.0.0-alpha1-10742 - 3.0.0-alpha1-10742 - 3.0.0-alpha1-10742 - 3.0.0-alpha1-10742 - 3.0.0-alpha1-10742 - 3.0.0-alpha1-10742 - 3.0.0-preview-181113-11 - 3.0.0-preview-181113-11 - 3.0.0-preview-181113-11 - 3.0.0-preview-181113-11 - 3.0.0-preview-181113-11 - 3.0.0-preview-181113-11 - 3.0.0-preview-181113-11 - 3.0.0-preview-181113-11 - 3.0.0-preview1-26907-05 - 3.0.0-preview-18579-0056 - 15.6.1 - 4.10.0 - 2.0.3 - 0.10.0 - 2.3.1 - 2.4.0 - - - - - diff --git a/src/AADIntegration/build/repo.props b/src/AADIntegration/build/repo.props deleted file mode 100644 index 00a0c65cc2..0000000000 --- a/src/AADIntegration/build/repo.props +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/AADIntegration/build/sources.props b/src/AADIntegration/build/sources.props deleted file mode 100644 index f23d255142..0000000000 --- a/src/AADIntegration/build/sources.props +++ /dev/null @@ -1,17 +0,0 @@ - - - - - $(DotNetRestoreSources) - - $(RestoreSources); - https://dotnet.myget.org/F/dotnet-core/api/v3/index.json; - https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json; - https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json; - - - $(RestoreSources); - https://api.nuget.org/v3/index.json; - - - \ No newline at end of file diff --git a/src/AADIntegration/samples/AzureADB2CSample/AzureADB2CSample.csproj b/src/AADIntegration/samples/AzureADB2CSample/AzureADB2CSample.csproj deleted file mode 100644 index 1e4e228ccf..0000000000 --- a/src/AADIntegration/samples/AzureADB2CSample/AzureADB2CSample.csproj +++ /dev/null @@ -1,26 +0,0 @@ - - - - netcoreapp3.0 - - - - true - - - - - - - - - - - - - - - - - - diff --git a/src/AADIntegration/samples/AzureADB2CSample/Properties/launchSettings.json b/src/AADIntegration/samples/AzureADB2CSample/Properties/launchSettings.json deleted file mode 100644 index 1ee213cd17..0000000000 --- a/src/AADIntegration/samples/AzureADB2CSample/Properties/launchSettings.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:59364/", - "sslPort": 44315 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "AzureADB2CSample": { - "commandName": "Project", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "applicationUrl": "https://localhost:44315/;http://localhost:59364/" - } - } -} \ No newline at end of file diff --git a/src/AADIntegration/test/Directory.Build.props b/src/AADIntegration/test/Directory.Build.props deleted file mode 100644 index 35b63d60ae..0000000000 --- a/src/AADIntegration/test/Directory.Build.props +++ /dev/null @@ -1,18 +0,0 @@ - - - - - false - xUnit1026:$(WarningsNotAsErrors) - $(MSBuildThisFileDirectory)AADIntegration.ruleset - - - - - - - - - - - diff --git a/src/AADIntegration/test/Microsoft.AspNetCore.Authentication.AzureAD.FunctionalTests/Microsoft.AspNetCore.Authentication.AzureAD.FunctionalTests.csproj b/src/AADIntegration/test/Microsoft.AspNetCore.Authentication.AzureAD.FunctionalTests/Microsoft.AspNetCore.Authentication.AzureAD.FunctionalTests.csproj deleted file mode 100644 index be07303a4c..0000000000 --- a/src/AADIntegration/test/Microsoft.AspNetCore.Authentication.AzureAD.FunctionalTests/Microsoft.AspNetCore.Authentication.AzureAD.FunctionalTests.csproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - netcoreapp3.0 - - - - - - - - - - - - - - - - diff --git a/src/AADIntegration/test/WebSites/AzureAD.WebSite/AzureAD.WebSite.csproj b/src/AADIntegration/test/WebSites/AzureAD.WebSite/AzureAD.WebSite.csproj deleted file mode 100644 index b23f727ae3..0000000000 --- a/src/AADIntegration/test/WebSites/AzureAD.WebSite/AzureAD.WebSite.csproj +++ /dev/null @@ -1,29 +0,0 @@ - - - - netcoreapp3.0 - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/AADIntegration/test/WebSites/Directory.Build.props b/src/AADIntegration/test/WebSites/Directory.Build.props deleted file mode 100644 index c8a4ec4440..0000000000 --- a/src/AADIntegration/test/WebSites/Directory.Build.props +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/AADIntegration/version.props b/src/AADIntegration/version.props deleted file mode 100644 index e796179bb9..0000000000 --- a/src/AADIntegration/version.props +++ /dev/null @@ -1,12 +0,0 @@ - - - 3.0.0 - 0.5.0 - alpha1 - $(VersionPrefix) - $(VersionPrefix)-$(VersionSuffix)-final - t000 - $(VersionSuffix)-$([System.Text.RegularExpressions.Regex]::Replace('$(FeatureBranchVersionSuffix)', '[^\w-]', '-')) - $(VersionSuffix)-$(BuildNumber) - - diff --git a/src/Antiforgery/src/AntiforgeryServiceCollectionExtensions.cs b/src/Antiforgery/src/AntiforgeryServiceCollectionExtensions.cs index a82851b3e2..8cc76d6f94 100644 --- a/src/Antiforgery/src/AntiforgeryServiceCollectionExtensions.cs +++ b/src/Antiforgery/src/AntiforgeryServiceCollectionExtensions.cs @@ -39,6 +39,8 @@ namespace Microsoft.Extensions.DependencyInjection services.TryAddSingleton(); services.TryAddSingleton(); services.TryAddSingleton(); + services.TryAddSingleton(); + services.TryAddSingleton>(serviceProvider => { diff --git a/src/Antiforgery/src/Internal/AntiforgeryLoggerExtensions.cs b/src/Antiforgery/src/Internal/AntiforgeryLoggerExtensions.cs index 232279e4be..1f55fecf96 100644 --- a/src/Antiforgery/src/Internal/AntiforgeryLoggerExtensions.cs +++ b/src/Antiforgery/src/Internal/AntiforgeryLoggerExtensions.cs @@ -1,4 +1,4 @@ -// 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. using System; @@ -22,42 +22,42 @@ namespace Microsoft.AspNetCore.Antiforgery.Internal { _validationFailed = LoggerMessage.Define( LogLevel.Warning, - 1, + new EventId(1, "ValidationFailed"), "Antiforgery validation failed with message '{Message}'."); _validated = LoggerMessage.Define( LogLevel.Debug, - 2, + new EventId(2, "Validated"), "Antiforgery successfully validated a request."); _missingCookieToken = LoggerMessage.Define( LogLevel.Warning, - 3, + new EventId(3, "MissingCookieToken"), "The required antiforgery cookie '{CookieName}' is not present."); _missingRequestToken = LoggerMessage.Define( LogLevel.Warning, - 4, + new EventId(4, "MissingRequestToken"), "The required antiforgery request token was not provided in either form field '{FormFieldName}' " + "or header '{HeaderName}'."); _newCookieToken = LoggerMessage.Define( LogLevel.Debug, - 5, + new EventId(5, "NewCookieToken"), "A new antiforgery cookie token was created."); _reusedCookieToken = LoggerMessage.Define( LogLevel.Debug, - 6, + new EventId(6, "ReusedCookieToken"), "An antiforgery cookie token was reused."); _tokenDeserializeException = LoggerMessage.Define( LogLevel.Error, - 7, + new EventId(7, "TokenDeserializeException"), "An exception was thrown while deserializing the token."); _responseCacheHeadersOverridenToNoCache = LoggerMessage.Define( LogLevel.Warning, - 8, - "The 'Cache-Control' and 'Pragma' headers have been overridden and set to 'no-cache, no-store' and " + + new EventId(8, "ResponseCacheHeadersOverridenToNoCache"), + "The 'Cache-Control' and 'Pragma' headers have been overridden and set to 'no-cache, no-store' and " + "'no-cache' respectively to prevent caching of this response. Any response that uses antiforgery " + "should not be cached."); _failedToDeserialzeTokens = LoggerMessage.Define( LogLevel.Debug, - 9, + new EventId(9, "FailedToDeserialzeTokens"), "Failed to deserialize antiforgery tokens."); } diff --git a/src/Antiforgery/test/Microsoft.AspNetCore.Antiforgery.Test.csproj b/src/Antiforgery/test/Microsoft.AspNetCore.Antiforgery.Test.csproj index ea34bc929f..ff11534abc 100644 --- a/src/Antiforgery/test/Microsoft.AspNetCore.Antiforgery.Test.csproj +++ b/src/Antiforgery/test/Microsoft.AspNetCore.Antiforgery.Test.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.0 diff --git a/src/AuthSamples/Directory.Build.targets b/src/AuthSamples/Directory.Build.targets index cf905f68fe..7a09b207eb 100644 --- a/src/AuthSamples/Directory.Build.targets +++ b/src/AuthSamples/Directory.Build.targets @@ -1,8 +1,5 @@ - $(MicrosoftNETCoreApp22PackageVersion) - $(NETStandardLibrary20PackageVersion) - - 99.9 + $(MicrosoftNETCoreAppPackageVersion) diff --git a/src/AuthSamples/build/dependencies.props b/src/AuthSamples/build/dependencies.props index 1e88d23ca4..8212c5b564 100644 --- a/src/AuthSamples/build/dependencies.props +++ b/src/AuthSamples/build/dependencies.props @@ -32,46 +32,21 @@ 3.0.0-alpha1-10772 3.0.0-alpha1-10772 3.0.0-preview-181106-14 - 2.2.1 - 2.3.2 3.0.0-alpha1-10706 - 3.0.0-alpha1-10706 3.0.0-alpha1-10706 3.0.0-alpha1-10706 3.0.0-preview-181106-14 - 3.0.0-preview-181106-14 3.0.0-preview-181106-14 - 3.0.0-preview-181106-14 - 3.0.0-preview-181106-14 - 3.0.0-preview-181106-14 3.0.0-preview-181106-14 3.0.0-preview-181106-14 - 3.0.0-preview-181106-14 - 3.0.0-preview-181106-14 3.0.0-preview-181106-14 3.0.0-preview-181106-14 - 3.0.0-preview-181106-14 - 3.0.0-preview-181106-14 - 3.0.0-preview-181106-14 - 3.0.0-preview-181106-14 - 3.0.0-preview-181106-14 - 3.0.0-preview-181106-14 - 3.19.8 - 5.3.0 - 2.0.9 - 2.1.3 - 3.0.0-preview1-26907-05 - 3.0.0-preview-18579-0056 - 15.6.1 - 3.0.1 - 3.0.0-alpha1-10772 - 4.10.0 - 2.0.3 - 4.6.0-preview1-26907-04 + 3.0.0-preview1-26907-05 + 3.0.0-preview.19053.2 + 15.9.0 0.10.0 2.3.1 2.4.0 - diff --git a/src/AuthSamples/build/repo.props b/src/AuthSamples/build/repo.props deleted file mode 100644 index aa7e07e780..0000000000 --- a/src/AuthSamples/build/repo.props +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/src/AuthSamples/test/AuthSamples.FunctionalTests/AuthSamples.FunctionalTests.csproj b/src/AuthSamples/test/AuthSamples.FunctionalTests/AuthSamples.FunctionalTests.csproj index 8d75e69122..540b771a93 100644 --- a/src/AuthSamples/test/AuthSamples.FunctionalTests/AuthSamples.FunctionalTests.csproj +++ b/src/AuthSamples/test/AuthSamples.FunctionalTests/AuthSamples.FunctionalTests.csproj @@ -4,13 +4,6 @@ netcoreapp3.0 - - - - AnyCPU - - - diff --git a/src/Azure/Azure.sln b/src/Azure/Azure.sln new file mode 100644 index 0000000000..b26a534edd --- /dev/null +++ b/src/Azure/Azure.sln @@ -0,0 +1,425 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26124.0 +MinimumVisualStudioVersion = 15.0.26124.0 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AzureAD", "AzureAD", "{B931802A-45BB-49A4-9919-B36C827100AC}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Authentication.AzureAD.UI", "Authentication.AzureAD.UI", "{312795E1-D5E2-4021-8FEA-342CA6F14CC8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Authentication.AzureAD.UI", "AzureAD\Authentication.AzureAD.UI\src\Microsoft.AspNetCore.Authentication.AzureAD.UI.csproj", "{0579BC3C-DC2C-440F-9FB9-F47ABD9B8A58}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Authentication.AzureAD.UI.Test", "AzureAD\Authentication.AzureAD.UI\test\Microsoft.AspNetCore.Authentication.AzureAD.UI.Test.csproj", "{06817D18-5694-454E-A010-CDAECD8AF89B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Authentication.AzureADB2C.UI", "Authentication.AzureADB2C.UI", "{79FE11AB-8D1E-4DEF-81C0-9B352769BFA4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Authentication.AzureADB2C.UI", "AzureAD\Authentication.AzureADB2C.UI\src\Microsoft.AspNetCore.Authentication.AzureADB2C.UI.csproj", "{6EC81D5C-D17C-4F11-9471-A8CDBDD8B76C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Test", "AzureAD\Authentication.AzureADB2C.UI\test\Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Test.csproj", "{C4703BE0-E8DE-4A22-8653-9E2A20E2BE51}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{A28A64CA-297E-4023-895A-483DFDA59FBE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AzureADB2CSample", "AzureAD\samples\AzureADB2CSample\AzureADB2CSample.csproj", "{A81C6D14-8A7F-4AC0-B4E8-DF0A925C1ECE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{F4F1E3C9-38E5-49EC-8688-A2D16AA8807B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Authentication.AzureAD.FunctionalTests", "AzureAD\test\FunctionalTests\Microsoft.AspNetCore.Authentication.AzureAD.FunctionalTests.csproj", "{B1FC9E6F-F2A2-4E3A-8CFC-0446C592C951}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "testassets", "testassets", "{0F577D33-2EA4-4182-9D89-2EFB022A2835}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AzureAD.WebSite", "AzureAD\test\testassets\AzureAD.WebSite\AzureAD.WebSite.csproj", "{84E67496-B000-4AAD-9626-2135F677C4F1}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "dependencies", "dependencies", "{84622717-F98A-4DE2-806E-1EF89C45C0EB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Server.Kestrel", "..\Servers\Kestrel\Kestrel\src\Microsoft.AspNetCore.Server.Kestrel.csproj", "{CF6B45E8-BF6C-487F-A0D0-D3EA31D80529}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Server.Kestrel.Core", "..\Servers\Kestrel\Core\src\Microsoft.AspNetCore.Server.Kestrel.Core.csproj", "{B1385496-607F-4573-ABE9-D9FE88D96DB8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.StaticFiles", "..\Middleware\StaticFiles\src\Microsoft.AspNetCore.StaticFiles.csproj", "{6EFFA596-23E7-498C-8D5E-331C6D8E945D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.HttpsPolicy", "..\Middleware\HttpsPolicy\src\Microsoft.AspNetCore.HttpsPolicy.csproj", "{A3789DA9-2E0E-41D6-BDDD-11DA4D3DD72D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Server.IISIntegration", "..\Servers\IIS\IISIntegration\src\Microsoft.AspNetCore.Server.IISIntegration.csproj", "{9631D314-7B0C-4CEC-8650-0259A8F4C77A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.DataProtection.Extensions", "..\DataProtection\Extensions\src\Microsoft.AspNetCore.DataProtection.Extensions.csproj", "{240BBDB1-3501-4637-8A17-996EA4EBB20B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Mvc", "..\Mvc\src\Microsoft.AspNetCore.Mvc\Microsoft.AspNetCore.Mvc.csproj", "{88EF760A-99A2-48C8-920F-78632A3BB57A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Mvc.Testing", "..\Mvc\src\Microsoft.AspNetCore.Mvc.Testing\Microsoft.AspNetCore.Mvc.Testing.csproj", "{9593691E-1B65-4EB1-97AA-F8B292B0082A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AzureAppServices.HostingStartup", "AzureAppServices.HostingStartup", "{9EC158BE-EB9C-4627-931D-B1B95D3210B6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.AzureAppServices.HostingStartup", "AzureAppServices.HostingStartup\src\Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj", "{4209F2B4-0388-47DF-A054-C974ABE78723}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AzureAppServicesIntegration", "AzureAppServicesIntegration", "{C6E2B73F-137E-4C37-84DE-0863B1C30D23}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.AzureAppServicesIntegration", "AzureAppServicesIntegration\src\Microsoft.AspNetCore.AzureAppServicesIntegration.csproj", "{215BC7AA-7275-44CA-A7B5-D62AEC7D4752}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.AzureAppServicesIntegration.Tests", "AzureAppServicesIntegration\test\Microsoft.AspNetCore.AzureAppServicesIntegration.Tests.csproj", "{15FAF776-E564-4ADF-9F10-20F3C0A8BA7C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{3DCECD76-8F99-481E-B828-9C674FF39B2A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AzureAppServicesHostingStartupSample", "samples\AzureAppServicesHostingStartupSample\AzureAppServicesHostingStartupSample.csproj", "{A52106C7-6539-4928-A6E3-A216292327E7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AzureAppServicesSample", "samples\AzureAppServicesSample\AzureAppServicesSample.csproj", "{6B3083B3-FAEA-4626-B299-26D89AE1175A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Hosting.Abstractions", "..\Hosting\Abstractions\src\Microsoft.AspNetCore.Hosting.Abstractions.csproj", "{CDD2AA23-BC7A-4C2A-8C42-3442B1D6B481}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Hosting", "..\Hosting\Hosting\src\Microsoft.AspNetCore.Hosting.csproj", "{DF5A8E5A-77C7-48B7-B8CD-4D032BAC8989}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Server.IntegrationTesting", "..\Hosting\Server.IntegrationTesting\src\Microsoft.AspNetCore.Server.IntegrationTesting.csproj", "{38027842-48A7-4A64-A44F-004BAF0AB450}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.TestHost", "..\Hosting\TestHost\src\Microsoft.AspNetCore.TestHost.csproj", "{C520D48E-87A0-463D-B4CF-3E6B68F8F4D0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Authorization", "..\Security\Authorization\Core\src\Microsoft.AspNetCore.Authorization.csproj", "{C57DFBC2-A887-44B4-A149-7ABFA6D98F7E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0579BC3C-DC2C-440F-9FB9-F47ABD9B8A58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0579BC3C-DC2C-440F-9FB9-F47ABD9B8A58}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0579BC3C-DC2C-440F-9FB9-F47ABD9B8A58}.Debug|x64.ActiveCfg = Debug|Any CPU + {0579BC3C-DC2C-440F-9FB9-F47ABD9B8A58}.Debug|x64.Build.0 = Debug|Any CPU + {0579BC3C-DC2C-440F-9FB9-F47ABD9B8A58}.Debug|x86.ActiveCfg = Debug|Any CPU + {0579BC3C-DC2C-440F-9FB9-F47ABD9B8A58}.Debug|x86.Build.0 = Debug|Any CPU + {0579BC3C-DC2C-440F-9FB9-F47ABD9B8A58}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0579BC3C-DC2C-440F-9FB9-F47ABD9B8A58}.Release|Any CPU.Build.0 = Release|Any CPU + {0579BC3C-DC2C-440F-9FB9-F47ABD9B8A58}.Release|x64.ActiveCfg = Release|Any CPU + {0579BC3C-DC2C-440F-9FB9-F47ABD9B8A58}.Release|x64.Build.0 = Release|Any CPU + {0579BC3C-DC2C-440F-9FB9-F47ABD9B8A58}.Release|x86.ActiveCfg = Release|Any CPU + {0579BC3C-DC2C-440F-9FB9-F47ABD9B8A58}.Release|x86.Build.0 = Release|Any CPU + {06817D18-5694-454E-A010-CDAECD8AF89B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {06817D18-5694-454E-A010-CDAECD8AF89B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {06817D18-5694-454E-A010-CDAECD8AF89B}.Debug|x64.ActiveCfg = Debug|Any CPU + {06817D18-5694-454E-A010-CDAECD8AF89B}.Debug|x64.Build.0 = Debug|Any CPU + {06817D18-5694-454E-A010-CDAECD8AF89B}.Debug|x86.ActiveCfg = Debug|Any CPU + {06817D18-5694-454E-A010-CDAECD8AF89B}.Debug|x86.Build.0 = Debug|Any CPU + {06817D18-5694-454E-A010-CDAECD8AF89B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {06817D18-5694-454E-A010-CDAECD8AF89B}.Release|Any CPU.Build.0 = Release|Any CPU + {06817D18-5694-454E-A010-CDAECD8AF89B}.Release|x64.ActiveCfg = Release|Any CPU + {06817D18-5694-454E-A010-CDAECD8AF89B}.Release|x64.Build.0 = Release|Any CPU + {06817D18-5694-454E-A010-CDAECD8AF89B}.Release|x86.ActiveCfg = Release|Any CPU + {06817D18-5694-454E-A010-CDAECD8AF89B}.Release|x86.Build.0 = Release|Any CPU + {6EC81D5C-D17C-4F11-9471-A8CDBDD8B76C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6EC81D5C-D17C-4F11-9471-A8CDBDD8B76C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6EC81D5C-D17C-4F11-9471-A8CDBDD8B76C}.Debug|x64.ActiveCfg = Debug|Any CPU + {6EC81D5C-D17C-4F11-9471-A8CDBDD8B76C}.Debug|x64.Build.0 = Debug|Any CPU + {6EC81D5C-D17C-4F11-9471-A8CDBDD8B76C}.Debug|x86.ActiveCfg = Debug|Any CPU + {6EC81D5C-D17C-4F11-9471-A8CDBDD8B76C}.Debug|x86.Build.0 = Debug|Any CPU + {6EC81D5C-D17C-4F11-9471-A8CDBDD8B76C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6EC81D5C-D17C-4F11-9471-A8CDBDD8B76C}.Release|Any CPU.Build.0 = Release|Any CPU + {6EC81D5C-D17C-4F11-9471-A8CDBDD8B76C}.Release|x64.ActiveCfg = Release|Any CPU + {6EC81D5C-D17C-4F11-9471-A8CDBDD8B76C}.Release|x64.Build.0 = Release|Any CPU + {6EC81D5C-D17C-4F11-9471-A8CDBDD8B76C}.Release|x86.ActiveCfg = Release|Any CPU + {6EC81D5C-D17C-4F11-9471-A8CDBDD8B76C}.Release|x86.Build.0 = Release|Any CPU + {C4703BE0-E8DE-4A22-8653-9E2A20E2BE51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C4703BE0-E8DE-4A22-8653-9E2A20E2BE51}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C4703BE0-E8DE-4A22-8653-9E2A20E2BE51}.Debug|x64.ActiveCfg = Debug|Any CPU + {C4703BE0-E8DE-4A22-8653-9E2A20E2BE51}.Debug|x64.Build.0 = Debug|Any CPU + {C4703BE0-E8DE-4A22-8653-9E2A20E2BE51}.Debug|x86.ActiveCfg = Debug|Any CPU + {C4703BE0-E8DE-4A22-8653-9E2A20E2BE51}.Debug|x86.Build.0 = Debug|Any CPU + {C4703BE0-E8DE-4A22-8653-9E2A20E2BE51}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C4703BE0-E8DE-4A22-8653-9E2A20E2BE51}.Release|Any CPU.Build.0 = Release|Any CPU + {C4703BE0-E8DE-4A22-8653-9E2A20E2BE51}.Release|x64.ActiveCfg = Release|Any CPU + {C4703BE0-E8DE-4A22-8653-9E2A20E2BE51}.Release|x64.Build.0 = Release|Any CPU + {C4703BE0-E8DE-4A22-8653-9E2A20E2BE51}.Release|x86.ActiveCfg = Release|Any CPU + {C4703BE0-E8DE-4A22-8653-9E2A20E2BE51}.Release|x86.Build.0 = Release|Any CPU + {A81C6D14-8A7F-4AC0-B4E8-DF0A925C1ECE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A81C6D14-8A7F-4AC0-B4E8-DF0A925C1ECE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A81C6D14-8A7F-4AC0-B4E8-DF0A925C1ECE}.Debug|x64.ActiveCfg = Debug|Any CPU + {A81C6D14-8A7F-4AC0-B4E8-DF0A925C1ECE}.Debug|x64.Build.0 = Debug|Any CPU + {A81C6D14-8A7F-4AC0-B4E8-DF0A925C1ECE}.Debug|x86.ActiveCfg = Debug|Any CPU + {A81C6D14-8A7F-4AC0-B4E8-DF0A925C1ECE}.Debug|x86.Build.0 = Debug|Any CPU + {A81C6D14-8A7F-4AC0-B4E8-DF0A925C1ECE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A81C6D14-8A7F-4AC0-B4E8-DF0A925C1ECE}.Release|Any CPU.Build.0 = Release|Any CPU + {A81C6D14-8A7F-4AC0-B4E8-DF0A925C1ECE}.Release|x64.ActiveCfg = Release|Any CPU + {A81C6D14-8A7F-4AC0-B4E8-DF0A925C1ECE}.Release|x64.Build.0 = Release|Any CPU + {A81C6D14-8A7F-4AC0-B4E8-DF0A925C1ECE}.Release|x86.ActiveCfg = Release|Any CPU + {A81C6D14-8A7F-4AC0-B4E8-DF0A925C1ECE}.Release|x86.Build.0 = Release|Any CPU + {B1FC9E6F-F2A2-4E3A-8CFC-0446C592C951}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B1FC9E6F-F2A2-4E3A-8CFC-0446C592C951}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B1FC9E6F-F2A2-4E3A-8CFC-0446C592C951}.Debug|x64.ActiveCfg = Debug|Any CPU + {B1FC9E6F-F2A2-4E3A-8CFC-0446C592C951}.Debug|x64.Build.0 = Debug|Any CPU + {B1FC9E6F-F2A2-4E3A-8CFC-0446C592C951}.Debug|x86.ActiveCfg = Debug|Any CPU + {B1FC9E6F-F2A2-4E3A-8CFC-0446C592C951}.Debug|x86.Build.0 = Debug|Any CPU + {B1FC9E6F-F2A2-4E3A-8CFC-0446C592C951}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B1FC9E6F-F2A2-4E3A-8CFC-0446C592C951}.Release|Any CPU.Build.0 = Release|Any CPU + {B1FC9E6F-F2A2-4E3A-8CFC-0446C592C951}.Release|x64.ActiveCfg = Release|Any CPU + {B1FC9E6F-F2A2-4E3A-8CFC-0446C592C951}.Release|x64.Build.0 = Release|Any CPU + {B1FC9E6F-F2A2-4E3A-8CFC-0446C592C951}.Release|x86.ActiveCfg = Release|Any CPU + {B1FC9E6F-F2A2-4E3A-8CFC-0446C592C951}.Release|x86.Build.0 = Release|Any CPU + {84E67496-B000-4AAD-9626-2135F677C4F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {84E67496-B000-4AAD-9626-2135F677C4F1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {84E67496-B000-4AAD-9626-2135F677C4F1}.Debug|x64.ActiveCfg = Debug|Any CPU + {84E67496-B000-4AAD-9626-2135F677C4F1}.Debug|x64.Build.0 = Debug|Any CPU + {84E67496-B000-4AAD-9626-2135F677C4F1}.Debug|x86.ActiveCfg = Debug|Any CPU + {84E67496-B000-4AAD-9626-2135F677C4F1}.Debug|x86.Build.0 = Debug|Any CPU + {84E67496-B000-4AAD-9626-2135F677C4F1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {84E67496-B000-4AAD-9626-2135F677C4F1}.Release|Any CPU.Build.0 = Release|Any CPU + {84E67496-B000-4AAD-9626-2135F677C4F1}.Release|x64.ActiveCfg = Release|Any CPU + {84E67496-B000-4AAD-9626-2135F677C4F1}.Release|x64.Build.0 = Release|Any CPU + {84E67496-B000-4AAD-9626-2135F677C4F1}.Release|x86.ActiveCfg = Release|Any CPU + {84E67496-B000-4AAD-9626-2135F677C4F1}.Release|x86.Build.0 = Release|Any CPU + {CF6B45E8-BF6C-487F-A0D0-D3EA31D80529}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CF6B45E8-BF6C-487F-A0D0-D3EA31D80529}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CF6B45E8-BF6C-487F-A0D0-D3EA31D80529}.Debug|x64.ActiveCfg = Debug|Any CPU + {CF6B45E8-BF6C-487F-A0D0-D3EA31D80529}.Debug|x64.Build.0 = Debug|Any CPU + {CF6B45E8-BF6C-487F-A0D0-D3EA31D80529}.Debug|x86.ActiveCfg = Debug|Any CPU + {CF6B45E8-BF6C-487F-A0D0-D3EA31D80529}.Debug|x86.Build.0 = Debug|Any CPU + {CF6B45E8-BF6C-487F-A0D0-D3EA31D80529}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CF6B45E8-BF6C-487F-A0D0-D3EA31D80529}.Release|Any CPU.Build.0 = Release|Any CPU + {CF6B45E8-BF6C-487F-A0D0-D3EA31D80529}.Release|x64.ActiveCfg = Release|Any CPU + {CF6B45E8-BF6C-487F-A0D0-D3EA31D80529}.Release|x64.Build.0 = Release|Any CPU + {CF6B45E8-BF6C-487F-A0D0-D3EA31D80529}.Release|x86.ActiveCfg = Release|Any CPU + {CF6B45E8-BF6C-487F-A0D0-D3EA31D80529}.Release|x86.Build.0 = Release|Any CPU + {B1385496-607F-4573-ABE9-D9FE88D96DB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B1385496-607F-4573-ABE9-D9FE88D96DB8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B1385496-607F-4573-ABE9-D9FE88D96DB8}.Debug|x64.ActiveCfg = Debug|Any CPU + {B1385496-607F-4573-ABE9-D9FE88D96DB8}.Debug|x64.Build.0 = Debug|Any CPU + {B1385496-607F-4573-ABE9-D9FE88D96DB8}.Debug|x86.ActiveCfg = Debug|Any CPU + {B1385496-607F-4573-ABE9-D9FE88D96DB8}.Debug|x86.Build.0 = Debug|Any CPU + {B1385496-607F-4573-ABE9-D9FE88D96DB8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B1385496-607F-4573-ABE9-D9FE88D96DB8}.Release|Any CPU.Build.0 = Release|Any CPU + {B1385496-607F-4573-ABE9-D9FE88D96DB8}.Release|x64.ActiveCfg = Release|Any CPU + {B1385496-607F-4573-ABE9-D9FE88D96DB8}.Release|x64.Build.0 = Release|Any CPU + {B1385496-607F-4573-ABE9-D9FE88D96DB8}.Release|x86.ActiveCfg = Release|Any CPU + {B1385496-607F-4573-ABE9-D9FE88D96DB8}.Release|x86.Build.0 = Release|Any CPU + {6EFFA596-23E7-498C-8D5E-331C6D8E945D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6EFFA596-23E7-498C-8D5E-331C6D8E945D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6EFFA596-23E7-498C-8D5E-331C6D8E945D}.Debug|x64.ActiveCfg = Debug|Any CPU + {6EFFA596-23E7-498C-8D5E-331C6D8E945D}.Debug|x64.Build.0 = Debug|Any CPU + {6EFFA596-23E7-498C-8D5E-331C6D8E945D}.Debug|x86.ActiveCfg = Debug|Any CPU + {6EFFA596-23E7-498C-8D5E-331C6D8E945D}.Debug|x86.Build.0 = Debug|Any CPU + {6EFFA596-23E7-498C-8D5E-331C6D8E945D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6EFFA596-23E7-498C-8D5E-331C6D8E945D}.Release|Any CPU.Build.0 = Release|Any CPU + {6EFFA596-23E7-498C-8D5E-331C6D8E945D}.Release|x64.ActiveCfg = Release|Any CPU + {6EFFA596-23E7-498C-8D5E-331C6D8E945D}.Release|x64.Build.0 = Release|Any CPU + {6EFFA596-23E7-498C-8D5E-331C6D8E945D}.Release|x86.ActiveCfg = Release|Any CPU + {6EFFA596-23E7-498C-8D5E-331C6D8E945D}.Release|x86.Build.0 = Release|Any CPU + {A3789DA9-2E0E-41D6-BDDD-11DA4D3DD72D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A3789DA9-2E0E-41D6-BDDD-11DA4D3DD72D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A3789DA9-2E0E-41D6-BDDD-11DA4D3DD72D}.Debug|x64.ActiveCfg = Debug|Any CPU + {A3789DA9-2E0E-41D6-BDDD-11DA4D3DD72D}.Debug|x64.Build.0 = Debug|Any CPU + {A3789DA9-2E0E-41D6-BDDD-11DA4D3DD72D}.Debug|x86.ActiveCfg = Debug|Any CPU + {A3789DA9-2E0E-41D6-BDDD-11DA4D3DD72D}.Debug|x86.Build.0 = Debug|Any CPU + {A3789DA9-2E0E-41D6-BDDD-11DA4D3DD72D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A3789DA9-2E0E-41D6-BDDD-11DA4D3DD72D}.Release|Any CPU.Build.0 = Release|Any CPU + {A3789DA9-2E0E-41D6-BDDD-11DA4D3DD72D}.Release|x64.ActiveCfg = Release|Any CPU + {A3789DA9-2E0E-41D6-BDDD-11DA4D3DD72D}.Release|x64.Build.0 = Release|Any CPU + {A3789DA9-2E0E-41D6-BDDD-11DA4D3DD72D}.Release|x86.ActiveCfg = Release|Any CPU + {A3789DA9-2E0E-41D6-BDDD-11DA4D3DD72D}.Release|x86.Build.0 = Release|Any CPU + {9631D314-7B0C-4CEC-8650-0259A8F4C77A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9631D314-7B0C-4CEC-8650-0259A8F4C77A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9631D314-7B0C-4CEC-8650-0259A8F4C77A}.Debug|x64.ActiveCfg = Debug|Any CPU + {9631D314-7B0C-4CEC-8650-0259A8F4C77A}.Debug|x64.Build.0 = Debug|Any CPU + {9631D314-7B0C-4CEC-8650-0259A8F4C77A}.Debug|x86.ActiveCfg = Debug|Any CPU + {9631D314-7B0C-4CEC-8650-0259A8F4C77A}.Debug|x86.Build.0 = Debug|Any CPU + {9631D314-7B0C-4CEC-8650-0259A8F4C77A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9631D314-7B0C-4CEC-8650-0259A8F4C77A}.Release|Any CPU.Build.0 = Release|Any CPU + {9631D314-7B0C-4CEC-8650-0259A8F4C77A}.Release|x64.ActiveCfg = Release|Any CPU + {9631D314-7B0C-4CEC-8650-0259A8F4C77A}.Release|x64.Build.0 = Release|Any CPU + {9631D314-7B0C-4CEC-8650-0259A8F4C77A}.Release|x86.ActiveCfg = Release|Any CPU + {9631D314-7B0C-4CEC-8650-0259A8F4C77A}.Release|x86.Build.0 = Release|Any CPU + {240BBDB1-3501-4637-8A17-996EA4EBB20B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {240BBDB1-3501-4637-8A17-996EA4EBB20B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {240BBDB1-3501-4637-8A17-996EA4EBB20B}.Debug|x64.ActiveCfg = Debug|Any CPU + {240BBDB1-3501-4637-8A17-996EA4EBB20B}.Debug|x64.Build.0 = Debug|Any CPU + {240BBDB1-3501-4637-8A17-996EA4EBB20B}.Debug|x86.ActiveCfg = Debug|Any CPU + {240BBDB1-3501-4637-8A17-996EA4EBB20B}.Debug|x86.Build.0 = Debug|Any CPU + {240BBDB1-3501-4637-8A17-996EA4EBB20B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {240BBDB1-3501-4637-8A17-996EA4EBB20B}.Release|Any CPU.Build.0 = Release|Any CPU + {240BBDB1-3501-4637-8A17-996EA4EBB20B}.Release|x64.ActiveCfg = Release|Any CPU + {240BBDB1-3501-4637-8A17-996EA4EBB20B}.Release|x64.Build.0 = Release|Any CPU + {240BBDB1-3501-4637-8A17-996EA4EBB20B}.Release|x86.ActiveCfg = Release|Any CPU + {240BBDB1-3501-4637-8A17-996EA4EBB20B}.Release|x86.Build.0 = Release|Any CPU + {88EF760A-99A2-48C8-920F-78632A3BB57A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {88EF760A-99A2-48C8-920F-78632A3BB57A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {88EF760A-99A2-48C8-920F-78632A3BB57A}.Debug|x64.ActiveCfg = Debug|Any CPU + {88EF760A-99A2-48C8-920F-78632A3BB57A}.Debug|x64.Build.0 = Debug|Any CPU + {88EF760A-99A2-48C8-920F-78632A3BB57A}.Debug|x86.ActiveCfg = Debug|Any CPU + {88EF760A-99A2-48C8-920F-78632A3BB57A}.Debug|x86.Build.0 = Debug|Any CPU + {88EF760A-99A2-48C8-920F-78632A3BB57A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {88EF760A-99A2-48C8-920F-78632A3BB57A}.Release|Any CPU.Build.0 = Release|Any CPU + {88EF760A-99A2-48C8-920F-78632A3BB57A}.Release|x64.ActiveCfg = Release|Any CPU + {88EF760A-99A2-48C8-920F-78632A3BB57A}.Release|x64.Build.0 = Release|Any CPU + {88EF760A-99A2-48C8-920F-78632A3BB57A}.Release|x86.ActiveCfg = Release|Any CPU + {88EF760A-99A2-48C8-920F-78632A3BB57A}.Release|x86.Build.0 = Release|Any CPU + {9593691E-1B65-4EB1-97AA-F8B292B0082A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9593691E-1B65-4EB1-97AA-F8B292B0082A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9593691E-1B65-4EB1-97AA-F8B292B0082A}.Debug|x64.ActiveCfg = Debug|Any CPU + {9593691E-1B65-4EB1-97AA-F8B292B0082A}.Debug|x64.Build.0 = Debug|Any CPU + {9593691E-1B65-4EB1-97AA-F8B292B0082A}.Debug|x86.ActiveCfg = Debug|Any CPU + {9593691E-1B65-4EB1-97AA-F8B292B0082A}.Debug|x86.Build.0 = Debug|Any CPU + {9593691E-1B65-4EB1-97AA-F8B292B0082A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9593691E-1B65-4EB1-97AA-F8B292B0082A}.Release|Any CPU.Build.0 = Release|Any CPU + {9593691E-1B65-4EB1-97AA-F8B292B0082A}.Release|x64.ActiveCfg = Release|Any CPU + {9593691E-1B65-4EB1-97AA-F8B292B0082A}.Release|x64.Build.0 = Release|Any CPU + {9593691E-1B65-4EB1-97AA-F8B292B0082A}.Release|x86.ActiveCfg = Release|Any CPU + {9593691E-1B65-4EB1-97AA-F8B292B0082A}.Release|x86.Build.0 = Release|Any CPU + {4209F2B4-0388-47DF-A054-C974ABE78723}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4209F2B4-0388-47DF-A054-C974ABE78723}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4209F2B4-0388-47DF-A054-C974ABE78723}.Debug|x64.ActiveCfg = Debug|Any CPU + {4209F2B4-0388-47DF-A054-C974ABE78723}.Debug|x64.Build.0 = Debug|Any CPU + {4209F2B4-0388-47DF-A054-C974ABE78723}.Debug|x86.ActiveCfg = Debug|Any CPU + {4209F2B4-0388-47DF-A054-C974ABE78723}.Debug|x86.Build.0 = Debug|Any CPU + {4209F2B4-0388-47DF-A054-C974ABE78723}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4209F2B4-0388-47DF-A054-C974ABE78723}.Release|Any CPU.Build.0 = Release|Any CPU + {4209F2B4-0388-47DF-A054-C974ABE78723}.Release|x64.ActiveCfg = Release|Any CPU + {4209F2B4-0388-47DF-A054-C974ABE78723}.Release|x64.Build.0 = Release|Any CPU + {4209F2B4-0388-47DF-A054-C974ABE78723}.Release|x86.ActiveCfg = Release|Any CPU + {4209F2B4-0388-47DF-A054-C974ABE78723}.Release|x86.Build.0 = Release|Any CPU + {215BC7AA-7275-44CA-A7B5-D62AEC7D4752}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {215BC7AA-7275-44CA-A7B5-D62AEC7D4752}.Debug|Any CPU.Build.0 = Debug|Any CPU + {215BC7AA-7275-44CA-A7B5-D62AEC7D4752}.Debug|x64.ActiveCfg = Debug|Any CPU + {215BC7AA-7275-44CA-A7B5-D62AEC7D4752}.Debug|x64.Build.0 = Debug|Any CPU + {215BC7AA-7275-44CA-A7B5-D62AEC7D4752}.Debug|x86.ActiveCfg = Debug|Any CPU + {215BC7AA-7275-44CA-A7B5-D62AEC7D4752}.Debug|x86.Build.0 = Debug|Any CPU + {215BC7AA-7275-44CA-A7B5-D62AEC7D4752}.Release|Any CPU.ActiveCfg = Release|Any CPU + {215BC7AA-7275-44CA-A7B5-D62AEC7D4752}.Release|Any CPU.Build.0 = Release|Any CPU + {215BC7AA-7275-44CA-A7B5-D62AEC7D4752}.Release|x64.ActiveCfg = Release|Any CPU + {215BC7AA-7275-44CA-A7B5-D62AEC7D4752}.Release|x64.Build.0 = Release|Any CPU + {215BC7AA-7275-44CA-A7B5-D62AEC7D4752}.Release|x86.ActiveCfg = Release|Any CPU + {215BC7AA-7275-44CA-A7B5-D62AEC7D4752}.Release|x86.Build.0 = Release|Any CPU + {15FAF776-E564-4ADF-9F10-20F3C0A8BA7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {15FAF776-E564-4ADF-9F10-20F3C0A8BA7C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {15FAF776-E564-4ADF-9F10-20F3C0A8BA7C}.Debug|x64.ActiveCfg = Debug|Any CPU + {15FAF776-E564-4ADF-9F10-20F3C0A8BA7C}.Debug|x64.Build.0 = Debug|Any CPU + {15FAF776-E564-4ADF-9F10-20F3C0A8BA7C}.Debug|x86.ActiveCfg = Debug|Any CPU + {15FAF776-E564-4ADF-9F10-20F3C0A8BA7C}.Debug|x86.Build.0 = Debug|Any CPU + {15FAF776-E564-4ADF-9F10-20F3C0A8BA7C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {15FAF776-E564-4ADF-9F10-20F3C0A8BA7C}.Release|Any CPU.Build.0 = Release|Any CPU + {15FAF776-E564-4ADF-9F10-20F3C0A8BA7C}.Release|x64.ActiveCfg = Release|Any CPU + {15FAF776-E564-4ADF-9F10-20F3C0A8BA7C}.Release|x64.Build.0 = Release|Any CPU + {15FAF776-E564-4ADF-9F10-20F3C0A8BA7C}.Release|x86.ActiveCfg = Release|Any CPU + {15FAF776-E564-4ADF-9F10-20F3C0A8BA7C}.Release|x86.Build.0 = Release|Any CPU + {A52106C7-6539-4928-A6E3-A216292327E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A52106C7-6539-4928-A6E3-A216292327E7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A52106C7-6539-4928-A6E3-A216292327E7}.Debug|x64.ActiveCfg = Debug|Any CPU + {A52106C7-6539-4928-A6E3-A216292327E7}.Debug|x64.Build.0 = Debug|Any CPU + {A52106C7-6539-4928-A6E3-A216292327E7}.Debug|x86.ActiveCfg = Debug|Any CPU + {A52106C7-6539-4928-A6E3-A216292327E7}.Debug|x86.Build.0 = Debug|Any CPU + {A52106C7-6539-4928-A6E3-A216292327E7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A52106C7-6539-4928-A6E3-A216292327E7}.Release|Any CPU.Build.0 = Release|Any CPU + {A52106C7-6539-4928-A6E3-A216292327E7}.Release|x64.ActiveCfg = Release|Any CPU + {A52106C7-6539-4928-A6E3-A216292327E7}.Release|x64.Build.0 = Release|Any CPU + {A52106C7-6539-4928-A6E3-A216292327E7}.Release|x86.ActiveCfg = Release|Any CPU + {A52106C7-6539-4928-A6E3-A216292327E7}.Release|x86.Build.0 = Release|Any CPU + {6B3083B3-FAEA-4626-B299-26D89AE1175A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6B3083B3-FAEA-4626-B299-26D89AE1175A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6B3083B3-FAEA-4626-B299-26D89AE1175A}.Debug|x64.ActiveCfg = Debug|Any CPU + {6B3083B3-FAEA-4626-B299-26D89AE1175A}.Debug|x64.Build.0 = Debug|Any CPU + {6B3083B3-FAEA-4626-B299-26D89AE1175A}.Debug|x86.ActiveCfg = Debug|Any CPU + {6B3083B3-FAEA-4626-B299-26D89AE1175A}.Debug|x86.Build.0 = Debug|Any CPU + {6B3083B3-FAEA-4626-B299-26D89AE1175A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6B3083B3-FAEA-4626-B299-26D89AE1175A}.Release|Any CPU.Build.0 = Release|Any CPU + {6B3083B3-FAEA-4626-B299-26D89AE1175A}.Release|x64.ActiveCfg = Release|Any CPU + {6B3083B3-FAEA-4626-B299-26D89AE1175A}.Release|x64.Build.0 = Release|Any CPU + {6B3083B3-FAEA-4626-B299-26D89AE1175A}.Release|x86.ActiveCfg = Release|Any CPU + {6B3083B3-FAEA-4626-B299-26D89AE1175A}.Release|x86.Build.0 = Release|Any CPU + {CDD2AA23-BC7A-4C2A-8C42-3442B1D6B481}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CDD2AA23-BC7A-4C2A-8C42-3442B1D6B481}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CDD2AA23-BC7A-4C2A-8C42-3442B1D6B481}.Debug|x64.ActiveCfg = Debug|Any CPU + {CDD2AA23-BC7A-4C2A-8C42-3442B1D6B481}.Debug|x64.Build.0 = Debug|Any CPU + {CDD2AA23-BC7A-4C2A-8C42-3442B1D6B481}.Debug|x86.ActiveCfg = Debug|Any CPU + {CDD2AA23-BC7A-4C2A-8C42-3442B1D6B481}.Debug|x86.Build.0 = Debug|Any CPU + {CDD2AA23-BC7A-4C2A-8C42-3442B1D6B481}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CDD2AA23-BC7A-4C2A-8C42-3442B1D6B481}.Release|Any CPU.Build.0 = Release|Any CPU + {CDD2AA23-BC7A-4C2A-8C42-3442B1D6B481}.Release|x64.ActiveCfg = Release|Any CPU + {CDD2AA23-BC7A-4C2A-8C42-3442B1D6B481}.Release|x64.Build.0 = Release|Any CPU + {CDD2AA23-BC7A-4C2A-8C42-3442B1D6B481}.Release|x86.ActiveCfg = Release|Any CPU + {CDD2AA23-BC7A-4C2A-8C42-3442B1D6B481}.Release|x86.Build.0 = Release|Any CPU + {DF5A8E5A-77C7-48B7-B8CD-4D032BAC8989}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DF5A8E5A-77C7-48B7-B8CD-4D032BAC8989}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DF5A8E5A-77C7-48B7-B8CD-4D032BAC8989}.Debug|x64.ActiveCfg = Debug|Any CPU + {DF5A8E5A-77C7-48B7-B8CD-4D032BAC8989}.Debug|x64.Build.0 = Debug|Any CPU + {DF5A8E5A-77C7-48B7-B8CD-4D032BAC8989}.Debug|x86.ActiveCfg = Debug|Any CPU + {DF5A8E5A-77C7-48B7-B8CD-4D032BAC8989}.Debug|x86.Build.0 = Debug|Any CPU + {DF5A8E5A-77C7-48B7-B8CD-4D032BAC8989}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DF5A8E5A-77C7-48B7-B8CD-4D032BAC8989}.Release|Any CPU.Build.0 = Release|Any CPU + {DF5A8E5A-77C7-48B7-B8CD-4D032BAC8989}.Release|x64.ActiveCfg = Release|Any CPU + {DF5A8E5A-77C7-48B7-B8CD-4D032BAC8989}.Release|x64.Build.0 = Release|Any CPU + {DF5A8E5A-77C7-48B7-B8CD-4D032BAC8989}.Release|x86.ActiveCfg = Release|Any CPU + {DF5A8E5A-77C7-48B7-B8CD-4D032BAC8989}.Release|x86.Build.0 = Release|Any CPU + {38027842-48A7-4A64-A44F-004BAF0AB450}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {38027842-48A7-4A64-A44F-004BAF0AB450}.Debug|Any CPU.Build.0 = Debug|Any CPU + {38027842-48A7-4A64-A44F-004BAF0AB450}.Debug|x64.ActiveCfg = Debug|Any CPU + {38027842-48A7-4A64-A44F-004BAF0AB450}.Debug|x64.Build.0 = Debug|Any CPU + {38027842-48A7-4A64-A44F-004BAF0AB450}.Debug|x86.ActiveCfg = Debug|Any CPU + {38027842-48A7-4A64-A44F-004BAF0AB450}.Debug|x86.Build.0 = Debug|Any CPU + {38027842-48A7-4A64-A44F-004BAF0AB450}.Release|Any CPU.ActiveCfg = Release|Any CPU + {38027842-48A7-4A64-A44F-004BAF0AB450}.Release|Any CPU.Build.0 = Release|Any CPU + {38027842-48A7-4A64-A44F-004BAF0AB450}.Release|x64.ActiveCfg = Release|Any CPU + {38027842-48A7-4A64-A44F-004BAF0AB450}.Release|x64.Build.0 = Release|Any CPU + {38027842-48A7-4A64-A44F-004BAF0AB450}.Release|x86.ActiveCfg = Release|Any CPU + {38027842-48A7-4A64-A44F-004BAF0AB450}.Release|x86.Build.0 = Release|Any CPU + {C520D48E-87A0-463D-B4CF-3E6B68F8F4D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C520D48E-87A0-463D-B4CF-3E6B68F8F4D0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C520D48E-87A0-463D-B4CF-3E6B68F8F4D0}.Debug|x64.ActiveCfg = Debug|Any CPU + {C520D48E-87A0-463D-B4CF-3E6B68F8F4D0}.Debug|x64.Build.0 = Debug|Any CPU + {C520D48E-87A0-463D-B4CF-3E6B68F8F4D0}.Debug|x86.ActiveCfg = Debug|Any CPU + {C520D48E-87A0-463D-B4CF-3E6B68F8F4D0}.Debug|x86.Build.0 = Debug|Any CPU + {C520D48E-87A0-463D-B4CF-3E6B68F8F4D0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C520D48E-87A0-463D-B4CF-3E6B68F8F4D0}.Release|Any CPU.Build.0 = Release|Any CPU + {C520D48E-87A0-463D-B4CF-3E6B68F8F4D0}.Release|x64.ActiveCfg = Release|Any CPU + {C520D48E-87A0-463D-B4CF-3E6B68F8F4D0}.Release|x64.Build.0 = Release|Any CPU + {C520D48E-87A0-463D-B4CF-3E6B68F8F4D0}.Release|x86.ActiveCfg = Release|Any CPU + {C520D48E-87A0-463D-B4CF-3E6B68F8F4D0}.Release|x86.Build.0 = Release|Any CPU + {C57DFBC2-A887-44B4-A149-7ABFA6D98F7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C57DFBC2-A887-44B4-A149-7ABFA6D98F7E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C57DFBC2-A887-44B4-A149-7ABFA6D98F7E}.Debug|x64.ActiveCfg = Debug|Any CPU + {C57DFBC2-A887-44B4-A149-7ABFA6D98F7E}.Debug|x64.Build.0 = Debug|Any CPU + {C57DFBC2-A887-44B4-A149-7ABFA6D98F7E}.Debug|x86.ActiveCfg = Debug|Any CPU + {C57DFBC2-A887-44B4-A149-7ABFA6D98F7E}.Debug|x86.Build.0 = Debug|Any CPU + {C57DFBC2-A887-44B4-A149-7ABFA6D98F7E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C57DFBC2-A887-44B4-A149-7ABFA6D98F7E}.Release|Any CPU.Build.0 = Release|Any CPU + {C57DFBC2-A887-44B4-A149-7ABFA6D98F7E}.Release|x64.ActiveCfg = Release|Any CPU + {C57DFBC2-A887-44B4-A149-7ABFA6D98F7E}.Release|x64.Build.0 = Release|Any CPU + {C57DFBC2-A887-44B4-A149-7ABFA6D98F7E}.Release|x86.ActiveCfg = Release|Any CPU + {C57DFBC2-A887-44B4-A149-7ABFA6D98F7E}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {312795E1-D5E2-4021-8FEA-342CA6F14CC8} = {B931802A-45BB-49A4-9919-B36C827100AC} + {0579BC3C-DC2C-440F-9FB9-F47ABD9B8A58} = {312795E1-D5E2-4021-8FEA-342CA6F14CC8} + {06817D18-5694-454E-A010-CDAECD8AF89B} = {312795E1-D5E2-4021-8FEA-342CA6F14CC8} + {79FE11AB-8D1E-4DEF-81C0-9B352769BFA4} = {B931802A-45BB-49A4-9919-B36C827100AC} + {6EC81D5C-D17C-4F11-9471-A8CDBDD8B76C} = {79FE11AB-8D1E-4DEF-81C0-9B352769BFA4} + {C4703BE0-E8DE-4A22-8653-9E2A20E2BE51} = {79FE11AB-8D1E-4DEF-81C0-9B352769BFA4} + {A28A64CA-297E-4023-895A-483DFDA59FBE} = {B931802A-45BB-49A4-9919-B36C827100AC} + {A81C6D14-8A7F-4AC0-B4E8-DF0A925C1ECE} = {A28A64CA-297E-4023-895A-483DFDA59FBE} + {F4F1E3C9-38E5-49EC-8688-A2D16AA8807B} = {B931802A-45BB-49A4-9919-B36C827100AC} + {B1FC9E6F-F2A2-4E3A-8CFC-0446C592C951} = {F4F1E3C9-38E5-49EC-8688-A2D16AA8807B} + {0F577D33-2EA4-4182-9D89-2EFB022A2835} = {F4F1E3C9-38E5-49EC-8688-A2D16AA8807B} + {84E67496-B000-4AAD-9626-2135F677C4F1} = {0F577D33-2EA4-4182-9D89-2EFB022A2835} + {CF6B45E8-BF6C-487F-A0D0-D3EA31D80529} = {84622717-F98A-4DE2-806E-1EF89C45C0EB} + {B1385496-607F-4573-ABE9-D9FE88D96DB8} = {84622717-F98A-4DE2-806E-1EF89C45C0EB} + {6EFFA596-23E7-498C-8D5E-331C6D8E945D} = {84622717-F98A-4DE2-806E-1EF89C45C0EB} + {A3789DA9-2E0E-41D6-BDDD-11DA4D3DD72D} = {84622717-F98A-4DE2-806E-1EF89C45C0EB} + {9631D314-7B0C-4CEC-8650-0259A8F4C77A} = {84622717-F98A-4DE2-806E-1EF89C45C0EB} + {240BBDB1-3501-4637-8A17-996EA4EBB20B} = {84622717-F98A-4DE2-806E-1EF89C45C0EB} + {88EF760A-99A2-48C8-920F-78632A3BB57A} = {84622717-F98A-4DE2-806E-1EF89C45C0EB} + {9593691E-1B65-4EB1-97AA-F8B292B0082A} = {84622717-F98A-4DE2-806E-1EF89C45C0EB} + {4209F2B4-0388-47DF-A054-C974ABE78723} = {9EC158BE-EB9C-4627-931D-B1B95D3210B6} + {215BC7AA-7275-44CA-A7B5-D62AEC7D4752} = {C6E2B73F-137E-4C37-84DE-0863B1C30D23} + {15FAF776-E564-4ADF-9F10-20F3C0A8BA7C} = {C6E2B73F-137E-4C37-84DE-0863B1C30D23} + {A52106C7-6539-4928-A6E3-A216292327E7} = {3DCECD76-8F99-481E-B828-9C674FF39B2A} + {6B3083B3-FAEA-4626-B299-26D89AE1175A} = {3DCECD76-8F99-481E-B828-9C674FF39B2A} + {CDD2AA23-BC7A-4C2A-8C42-3442B1D6B481} = {84622717-F98A-4DE2-806E-1EF89C45C0EB} + {DF5A8E5A-77C7-48B7-B8CD-4D032BAC8989} = {84622717-F98A-4DE2-806E-1EF89C45C0EB} + {38027842-48A7-4A64-A44F-004BAF0AB450} = {84622717-F98A-4DE2-806E-1EF89C45C0EB} + {C520D48E-87A0-463D-B4CF-3E6B68F8F4D0} = {84622717-F98A-4DE2-806E-1EF89C45C0EB} + {C57DFBC2-A887-44B4-A149-7ABFA6D98F7E} = {84622717-F98A-4DE2-806E-1EF89C45C0EB} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {81AADD49-473B-43ED-8A08-F6B7A058AA39} + EndGlobalSection +EndGlobal diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/Areas/AzureAD/Controllers/AccountController.cs b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Controllers/AccountController.cs similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/Areas/AzureAD/Controllers/AccountController.cs rename to src/Azure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Controllers/AccountController.cs diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/Areas/AzureAD/Pages/Account/AccessDenied.cshtml b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Pages/Account/AccessDenied.cshtml similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/Areas/AzureAD/Pages/Account/AccessDenied.cshtml rename to src/Azure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Pages/Account/AccessDenied.cshtml diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/Areas/AzureAD/Pages/Account/AccessDenied.cshtml.cs b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Pages/Account/AccessDenied.cshtml.cs similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/Areas/AzureAD/Pages/Account/AccessDenied.cshtml.cs rename to src/Azure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Pages/Account/AccessDenied.cshtml.cs diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/Areas/AzureAD/Pages/Account/Error.cshtml b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Pages/Account/Error.cshtml similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/Areas/AzureAD/Pages/Account/Error.cshtml rename to src/Azure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Pages/Account/Error.cshtml diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/Areas/AzureAD/Pages/Account/Error.cshtml.cs b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Pages/Account/Error.cshtml.cs similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/Areas/AzureAD/Pages/Account/Error.cshtml.cs rename to src/Azure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Pages/Account/Error.cshtml.cs diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/Areas/AzureAD/Pages/Account/SignedOut.cshtml b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Pages/Account/SignedOut.cshtml similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/Areas/AzureAD/Pages/Account/SignedOut.cshtml rename to src/Azure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Pages/Account/SignedOut.cshtml diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/Areas/AzureAD/Pages/Account/SignedOut.cshtml.cs b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Pages/Account/SignedOut.cshtml.cs similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/Areas/AzureAD/Pages/Account/SignedOut.cshtml.cs rename to src/Azure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Pages/Account/SignedOut.cshtml.cs diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/Areas/AzureAD/Pages/Account/_viewImports.cshtml b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Pages/Account/_viewImports.cshtml similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/Areas/AzureAD/Pages/Account/_viewImports.cshtml rename to src/Azure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Pages/Account/_viewImports.cshtml diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/Areas/AzureAD/Pages/_ViewStart.cshtml b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Pages/_ViewStart.cshtml similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/Areas/AzureAD/Pages/_ViewStart.cshtml rename to src/Azure/AzureAD/Authentication.AzureAD.UI/src/Areas/AzureAD/Pages/_ViewStart.cshtml diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/AzureADAccountControllerFeatureProvider.cs b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/AzureADAccountControllerFeatureProvider.cs similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/AzureADAccountControllerFeatureProvider.cs rename to src/Azure/AzureAD/Authentication.AzureAD.UI/src/AzureADAccountControllerFeatureProvider.cs diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/AzureADAuthenticationBuilderExtensions.cs b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/AzureADAuthenticationBuilderExtensions.cs similarity index 98% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/AzureADAuthenticationBuilderExtensions.cs rename to src/Azure/AzureAD/Authentication.AzureAD.UI/src/AzureADAuthenticationBuilderExtensions.cs index 9afbcdee27..60a5089ae8 100644 --- a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/AzureADAuthenticationBuilderExtensions.cs +++ b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/AzureADAuthenticationBuilderExtensions.cs @@ -1,4 +1,4 @@ -// 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.using Microsoft.AspNetCore.Authorization; using System; @@ -192,7 +192,6 @@ namespace Microsoft.AspNetCore.Authentication var additionalParts = GetAdditionalParts(); var mvcBuilder = services .AddMvc() - .AddRazorPagesOptions(o => o.AllowAreas = true) .ConfigureApplicationPartManager(apm => { foreach (var part in additionalParts) diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/AzureADDefaults.cs b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/AzureADDefaults.cs similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/AzureADDefaults.cs rename to src/Azure/AzureAD/Authentication.AzureAD.UI/src/AzureADDefaults.cs diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/AzureADOptions.cs b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/AzureADOptions.cs similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/AzureADOptions.cs rename to src/Azure/AzureAD/Authentication.AzureAD.UI/src/AzureADOptions.cs diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/AzureADOptionsConfiguration.cs b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/AzureADOptionsConfiguration.cs similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/AzureADOptionsConfiguration.cs rename to src/Azure/AzureAD/Authentication.AzureAD.UI/src/AzureADOptionsConfiguration.cs diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/AzureADSchemeOptions.cs b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/AzureADSchemeOptions.cs similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/AzureADSchemeOptions.cs rename to src/Azure/AzureAD/Authentication.AzureAD.UI/src/AzureADSchemeOptions.cs diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/CookieOptionsConfiguration.cs b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/CookieOptionsConfiguration.cs similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/CookieOptionsConfiguration.cs rename to src/Azure/AzureAD/Authentication.AzureAD.UI/src/CookieOptionsConfiguration.cs diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/JwtBearerOptionsConfiguration.cs b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/JwtBearerOptionsConfiguration.cs similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/JwtBearerOptionsConfiguration.cs rename to src/Azure/AzureAD/Authentication.AzureAD.UI/src/JwtBearerOptionsConfiguration.cs diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/Microsoft.AspNetCore.Authentication.AzureAD.UI.csproj b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Microsoft.AspNetCore.Authentication.AzureAD.UI.csproj similarity index 71% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/Microsoft.AspNetCore.Authentication.AzureAD.UI.csproj rename to src/Azure/AzureAD/Authentication.AzureAD.UI/src/Microsoft.AspNetCore.Authentication.AzureAD.UI.csproj index 00a3d36749..4a7df9d5a8 100644 --- a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/Microsoft.AspNetCore.Authentication.AzureAD.UI.csproj +++ b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Microsoft.AspNetCore.Authentication.AzureAD.UI.csproj @@ -6,6 +6,7 @@ netcoreapp3.0 aspnetcore;authentication;AzureAD true + true Microsoft.AspNetCore.Mvc.ApplicationParts.NullApplicationPartFactory, Microsoft.AspNetCore.Mvc.Core <_EnableAllInclusiveRazorSdk>true @@ -14,11 +15,11 @@ - - - - - + + + + + @@ -32,10 +33,10 @@ <_Parameter2>$(BuildNumber) - + - + diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/OpenIdConnectOptionsConfiguration.cs b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/OpenIdConnectOptionsConfiguration.cs similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/OpenIdConnectOptionsConfiguration.cs rename to src/Azure/AzureAD/Authentication.AzureAD.UI/src/OpenIdConnectOptionsConfiguration.cs diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/Properties/AssemblyInfo.cs b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Properties/AssemblyInfo.cs similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/Properties/AssemblyInfo.cs rename to src/Azure/AzureAD/Authentication.AzureAD.UI/src/Properties/AssemblyInfo.cs diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/baseline.netcore.json b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/baseline.netcore.json similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureAD.UI/baseline.netcore.json rename to src/Azure/AzureAD/Authentication.AzureAD.UI/src/baseline.netcore.json diff --git a/src/AADIntegration/test/Microsoft.AspNetCore.Authentication.AzureAD.UI.Test/AzureADAuthenticationBuilderExtensionsTests.cs b/src/Azure/AzureAD/Authentication.AzureAD.UI/test/AzureADAuthenticationBuilderExtensionsTests.cs similarity index 100% rename from src/AADIntegration/test/Microsoft.AspNetCore.Authentication.AzureAD.UI.Test/AzureADAuthenticationBuilderExtensionsTests.cs rename to src/Azure/AzureAD/Authentication.AzureAD.UI/test/AzureADAuthenticationBuilderExtensionsTests.cs diff --git a/src/AADIntegration/test/Microsoft.AspNetCore.Authentication.AzureAD.UI.Test/Controllers/AccountControllerTests.cs b/src/Azure/AzureAD/Authentication.AzureAD.UI/test/Controllers/AccountControllerTests.cs similarity index 100% rename from src/AADIntegration/test/Microsoft.AspNetCore.Authentication.AzureAD.UI.Test/Controllers/AccountControllerTests.cs rename to src/Azure/AzureAD/Authentication.AzureAD.UI/test/Controllers/AccountControllerTests.cs diff --git a/src/AADIntegration/test/Microsoft.AspNetCore.Authentication.AzureAD.UI.Test/Microsoft.AspNetCore.Authentication.AzureAD.UI.Test.csproj b/src/Azure/AzureAD/Authentication.AzureAD.UI/test/Microsoft.AspNetCore.Authentication.AzureAD.UI.Test.csproj similarity index 73% rename from src/AADIntegration/test/Microsoft.AspNetCore.Authentication.AzureAD.UI.Test/Microsoft.AspNetCore.Authentication.AzureAD.UI.Test.csproj rename to src/Azure/AzureAD/Authentication.AzureAD.UI/test/Microsoft.AspNetCore.Authentication.AzureAD.UI.Test.csproj index 554232c8a4..509d46fde9 100644 --- a/src/AADIntegration/test/Microsoft.AspNetCore.Authentication.AzureAD.UI.Test/Microsoft.AspNetCore.Authentication.AzureAD.UI.Test.csproj +++ b/src/Azure/AzureAD/Authentication.AzureAD.UI/test/Microsoft.AspNetCore.Authentication.AzureAD.UI.Test.csproj @@ -12,7 +12,7 @@ - + diff --git a/src/AADIntegration/test/Microsoft.AspNetCore.Authentication.AzureAD.FunctionalTests/xunit.runner.json b/src/Azure/AzureAD/Authentication.AzureAD.UI/test/xunit.runner.json similarity index 100% rename from src/AADIntegration/test/Microsoft.AspNetCore.Authentication.AzureAD.FunctionalTests/xunit.runner.json rename to src/Azure/AzureAD/Authentication.AzureAD.UI/test/xunit.runner.json diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/Areas/AzureADB2C/Controllers/AccountController.cs b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Areas/AzureADB2C/Controllers/AccountController.cs similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/Areas/AzureADB2C/Controllers/AccountController.cs rename to src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Areas/AzureADB2C/Controllers/AccountController.cs diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/Areas/AzureADB2C/Pages/Account/AccessDenied.cshtml b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Areas/AzureADB2C/Pages/Account/AccessDenied.cshtml similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/Areas/AzureADB2C/Pages/Account/AccessDenied.cshtml rename to src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Areas/AzureADB2C/Pages/Account/AccessDenied.cshtml diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/Areas/AzureADB2C/Pages/Account/AccessDenied.cshtml.cs b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Areas/AzureADB2C/Pages/Account/AccessDenied.cshtml.cs similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/Areas/AzureADB2C/Pages/Account/AccessDenied.cshtml.cs rename to src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Areas/AzureADB2C/Pages/Account/AccessDenied.cshtml.cs diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/Areas/AzureADB2C/Pages/Account/Error.cshtml b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Areas/AzureADB2C/Pages/Account/Error.cshtml similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/Areas/AzureADB2C/Pages/Account/Error.cshtml rename to src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Areas/AzureADB2C/Pages/Account/Error.cshtml diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/Areas/AzureADB2C/Pages/Account/Error.cshtml.cs b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Areas/AzureADB2C/Pages/Account/Error.cshtml.cs similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/Areas/AzureADB2C/Pages/Account/Error.cshtml.cs rename to src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Areas/AzureADB2C/Pages/Account/Error.cshtml.cs diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/Areas/AzureADB2C/Pages/Account/SignedOut.cshtml b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Areas/AzureADB2C/Pages/Account/SignedOut.cshtml similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/Areas/AzureADB2C/Pages/Account/SignedOut.cshtml rename to src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Areas/AzureADB2C/Pages/Account/SignedOut.cshtml diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/Areas/AzureADB2C/Pages/Account/SignedOut.cshtml.cs b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Areas/AzureADB2C/Pages/Account/SignedOut.cshtml.cs similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/Areas/AzureADB2C/Pages/Account/SignedOut.cshtml.cs rename to src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Areas/AzureADB2C/Pages/Account/SignedOut.cshtml.cs diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/Areas/AzureADB2C/Pages/Account/_viewImports.cshtml b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Areas/AzureADB2C/Pages/Account/_viewImports.cshtml similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/Areas/AzureADB2C/Pages/Account/_viewImports.cshtml rename to src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Areas/AzureADB2C/Pages/Account/_viewImports.cshtml diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/Areas/AzureADB2C/Pages/_ViewStart.cshtml b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Areas/AzureADB2C/Pages/_ViewStart.cshtml similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/Areas/AzureADB2C/Pages/_ViewStart.cshtml rename to src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Areas/AzureADB2C/Pages/_ViewStart.cshtml diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/AzureADB2CAccountControllerFeatureProvider.cs b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/AzureADB2CAccountControllerFeatureProvider.cs similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/AzureADB2CAccountControllerFeatureProvider.cs rename to src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/AzureADB2CAccountControllerFeatureProvider.cs diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/AzureAdB2CAuthenticationBuilderExtensions.cs b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/AzureAdB2CAuthenticationBuilderExtensions.cs similarity index 98% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/AzureAdB2CAuthenticationBuilderExtensions.cs rename to src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/AzureAdB2CAuthenticationBuilderExtensions.cs index 23d567a5e4..b80823600a 100644 --- a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/AzureAdB2CAuthenticationBuilderExtensions.cs +++ b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/AzureAdB2CAuthenticationBuilderExtensions.cs @@ -1,4 +1,4 @@ -// 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.using Microsoft.AspNetCore.Authorization; using System; @@ -193,7 +193,6 @@ namespace Microsoft.AspNetCore.Authentication var additionalParts = GetAdditionalParts(); var mvcBuilder = services .AddMvc() - .AddRazorPagesOptions(o => o.AllowAreas = true) .ConfigureApplicationPartManager(apm => { foreach (var part in additionalParts) diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/AzureAdB2CDefaults.cs b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/AzureAdB2CDefaults.cs similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/AzureAdB2CDefaults.cs rename to src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/AzureAdB2CDefaults.cs diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/AzureAdB2COpenIDConnectEventHandlers.cs b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/AzureAdB2COpenIDConnectEventHandlers.cs similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/AzureAdB2COpenIDConnectEventHandlers.cs rename to src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/AzureAdB2COpenIDConnectEventHandlers.cs diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/AzureAdB2COptions.cs b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/AzureAdB2COptions.cs similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/AzureAdB2COptions.cs rename to src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/AzureAdB2COptions.cs diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/AzureAdB2COptionsConfiguration.cs b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/AzureAdB2COptionsConfiguration.cs similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/AzureAdB2COptionsConfiguration.cs rename to src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/AzureAdB2COptionsConfiguration.cs diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/AzureAdB2CSchemeOptions.cs b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/AzureAdB2CSchemeOptions.cs similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/AzureAdB2CSchemeOptions.cs rename to src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/AzureAdB2CSchemeOptions.cs diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/CookieOptionsConfiguration.cs b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/CookieOptionsConfiguration.cs similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/CookieOptionsConfiguration.cs rename to src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/CookieOptionsConfiguration.cs diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/JwtBearerOptionsConfiguration.cs b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/JwtBearerOptionsConfiguration.cs similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/JwtBearerOptionsConfiguration.cs rename to src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/JwtBearerOptionsConfiguration.cs diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.csproj b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.csproj similarity index 71% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.csproj rename to src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.csproj index c1f77ce905..3c3a584bfd 100644 --- a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.csproj +++ b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.csproj @@ -6,6 +6,7 @@ netcoreapp3.0 aspnetcore;authentication;AzureADB2C true + true Microsoft.AspNetCore.Mvc.ApplicationParts.NullApplicationPartFactory, Microsoft.AspNetCore.Mvc.Core <_EnableAllInclusiveRazorSdk>true @@ -14,11 +15,11 @@ - - - - - + + + + + @@ -32,10 +33,10 @@ <_Parameter2>$(BuildNumber) - + - + diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/OpenIdConnectOptionsConfiguration.cs b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/OpenIdConnectOptionsConfiguration.cs similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/OpenIdConnectOptionsConfiguration.cs rename to src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/OpenIdConnectOptionsConfiguration.cs diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/Properties/AssemblyInfo.cs b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Properties/AssemblyInfo.cs similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/Properties/AssemblyInfo.cs rename to src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Properties/AssemblyInfo.cs diff --git a/src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/baseline.netcore.json b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/baseline.netcore.json similarity index 100% rename from src/AADIntegration/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI/baseline.netcore.json rename to src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/baseline.netcore.json diff --git a/src/AADIntegration/test/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Test/AzureAdB2CAuthenticationBuilderExtensionsTests.cs b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/test/AzureAdB2CAuthenticationBuilderExtensionsTests.cs similarity index 100% rename from src/AADIntegration/test/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Test/AzureAdB2CAuthenticationBuilderExtensionsTests.cs rename to src/Azure/AzureAD/Authentication.AzureADB2C.UI/test/AzureAdB2CAuthenticationBuilderExtensionsTests.cs diff --git a/src/AADIntegration/test/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Test/AzureAdB2COpenIDConnectEventHandlersTests.cs b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/test/AzureAdB2COpenIDConnectEventHandlersTests.cs similarity index 100% rename from src/AADIntegration/test/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Test/AzureAdB2COpenIDConnectEventHandlersTests.cs rename to src/Azure/AzureAD/Authentication.AzureADB2C.UI/test/AzureAdB2COpenIDConnectEventHandlersTests.cs diff --git a/src/AADIntegration/test/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Test/Controllers/AccountControllerTests.cs b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/test/Controllers/AccountControllerTests.cs similarity index 100% rename from src/AADIntegration/test/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Test/Controllers/AccountControllerTests.cs rename to src/Azure/AzureAD/Authentication.AzureADB2C.UI/test/Controllers/AccountControllerTests.cs diff --git a/src/AADIntegration/test/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Test/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Test.csproj b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/test/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Test.csproj similarity index 72% rename from src/AADIntegration/test/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Test/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Test.csproj rename to src/Azure/AzureAD/Authentication.AzureADB2C.UI/test/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Test.csproj index 7becca1b5e..6abd66f574 100644 --- a/src/AADIntegration/test/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Test/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Test.csproj +++ b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/test/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Test.csproj @@ -12,7 +12,7 @@ - + diff --git a/src/AADIntegration/test/Microsoft.AspNetCore.Authentication.AzureAD.UI.Test/xunit.runner.json b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/test/xunit.runner.json similarity index 100% rename from src/AADIntegration/test/Microsoft.AspNetCore.Authentication.AzureAD.UI.Test/xunit.runner.json rename to src/Azure/AzureAD/Authentication.AzureADB2C.UI/test/xunit.runner.json diff --git a/src/AADIntegration/test/AADIntegration.ruleset b/src/Azure/AzureAD/AzureAD.ruleset similarity index 69% rename from src/AADIntegration/test/AADIntegration.ruleset rename to src/Azure/AzureAD/AzureAD.ruleset index 23f2deac4a..57375fd55d 100644 --- a/src/AADIntegration/test/AADIntegration.ruleset +++ b/src/Azure/AzureAD/AzureAD.ruleset @@ -1,7 +1,7 @@  - + - diff --git a/src/Azure/AzureAD/Directory.Build.props b/src/Azure/AzureAD/Directory.Build.props new file mode 100644 index 0000000000..647d706b5a --- /dev/null +++ b/src/Azure/AzureAD/Directory.Build.props @@ -0,0 +1,8 @@ + + + + + xUnit1026:$(WarningsNotAsErrors) + $(MSBuildThisFileDirectory)AzureAD.ruleset + + diff --git a/src/Azure/AzureAD/README.md b/src/Azure/AzureAD/README.md new file mode 100644 index 0000000000..6086294419 --- /dev/null +++ b/src/Azure/AzureAD/README.md @@ -0,0 +1,4 @@ +Azure Active Directory Integration +================================== + +ASP.NET Core Azure Active Directory Integration provides seamless authentication integration with different Azure Active Directory services like Azure Active Directory and Azure Active Directory B2C for ASP.NET Core applications. \ No newline at end of file diff --git a/src/Azure/AzureAD/samples/AzureADB2CSample/AzureADB2CSample.csproj b/src/Azure/AzureAD/samples/AzureADB2CSample/AzureADB2CSample.csproj new file mode 100644 index 0000000000..6b9a99731f --- /dev/null +++ b/src/Azure/AzureAD/samples/AzureADB2CSample/AzureADB2CSample.csproj @@ -0,0 +1,23 @@ + + + + netcoreapp3.0 + + + + true + + + + + + + + + + + + + + + diff --git a/src/AADIntegration/samples/AzureADB2CSample/Pages/Index.cshtml b/src/Azure/AzureAD/samples/AzureADB2CSample/Pages/Index.cshtml similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/Pages/Index.cshtml rename to src/Azure/AzureAD/samples/AzureADB2CSample/Pages/Index.cshtml diff --git a/src/AADIntegration/samples/AzureADB2CSample/Pages/Index.cshtml.cs b/src/Azure/AzureAD/samples/AzureADB2CSample/Pages/Index.cshtml.cs similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/Pages/Index.cshtml.cs rename to src/Azure/AzureAD/samples/AzureADB2CSample/Pages/Index.cshtml.cs diff --git a/src/AADIntegration/samples/AzureADB2CSample/Pages/Shared/_Layout.cshtml b/src/Azure/AzureAD/samples/AzureADB2CSample/Pages/Shared/_Layout.cshtml similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/Pages/Shared/_Layout.cshtml rename to src/Azure/AzureAD/samples/AzureADB2CSample/Pages/Shared/_Layout.cshtml diff --git a/src/AADIntegration/samples/AzureADB2CSample/Pages/Shared/_LoginPartial.cshtml b/src/Azure/AzureAD/samples/AzureADB2CSample/Pages/Shared/_LoginPartial.cshtml similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/Pages/Shared/_LoginPartial.cshtml rename to src/Azure/AzureAD/samples/AzureADB2CSample/Pages/Shared/_LoginPartial.cshtml diff --git a/src/AADIntegration/samples/AzureADB2CSample/Pages/_ViewImports.cshtml b/src/Azure/AzureAD/samples/AzureADB2CSample/Pages/_ViewImports.cshtml similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/Pages/_ViewImports.cshtml rename to src/Azure/AzureAD/samples/AzureADB2CSample/Pages/_ViewImports.cshtml diff --git a/src/AADIntegration/samples/AzureADB2CSample/Pages/_ViewStart.cshtml b/src/Azure/AzureAD/samples/AzureADB2CSample/Pages/_ViewStart.cshtml similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/Pages/_ViewStart.cshtml rename to src/Azure/AzureAD/samples/AzureADB2CSample/Pages/_ViewStart.cshtml diff --git a/src/AADIntegration/samples/AzureADB2CSample/Program.cs b/src/Azure/AzureAD/samples/AzureADB2CSample/Program.cs similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/Program.cs rename to src/Azure/AzureAD/samples/AzureADB2CSample/Program.cs diff --git a/src/AADIntegration/samples/AzureADB2CSample/Startup.cs b/src/Azure/AzureAD/samples/AzureADB2CSample/Startup.cs similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/Startup.cs rename to src/Azure/AzureAD/samples/AzureADB2CSample/Startup.cs diff --git a/src/AADIntegration/samples/AzureADB2CSample/appsettings.Development.json b/src/Azure/AzureAD/samples/AzureADB2CSample/appsettings.Development.json similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/appsettings.Development.json rename to src/Azure/AzureAD/samples/AzureADB2CSample/appsettings.Development.json diff --git a/src/AADIntegration/samples/AzureADB2CSample/appsettings.json b/src/Azure/AzureAD/samples/AzureADB2CSample/appsettings.json similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/appsettings.json rename to src/Azure/AzureAD/samples/AzureADB2CSample/appsettings.json diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/css/site.css b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/css/site.css similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/css/site.css rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/css/site.css diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/css/site.min.css b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/css/site.min.css similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/css/site.min.css rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/css/site.min.css diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/favicon.ico b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/favicon.ico similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/favicon.ico rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/favicon.ico diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/images/banner1.svg b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/images/banner1.svg similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/images/banner1.svg rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/images/banner1.svg diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/images/banner2.svg b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/images/banner2.svg similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/images/banner2.svg rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/images/banner2.svg diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/images/banner3.svg b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/images/banner3.svg similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/images/banner3.svg rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/images/banner3.svg diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/images/banner4.svg b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/images/banner4.svg similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/images/banner4.svg rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/images/banner4.svg diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/js/site.js b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/js/site.js similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/js/site.js rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/js/site.js diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/js/site.min.js b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/js/site.min.js similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/js/site.min.js rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/js/site.min.js diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/bootstrap/.bower.json b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/bootstrap/.bower.json similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/bootstrap/.bower.json rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/bootstrap/.bower.json diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/bootstrap/LICENSE b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/bootstrap/LICENSE similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/bootstrap/LICENSE rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/bootstrap/LICENSE diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.css b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.css similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.css rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.css diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.css.map b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.css.map similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.css.map rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.css.map diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.min.css.map b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.min.css.map similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.min.css.map rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.min.css.map diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/css/bootstrap.css b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/css/bootstrap.css similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/css/bootstrap.css rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/css/bootstrap.css diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.eot b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.eot similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.eot rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.eot diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.svg b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.svg similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.svg rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.svg diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2 b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2 similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2 rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2 diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/js/bootstrap.js b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/js/bootstrap.js similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/js/bootstrap.js rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/js/bootstrap.js diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/js/npm.js b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/js/npm.js similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/js/npm.js rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/bootstrap/dist/js/npm.js diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/jquery-validation-unobtrusive/.bower.json b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/jquery-validation-unobtrusive/.bower.json similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/jquery-validation-unobtrusive/.bower.json rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/jquery-validation-unobtrusive/.bower.json diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/jquery-validation/.bower.json b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/jquery-validation/.bower.json similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/jquery-validation/.bower.json rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/jquery-validation/.bower.json diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/jquery-validation/LICENSE.md b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/jquery-validation/LICENSE.md similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/jquery-validation/LICENSE.md rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/jquery-validation/LICENSE.md diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/jquery-validation/dist/additional-methods.js b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/jquery-validation/dist/additional-methods.js similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/jquery-validation/dist/additional-methods.js rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/jquery-validation/dist/additional-methods.js diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/jquery-validation/dist/jquery.validate.js b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/jquery-validation/dist/jquery.validate.js similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/jquery-validation/dist/jquery.validate.js rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/jquery-validation/dist/jquery.validate.js diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/jquery/.bower.json b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/jquery/.bower.json similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/jquery/.bower.json rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/jquery/.bower.json diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/jquery/LICENSE.txt b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/jquery/LICENSE.txt similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/jquery/LICENSE.txt rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/jquery/LICENSE.txt diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/jquery/dist/jquery.js b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/jquery/dist/jquery.js similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/jquery/dist/jquery.js rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/jquery/dist/jquery.js diff --git a/src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/jquery/dist/jquery.min.map b/src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/jquery/dist/jquery.min.map similarity index 100% rename from src/AADIntegration/samples/AzureADB2CSample/wwwroot/lib/jquery/dist/jquery.min.map rename to src/Azure/AzureAD/samples/AzureADB2CSample/wwwroot/lib/jquery/dist/jquery.min.map diff --git a/src/AADIntegration/test/Microsoft.AspNetCore.Authentication.AzureAD.FunctionalTests/ApiAuthenticationTests.cs b/src/Azure/AzureAD/test/FunctionalTests/ApiAuthenticationTests.cs similarity index 100% rename from src/AADIntegration/test/Microsoft.AspNetCore.Authentication.AzureAD.FunctionalTests/ApiAuthenticationTests.cs rename to src/Azure/AzureAD/test/FunctionalTests/ApiAuthenticationTests.cs diff --git a/src/Azure/AzureAD/test/FunctionalTests/Microsoft.AspNetCore.Authentication.AzureAD.FunctionalTests.csproj b/src/Azure/AzureAD/test/FunctionalTests/Microsoft.AspNetCore.Authentication.AzureAD.FunctionalTests.csproj new file mode 100644 index 0000000000..ed2253ef17 --- /dev/null +++ b/src/Azure/AzureAD/test/FunctionalTests/Microsoft.AspNetCore.Authentication.AzureAD.FunctionalTests.csproj @@ -0,0 +1,21 @@ + + + + netcoreapp3.0 + + + + + + + + + + + + + + + + + diff --git a/src/AADIntegration/test/Microsoft.AspNetCore.Authentication.AzureAD.FunctionalTests/WebAuthenticationTests.cs b/src/Azure/AzureAD/test/FunctionalTests/WebAuthenticationTests.cs similarity index 100% rename from src/AADIntegration/test/Microsoft.AspNetCore.Authentication.AzureAD.FunctionalTests/WebAuthenticationTests.cs rename to src/Azure/AzureAD/test/FunctionalTests/WebAuthenticationTests.cs diff --git a/src/AADIntegration/test/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Test/xunit.runner.json b/src/Azure/AzureAD/test/FunctionalTests/xunit.runner.json similarity index 100% rename from src/AADIntegration/test/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Test/xunit.runner.json rename to src/Azure/AzureAD/test/FunctionalTests/xunit.runner.json diff --git a/src/Azure/AzureAD/test/testassets/AzureAD.WebSite/AzureAD.WebSite.csproj b/src/Azure/AzureAD/test/testassets/AzureAD.WebSite/AzureAD.WebSite.csproj new file mode 100644 index 0000000000..73b832bf22 --- /dev/null +++ b/src/Azure/AzureAD/test/testassets/AzureAD.WebSite/AzureAD.WebSite.csproj @@ -0,0 +1,25 @@ + + + + netcoreapp3.0 + + + + + + + + + + + + + + + + + + + + + diff --git a/src/AADIntegration/test/WebSites/AzureAD.WebSite/Controllers/TestController.cs b/src/Azure/AzureAD/test/testassets/AzureAD.WebSite/Controllers/TestController.cs similarity index 100% rename from src/AADIntegration/test/WebSites/AzureAD.WebSite/Controllers/TestController.cs rename to src/Azure/AzureAD/test/testassets/AzureAD.WebSite/Controllers/TestController.cs diff --git a/src/AADIntegration/test/WebSites/AzureAD.WebSite/Program.cs b/src/Azure/AzureAD/test/testassets/AzureAD.WebSite/Program.cs similarity index 100% rename from src/AADIntegration/test/WebSites/AzureAD.WebSite/Program.cs rename to src/Azure/AzureAD/test/testassets/AzureAD.WebSite/Program.cs diff --git a/src/AADIntegration/test/WebSites/AzureAD.WebSite/Startup.cs b/src/Azure/AzureAD/test/testassets/AzureAD.WebSite/Startup.cs similarity index 100% rename from src/AADIntegration/test/WebSites/AzureAD.WebSite/Startup.cs rename to src/Azure/AzureAD/test/testassets/AzureAD.WebSite/Startup.cs diff --git a/src/AzureIntegration/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup/AssemblyInfo.cs b/src/Azure/AzureAppServices.HostingStartup/src/AssemblyInfo.cs similarity index 100% rename from src/AzureIntegration/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup/AssemblyInfo.cs rename to src/Azure/AzureAppServices.HostingStartup/src/AssemblyInfo.cs diff --git a/src/AzureIntegration/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup/AzureAppServicesHostingStartup.cs b/src/Azure/AzureAppServices.HostingStartup/src/AzureAppServicesHostingStartup.cs similarity index 100% rename from src/AzureIntegration/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup/AzureAppServicesHostingStartup.cs rename to src/Azure/AzureAppServices.HostingStartup/src/AzureAppServicesHostingStartup.cs diff --git a/src/AzureIntegration/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup/HostingStartupConfigurationExtensions.cs b/src/Azure/AzureAppServices.HostingStartup/src/HostingStartupConfigurationExtensions.cs similarity index 100% rename from src/AzureIntegration/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup/HostingStartupConfigurationExtensions.cs rename to src/Azure/AzureAppServices.HostingStartup/src/HostingStartupConfigurationExtensions.cs diff --git a/src/Azure/AzureAppServices.HostingStartup/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj b/src/Azure/AzureAppServices.HostingStartup/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj new file mode 100644 index 0000000000..ac74adf4d7 --- /dev/null +++ b/src/Azure/AzureAppServices.HostingStartup/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj @@ -0,0 +1,18 @@ + + + + + + ASP.NET Core lightup integration with Azure AppServices. + netcoreapp3.0 + true + aspnetcore;azure;appservices + true + + + + + + + + diff --git a/src/AzureIntegration/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup/baseline.netcore.json b/src/Azure/AzureAppServices.HostingStartup/src/baseline.netcore.json similarity index 100% rename from src/AzureIntegration/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup/baseline.netcore.json rename to src/Azure/AzureAppServices.HostingStartup/src/baseline.netcore.json diff --git a/src/AzureIntegration/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup/baseline.netframework.json b/src/Azure/AzureAppServices.HostingStartup/src/baseline.netframework.json similarity index 100% rename from src/AzureIntegration/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup/baseline.netframework.json rename to src/Azure/AzureAppServices.HostingStartup/src/baseline.netframework.json diff --git a/src/AzureIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration/AppServicesWebHostBuilderExtensions.cs b/src/Azure/AzureAppServicesIntegration/src/AppServicesWebHostBuilderExtensions.cs similarity index 100% rename from src/AzureIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration/AppServicesWebHostBuilderExtensions.cs rename to src/Azure/AzureAppServicesIntegration/src/AppServicesWebHostBuilderExtensions.cs diff --git a/src/AzureIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration/Microsoft.AspNetCore.AzureAppServicesIntegration.csproj b/src/Azure/AzureAppServicesIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration.csproj similarity index 63% rename from src/AzureIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration/Microsoft.AspNetCore.AzureAppServicesIntegration.csproj rename to src/Azure/AzureAppServicesIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration.csproj index dd72a33a90..fbbef613fd 100644 --- a/src/AzureIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration/Microsoft.AspNetCore.AzureAppServicesIntegration.csproj +++ b/src/Azure/AzureAppServicesIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration.csproj @@ -7,11 +7,12 @@ true true aspnetcore;azure;appservices + true - - + + diff --git a/src/AzureIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration/Properties/AssemblyInfo.cs b/src/Azure/AzureAppServicesIntegration/src/Properties/AssemblyInfo.cs similarity index 100% rename from src/AzureIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration/Properties/AssemblyInfo.cs rename to src/Azure/AzureAppServicesIntegration/src/Properties/AssemblyInfo.cs diff --git a/src/AzureIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration/baseline.netcore.json b/src/Azure/AzureAppServicesIntegration/src/baseline.netcore.json similarity index 100% rename from src/AzureIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration/baseline.netcore.json rename to src/Azure/AzureAppServicesIntegration/src/baseline.netcore.json diff --git a/src/AzureIntegration/test/Microsoft.AspNetCore.AzureAppServicesIntegration.Tests/AppServicesWebHostBuilderExtensionsTest.cs b/src/Azure/AzureAppServicesIntegration/test/AppServicesWebHostBuilderExtensionsTest.cs similarity index 100% rename from src/AzureIntegration/test/Microsoft.AspNetCore.AzureAppServicesIntegration.Tests/AppServicesWebHostBuilderExtensionsTest.cs rename to src/Azure/AzureAppServicesIntegration/test/AppServicesWebHostBuilderExtensionsTest.cs diff --git a/src/Azure/AzureAppServicesIntegration/test/Microsoft.AspNetCore.AzureAppServicesIntegration.Tests.csproj b/src/Azure/AzureAppServicesIntegration/test/Microsoft.AspNetCore.AzureAppServicesIntegration.Tests.csproj new file mode 100644 index 0000000000..d325471015 --- /dev/null +++ b/src/Azure/AzureAppServicesIntegration/test/Microsoft.AspNetCore.AzureAppServicesIntegration.Tests.csproj @@ -0,0 +1,13 @@ + + + + netcoreapp3.0 + + + + + + + + + diff --git a/src/Azure/build.cmd b/src/Azure/build.cmd new file mode 100644 index 0000000000..033fe6f614 --- /dev/null +++ b/src/Azure/build.cmd @@ -0,0 +1,3 @@ +@ECHO OFF +SET RepoRoot=%~dp0..\.. +%RepoRoot%\build.cmd -projects %~dp0\**\*.*proj %* diff --git a/src/AzureIntegration/build/hostingstartup.targets b/src/Azure/hostingstartup.targets similarity index 100% rename from src/AzureIntegration/build/hostingstartup.targets rename to src/Azure/hostingstartup.targets diff --git a/src/Azure/samples/AzureAppServicesHostingStartupSample/AzureAppServicesHostingStartupSample.csproj b/src/Azure/samples/AzureAppServicesHostingStartupSample/AzureAppServicesHostingStartupSample.csproj new file mode 100644 index 0000000000..6985ea6c0c --- /dev/null +++ b/src/Azure/samples/AzureAppServicesHostingStartupSample/AzureAppServicesHostingStartupSample.csproj @@ -0,0 +1,15 @@ + + + + netcoreapp3.0 + + + + + + + + + + + diff --git a/src/AzureIntegration/sample/AzureAppServicesHostingStartupSample/Startup.cs b/src/Azure/samples/AzureAppServicesHostingStartupSample/Startup.cs similarity index 100% rename from src/AzureIntegration/sample/AzureAppServicesHostingStartupSample/Startup.cs rename to src/Azure/samples/AzureAppServicesHostingStartupSample/Startup.cs diff --git a/src/Azure/samples/AzureAppServicesSample/AzureAppServicesSample.csproj b/src/Azure/samples/AzureAppServicesSample/AzureAppServicesSample.csproj new file mode 100644 index 0000000000..9f7be59933 --- /dev/null +++ b/src/Azure/samples/AzureAppServicesSample/AzureAppServicesSample.csproj @@ -0,0 +1,15 @@ + + + + netcoreapp3.0 + + + + + + + + + + + diff --git a/src/AzureIntegration/sample/AzureAppServicesSample/Startup.cs b/src/Azure/samples/AzureAppServicesSample/Startup.cs similarity index 100% rename from src/AzureIntegration/sample/AzureAppServicesSample/Startup.cs rename to src/Azure/samples/AzureAppServicesSample/Startup.cs diff --git a/src/Azure/startvs.cmd b/src/Azure/startvs.cmd new file mode 100644 index 0000000000..458c43b11a --- /dev/null +++ b/src/Azure/startvs.cmd @@ -0,0 +1,3 @@ +@ECHO OFF + +%~dp0..\..\startvs.cmd %~dp0Azure.sln diff --git a/src/AzureIntegration/.gitignore b/src/AzureIntegration/.gitignore deleted file mode 100644 index 5c05ff5f40..0000000000 --- a/src/AzureIntegration/.gitignore +++ /dev/null @@ -1,34 +0,0 @@ -[Oo]bj/ -[Bb]in/ -TestResults/ -.nuget/ -_ReSharper.*/ -packages/ -artifacts/ -PublishProfiles/ -*.user -*.suo -*.cache -*.docstates -_ReSharper.* -nuget.exe -*net45.csproj -*net451.csproj -*k10.csproj -*.psess -*.vsp -*.pidb -*.userprefs -*DS_Store -*.ncrunchsolution -*.*sdf -*.ipch -*.sln.ide -project.lock.json -.vs -.build/ -.testPublish/ -global.json -msbuild.binlog -.test-dotnet/ -.deps/ \ No newline at end of file diff --git a/src/AzureIntegration/AzureIntegration.sln b/src/AzureIntegration/AzureIntegration.sln deleted file mode 100644 index cc9ac83c23..0000000000 --- a/src/AzureIntegration/AzureIntegration.sln +++ /dev/null @@ -1,117 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27016.1 -MinimumVisualStudioVersion = 15.0.26730.03 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.AzureAppServicesIntegration", "src\Microsoft.AspNetCore.AzureAppServicesIntegration\Microsoft.AspNetCore.AzureAppServicesIntegration.csproj", "{5916BEB5-0969-469B-976C-A392E015DFAC}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{FF9B744E-6C59-40CC-9E41-9D2EBD292435}" - ProjectSection(SolutionItems) = preProject - src\Directory.Build.props = src\Directory.Build.props - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2FFE2B87-BF8A-4B38-ADAB-2FE2F9BC4A7C}" - ProjectSection(SolutionItems) = preProject - build\dependencies.props = build\dependencies.props - Directory.Build.props = Directory.Build.props - Directory.Build.targets = Directory.Build.targets - NuGet.config = NuGet.config - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AzureAppServicesSample", "sample\AzureAppServicesSample\AzureAppServicesSample.csproj", "{05A4D308-B162-4194-BC5E-88CCB4DBD318}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{37237C93-6855-40D9-9E60-418B093EF49A}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{CD650B4B-81C2-4A44-AEF2-A251A877C1F0}" - ProjectSection(SolutionItems) = preProject - test\Directory.Build.props = test\Directory.Build.props - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.AzureAppServicesIntegration.Tests", "test\Microsoft.AspNetCore.AzureAppServicesIntegration.Tests\Microsoft.AspNetCore.AzureAppServicesIntegration.Tests.csproj", "{9BA1B692-B313-4E22-A864-F0ADBBE3C3FA}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.AzureAppServices.HostingStartup", "src\Microsoft.AspNetCore.AzureAppServices.HostingStartup\Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj", "{AC023B45-7995-4D4A-8108-E512AE8E5734}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AzureAppServicesHostingStartupSample", "sample\AzureAppServicesHostingStartupSample\AzureAppServicesHostingStartupSample.csproj", "{939EA897-CA31-4F2E-BA51-22B570B64671}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Web.Xdt.Extensions", "src\Microsoft.Web.Xdt.Extensions\Microsoft.Web.Xdt.Extensions.csproj", "{9B22E525-FEC9-4C7C-9F9C-598C15BD0250}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.AzureAppServices.SiteExtension", "extensions\Microsoft.AspNetCore.AzureAppServices.SiteExtension\Microsoft.AspNetCore.AzureAppServices.SiteExtension.csproj", "{1CE2D76B-39E6-46C0-8F6F-C63E370955A9}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Web.Xdt.Extensions.Tests", "test\Microsoft.Web.Xdt.Extensions.Tests\Microsoft.Web.Xdt.Extensions.Tests.csproj", "{809AEE05-1B28-4E31-8959-776B249BD725}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.ApplicationModelDetection", "src\Microsoft.Extensions.ApplicationModelDetection\Microsoft.Extensions.ApplicationModelDetection.csproj", "{F0CABFE8-A5B1-487B-A451-A486D26742D3}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.ApplicationModelDetection.Tests", "test\Microsoft.Extensions.ApplicationModelDetection.Tests\Microsoft.Extensions.ApplicationModelDetection.Tests.csproj", "{15664836-2B94-4D2D-AC18-6DED01FCCCBD}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Runtime.SiteExtension", "extensions\Microsoft.AspNetCore.Runtime.SiteExtension\Microsoft.AspNetCore.Runtime.SiteExtension.csproj", "{E1E9BC7A-6951-4B60-8DFB-DBB9AC3CDEB0}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {5916BEB5-0969-469B-976C-A392E015DFAC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5916BEB5-0969-469B-976C-A392E015DFAC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5916BEB5-0969-469B-976C-A392E015DFAC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5916BEB5-0969-469B-976C-A392E015DFAC}.Release|Any CPU.Build.0 = Release|Any CPU - {05A4D308-B162-4194-BC5E-88CCB4DBD318}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {05A4D308-B162-4194-BC5E-88CCB4DBD318}.Debug|Any CPU.Build.0 = Debug|Any CPU - {05A4D308-B162-4194-BC5E-88CCB4DBD318}.Release|Any CPU.ActiveCfg = Release|Any CPU - {05A4D308-B162-4194-BC5E-88CCB4DBD318}.Release|Any CPU.Build.0 = Release|Any CPU - {9BA1B692-B313-4E22-A864-F0ADBBE3C3FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9BA1B692-B313-4E22-A864-F0ADBBE3C3FA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9BA1B692-B313-4E22-A864-F0ADBBE3C3FA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9BA1B692-B313-4E22-A864-F0ADBBE3C3FA}.Release|Any CPU.Build.0 = Release|Any CPU - {AC023B45-7995-4D4A-8108-E512AE8E5734}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AC023B45-7995-4D4A-8108-E512AE8E5734}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AC023B45-7995-4D4A-8108-E512AE8E5734}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AC023B45-7995-4D4A-8108-E512AE8E5734}.Release|Any CPU.Build.0 = Release|Any CPU - {939EA897-CA31-4F2E-BA51-22B570B64671}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {939EA897-CA31-4F2E-BA51-22B570B64671}.Debug|Any CPU.Build.0 = Debug|Any CPU - {939EA897-CA31-4F2E-BA51-22B570B64671}.Release|Any CPU.ActiveCfg = Release|Any CPU - {939EA897-CA31-4F2E-BA51-22B570B64671}.Release|Any CPU.Build.0 = Release|Any CPU - {9B22E525-FEC9-4C7C-9F9C-598C15BD0250}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9B22E525-FEC9-4C7C-9F9C-598C15BD0250}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9B22E525-FEC9-4C7C-9F9C-598C15BD0250}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9B22E525-FEC9-4C7C-9F9C-598C15BD0250}.Release|Any CPU.Build.0 = Release|Any CPU - {1CE2D76B-39E6-46C0-8F6F-C63E370955A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1CE2D76B-39E6-46C0-8F6F-C63E370955A9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1CE2D76B-39E6-46C0-8F6F-C63E370955A9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1CE2D76B-39E6-46C0-8F6F-C63E370955A9}.Release|Any CPU.Build.0 = Release|Any CPU - {809AEE05-1B28-4E31-8959-776B249BD725}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {809AEE05-1B28-4E31-8959-776B249BD725}.Debug|Any CPU.Build.0 = Debug|Any CPU - {809AEE05-1B28-4E31-8959-776B249BD725}.Release|Any CPU.ActiveCfg = Release|Any CPU - {809AEE05-1B28-4E31-8959-776B249BD725}.Release|Any CPU.Build.0 = Release|Any CPU - {F0CABFE8-A5B1-487B-A451-A486D26742D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F0CABFE8-A5B1-487B-A451-A486D26742D3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F0CABFE8-A5B1-487B-A451-A486D26742D3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F0CABFE8-A5B1-487B-A451-A486D26742D3}.Release|Any CPU.Build.0 = Release|Any CPU - {15664836-2B94-4D2D-AC18-6DED01FCCCBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {15664836-2B94-4D2D-AC18-6DED01FCCCBD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {15664836-2B94-4D2D-AC18-6DED01FCCCBD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {15664836-2B94-4D2D-AC18-6DED01FCCCBD}.Release|Any CPU.Build.0 = Release|Any CPU - {E1E9BC7A-6951-4B60-8DFB-DBB9AC3CDEB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E1E9BC7A-6951-4B60-8DFB-DBB9AC3CDEB0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E1E9BC7A-6951-4B60-8DFB-DBB9AC3CDEB0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E1E9BC7A-6951-4B60-8DFB-DBB9AC3CDEB0}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {5916BEB5-0969-469B-976C-A392E015DFAC} = {FF9B744E-6C59-40CC-9E41-9D2EBD292435} - {05A4D308-B162-4194-BC5E-88CCB4DBD318} = {37237C93-6855-40D9-9E60-418B093EF49A} - {9BA1B692-B313-4E22-A864-F0ADBBE3C3FA} = {CD650B4B-81C2-4A44-AEF2-A251A877C1F0} - {AC023B45-7995-4D4A-8108-E512AE8E5734} = {FF9B744E-6C59-40CC-9E41-9D2EBD292435} - {939EA897-CA31-4F2E-BA51-22B570B64671} = {37237C93-6855-40D9-9E60-418B093EF49A} - {9B22E525-FEC9-4C7C-9F9C-598C15BD0250} = {FF9B744E-6C59-40CC-9E41-9D2EBD292435} - {1CE2D76B-39E6-46C0-8F6F-C63E370955A9} = {FF9B744E-6C59-40CC-9E41-9D2EBD292435} - {809AEE05-1B28-4E31-8959-776B249BD725} = {CD650B4B-81C2-4A44-AEF2-A251A877C1F0} - {F0CABFE8-A5B1-487B-A451-A486D26742D3} = {FF9B744E-6C59-40CC-9E41-9D2EBD292435} - {15664836-2B94-4D2D-AC18-6DED01FCCCBD} = {CD650B4B-81C2-4A44-AEF2-A251A877C1F0} - {E1E9BC7A-6951-4B60-8DFB-DBB9AC3CDEB0} = {FF9B744E-6C59-40CC-9E41-9D2EBD292435} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {5743DFE7-1AA5-439D-84AE-A480EA389927} - EndGlobalSection -EndGlobal diff --git a/src/AzureIntegration/Directory.Build.props b/src/AzureIntegration/Directory.Build.props deleted file mode 100644 index cf33763ee4..0000000000 --- a/src/AzureIntegration/Directory.Build.props +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - Microsoft ASP.NET Core - https://github.com/aspnet/AspNetCore - git - $(MSBuildThisFileDirectory) - $(MSBuildThisFileDirectory)..\..\eng\AspNetCore.snk - true - true - - - diff --git a/src/AzureIntegration/Directory.Build.targets b/src/AzureIntegration/Directory.Build.targets deleted file mode 100644 index 7e3f8df92e..0000000000 --- a/src/AzureIntegration/Directory.Build.targets +++ /dev/null @@ -1,6 +0,0 @@ - - - $(MicrosoftNETCoreAppPackageVersion) - $(NETStandardLibrary20PackageVersion) - - diff --git a/src/AzureIntegration/NuGetPackageVerifier.json b/src/AzureIntegration/NuGetPackageVerifier.json deleted file mode 100644 index cf7178529c..0000000000 --- a/src/AzureIntegration/NuGetPackageVerifier.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "adx": { // Packages written by the ADX team and that ship on NuGet.org - "rules": [ - "AdxVerificationCompositeRule" - ], - "packages": { - "Microsoft.AspNetCore.AzureAppServicesIntegration": { }, - "Microsoft.Extensions.ApplicationModelDetection": { } - } - }, - "Default": { // Rules to run for packages not listed in any other set. - "rules": [ - "DefaultCompositeRule" - ] - } -} \ No newline at end of file diff --git a/src/AzureIntegration/README.md b/src/AzureIntegration/README.md deleted file mode 100644 index 1eeece66ef..0000000000 --- a/src/AzureIntegration/README.md +++ /dev/null @@ -1,27 +0,0 @@ -AzureIntegration -=== - -Features that integrate ASP.NET Core with Azure. - -This project is part of ASP.NET Core. You can find samples, documentation and getting started instructions for ASP.NET Core at the [Home](https://github.com/aspnet/home) repo. - - -SiteExtensions -=== - -To install a nightly preview of the ASP.NET Core runtime site extension for testing purposes: -1. In the Azure portal select App Services -> your site -> Application settings -1. Set `SCM_SITEEXTENSIONS_FEED_URL` application setting to `https://dotnet.myget.org/F/aspnetcore-dev/` -1. Go to `DEVELOPMENT TOOLS` -> `Advanced Tools` -> `Site extensions` -> `Gallery` -1. Enter `AspNetCoreRuntime` into `Search` box and click `Search` -1. Click `+` to install site extension and wait untill installation animation finishes -1. `Extensions` tab should now show newly installed site extension -1. Click `Restart site` on the right side of the page when installation finishes (this would only restart Kudu site, not the main one) -1. Restart site in `Overview` tab of `App service` - - -To update ASP.NET Core runtime site extension: -1. Stop site in `Overview` tab of `App service` -1. Go to `DEVELOPMENT TOOLS` -> `Advanced Tools` -> `Site extensions` -1. Click update on site extension -1. Start site in `Overview` tab of `App service` \ No newline at end of file diff --git a/src/AzureIntegration/build/dependencies.props b/src/AzureIntegration/build/dependencies.props deleted file mode 100644 index d0da5d8def..0000000000 --- a/src/AzureIntegration/build/dependencies.props +++ /dev/null @@ -1,47 +0,0 @@ - - - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - - - 3.0.0-build-20181114.5 - 3.0.0-build-20181114.5 - 3.0.0-alpha1-10742 - 3.0.0-alpha1-10742 - 3.0.0-alpha1-10742 - 3.0.0-alpha1-10742 - 3.0.0-alpha1-10742 - 3.0.0-alpha1-10742 - 3.0.0-alpha1-10742 - 3.0.0-alpha1-10742 - 3.0.0-alpha1-10742 - 0.7.0-alpha1-10742 - 3.0.0-alpha1-10742 - 3.0.0-alpha1-10742 - 1.1.3 - 1.0.3 - 3.0.0-alpha1-10670 - 3.0.0-preview-181113-11 - 3.0.0-preview-181113-11 - 3.0.0-preview-181113-11 - 3.0.0-preview-181113-11 - 3.0.0-preview-181113-11 - 3.0.0-preview-181113-11 - 3.0.0-preview-181113-11 - 3.0.0-preview-181113-11 - 3.0.0-preview-181113-11 - 3.0.0-preview-181113-11 - 3.0.0-preview1-26907-05 - 3.0.0-preview-18579-0056 - 15.6.1 - 1.4.0 - 4.10.0 - 2.0.3 - 11.0.2 - 1.7.0-preview1-26907-04 - 8.1.4 - 2.3.1 - 2.4.0 - - - - diff --git a/src/AzureIntegration/build/repo.props b/src/AzureIntegration/build/repo.props deleted file mode 100644 index f3a8446fbb..0000000000 --- a/src/AzureIntegration/build/repo.props +++ /dev/null @@ -1,31 +0,0 @@ - - - - - $(RepositoryRoot)test\Microsoft.AspNetCore.AzureAppServices.FunctionalTests\Microsoft.AspNetCore.AzureAppServices.FunctionalTests.csproj - - - - - - - - - - - - - - - - - - - - - diff --git a/src/AzureIntegration/build/repo.targets b/src/AzureIntegration/build/repo.targets deleted file mode 100644 index 9dcc1240cc..0000000000 --- a/src/AzureIntegration/build/repo.targets +++ /dev/null @@ -1,94 +0,0 @@ - - - - True - <_SdkVersion>$(SITE_EXTENSION_SDK_VERSION) - <_SdkVersion Condition="'$(_SdkVersion)' == ''">$([System.IO.Path]::GetFileName($([System.IO.Path]::GetDirectoryName('$(MSBuildExtensionsPath)')))) - <_SdkFeed>$(SITE_EXTENSION_SDK_FEED) - <_SdkFeed Condition="'$(_SdkFeed)' == ''">$(DefaultDotNetAssetFeed) - $(RepositoryRoot).test-dotnet\ - $(RepositoryRoot)artifacts\apps - $(TestDotNetPath)extension\$(SiteExtensionArch)\ - $(RepositoryRoot)artifacts\build - $(RepositoryRoot)\test\Microsoft.AspNetCore.AzureAppServices.FunctionalTests\ - https://dotnet.myget.org/F/aspnetcore-dev/ - $(MicrosoftNETCoreAppPackageVersion) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/AzureIntegration/build/sources.props b/src/AzureIntegration/build/sources.props deleted file mode 100644 index 9215df9751..0000000000 --- a/src/AzureIntegration/build/sources.props +++ /dev/null @@ -1,17 +0,0 @@ - - - - - $(DotNetRestoreSources) - - $(RestoreSources); - https://dotnet.myget.org/F/dotnet-core/api/v3/index.json; - https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json; - https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json; - - - $(RestoreSources); - https://api.nuget.org/v3/index.json; - - - diff --git a/src/AzureIntegration/extensions/Directory.Build.props b/src/AzureIntegration/extensions/Directory.Build.props deleted file mode 100644 index d333f1a2b7..0000000000 --- a/src/AzureIntegration/extensions/Directory.Build.props +++ /dev/null @@ -1,23 +0,0 @@ - - - - net461 - false - AzureSiteExtension - true - false - false - false - content - - $(NoWarn);NU5119 - - - - - - diff --git a/src/AzureIntegration/extensions/Microsoft.AspNetCore.AzureAppServices.SiteExtension/Microsoft.AspNetCore.AzureAppServices.SiteExtension.csproj b/src/AzureIntegration/extensions/Microsoft.AspNetCore.AzureAppServices.SiteExtension/Microsoft.AspNetCore.AzureAppServices.SiteExtension.csproj deleted file mode 100644 index 00f21b9bae..0000000000 --- a/src/AzureIntegration/extensions/Microsoft.AspNetCore.AzureAppServices.SiteExtension/Microsoft.AspNetCore.AzureAppServices.SiteExtension.csproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - $(VersionPrefix.Substring(0, $(VersionPrefix.LastIndexOf('.')))) - ASP.NET Core Extensions - This extension enables additional functionality for ASP.NET Core on Azure WebSites, such as enabling Azure logging. - netcoreapp3.0 - false - aspnet;logging;aspnetcore;AzureSiteExtension;keyvault;configuration;dataprotection - content - $(MicrosoftNETCoreAppPackageVersion) - Microsoft.AspNetCore.AzureAppServices.SiteExtension.$(TrimmedVersion) - - - - - - - - - diff --git a/src/AzureIntegration/extensions/Microsoft.AspNetCore.Runtime.SiteExtension/Microsoft.AspNetCore.Runtime.SiteExtension.csproj b/src/AzureIntegration/extensions/Microsoft.AspNetCore.Runtime.SiteExtension/Microsoft.AspNetCore.Runtime.SiteExtension.csproj deleted file mode 100644 index 6ff0419a6f..0000000000 --- a/src/AzureIntegration/extensions/Microsoft.AspNetCore.Runtime.SiteExtension/Microsoft.AspNetCore.Runtime.SiteExtension.csproj +++ /dev/null @@ -1,36 +0,0 @@ - - - - $(VersionPrefix.Substring(0, $(VersionPrefix.LastIndexOf('.')))) - ASP.NET Core $(TrimmedVersion) ($(RuntimeArch)) Runtime - This site extension installs Microsoft.AspNetCore.All, Microsoft.AspNetCore.App and Microsoft.NetCore.App shared runtimes. - aspnetcore;AzureSiteExtension - AspNetCoreRuntime.$(TrimmedVersion).$(RuntimeArch) - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/AzureIntegration/sample/AzureAppServicesHostingStartupSample/AzureAppServicesHostingStartupSample.csproj b/src/AzureIntegration/sample/AzureAppServicesHostingStartupSample/AzureAppServicesHostingStartupSample.csproj deleted file mode 100644 index a2f447ed5e..0000000000 --- a/src/AzureIntegration/sample/AzureAppServicesHostingStartupSample/AzureAppServicesHostingStartupSample.csproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - netcoreapp3.0 - - - - - - - - - - - - - - diff --git a/src/AzureIntegration/sample/AzureAppServicesHostingStartupSample/Properties/launchSettings.json b/src/AzureIntegration/sample/AzureAppServicesHostingStartupSample/Properties/launchSettings.json deleted file mode 100644 index 731d8620e9..0000000000 --- a/src/AzureIntegration/sample/AzureAppServicesHostingStartupSample/Properties/launchSettings.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:22071/", - "sslPort": 0 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development", - "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.AzureAppServices.HostingStartup;Microsoft.AspNetCore.Server.IISIntegration" - } - }, - "AzureAppServicesHostingStartupSample": { - "commandName": "IISExpress", - "launchBrowser": true - } - } -} \ No newline at end of file diff --git a/src/AzureIntegration/sample/AzureAppServicesSample/AzureAppServicesSample.csproj b/src/AzureIntegration/sample/AzureAppServicesSample/AzureAppServicesSample.csproj deleted file mode 100644 index 4b03ef5612..0000000000 --- a/src/AzureIntegration/sample/AzureAppServicesSample/AzureAppServicesSample.csproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - netcoreapp3.0 - - - - - - - - - - - - - - diff --git a/src/AzureIntegration/sample/AzureAppServicesSample/Properties/launchSettings.json b/src/AzureIntegration/sample/AzureAppServicesSample/Properties/launchSettings.json deleted file mode 100644 index 93ebc1db03..0000000000 --- a/src/AzureIntegration/sample/AzureAppServicesSample/Properties/launchSettings.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:64358/", - "sslPort": 0 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development", - "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.Server.IISIntegration" - } - }, - "AzureAppServicesSample": { - "commandName": "IISExpress", - "launchBrowser": true - } - } -} \ No newline at end of file diff --git a/src/AzureIntegration/src/Directory.Build.props b/src/AzureIntegration/src/Directory.Build.props deleted file mode 100644 index 4f07cbc45d..0000000000 --- a/src/AzureIntegration/src/Directory.Build.props +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/src/AzureIntegration/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup/Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj b/src/AzureIntegration/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup/Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj deleted file mode 100644 index 37da02ef70..0000000000 --- a/src/AzureIntegration/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup/Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - ASP.NET Core lightup integration with Azure AppServices. - netcoreapp3.0 - true - aspnetcore;azure;appservices - - - - - - - - - - - diff --git a/src/AzureIntegration/src/Microsoft.Extensions.ApplicationModelDetection/AppModelDetectionResult.cs b/src/AzureIntegration/src/Microsoft.Extensions.ApplicationModelDetection/AppModelDetectionResult.cs deleted file mode 100644 index 96e53dc52d..0000000000 --- a/src/AzureIntegration/src/Microsoft.Extensions.ApplicationModelDetection/AppModelDetectionResult.cs +++ /dev/null @@ -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.Extensions.ApplicationModelDetection -{ - public class AppModelDetectionResult - { - public RuntimeFramework? Framework { get; set; } - public string FrameworkVersion { get; set; } - public string AspNetCoreVersion { get; set; } - } -} \ No newline at end of file diff --git a/src/AzureIntegration/src/Microsoft.Extensions.ApplicationModelDetection/AppModelDetector.cs b/src/AzureIntegration/src/Microsoft.Extensions.ApplicationModelDetection/AppModelDetector.cs deleted file mode 100644 index e42a8f2918..0000000000 --- a/src/AzureIntegration/src/Microsoft.Extensions.ApplicationModelDetection/AppModelDetector.cs +++ /dev/null @@ -1,250 +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 System.Linq; -using System.Reflection.Metadata; -using System.Reflection.PortableExecutable; -using System.Xml.Linq; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; - -namespace Microsoft.Extensions.ApplicationModelDetection -{ - public class AppModelDetector - { - // We use Hosting package to detect AspNetCore version - // it contains light-up implemenation that we care about and - // would have to be used by aspnet core web apps - private const string AspNetCoreAssembly = "Microsoft.AspNetCore.Hosting"; - - /// - /// Reads the following sources - /// - web.config to detect dotnet framework kind - /// - *.runtimeconfig.json to detect target framework version - /// - *.deps.json to detect Asp.Net Core version - /// - Microsoft.AspNetCore.Hosting.dll to detect Asp.Net Core version - /// - /// The application directory - /// The instance containing information about application - public AppModelDetectionResult Detect(DirectoryInfo directory) - { - string entryPoint = null; - - // Try reading web.config and resolving framework and app path - var webConfig = directory.GetFiles("web.config").FirstOrDefault(); - - bool webConfigExists = webConfig != null; - bool? usesDotnetExe = null; - - if (webConfigExists && - TryParseWebConfig(webConfig, out var dotnetExe, out entryPoint)) - { - usesDotnetExe = dotnetExe; - } - - // If we found entry point let's look for .deps.json - // in some cases it exists in desktop too - FileInfo depsJson = null; - FileInfo runtimeConfig = null; - - if (!string.IsNullOrWhiteSpace(entryPoint)) - { - depsJson = new FileInfo(Path.ChangeExtension(entryPoint, ".deps.json")); - runtimeConfig = new FileInfo(Path.ChangeExtension(entryPoint, ".runtimeconfig.json")); - } - - if (depsJson == null || !depsJson.Exists) - { - depsJson = directory.GetFiles("*.deps.json").FirstOrDefault(); - } - - if (runtimeConfig == null || !runtimeConfig.Exists) - { - runtimeConfig = directory.GetFiles("*.runtimeconfig.json").FirstOrDefault(); - } - - string aspNetCoreVersionFromDeps = null; - string aspNetCoreVersionFromDll = null; - - - // Try to detect ASP.NET Core version from .deps.json - if (depsJson != null && - depsJson.Exists && - TryParseDependencies(depsJson, out var aspNetCoreVersion)) - { - aspNetCoreVersionFromDeps = aspNetCoreVersion; - } - - // Try to detect ASP.NET Core version from .deps.json - var aspNetCoreDll = directory.GetFiles(AspNetCoreAssembly + ".dll").FirstOrDefault(); - if (aspNetCoreDll != null && - TryParseAssembly(aspNetCoreDll, out aspNetCoreVersion)) - { - aspNetCoreVersionFromDll = aspNetCoreVersion; - } - - // Try to detect dotnet core runtime version from runtimeconfig.json - string runtimeVersionFromRuntimeConfig = null; - if (runtimeConfig != null && - runtimeConfig.Exists) - { - TryParseRuntimeConfig(runtimeConfig, out runtimeVersionFromRuntimeConfig); - } - - var result = new AppModelDetectionResult(); - if (usesDotnetExe == true) - { - result.Framework = RuntimeFramework.DotNetCore; - result.FrameworkVersion = runtimeVersionFromRuntimeConfig; - } - else - { - if (depsJson?.Exists == true && - runtimeConfig?.Exists == true) - { - result.Framework = RuntimeFramework.DotNetCoreStandalone; - } - else - { - result.Framework = RuntimeFramework.DotNetFramework; - } - } - - result.AspNetCoreVersion = aspNetCoreVersionFromDeps ?? aspNetCoreVersionFromDll; - - return result; - } - - private bool TryParseAssembly(FileInfo aspNetCoreDll, out string aspNetCoreVersion) - { - aspNetCoreVersion = null; - try - { - using (var stream = aspNetCoreDll.OpenRead()) - using (var peReader = new PEReader(stream)) - { - var metadataReader = peReader.GetMetadataReader(); - var assemblyDefinition = metadataReader.GetAssemblyDefinition(); - aspNetCoreVersion = assemblyDefinition.Version.ToString(); - return true; - } - } - catch (Exception) - { - return false; - } - } - - /// - /// Search for Microsoft.AspNetCore.Hosting entry in deps.json and get it's version number - /// - private bool TryParseDependencies(FileInfo depsJson, out string aspnetCoreVersion) - { - aspnetCoreVersion = null; - try - { - using (var streamReader = depsJson.OpenText()) - using (var jsonReader = new JsonTextReader(streamReader)) - { - var json = JObject.Load(jsonReader); - - var libraryPrefix = AspNetCoreAssembly+ "/"; - - var library = json.Descendants().OfType().FirstOrDefault(property => property.Name.StartsWith(libraryPrefix)); - if (library != null) - { - aspnetCoreVersion = library.Name.Substring(libraryPrefix.Length); - return true; - } - } - } - catch (Exception) - { - } - return false; - } - - private bool TryParseRuntimeConfig(FileInfo runtimeConfig, out string frameworkVersion) - { - frameworkVersion = null; - try - { - using (var streamReader = runtimeConfig.OpenText()) - using (var jsonReader = new JsonTextReader(streamReader)) - { - var json = JObject.Load(jsonReader); - frameworkVersion = (string)json?["runtimeOptions"] - ?["framework"] - ?["version"]; - - return true; - } - } - catch (Exception) - { - return false; - } - } - - private bool TryParseWebConfig(FileInfo webConfig, out bool usesDotnetExe, out string entryPoint) - { - usesDotnetExe = false; - entryPoint = null; - - try - { - var xdocument = XDocument.Load(webConfig.FullName); - var aspNetCoreHandler = xdocument.Root? - .Element("system.webServer") - .Element("aspNetCore"); - - if (aspNetCoreHandler == null) - { - return false; - } - - var processPath = (string) aspNetCoreHandler.Attribute("processPath"); - var arguments = (string) aspNetCoreHandler.Attribute("arguments"); - - if (processPath.EndsWith("dotnet", StringComparison.OrdinalIgnoreCase) || - processPath.EndsWith("dotnet.exe", StringComparison.OrdinalIgnoreCase) && - !string.IsNullOrWhiteSpace(arguments)) - { - usesDotnetExe = true; - var entryPointPart = arguments.Split(new[] {" "}, StringSplitOptions.RemoveEmptyEntries).FirstOrDefault(); - - if (!string.IsNullOrWhiteSpace(entryPointPart)) - { - try - { - entryPoint = Path.GetFullPath(Path.Combine(webConfig.DirectoryName, entryPointPart)); - } - catch (Exception) - { - } - } - } - else - { - usesDotnetExe = false; - - try - { - entryPoint = Path.GetFullPath(Path.Combine(webConfig.DirectoryName, processPath)); - } - catch (Exception) - { - } - } - } - catch (Exception) - { - return false; - } - - return true; - } - } -} \ No newline at end of file diff --git a/src/AzureIntegration/src/Microsoft.Extensions.ApplicationModelDetection/Microsoft.Extensions.ApplicationModelDetection.csproj b/src/AzureIntegration/src/Microsoft.Extensions.ApplicationModelDetection/Microsoft.Extensions.ApplicationModelDetection.csproj deleted file mode 100644 index ccb195cee2..0000000000 --- a/src/AzureIntegration/src/Microsoft.Extensions.ApplicationModelDetection/Microsoft.Extensions.ApplicationModelDetection.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - ASP.NET Core integration with Azure AppServices. - netcoreapp3.0 - $(NoWarn);CS1591 - true - true - aspnetcore;azure;appservices - - - - - - - diff --git a/src/AzureIntegration/src/Microsoft.Extensions.ApplicationModelDetection/RuntimeFramework.cs b/src/AzureIntegration/src/Microsoft.Extensions.ApplicationModelDetection/RuntimeFramework.cs deleted file mode 100644 index b182c79eec..0000000000 --- a/src/AzureIntegration/src/Microsoft.Extensions.ApplicationModelDetection/RuntimeFramework.cs +++ /dev/null @@ -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.Extensions.ApplicationModelDetection -{ - public enum RuntimeFramework - { - DotNetCore, - DotNetCoreStandalone, - DotNetFramework - } -} \ No newline at end of file diff --git a/src/AzureIntegration/src/Microsoft.Extensions.ApplicationModelDetection/baseline.netcore.json b/src/AzureIntegration/src/Microsoft.Extensions.ApplicationModelDetection/baseline.netcore.json deleted file mode 100644 index d94df11f0a..0000000000 --- a/src/AzureIntegration/src/Microsoft.Extensions.ApplicationModelDetection/baseline.netcore.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "AssemblyIdentity": "Microsoft.Extensions.ApplicationModelDetection, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", - "Types": [ - { - "Name": "Microsoft.Extensions.ApplicationModelDetection.AppModelDetectionResult", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_Framework", - "Parameters": [], - "ReturnType": "System.Nullable", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Framework", - "Parameters": [ - { - "Name": "value", - "Type": "System.Nullable" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_FrameworkVersion", - "Parameters": [], - "ReturnType": "System.String", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_FrameworkVersion", - "Parameters": [ - { - "Name": "value", - "Type": "System.String" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_AspNetCoreVersion", - "Parameters": [], - "ReturnType": "System.String", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_AspNetCoreVersion", - "Parameters": [ - { - "Name": "value", - "Type": "System.String" - } - ], - "ReturnType": "System.Void", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.Extensions.ApplicationModelDetection.AppModelDetector", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Detect", - "Parameters": [ - { - "Name": "directory", - "Type": "System.IO.DirectoryInfo" - } - ], - "ReturnType": "Microsoft.Extensions.ApplicationModelDetection.AppModelDetectionResult", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.Extensions.ApplicationModelDetection.RuntimeFramework", - "Visibility": "Public", - "Kind": "Enumeration", - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Field", - "Name": "DotNetCore", - "Parameters": [], - "GenericParameter": [], - "Literal": "0" - }, - { - "Kind": "Field", - "Name": "DotNetCoreStandalone", - "Parameters": [], - "GenericParameter": [], - "Literal": "1" - }, - { - "Kind": "Field", - "Name": "DotNetFramework", - "Parameters": [], - "GenericParameter": [], - "Literal": "2" - } - ], - "GenericParameters": [] - } - ] -} \ No newline at end of file diff --git a/src/AzureIntegration/src/Microsoft.Web.Xdt.Extensions/Microsoft.Web.Xdt.Extensions.csproj b/src/AzureIntegration/src/Microsoft.Web.Xdt.Extensions/Microsoft.Web.Xdt.Extensions.csproj deleted file mode 100644 index 4222ec4e2d..0000000000 --- a/src/AzureIntegration/src/Microsoft.Web.Xdt.Extensions/Microsoft.Web.Xdt.Extensions.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Additional functionality for Xdt transforms. - net461 - true - xdt - - - - - - - \ No newline at end of file diff --git a/src/AzureIntegration/test/Microsoft.AspNetCore.AzureAppServicesIntegration.Tests/Microsoft.AspNetCore.AzureAppServicesIntegration.Tests.csproj b/src/AzureIntegration/test/Microsoft.AspNetCore.AzureAppServicesIntegration.Tests/Microsoft.AspNetCore.AzureAppServicesIntegration.Tests.csproj deleted file mode 100644 index 039fe663b8..0000000000 --- a/src/AzureIntegration/test/Microsoft.AspNetCore.AzureAppServicesIntegration.Tests/Microsoft.AspNetCore.AzureAppServicesIntegration.Tests.csproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - netcoreapp3.0 - - - - - - - - - - - - diff --git a/src/AzureIntegration/test/Microsoft.Extensions.ApplicationModelDetection.Tests/AppModelTests.cs b/src/AzureIntegration/test/Microsoft.Extensions.ApplicationModelDetection.Tests/AppModelTests.cs deleted file mode 100644 index 02e420d2e4..0000000000 --- a/src/AzureIntegration/test/Microsoft.Extensions.ApplicationModelDetection.Tests/AppModelTests.cs +++ /dev/null @@ -1,229 +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.AspNetCore.Hosting; -using Xunit; - -namespace Microsoft.Extensions.ApplicationModelDetection.Tests -{ - public class AppModelTests - { - private const string EmptyWebConfig = @""; - - [Theory] - [InlineData("dotnet")] - [InlineData("dotnet.exe")] - [InlineData("%HOME%/dotnet")] - [InlineData("%HOME%/dotnet.exe")] - [InlineData("DoTNeT.ExE")] - public void DetectsCoreFrameworkFromWebConfig(string processPath) - { - using (var temp = new TemporaryDirectory() - .WithFile("web.config",GenerateWebConfig(processPath, ".\\app.dll"))) - { - var result = new AppModelDetector().Detect(temp.Directory); - Assert.Equal(RuntimeFramework.DotNetCore, result.Framework); - } - } - - [Theory] - [InlineData("app")] - [InlineData("app.exe")] - [InlineData("%HOME%/app")] - [InlineData("%HOME%/app.exe")] - public void DetectsFullFrameworkFromWebConfig(string processPath) - { - using (var temp = new TemporaryDirectory() - .WithFile("web.config", GenerateWebConfig(processPath, ".\\app.dll"))) - { - var result = new AppModelDetector().Detect(temp.Directory); - Assert.Equal(RuntimeFramework.DotNetFramework, result.Framework); - } - } - - [Theory] - [InlineData("2.0.0")] - [InlineData("2.0.0-preview1")] - [InlineData("1.1.3")] - public void DetectsRuntimeVersionFromRuntimeConfig(string runtimeVersion) - { - using (var temp = new TemporaryDirectory() - .WithFile("web.config", GenerateWebConfig("dotnet", ".\\app.dll")) - .WithFile("app.runtimeconfig.json", @"{ - ""runtimeOptions"": { - ""tfm"": ""netcoreapp2.0"", - ""framework"": { - ""name"": ""Microsoft.NETCore.App"", - ""version"": """+ runtimeVersion + @""" - }, - ""configProperties"": { - ""System.GC.Server"": true - } - } -}")) - { - var result = new AppModelDetector().Detect(temp.Directory); - Assert.Equal(RuntimeFramework.DotNetCore, result.Framework); - Assert.Equal(runtimeVersion, result.FrameworkVersion); - } - } - - - [Theory] - [InlineData("2.0.0")] - [InlineData("2.0.0-preview1")] - [InlineData("1.1.3")] - public void DetectsRuntimeVersionFromRuntimeConfigWitoutEntryPoint(string runtimeVersion) - { - using (var temp = new TemporaryDirectory() - .WithFile("web.config", GenerateWebConfig("dotnet", "%HOME%\\app.dll")) - .WithFile("app.runtimeconfig.json", @"{ - ""runtimeOptions"": { - ""tfm"": ""netcoreapp2.0"", - ""framework"": { - ""name"": ""Microsoft.NETCore.App"", - ""version"": """+ runtimeVersion + @""" - }, - ""configProperties"": { - ""System.GC.Server"": true - } - } -}")) - { - var result = new AppModelDetector().Detect(temp.Directory); - Assert.Equal(RuntimeFramework.DotNetCore, result.Framework); - Assert.Equal(runtimeVersion, result.FrameworkVersion); - } - } - - [Theory] - [InlineData("2.0.0")] - [InlineData("2.0.0-preview1")] - [InlineData("1.1.3")] - public void DetectsAspNetCoreVersionFromDepsFile(string runtimeVersion) - { - using (var temp = new TemporaryDirectory() - .WithFile("web.config", GenerateWebConfig("dotnet", "app.dll")) - .WithFile("app.deps.json", @"{ - ""targets"": { - "".NETCoreApp,Version=v2.7"": { - ""Microsoft.AspNetCore.Hosting/" + runtimeVersion + @""": { } - } - } -}")) - { - var result = new AppModelDetector().Detect(temp.Directory); - Assert.Equal(RuntimeFramework.DotNetCore, result.Framework); - Assert.Equal(runtimeVersion, result.AspNetCoreVersion); - } - } - - [Theory] - [InlineData("2.0.0")] - [InlineData("2.0.0-preview1")] - [InlineData("1.1.3")] - public void DetectsAspNetCoreVersionFromDepsFileWithoutEntryPoint(string runtimeVersion) - { - using (var temp = new TemporaryDirectory() - .WithFile("web.config", GenerateWebConfig("dotnet", "%HOME%\\app.dll")) - .WithFile("app.deps.json", @"{ - ""targets"": { - "".NETCoreApp,Version=v2.7"": { - ""Microsoft.AspNetCore.Hosting/" + runtimeVersion + @""": { } - } - } -}")) - { - var result = new AppModelDetector().Detect(temp.Directory); - Assert.Equal(RuntimeFramework.DotNetCore, result.Framework); - Assert.Equal(runtimeVersion, result.AspNetCoreVersion); - } - } - - [Fact] - public void DetectsFullFrameworkWhenWebConfigExists() - { - using (var temp = new TemporaryDirectory() - .WithFile("web.config", EmptyWebConfig)) - { - var result = new AppModelDetector().Detect(temp.Directory); - Assert.Equal(RuntimeFramework.DotNetFramework, result.Framework); - } - } - - [Fact] - public void DetectsStandalone_WhenBothDepsAndRuntimeConfigExist() - { - using (var temp = new TemporaryDirectory() - .WithFile("web.config", GenerateWebConfig("app.exe", "")) - .WithFile("app.runtimeconfig.json", "{}") - .WithFile("app.deps.json", "{}")) - { - var result = new AppModelDetector().Detect(temp.Directory); - Assert.Equal(RuntimeFramework.DotNetCoreStandalone, result.Framework); - } - } - - [Fact] - public void DetectsAspNetCoreVersionFromHostingDll() - { - using (var temp = new TemporaryDirectory() - .WithFile(typeof(WebHostBuilder).Assembly.Location)) - { - var result = new AppModelDetector().Detect(temp.Directory); - Assert.Equal(typeof(WebHostBuilder).Assembly.GetName().Version.ToString(), result.AspNetCoreVersion); - } - } - - private static string GenerateWebConfig(string processPath, string arguments) - { - return $@" - - - - - - - - -"; - } - - private class TemporaryDirectory: IDisposable - { - public TemporaryDirectory() - { - Directory = new DirectoryInfo(Path.GetTempPath()) - .CreateSubdirectory(Guid.NewGuid().ToString("N")); - } - - public DirectoryInfo Directory { get; } - - public void Dispose() - { - try - { - Directory.Delete(true); - } - catch (IOException) - { - } - } - - public TemporaryDirectory WithFile(string name, string value) - { - File.WriteAllText(Path.Combine(Directory.FullName, name), value); - return this; - } - - - public TemporaryDirectory WithFile(string name) - { - File.Copy(name, Path.Combine(Directory.FullName, Path.GetFileName(name))); - return this; - } - } - } -} \ No newline at end of file diff --git a/src/AzureIntegration/version.props b/src/AzureIntegration/version.props deleted file mode 100644 index 39e69414a0..0000000000 --- a/src/AzureIntegration/version.props +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/Components/Components.sln b/src/Components/Components.sln index 0a909ab6e3..623004b5bb 100644 --- a/src/Components/Components.sln +++ b/src/Components/Components.sln @@ -1,94 +1,26 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27130.2010 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.28414.68 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{F5FDD4E5-6A52-4A86-BE5E-5E42CB1DC8DA}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B867E038-B3CE-43E3-9292-61568C46CDEB}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MonoSanity", "blazor\samples\MonoSanity\MonoSanity.csproj", "{7C53BB6B-5906-4753-B507-C9FCC2F7E5B7}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Server", "src\Microsoft.AspNetCore.Components.Server\Microsoft.AspNetCore.Components.Server.csproj", "{5A694793-3257-4D37-BB74-4A41B3894685}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{ADA3AE29-F6DE-49F6-8C7C-B321508CAE8E}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.E2ETest", "test\Microsoft.AspNetCore.Components.E2ETest\Microsoft.AspNetCore.Components.E2ETest.csproj", "{5BC2A10D-B6CA-43AE-B73C-2A41AE1039F9}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MonoSanityClient", "blazor\samples\MonoSanityClient\MonoSanityClient.csproj", "{06AAAE9E-96DE-4574-97DA-9C4C7D9FE990}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "HostedInAspNet", "HostedInAspNet", "{4D367450-96E9-4C8C-8B56-EED8ADE3A20D}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HostedInAspNet.Client", "blazor\samples\HostedInAspNet.Client\HostedInAspNet.Client.csproj", "{B4335F7C-4E86-4559-821F-F1B1C75F5FAE}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HostedInAspNet.Server", "blazor\samples\HostedInAspNet.Server\HostedInAspNet.Server.csproj", "{F8996835-41F7-4663-91DF-3B5652ADC37D}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components", "src\Microsoft.AspNetCore.Components\Microsoft.AspNetCore.Components.csproj", "{7FD8C650-74B3-4153-AEA1-00F4F6AF393D}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StandaloneApp", "blazor\samples\StandaloneApp\StandaloneApp.csproj", "{B241434A-1642-44CC-AE9A-2012B5C5BD02}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MonoSanity", "MonoSanity", "{2A076721-6081-4517-8329-B9E5110D6DAC}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Build.Test", "test\Microsoft.AspNetCore.Components.Build.Test\Microsoft.AspNetCore.Components.Build.Test.csproj", "{709C7EBE-EB93-4F6D-9491-D714B0D2E898}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Build", "src\Microsoft.AspNetCore.Components.Build\Microsoft.AspNetCore.Components.Build.csproj", "{8B3D0F1C-0E38-4E6D-BFF1-C4FDA0CD9815}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Browser.JS", "src\Microsoft.AspNetCore.Components.Browser.JS\Microsoft.AspNetCore.Components.Browser.JS.csproj", "{8A19B1CE-9B62-4440-93B3-152DDBB39D0A}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Browser", "src\Microsoft.AspNetCore.Components.Browser\Microsoft.AspNetCore.Components.Browser.csproj", "{4874AFF4-335D-4037-8858-BBBB987C124B}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Test", "test\Microsoft.AspNetCore.Components.Test\Microsoft.AspNetCore.Components.Test.csproj", "{8FD8636E-AFA5-434D-8857-06D02686741A}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "testapps", "testapps", "{4AE0D35B-D97A-44D0-8392-C9240377DCCE}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BasicTestApp", "test\testapps\BasicTestApp\BasicTestApp.csproj", "{2838CB6F-D2C7-4C0A-A994-C72E56F16984}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Razor.Extensions", "src\Microsoft.AspNetCore.Components.Razor.Extensions\Microsoft.AspNetCore.Components.Razor.Extensions.csproj", "{D652A019-B765-4922-B7B8-3AB1C58338D7}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Browser.Test", "test\Microsoft.AspNetCore.Components.Browser.Test\Microsoft.AspNetCore.Components.Browser.Test.csproj", "{EC2A38BF-6E77-4A8E-A731-15929544F29C}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestServer", "test\testapps\TestServer\TestServer.csproj", "{29CD3FC6-49E3-4756-B5DF-E03B46E5CD45}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.Cli", "blazor\src\Microsoft.AspNetCore.Blazor.Cli\Microsoft.AspNetCore.Blazor.Cli.csproj", "{AF79BB84-BAE6-4F9A-9AD5-B0E3D7455288}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.Templates", "blazor\src\Microsoft.AspNetCore.Blazor.Templates\Microsoft.AspNetCore.Blazor.Templates.csproj", "{8C160273-0A1D-4D79-9F7B-7687B2D2F7C4}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "templates", "templates", "{E8EBA72C-D555-43AE-BC98-F0B2D05F6A07}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "BlazorHosted-CSharp", "BlazorHosted-CSharp", "{73DA1DFD-79F0-4BA2-B0B6-4F3A21D2C3F8}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Razor.Extensions.Test", "test\Microsoft.AspNetCore.Components.Razor.Extensions.Test\Microsoft.AspNetCore.Components.Razor.Extensions.Test.csproj", "{FF25111E-5A3E-48A3-96D8-08A2C5A2A91C}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tooling", "tooling", "{F563ABB6-85FB-4CFC-B0D2-1D5130E8246D}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.VisualStudio.LanguageServices.Blazor", "blazor\tooling\Microsoft.VisualStudio.LanguageServices.Blazor\Microsoft.VisualStudio.LanguageServices.Blazor.csproj", "{43E39257-7DC1-46BD-9BD9-2319A1313D07}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.VisualStudio.BlazorExtension", "blazor\tooling\Microsoft.VisualStudio.BlazorExtension\Microsoft.VisualStudio.BlazorExtension.csproj", "{9088E4E4-B855-457F-AE9E-D86709A5E1F4}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestContentPackage", "test\testapps\TestContentPackage\TestContentPackage.csproj", "{C57382BC-EE93-49D5-BC40-5C98AF8AA048}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "benchmarks", "benchmarks", "{36A7DEB7-5F88-4BFB-B57E-79EEC9950E25}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Performance", "benchmarks\Microsoft.AspNetCore.Components.Performance\Microsoft.AspNetCore.Components.Performance.csproj", "{50F6820F-D058-4E68-9E15-801F893F514E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Analyzers", "src\Microsoft.AspNetCore.Components.Analyzers\Microsoft.AspNetCore.Components.Analyzers.csproj", "{6DDD6A29-0A3E-417F-976C-5FE3FDA74055}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Analyzers.Test", "test\Microsoft.AspNetCore.Components.Analyzers.Test\Microsoft.AspNetCore.Components.Analyzers.Test.csproj", "{CF3B5990-7A05-4993-AACA-D2C8D7AFF6E6}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Server.Test", "test\Microsoft.AspNetCore.Components.Server.Test\Microsoft.AspNetCore.Components.Server.Test.csproj", "{142AA6BC-5110-486B-A34D-6878E5E2CE95}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ComponentsApp", "ComponentsApp", "{3173A9C0-4F66-4064-83EC-3C206F1430FB}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComponentsApp.Server", "samples\ComponentsApp.Server\ComponentsApp.Server.csproj", "{5655AFF9-612C-4947-8221-7DB6949A6CA4}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComponentsApp.App", "samples\ComponentsApp.App\ComponentsApp.App.csproj", "{33C361D8-CAF1-47C0-A344-251AEF4FE1FE}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Components-CSharp", "Components-CSharp", "{6BDD3018-3961-488E-97D3-1FB7320A8AC6}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.E2EPerformance", "blazor\benchmarks\Microsoft.AspNetCore.Blazor.E2EPerformance\Microsoft.AspNetCore.Blazor.E2EPerformance.csproj", "{CCEC81C4-1A3C-40DC-952F-074712C46180}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.TagHelperWorkaround", "src\Microsoft.AspNetCore.Components.TagHelperWorkaround\Microsoft.AspNetCore.Components.TagHelperWorkaround.csproj", "{F71D78AB-A07E-415D-BF3F-1B9991628214}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "blazor", "blazor", "{E5DDF29D-DFC9-43E3-AC3A-5B6D54B786D5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "benchmarks", "benchmarks", "{DDE4B710-6936-4E17-9CA0-54C45333ED15}" @@ -97,19 +29,76 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{C7B9 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{AD41FFD8-2C0C-4F0C-9537-25C2A3A7A1F4}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorLibrary-CSharp", "blazor\src\Microsoft.AspNetCore.Blazor.Templates\content\BlazorLibrary-CSharp\BlazorLibrary-CSharp.csproj", "{8C5D8A27-E6E6-4E5B-9389-206B5519658C}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "shared", "shared", "{A63F9FCD-29D7-4D49-BC70-7E0F57D0BA60}" + ProjectSection(SolutionItems) = preProject + src\shared\ComponentsApi.cs = src\shared\ComponentsApi.cs + src\shared\ConventionBasedStartup.cs = src\shared\ConventionBasedStartup.cs + src\shared\IBlazorStartup.cs = src\shared\IBlazorStartup.cs + EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorHosted-CSharp.Client", "blazor\src\Microsoft.AspNetCore.Blazor.Templates\content\BlazorHosted-CSharp\BlazorHosted-CSharp.Client\BlazorHosted-CSharp.Client.csproj", "{61150807-8DBD-4456-9C6E-D97268181C2B}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{32B33872-B599-4913-9F90-EDB5F9E24B18}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorHosted-CSharp.Server", "blazor\src\Microsoft.AspNetCore.Blazor.Templates\content\BlazorHosted-CSharp\BlazorHosted-CSharp.Server\BlazorHosted-CSharp.Server.csproj", "{EB8B8216-BD47-4635-A23D-21135943F2B7}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MonoSanity", "blazor\samples\MonoSanity\MonoSanity.csproj", "{7C53BB6B-5906-4753-B507-C9FCC2F7E5B7}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorHosted-CSharp.Shared", "blazor\src\Microsoft.AspNetCore.Blazor.Templates\content\BlazorHosted-CSharp\BlazorHosted-CSharp.Shared\BlazorHosted-CSharp.Shared.csproj", "{46B3D506-E351-4668-AC65-0719191B06A7}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Server", "src\Microsoft.AspNetCore.Components.Server\Microsoft.AspNetCore.Components.Server.csproj", "{5A694793-3257-4D37-BB74-4A41B3894685}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Components-CSharp.App", "blazor\src\Microsoft.AspNetCore.Blazor.Templates\content\Components-CSharp\Components-CSharp.App\Components-CSharp.App.csproj", "{7437B663-B5A8-43A3-9796-EE5A64B82E9E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.E2ETest", "test\Microsoft.AspNetCore.Components.E2ETest\Microsoft.AspNetCore.Components.E2ETest.csproj", "{5BC2A10D-B6CA-43AE-B73C-2A41AE1039F9}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Components-CSharp.Server", "blazor\src\Microsoft.AspNetCore.Blazor.Templates\content\Components-CSharp\Components-CSharp.Server\Components-CSharp.Server.csproj", "{24DE309C-A2F5-4726-A8D8-95BB44118CD8}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MonoSanityClient", "blazor\samples\MonoSanityClient\MonoSanityClient.csproj", "{06AAAE9E-96DE-4574-97DA-9C4C7D9FE990}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorStandalone-CSharp", "blazor\src\Microsoft.AspNetCore.Blazor.Templates\content\BlazorStandalone-CSharp\BlazorStandalone-CSharp.csproj", "{2F92DE29-78E9-4A04-8F4F-F8F40E02FE98}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HostedInAspNet.Client", "blazor\samples\HostedInAspNet.Client\HostedInAspNet.Client.csproj", "{B4335F7C-4E86-4559-821F-F1B1C75F5FAE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HostedInAspNet.Server", "blazor\samples\HostedInAspNet.Server\HostedInAspNet.Server.csproj", "{F8996835-41F7-4663-91DF-3B5652ADC37D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components", "src\Microsoft.AspNetCore.Components\Microsoft.AspNetCore.Components.csproj", "{7FD8C650-74B3-4153-AEA1-00F4F6AF393D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StandaloneApp", "blazor\samples\StandaloneApp\StandaloneApp.csproj", "{B241434A-1642-44CC-AE9A-2012B5C5BD02}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.Build.Test", "blazor\test\Microsoft.AspNetCore.Blazor.Build.Test\Microsoft.AspNetCore.Blazor.Build.Test.csproj", "{709C7EBE-EB93-4F6D-9491-D714B0D2E898}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.Build", "blazor\src\Microsoft.AspNetCore.Blazor.Build\Microsoft.AspNetCore.Blazor.Build.csproj", "{8B3D0F1C-0E38-4E6D-BFF1-C4FDA0CD9815}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Browser.JS", "src\Microsoft.AspNetCore.Components.Browser.JS\Microsoft.AspNetCore.Components.Browser.JS.csproj", "{8A19B1CE-9B62-4440-93B3-152DDBB39D0A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Test", "test\Microsoft.AspNetCore.Components.Test\Microsoft.AspNetCore.Components.Test.csproj", "{8FD8636E-AFA5-434D-8857-06D02686741A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BasicTestApp", "test\testapps\BasicTestApp\BasicTestApp.csproj", "{2838CB6F-D2C7-4C0A-A994-C72E56F16984}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestServer", "test\testapps\TestServer\TestServer.csproj", "{29CD3FC6-49E3-4756-B5DF-E03B46E5CD45}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.Cli", "blazor\src\Microsoft.AspNetCore.Blazor.Cli\Microsoft.AspNetCore.Blazor.Cli.csproj", "{AF79BB84-BAE6-4F9A-9AD5-B0E3D7455288}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.Templates", "blazor\src\Microsoft.AspNetCore.Blazor.Templates\Microsoft.AspNetCore.Blazor.Templates.csproj", "{8C160273-0A1D-4D79-9F7B-7687B2D2F7C4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.VisualStudio.LanguageServices.Blazor", "blazor\tooling\Microsoft.VisualStudio.LanguageServices.Blazor\Microsoft.VisualStudio.LanguageServices.Blazor.csproj", "{43E39257-7DC1-46BD-9BD9-2319A1313D07}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.VisualStudio.BlazorExtension", "blazor\tooling\Microsoft.VisualStudio.BlazorExtension\Microsoft.VisualStudio.BlazorExtension.csproj", "{9088E4E4-B855-457F-AE9E-D86709A5E1F4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestContentPackage", "test\testapps\TestContentPackage\TestContentPackage.csproj", "{C57382BC-EE93-49D5-BC40-5C98AF8AA048}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Performance", "benchmarks\Microsoft.AspNetCore.Components.Performance\Microsoft.AspNetCore.Components.Performance.csproj", "{50F6820F-D058-4E68-9E15-801F893F514E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Analyzers", "src\Microsoft.AspNetCore.Components.Analyzers\Microsoft.AspNetCore.Components.Analyzers.csproj", "{6DDD6A29-0A3E-417F-976C-5FE3FDA74055}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Analyzers.Test", "test\Microsoft.AspNetCore.Components.Analyzers.Test\Microsoft.AspNetCore.Components.Analyzers.Test.csproj", "{CF3B5990-7A05-4993-AACA-D2C8D7AFF6E6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Server.Test", "test\Microsoft.AspNetCore.Components.Server.Test\Microsoft.AspNetCore.Components.Server.Test.csproj", "{142AA6BC-5110-486B-A34D-6878E5E2CE95}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComponentsApp.Server", "samples\ComponentsApp.Server\ComponentsApp.Server.csproj", "{5655AFF9-612C-4947-8221-7DB6949A6CA4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComponentsApp.App", "samples\ComponentsApp.App\ComponentsApp.App.csproj", "{33C361D8-CAF1-47C0-A344-251AEF4FE1FE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.E2EPerformance", "blazor\benchmarks\Microsoft.AspNetCore.Blazor.E2EPerformance\Microsoft.AspNetCore.Blazor.E2EPerformance.csproj", "{CCEC81C4-1A3C-40DC-952F-074712C46180}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor", "blazor\src\Microsoft.AspNetCore.Blazor\Microsoft.AspNetCore.Blazor.csproj", "{A42AC30B-45E3-4907-99A9-9ABDA45973D7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.Test", "blazor\test\Microsoft.AspNetCore.Blazor.Test\Microsoft.AspNetCore.Blazor.Test.csproj", "{85813607-297F-4D39-92F7-89379FD80D70}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Browser", "src\Microsoft.AspNetCore.Components.Browser\Microsoft.AspNetCore.Components.Browser.csproj", "{E52F5005-26EA-4764-8ECF-41D324AAA6D9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Components.Build", "src\Microsoft.AspNetCore.Components.Build\Microsoft.AspNetCore.Components.Build.csproj", "{ABDBB486-6F40-4EA0-8ED1-BF995F534F13}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNetCore.Blazor.Server", "blazor\src\Microsoft.AspNetCore.Blazor.Server\Microsoft.AspNetCore.Blazor.Server.csproj", "{EA44F350-F410-41B4-BA21-00CD31D17384}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -207,14 +196,6 @@ Global {8A19B1CE-9B62-4440-93B3-152DDBB39D0A}.Release|Any CPU.Build.0 = Release|Any CPU {8A19B1CE-9B62-4440-93B3-152DDBB39D0A}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU {8A19B1CE-9B62-4440-93B3-152DDBB39D0A}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU - {4874AFF4-335D-4037-8858-BBBB987C124B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4874AFF4-335D-4037-8858-BBBB987C124B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4874AFF4-335D-4037-8858-BBBB987C124B}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU - {4874AFF4-335D-4037-8858-BBBB987C124B}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU - {4874AFF4-335D-4037-8858-BBBB987C124B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4874AFF4-335D-4037-8858-BBBB987C124B}.Release|Any CPU.Build.0 = Release|Any CPU - {4874AFF4-335D-4037-8858-BBBB987C124B}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU - {4874AFF4-335D-4037-8858-BBBB987C124B}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU {8FD8636E-AFA5-434D-8857-06D02686741A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8FD8636E-AFA5-434D-8857-06D02686741A}.Debug|Any CPU.Build.0 = Debug|Any CPU {8FD8636E-AFA5-434D-8857-06D02686741A}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU @@ -231,22 +212,6 @@ Global {2838CB6F-D2C7-4C0A-A994-C72E56F16984}.Release|Any CPU.Build.0 = Release|Any CPU {2838CB6F-D2C7-4C0A-A994-C72E56F16984}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU {2838CB6F-D2C7-4C0A-A994-C72E56F16984}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU - {D652A019-B765-4922-B7B8-3AB1C58338D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D652A019-B765-4922-B7B8-3AB1C58338D7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D652A019-B765-4922-B7B8-3AB1C58338D7}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU - {D652A019-B765-4922-B7B8-3AB1C58338D7}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU - {D652A019-B765-4922-B7B8-3AB1C58338D7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D652A019-B765-4922-B7B8-3AB1C58338D7}.Release|Any CPU.Build.0 = Release|Any CPU - {D652A019-B765-4922-B7B8-3AB1C58338D7}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU - {D652A019-B765-4922-B7B8-3AB1C58338D7}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU - {EC2A38BF-6E77-4A8E-A731-15929544F29C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EC2A38BF-6E77-4A8E-A731-15929544F29C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EC2A38BF-6E77-4A8E-A731-15929544F29C}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU - {EC2A38BF-6E77-4A8E-A731-15929544F29C}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU - {EC2A38BF-6E77-4A8E-A731-15929544F29C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EC2A38BF-6E77-4A8E-A731-15929544F29C}.Release|Any CPU.Build.0 = Release|Any CPU - {EC2A38BF-6E77-4A8E-A731-15929544F29C}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU - {EC2A38BF-6E77-4A8E-A731-15929544F29C}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU {29CD3FC6-49E3-4756-B5DF-E03B46E5CD45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {29CD3FC6-49E3-4756-B5DF-E03B46E5CD45}.Debug|Any CPU.Build.0 = Debug|Any CPU {29CD3FC6-49E3-4756-B5DF-E03B46E5CD45}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU @@ -271,14 +236,6 @@ Global {8C160273-0A1D-4D79-9F7B-7687B2D2F7C4}.Release|Any CPU.Build.0 = Release|Any CPU {8C160273-0A1D-4D79-9F7B-7687B2D2F7C4}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU {8C160273-0A1D-4D79-9F7B-7687B2D2F7C4}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU - {FF25111E-5A3E-48A3-96D8-08A2C5A2A91C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FF25111E-5A3E-48A3-96D8-08A2C5A2A91C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FF25111E-5A3E-48A3-96D8-08A2C5A2A91C}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU - {FF25111E-5A3E-48A3-96D8-08A2C5A2A91C}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU - {FF25111E-5A3E-48A3-96D8-08A2C5A2A91C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FF25111E-5A3E-48A3-96D8-08A2C5A2A91C}.Release|Any CPU.Build.0 = Release|Any CPU - {FF25111E-5A3E-48A3-96D8-08A2C5A2A91C}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU - {FF25111E-5A3E-48A3-96D8-08A2C5A2A91C}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU {43E39257-7DC1-46BD-9BD9-2319A1313D07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {43E39257-7DC1-46BD-9BD9-2319A1313D07}.Debug|Any CPU.Build.0 = Debug|Any CPU {43E39257-7DC1-46BD-9BD9-2319A1313D07}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU @@ -357,101 +314,77 @@ Global {CCEC81C4-1A3C-40DC-952F-074712C46180}.Release|Any CPU.Build.0 = Release|Any CPU {CCEC81C4-1A3C-40DC-952F-074712C46180}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU {CCEC81C4-1A3C-40DC-952F-074712C46180}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU - {F71D78AB-A07E-415D-BF3F-1B9991628214}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F71D78AB-A07E-415D-BF3F-1B9991628214}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F71D78AB-A07E-415D-BF3F-1B9991628214}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU - {F71D78AB-A07E-415D-BF3F-1B9991628214}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU - {F71D78AB-A07E-415D-BF3F-1B9991628214}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F71D78AB-A07E-415D-BF3F-1B9991628214}.Release|Any CPU.Build.0 = Release|Any CPU - {F71D78AB-A07E-415D-BF3F-1B9991628214}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU - {F71D78AB-A07E-415D-BF3F-1B9991628214}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU - {8C5D8A27-E6E6-4E5B-9389-206B5519658C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8C5D8A27-E6E6-4E5B-9389-206B5519658C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8C5D8A27-E6E6-4E5B-9389-206B5519658C}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU - {8C5D8A27-E6E6-4E5B-9389-206B5519658C}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU - {8C5D8A27-E6E6-4E5B-9389-206B5519658C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8C5D8A27-E6E6-4E5B-9389-206B5519658C}.Release|Any CPU.Build.0 = Release|Any CPU - {8C5D8A27-E6E6-4E5B-9389-206B5519658C}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU - {8C5D8A27-E6E6-4E5B-9389-206B5519658C}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU - {61150807-8DBD-4456-9C6E-D97268181C2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {61150807-8DBD-4456-9C6E-D97268181C2B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {61150807-8DBD-4456-9C6E-D97268181C2B}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU - {61150807-8DBD-4456-9C6E-D97268181C2B}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU - {61150807-8DBD-4456-9C6E-D97268181C2B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {61150807-8DBD-4456-9C6E-D97268181C2B}.Release|Any CPU.Build.0 = Release|Any CPU - {61150807-8DBD-4456-9C6E-D97268181C2B}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU - {61150807-8DBD-4456-9C6E-D97268181C2B}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU - {EB8B8216-BD47-4635-A23D-21135943F2B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EB8B8216-BD47-4635-A23D-21135943F2B7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EB8B8216-BD47-4635-A23D-21135943F2B7}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU - {EB8B8216-BD47-4635-A23D-21135943F2B7}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU - {EB8B8216-BD47-4635-A23D-21135943F2B7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EB8B8216-BD47-4635-A23D-21135943F2B7}.Release|Any CPU.Build.0 = Release|Any CPU - {EB8B8216-BD47-4635-A23D-21135943F2B7}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU - {EB8B8216-BD47-4635-A23D-21135943F2B7}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU - {46B3D506-E351-4668-AC65-0719191B06A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {46B3D506-E351-4668-AC65-0719191B06A7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {46B3D506-E351-4668-AC65-0719191B06A7}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU - {46B3D506-E351-4668-AC65-0719191B06A7}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU - {46B3D506-E351-4668-AC65-0719191B06A7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {46B3D506-E351-4668-AC65-0719191B06A7}.Release|Any CPU.Build.0 = Release|Any CPU - {46B3D506-E351-4668-AC65-0719191B06A7}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU - {46B3D506-E351-4668-AC65-0719191B06A7}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU - {7437B663-B5A8-43A3-9796-EE5A64B82E9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7437B663-B5A8-43A3-9796-EE5A64B82E9E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7437B663-B5A8-43A3-9796-EE5A64B82E9E}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU - {7437B663-B5A8-43A3-9796-EE5A64B82E9E}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU - {7437B663-B5A8-43A3-9796-EE5A64B82E9E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7437B663-B5A8-43A3-9796-EE5A64B82E9E}.Release|Any CPU.Build.0 = Release|Any CPU - {7437B663-B5A8-43A3-9796-EE5A64B82E9E}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU - {7437B663-B5A8-43A3-9796-EE5A64B82E9E}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU - {24DE309C-A2F5-4726-A8D8-95BB44118CD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {24DE309C-A2F5-4726-A8D8-95BB44118CD8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {24DE309C-A2F5-4726-A8D8-95BB44118CD8}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU - {24DE309C-A2F5-4726-A8D8-95BB44118CD8}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU - {24DE309C-A2F5-4726-A8D8-95BB44118CD8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {24DE309C-A2F5-4726-A8D8-95BB44118CD8}.Release|Any CPU.Build.0 = Release|Any CPU - {24DE309C-A2F5-4726-A8D8-95BB44118CD8}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU - {24DE309C-A2F5-4726-A8D8-95BB44118CD8}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU - {2F92DE29-78E9-4A04-8F4F-F8F40E02FE98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2F92DE29-78E9-4A04-8F4F-F8F40E02FE98}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2F92DE29-78E9-4A04-8F4F-F8F40E02FE98}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU - {2F92DE29-78E9-4A04-8F4F-F8F40E02FE98}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU - {2F92DE29-78E9-4A04-8F4F-F8F40E02FE98}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2F92DE29-78E9-4A04-8F4F-F8F40E02FE98}.Release|Any CPU.Build.0 = Release|Any CPU - {2F92DE29-78E9-4A04-8F4F-F8F40E02FE98}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU - {2F92DE29-78E9-4A04-8F4F-F8F40E02FE98}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU + {A42AC30B-45E3-4907-99A9-9ABDA45973D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A42AC30B-45E3-4907-99A9-9ABDA45973D7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A42AC30B-45E3-4907-99A9-9ABDA45973D7}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU + {A42AC30B-45E3-4907-99A9-9ABDA45973D7}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU + {A42AC30B-45E3-4907-99A9-9ABDA45973D7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A42AC30B-45E3-4907-99A9-9ABDA45973D7}.Release|Any CPU.Build.0 = Release|Any CPU + {A42AC30B-45E3-4907-99A9-9ABDA45973D7}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU + {A42AC30B-45E3-4907-99A9-9ABDA45973D7}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU + {85813607-297F-4D39-92F7-89379FD80D70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85813607-297F-4D39-92F7-89379FD80D70}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85813607-297F-4D39-92F7-89379FD80D70}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU + {85813607-297F-4D39-92F7-89379FD80D70}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU + {85813607-297F-4D39-92F7-89379FD80D70}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85813607-297F-4D39-92F7-89379FD80D70}.Release|Any CPU.Build.0 = Release|Any CPU + {85813607-297F-4D39-92F7-89379FD80D70}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU + {85813607-297F-4D39-92F7-89379FD80D70}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU + {E52F5005-26EA-4764-8ECF-41D324AAA6D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E52F5005-26EA-4764-8ECF-41D324AAA6D9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E52F5005-26EA-4764-8ECF-41D324AAA6D9}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU + {E52F5005-26EA-4764-8ECF-41D324AAA6D9}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU + {E52F5005-26EA-4764-8ECF-41D324AAA6D9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E52F5005-26EA-4764-8ECF-41D324AAA6D9}.Release|Any CPU.Build.0 = Release|Any CPU + {E52F5005-26EA-4764-8ECF-41D324AAA6D9}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU + {E52F5005-26EA-4764-8ECF-41D324AAA6D9}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU + {ABDBB486-6F40-4EA0-8ED1-BF995F534F13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ABDBB486-6F40-4EA0-8ED1-BF995F534F13}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ABDBB486-6F40-4EA0-8ED1-BF995F534F13}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU + {ABDBB486-6F40-4EA0-8ED1-BF995F534F13}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU + {ABDBB486-6F40-4EA0-8ED1-BF995F534F13}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ABDBB486-6F40-4EA0-8ED1-BF995F534F13}.Release|Any CPU.Build.0 = Release|Any CPU + {ABDBB486-6F40-4EA0-8ED1-BF995F534F13}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU + {ABDBB486-6F40-4EA0-8ED1-BF995F534F13}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU + {EA44F350-F410-41B4-BA21-00CD31D17384}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EA44F350-F410-41B4-BA21-00CD31D17384}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EA44F350-F410-41B4-BA21-00CD31D17384}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU + {EA44F350-F410-41B4-BA21-00CD31D17384}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU + {EA44F350-F410-41B4-BA21-00CD31D17384}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EA44F350-F410-41B4-BA21-00CD31D17384}.Release|Any CPU.Build.0 = Release|Any CPU + {EA44F350-F410-41B4-BA21-00CD31D17384}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU + {EA44F350-F410-41B4-BA21-00CD31D17384}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution + {4D367450-96E9-4C8C-8B56-EED8ADE3A20D} = {C7B9207E-BF85-422D-9EBC-E243C399F619} + {2A076721-6081-4517-8329-B9E5110D6DAC} = {C7B9207E-BF85-422D-9EBC-E243C399F619} + {4AE0D35B-D97A-44D0-8392-C9240377DCCE} = {ADA3AE29-F6DE-49F6-8C7C-B321508CAE8E} + {F563ABB6-85FB-4CFC-B0D2-1D5130E8246D} = {E5DDF29D-DFC9-43E3-AC3A-5B6D54B786D5} + {3173A9C0-4F66-4064-83EC-3C206F1430FB} = {F5FDD4E5-6A52-4A86-BE5E-5E42CB1DC8DA} + {DDE4B710-6936-4E17-9CA0-54C45333ED15} = {E5DDF29D-DFC9-43E3-AC3A-5B6D54B786D5} + {C7B9207E-BF85-422D-9EBC-E243C399F619} = {E5DDF29D-DFC9-43E3-AC3A-5B6D54B786D5} + {AD41FFD8-2C0C-4F0C-9537-25C2A3A7A1F4} = {E5DDF29D-DFC9-43E3-AC3A-5B6D54B786D5} + {A63F9FCD-29D7-4D49-BC70-7E0F57D0BA60} = {B867E038-B3CE-43E3-9292-61568C46CDEB} + {32B33872-B599-4913-9F90-EDB5F9E24B18} = {E5DDF29D-DFC9-43E3-AC3A-5B6D54B786D5} {7C53BB6B-5906-4753-B507-C9FCC2F7E5B7} = {2A076721-6081-4517-8329-B9E5110D6DAC} {5A694793-3257-4D37-BB74-4A41B3894685} = {B867E038-B3CE-43E3-9292-61568C46CDEB} {5BC2A10D-B6CA-43AE-B73C-2A41AE1039F9} = {ADA3AE29-F6DE-49F6-8C7C-B321508CAE8E} {06AAAE9E-96DE-4574-97DA-9C4C7D9FE990} = {2A076721-6081-4517-8329-B9E5110D6DAC} - {4D367450-96E9-4C8C-8B56-EED8ADE3A20D} = {C7B9207E-BF85-422D-9EBC-E243C399F619} {B4335F7C-4E86-4559-821F-F1B1C75F5FAE} = {4D367450-96E9-4C8C-8B56-EED8ADE3A20D} {F8996835-41F7-4663-91DF-3B5652ADC37D} = {4D367450-96E9-4C8C-8B56-EED8ADE3A20D} {7FD8C650-74B3-4153-AEA1-00F4F6AF393D} = {B867E038-B3CE-43E3-9292-61568C46CDEB} {B241434A-1642-44CC-AE9A-2012B5C5BD02} = {C7B9207E-BF85-422D-9EBC-E243C399F619} - {2A076721-6081-4517-8329-B9E5110D6DAC} = {C7B9207E-BF85-422D-9EBC-E243C399F619} - {709C7EBE-EB93-4F6D-9491-D714B0D2E898} = {ADA3AE29-F6DE-49F6-8C7C-B321508CAE8E} - {8B3D0F1C-0E38-4E6D-BFF1-C4FDA0CD9815} = {B867E038-B3CE-43E3-9292-61568C46CDEB} + {709C7EBE-EB93-4F6D-9491-D714B0D2E898} = {32B33872-B599-4913-9F90-EDB5F9E24B18} + {8B3D0F1C-0E38-4E6D-BFF1-C4FDA0CD9815} = {AD41FFD8-2C0C-4F0C-9537-25C2A3A7A1F4} {8A19B1CE-9B62-4440-93B3-152DDBB39D0A} = {B867E038-B3CE-43E3-9292-61568C46CDEB} - {4874AFF4-335D-4037-8858-BBBB987C124B} = {B867E038-B3CE-43E3-9292-61568C46CDEB} {8FD8636E-AFA5-434D-8857-06D02686741A} = {ADA3AE29-F6DE-49F6-8C7C-B321508CAE8E} - {4AE0D35B-D97A-44D0-8392-C9240377DCCE} = {ADA3AE29-F6DE-49F6-8C7C-B321508CAE8E} {2838CB6F-D2C7-4C0A-A994-C72E56F16984} = {4AE0D35B-D97A-44D0-8392-C9240377DCCE} - {D652A019-B765-4922-B7B8-3AB1C58338D7} = {B867E038-B3CE-43E3-9292-61568C46CDEB} - {EC2A38BF-6E77-4A8E-A731-15929544F29C} = {ADA3AE29-F6DE-49F6-8C7C-B321508CAE8E} {29CD3FC6-49E3-4756-B5DF-E03B46E5CD45} = {4AE0D35B-D97A-44D0-8392-C9240377DCCE} {AF79BB84-BAE6-4F9A-9AD5-B0E3D7455288} = {AD41FFD8-2C0C-4F0C-9537-25C2A3A7A1F4} {8C160273-0A1D-4D79-9F7B-7687B2D2F7C4} = {AD41FFD8-2C0C-4F0C-9537-25C2A3A7A1F4} - {E8EBA72C-D555-43AE-BC98-F0B2D05F6A07} = {E5DDF29D-DFC9-43E3-AC3A-5B6D54B786D5} - {73DA1DFD-79F0-4BA2-B0B6-4F3A21D2C3F8} = {E8EBA72C-D555-43AE-BC98-F0B2D05F6A07} - {FF25111E-5A3E-48A3-96D8-08A2C5A2A91C} = {ADA3AE29-F6DE-49F6-8C7C-B321508CAE8E} - {F563ABB6-85FB-4CFC-B0D2-1D5130E8246D} = {E5DDF29D-DFC9-43E3-AC3A-5B6D54B786D5} {43E39257-7DC1-46BD-9BD9-2319A1313D07} = {F563ABB6-85FB-4CFC-B0D2-1D5130E8246D} {9088E4E4-B855-457F-AE9E-D86709A5E1F4} = {F563ABB6-85FB-4CFC-B0D2-1D5130E8246D} {C57382BC-EE93-49D5-BC40-5C98AF8AA048} = {4AE0D35B-D97A-44D0-8392-C9240377DCCE} @@ -459,22 +392,14 @@ Global {6DDD6A29-0A3E-417F-976C-5FE3FDA74055} = {B867E038-B3CE-43E3-9292-61568C46CDEB} {CF3B5990-7A05-4993-AACA-D2C8D7AFF6E6} = {ADA3AE29-F6DE-49F6-8C7C-B321508CAE8E} {142AA6BC-5110-486B-A34D-6878E5E2CE95} = {ADA3AE29-F6DE-49F6-8C7C-B321508CAE8E} - {3173A9C0-4F66-4064-83EC-3C206F1430FB} = {F5FDD4E5-6A52-4A86-BE5E-5E42CB1DC8DA} {5655AFF9-612C-4947-8221-7DB6949A6CA4} = {3173A9C0-4F66-4064-83EC-3C206F1430FB} {33C361D8-CAF1-47C0-A344-251AEF4FE1FE} = {3173A9C0-4F66-4064-83EC-3C206F1430FB} - {6BDD3018-3961-488E-97D3-1FB7320A8AC6} = {E8EBA72C-D555-43AE-BC98-F0B2D05F6A07} {CCEC81C4-1A3C-40DC-952F-074712C46180} = {DDE4B710-6936-4E17-9CA0-54C45333ED15} - {F71D78AB-A07E-415D-BF3F-1B9991628214} = {B867E038-B3CE-43E3-9292-61568C46CDEB} - {DDE4B710-6936-4E17-9CA0-54C45333ED15} = {E5DDF29D-DFC9-43E3-AC3A-5B6D54B786D5} - {C7B9207E-BF85-422D-9EBC-E243C399F619} = {E5DDF29D-DFC9-43E3-AC3A-5B6D54B786D5} - {AD41FFD8-2C0C-4F0C-9537-25C2A3A7A1F4} = {E5DDF29D-DFC9-43E3-AC3A-5B6D54B786D5} - {8C5D8A27-E6E6-4E5B-9389-206B5519658C} = {E8EBA72C-D555-43AE-BC98-F0B2D05F6A07} - {61150807-8DBD-4456-9C6E-D97268181C2B} = {73DA1DFD-79F0-4BA2-B0B6-4F3A21D2C3F8} - {EB8B8216-BD47-4635-A23D-21135943F2B7} = {73DA1DFD-79F0-4BA2-B0B6-4F3A21D2C3F8} - {46B3D506-E351-4668-AC65-0719191B06A7} = {73DA1DFD-79F0-4BA2-B0B6-4F3A21D2C3F8} - {7437B663-B5A8-43A3-9796-EE5A64B82E9E} = {6BDD3018-3961-488E-97D3-1FB7320A8AC6} - {24DE309C-A2F5-4726-A8D8-95BB44118CD8} = {6BDD3018-3961-488E-97D3-1FB7320A8AC6} - {2F92DE29-78E9-4A04-8F4F-F8F40E02FE98} = {E8EBA72C-D555-43AE-BC98-F0B2D05F6A07} + {A42AC30B-45E3-4907-99A9-9ABDA45973D7} = {AD41FFD8-2C0C-4F0C-9537-25C2A3A7A1F4} + {85813607-297F-4D39-92F7-89379FD80D70} = {32B33872-B599-4913-9F90-EDB5F9E24B18} + {E52F5005-26EA-4764-8ECF-41D324AAA6D9} = {B867E038-B3CE-43E3-9292-61568C46CDEB} + {ABDBB486-6F40-4EA0-8ED1-BF995F534F13} = {B867E038-B3CE-43E3-9292-61568C46CDEB} + {EA44F350-F410-41B4-BA21-00CD31D17384} = {AD41FFD8-2C0C-4F0C-9537-25C2A3A7A1F4} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {504DA352-6788-4DC0-8705-82167E72A4D3} diff --git a/src/Components/Directory.Build.props b/src/Components/Directory.Build.props index 98dd18f1ab..42dc9caa9e 100644 --- a/src/Components/Directory.Build.props +++ b/src/Components/Directory.Build.props @@ -8,7 +8,7 @@ aspnetcore;components - $(MSBuildThisFileDirectory)src\Microsoft.AspNetCore.Components.Build\bin\$(Configuration)\netcoreapp3.0\ + $(MSBuildThisFileDirectory)blazor\src\Microsoft.AspNetCore.Blazor.Build\bin\$(Configuration)\netcoreapp3.0\ @@ -16,10 +16,22 @@ true false + + + false + + + $(MSBuildThisFileDirectory)..\..\artifacts\ + $(ArtifactsDir)$(Configuration)\ + $(ArtifactsConfigurationDir)packages\ + $(BasePackageOutputPath)product\ + $(BasePackageOutputPath)internal\ + + diff --git a/src/Components/Directory.Build.targets b/src/Components/Directory.Build.targets index a643937da2..da4852969b 100644 --- a/src/Components/Directory.Build.targets +++ b/src/Components/Directory.Build.targets @@ -1,7 +1,17 @@  - $(MicrosoftNETCoreApp22PackageVersion) - - 99.9 + $(MicrosoftNETCoreAppPackageVersion) + + + + false + + $(ProductPackageOutputPath) + $(InternalPackageOutputPath) + + diff --git a/src/Components/NuGetPackageVerifier.json b/src/Components/NuGetPackageVerifier.json index 7c9631e4f8..13c842a076 100644 --- a/src/Components/NuGetPackageVerifier.json +++ b/src/Components/NuGetPackageVerifier.json @@ -4,7 +4,7 @@ "AdxVerificationCompositeRule" ], "packages": { - "Microsoft.AspNetCore.Components.Build": { + "Microsoft.AspNetCore.Blazor.Build": { "Exclusions": { "ASSEMBLY_COMPANY": { "tools/Mono.Cecil.dll": "External package", diff --git a/src/Components/README.md b/src/Components/README.md index 98e02d2fc6..71a91b017f 100644 --- a/src/Components/README.md +++ b/src/Components/README.md @@ -10,7 +10,7 @@ Features of the components programming model include: - [Routing](https://blazor.net/docs/routing.html) - [Layouts](https://blazor.net/docs/layouts.html) - Forms and validation -- Dependency injection +- [Dependency injection](https://blazor.net/docs/dependency-injection.html) - [JavaScript interop](https://blazor.net/docs/javascript-interop.html) - Live reloading in the browser during development - Server-side rendering @@ -144,8 +144,8 @@ You can browse https://dotnet.myget.org/gallery/blazor-dev to find the current v ```xml - - + + ``` diff --git a/src/Components/blazor/benchmarks/Microsoft.AspNetCore.Blazor.E2EPerformance/Microsoft.AspNetCore.Blazor.E2EPerformance.csproj b/src/Components/blazor/benchmarks/Microsoft.AspNetCore.Blazor.E2EPerformance/Microsoft.AspNetCore.Blazor.E2EPerformance.csproj index 60f660a4e8..171caedbca 100644 --- a/src/Components/blazor/benchmarks/Microsoft.AspNetCore.Blazor.E2EPerformance/Microsoft.AspNetCore.Blazor.E2EPerformance.csproj +++ b/src/Components/blazor/benchmarks/Microsoft.AspNetCore.Blazor.E2EPerformance/Microsoft.AspNetCore.Blazor.E2EPerformance.csproj @@ -2,18 +2,17 @@ netstandard2.0 - - - dotnet - run --project ../../../blazor/src/Microsoft.AspNetCore.Blazor.Cli serve - - + - + + + + + diff --git a/src/Components/blazor/benchmarks/Microsoft.AspNetCore.Blazor.E2EPerformance/Program.cs b/src/Components/blazor/benchmarks/Microsoft.AspNetCore.Blazor.E2EPerformance/Program.cs index 197f8367ba..f498eb0222 100644 --- a/src/Components/blazor/benchmarks/Microsoft.AspNetCore.Blazor.E2EPerformance/Program.cs +++ b/src/Components/blazor/benchmarks/Microsoft.AspNetCore.Blazor.E2EPerformance/Program.cs @@ -1,7 +1,7 @@ // 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.Components.Hosting; +using Microsoft.AspNetCore.Blazor.Hosting; namespace Microsoft.AspNetCore.Blazor.E2EPerformance { diff --git a/src/Components/blazor/benchmarks/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/blazor-frame.html b/src/Components/blazor/benchmarks/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/blazor-frame.html index 59a2dc0063..e93b5f8d82 100644 --- a/src/Components/blazor/benchmarks/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/blazor-frame.html +++ b/src/Components/blazor/benchmarks/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/blazor-frame.html @@ -19,6 +19,6 @@ Loading... - + diff --git a/src/Components/blazor/samples/HostedInAspNet.Client/HostedInAspNet.Client.csproj b/src/Components/blazor/samples/HostedInAspNet.Client/HostedInAspNet.Client.csproj index 6819e11373..8ebc1dcf71 100644 --- a/src/Components/blazor/samples/HostedInAspNet.Client/HostedInAspNet.Client.csproj +++ b/src/Components/blazor/samples/HostedInAspNet.Client/HostedInAspNet.Client.csproj @@ -6,11 +6,14 @@ - - + - + + + + + diff --git a/src/Components/blazor/samples/HostedInAspNet.Client/Program.cs b/src/Components/blazor/samples/HostedInAspNet.Client/Program.cs index 71369f2061..69ee439533 100644 --- a/src/Components/blazor/samples/HostedInAspNet.Client/Program.cs +++ b/src/Components/blazor/samples/HostedInAspNet.Client/Program.cs @@ -1,15 +1,19 @@ -// 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. -using Microsoft.AspNetCore.Components.Browser.Rendering; +using Microsoft.AspNetCore.Blazor.Hosting; namespace HostedInAspNet.Client { public class Program { - static void Main(string[] args) + public static void Main(string[] args) { - new BrowserRenderer().AddComponent("app"); + CreateHostBuilder(args).Build().Run(); } + + public static IWebAssemblyHostBuilder CreateHostBuilder(string[] args) => + BlazorWebAssemblyHost.CreateDefaultBuilder() + .UseBlazorStartup(); } } diff --git a/src/Hosting/test/testassets/BuildWebHostInvalidSignature/Startup.cs b/src/Components/blazor/samples/HostedInAspNet.Client/Startup.cs similarity index 56% rename from src/Hosting/test/testassets/BuildWebHostInvalidSignature/Startup.cs rename to src/Components/blazor/samples/HostedInAspNet.Client/Startup.cs index 0b52bc36b8..ec33329c95 100644 --- a/src/Hosting/test/testassets/BuildWebHostInvalidSignature/Startup.cs +++ b/src/Components/blazor/samples/HostedInAspNet.Client/Startup.cs @@ -1,10 +1,10 @@ -// 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. -using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Components.Builder; using Microsoft.Extensions.DependencyInjection; -namespace BuildWebHostInvalidSignature +namespace HostedInAspNet.Client { public class Startup { @@ -12,8 +12,9 @@ namespace BuildWebHostInvalidSignature { } - public void Configure(IApplicationBuilder builder) + public void Configure(IBlazorApplicationBuilder app) { + app.AddComponent("app"); } } } diff --git a/src/Components/blazor/samples/HostedInAspNet.Client/wwwroot/index.html b/src/Components/blazor/samples/HostedInAspNet.Client/wwwroot/index.html index a47b1ad84e..7defbfa816 100644 --- a/src/Components/blazor/samples/HostedInAspNet.Client/wwwroot/index.html +++ b/src/Components/blazor/samples/HostedInAspNet.Client/wwwroot/index.html @@ -7,6 +7,6 @@ Loading... - + diff --git a/src/Components/blazor/samples/HostedInAspNet.Server/HostedInAspNet.Server.csproj b/src/Components/blazor/samples/HostedInAspNet.Server/HostedInAspNet.Server.csproj index 6e928f4343..5e2b98c810 100644 --- a/src/Components/blazor/samples/HostedInAspNet.Server/HostedInAspNet.Server.csproj +++ b/src/Components/blazor/samples/HostedInAspNet.Server/HostedInAspNet.Server.csproj @@ -1,16 +1,32 @@ - + netcoreapp3.0 + + + false - + + + + + + diff --git a/src/Components/blazor/samples/HostedInAspNet.Server/Startup.cs b/src/Components/blazor/samples/HostedInAspNet.Server/Startup.cs index 732ec7f498..ec093272b6 100644 --- a/src/Components/blazor/samples/HostedInAspNet.Server/Startup.cs +++ b/src/Components/blazor/samples/HostedInAspNet.Server/Startup.cs @@ -1,4 +1,4 @@ -// 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. using Microsoft.AspNetCore.Builder; @@ -21,6 +21,7 @@ namespace HostedInAspNet.Server if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); + app.UseBlazorDebugging(); } app.UseBlazor(); diff --git a/src/Components/blazor/samples/MonoSanity/MonoSanity.csproj b/src/Components/blazor/samples/MonoSanity/MonoSanity.csproj index 503326e547..266f7976ca 100644 --- a/src/Components/blazor/samples/MonoSanity/MonoSanity.csproj +++ b/src/Components/blazor/samples/MonoSanity/MonoSanity.csproj @@ -6,7 +6,6 @@ - diff --git a/src/Components/blazor/samples/MonoSanityClient/MonoSanityClient.csproj b/src/Components/blazor/samples/MonoSanityClient/MonoSanityClient.csproj index 72f20a8fc8..23b5d92471 100644 --- a/src/Components/blazor/samples/MonoSanityClient/MonoSanityClient.csproj +++ b/src/Components/blazor/samples/MonoSanityClient/MonoSanityClient.csproj @@ -11,6 +11,10 @@ - + + + + + diff --git a/src/Components/blazor/samples/StandaloneApp/Pages/FetchData.cshtml b/src/Components/blazor/samples/StandaloneApp/Pages/FetchData.cshtml index 06ae482c55..2113b17af9 100644 --- a/src/Components/blazor/samples/StandaloneApp/Pages/FetchData.cshtml +++ b/src/Components/blazor/samples/StandaloneApp/Pages/FetchData.cshtml @@ -1,4 +1,4 @@ -@page "/fetchdata" +@page "/fetchdata" @page "/fetchdata/{StartDate:datetime}" @inject HttpClient Http @@ -48,14 +48,14 @@ else WeatherForecast[] forecasts; - public override void SetParameters(ParameterCollection parameters) - { - StartDate = DateTime.Now; - base.SetParameters(parameters); - } - protected override async Task OnParametersSetAsync() { + // If no value was given in the URL for StartDate, apply a default + if (StartDate == default) + { + StartDate = DateTime.Now; + } + forecasts = await Http.GetJsonAsync( $"sample-data/weather.json?date={StartDate.ToString("yyyy-MM-dd")}"); diff --git a/src/Components/blazor/samples/StandaloneApp/Program.cs b/src/Components/blazor/samples/StandaloneApp/Program.cs index 25774cea77..530de72870 100644 --- a/src/Components/blazor/samples/StandaloneApp/Program.cs +++ b/src/Components/blazor/samples/StandaloneApp/Program.cs @@ -1,7 +1,7 @@ // 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.Components.Hosting; +using Microsoft.AspNetCore.Blazor.Hosting; namespace StandaloneApp { diff --git a/src/Components/blazor/samples/StandaloneApp/StandaloneApp.csproj b/src/Components/blazor/samples/StandaloneApp/StandaloneApp.csproj index 9e6c4486c8..171caedbca 100644 --- a/src/Components/blazor/samples/StandaloneApp/StandaloneApp.csproj +++ b/src/Components/blazor/samples/StandaloneApp/StandaloneApp.csproj @@ -2,18 +2,17 @@ netstandard2.0 - - - dotnet - run --project ../../src/Microsoft.AspNetCore.Blazor.Cli serve - - + - + + + + + diff --git a/src/Components/blazor/samples/StandaloneApp/wwwroot/index.html b/src/Components/blazor/samples/StandaloneApp/wwwroot/index.html index 5da6ba26b3..663e9776c1 100644 --- a/src/Components/blazor/samples/StandaloneApp/wwwroot/index.html +++ b/src/Components/blazor/samples/StandaloneApp/wwwroot/index.html @@ -11,6 +11,6 @@ Loading... - + diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Build/Cli/Commands/ResolveRuntimeDependenciesCommand.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Cli/Commands/ResolveRuntimeDependenciesCommand.cs similarity index 97% rename from src/Components/src/Microsoft.AspNetCore.Components.Build/Cli/Commands/ResolveRuntimeDependenciesCommand.cs rename to src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Cli/Commands/ResolveRuntimeDependenciesCommand.cs index 288f6f8f50..e749713c42 100644 --- a/src/Components/src/Microsoft.AspNetCore.Components.Build/Cli/Commands/ResolveRuntimeDependenciesCommand.cs +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Cli/Commands/ResolveRuntimeDependenciesCommand.cs @@ -5,7 +5,7 @@ using System; using System.IO; using Microsoft.Extensions.CommandLineUtils; -namespace Microsoft.AspNetCore.Components.Build.Cli.Commands +namespace Microsoft.AspNetCore.Blazor.Build.Cli.Commands { class ResolveRuntimeDependenciesCommand { diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Build/Cli/Commands/WriteBootJsonCommand.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Cli/Commands/WriteBootJsonCommand.cs similarity index 97% rename from src/Components/src/Microsoft.AspNetCore.Components.Build/Cli/Commands/WriteBootJsonCommand.cs rename to src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Cli/Commands/WriteBootJsonCommand.cs index 7abee7ebe7..275f4e7575 100644 --- a/src/Components/src/Microsoft.AspNetCore.Components.Build/Cli/Commands/WriteBootJsonCommand.cs +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Cli/Commands/WriteBootJsonCommand.cs @@ -5,7 +5,7 @@ using Microsoft.Extensions.CommandLineUtils; using System; using System.IO; -namespace Microsoft.AspNetCore.Components.Build.Cli.Commands +namespace Microsoft.AspNetCore.Blazor.Build.Cli.Commands { internal class WriteBootJsonCommand { diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Build/Cli/Program.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Cli/Program.cs similarity index 82% rename from src/Components/src/Microsoft.AspNetCore.Components.Build/Cli/Program.cs rename to src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Cli/Program.cs index 59dd11cd80..1eac086fc7 100644 --- a/src/Components/src/Microsoft.AspNetCore.Components.Build/Cli/Program.cs +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Cli/Program.cs @@ -1,10 +1,10 @@ // 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.Components.Build.Cli.Commands; +using Microsoft.AspNetCore.Blazor.Build.Cli.Commands; using Microsoft.Extensions.CommandLineUtils; -namespace Microsoft.AspNetCore.Components.Build +namespace Microsoft.AspNetCore.Blazor.Build { static class Program { @@ -12,7 +12,7 @@ namespace Microsoft.AspNetCore.Components.Build { var app = new CommandLineApplication { - Name = "Microsoft.AspNetCore.Components.Build" + Name = "Microsoft.AspNetCore.Blazor.Build" }; app.HelpOption("-?|-h|--help"); diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Build/Core/BootJsonWriter.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Core/BootJsonWriter.cs similarity index 98% rename from src/Components/src/Microsoft.AspNetCore.Components.Build/Core/BootJsonWriter.cs rename to src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Core/BootJsonWriter.cs index d26e942bbf..50a09fa8b2 100644 --- a/src/Components/src/Microsoft.AspNetCore.Components.Build/Core/BootJsonWriter.cs +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Core/BootJsonWriter.cs @@ -8,7 +8,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; -namespace Microsoft.AspNetCore.Components.Build +namespace Microsoft.AspNetCore.Blazor.Build { internal class BootJsonWriter { diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Build/Core/EmbeddedResources/EmbeddedResourceInfo.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Core/EmbeddedResources/EmbeddedResourceInfo.cs similarity index 91% rename from src/Components/src/Microsoft.AspNetCore.Components.Build/Core/EmbeddedResources/EmbeddedResourceInfo.cs rename to src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Core/EmbeddedResources/EmbeddedResourceInfo.cs index 012ac016c4..97331537f2 100644 --- a/src/Components/src/Microsoft.AspNetCore.Components.Build/Core/EmbeddedResources/EmbeddedResourceInfo.cs +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Core/EmbeddedResources/EmbeddedResourceInfo.cs @@ -1,7 +1,7 @@ // 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.Build +namespace Microsoft.AspNetCore.Blazor.Build { internal class EmbeddedResourceInfo { diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Build/Core/EmbeddedResources/EmbeddedResourceKind.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Core/EmbeddedResources/EmbeddedResourceKind.cs similarity index 85% rename from src/Components/src/Microsoft.AspNetCore.Components.Build/Core/EmbeddedResources/EmbeddedResourceKind.cs rename to src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Core/EmbeddedResources/EmbeddedResourceKind.cs index 3fb349fafb..caf322ee15 100644 --- a/src/Components/src/Microsoft.AspNetCore.Components.Build/Core/EmbeddedResources/EmbeddedResourceKind.cs +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Core/EmbeddedResources/EmbeddedResourceKind.cs @@ -1,7 +1,7 @@ // 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.Build +namespace Microsoft.AspNetCore.Blazor.Build { internal enum EmbeddedResourceKind { diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Build/Core/EmbeddedResources/EmbeddedResourcesProcessor.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Core/EmbeddedResources/EmbeddedResourcesProcessor.cs similarity index 99% rename from src/Components/src/Microsoft.AspNetCore.Components.Build/Core/EmbeddedResources/EmbeddedResourcesProcessor.cs rename to src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Core/EmbeddedResources/EmbeddedResourcesProcessor.cs index 22fbdc2af9..21a28597e1 100644 --- a/src/Components/src/Microsoft.AspNetCore.Components.Build/Core/EmbeddedResources/EmbeddedResourcesProcessor.cs +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Core/EmbeddedResources/EmbeddedResourcesProcessor.cs @@ -7,7 +7,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; -namespace Microsoft.AspNetCore.Components.Build +namespace Microsoft.AspNetCore.Blazor.Build { internal class EmbeddedResourcesProcessor { diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Build/Core/RuntimeDependenciesResolver.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Core/RuntimeDependenciesResolver.cs similarity index 99% rename from src/Components/src/Microsoft.AspNetCore.Components.Build/Core/RuntimeDependenciesResolver.cs rename to src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Core/RuntimeDependenciesResolver.cs index daa7e7f2be..18637753cc 100644 --- a/src/Components/src/Microsoft.AspNetCore.Components.Build/Core/RuntimeDependenciesResolver.cs +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Core/RuntimeDependenciesResolver.cs @@ -8,7 +8,7 @@ using System.IO; using System.Linq; using Mono.Cecil; -namespace Microsoft.AspNetCore.Components.Build +namespace Microsoft.AspNetCore.Blazor.Build { internal class RuntimeDependenciesResolver { diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Microsoft.AspNetCore.Blazor.Build.csproj b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Microsoft.AspNetCore.Blazor.Build.csproj new file mode 100644 index 0000000000..c68831682f --- /dev/null +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Microsoft.AspNetCore.Blazor.Build.csproj @@ -0,0 +1,78 @@ + + + + netcoreapp3.0 + Build mechanism for ASP.NET Core Blazor applications. + Exe + true + true + + + + + true + Microsoft.AspNetCore.Blazor.Build.nuspec + obj\publish\ + $(IntermediatePackDir)$(TargetFramework)/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + version=$(PackageVersion); + publishDir=$([MSBuild]::NormalizeDirectory($(IntermediatePackDir))); + componentsversion=$(ComponentsPackageVersion); + razorversion=$(MicrosoftAspNetCoreRazorDesignPackageVersion); + blazormonoversion=$(MicrosoftAspNetCoreBlazorMonoPackageVersion); + repositorycommit=$(RepositoryCommit); + + + <_TargetFramework Include="$(TargetFramework)" /> + + + + + + + + + + + + + + + diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Microsoft.AspNetCore.Blazor.Build.nuspec b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Microsoft.AspNetCore.Blazor.Build.nuspec new file mode 100644 index 0000000000..7a8a465048 --- /dev/null +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Microsoft.AspNetCore.Blazor.Build.nuspec @@ -0,0 +1,27 @@ + + + + Microsoft.AspNetCore.Blazor.Build + $version$ + Microsoft + © Microsoft Corporation. All rights reserved. + Build mechanism for ASP.NET Core Components. + aspnet components + https://go.microsoft.com/fwlink/?LinkID=288859 + https://raw.githubusercontent.com/aspnet/Home/2.0.0/LICENSE.txt + https://asp.net/ + + true + + + + + + + + + + + + + diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Properties/AssemblyInfo.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..65917c9ab2 --- /dev/null +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Properties/AssemblyInfo.cs @@ -0,0 +1,3 @@ +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Blazor.Build.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/ReferenceFromSource.props b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/ReferenceFromSource.props new file mode 100644 index 0000000000..0d1f091e35 --- /dev/null +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/ReferenceFromSource.props @@ -0,0 +1,59 @@ + + + + + + + + true + $(MSBuildThisFileDirectory)../../../src/Microsoft.AspNetCore.Components.Browser.JS/dist/components.*.js + + + + + + + + dotnet + <_BlazorCliLocation>$(MSBuildThisFileDirectory)../Microsoft.AspNetCore.Blazor.Cli/bin/$(Configuration)/netcoreapp3.0/dotnet-blazor.dll + exec "$(_BlazorCliLocation)" serve $(AdditionalRunArguments) + + + + + + + + + + + false + + true + TargetFramework + + + + + + true + + diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/build/netstandard1.0/Microsoft.AspNetCore.Blazor.Build.props b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/build/netstandard1.0/Microsoft.AspNetCore.Blazor.Build.props new file mode 100644 index 0000000000..0407d95f86 --- /dev/null +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/build/netstandard1.0/Microsoft.AspNetCore.Blazor.Build.props @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/build/netstandard1.0/Microsoft.AspNetCore.Blazor.Build.targets b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/build/netstandard1.0/Microsoft.AspNetCore.Blazor.Build.targets new file mode 100644 index 0000000000..35115b33b3 --- /dev/null +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/build/netstandard1.0/Microsoft.AspNetCore.Blazor.Build.targets @@ -0,0 +1,3 @@ + + + diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/targets/All.props b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/targets/All.props new file mode 100644 index 0000000000..690a29fbab --- /dev/null +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/targets/All.props @@ -0,0 +1,16 @@ + + + + + $(DefaultWebContentItemExcludes);wwwroot\** + + + true + + + true + + + true + + diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/targets/All.targets b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/targets/All.targets new file mode 100644 index 0000000000..2f61b5e4df --- /dev/null +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/targets/All.targets @@ -0,0 +1,32 @@ + + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + + + $(MSBuildThisFileDirectory)../tools/ + dotnet "$(BlazorToolsDir)Microsoft.AspNetCore.Blazor.Build.dll" + + + true + + + + + + + + $(AssemblyName).blazor.config + $(TargetDir)$(BlazorMetadataFileName) + + + + + + + + + + diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Build/targets/Blazor.MonoRuntime.props b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/targets/Blazor.MonoRuntime.props similarity index 93% rename from src/Components/src/Microsoft.AspNetCore.Components.Build/targets/Blazor.MonoRuntime.props rename to src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/targets/Blazor.MonoRuntime.props index 20b8d90fcf..d15e156b1d 100644 --- a/src/Components/src/Microsoft.AspNetCore.Components.Build/targets/Blazor.MonoRuntime.props +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/targets/Blazor.MonoRuntime.props @@ -1,7 +1,7 @@ - $(MSBuildThisFileDirectory)../tools/blazor/blazor.*.js + $(MSBuildThisFileDirectory)../tools/blazor/components.*.js diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Build/targets/Blazor.MonoRuntime.targets b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/targets/Blazor.MonoRuntime.targets similarity index 100% rename from src/Components/src/Microsoft.AspNetCore.Components.Build/targets/Blazor.MonoRuntime.targets rename to src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/targets/Blazor.MonoRuntime.targets diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Build/targets/BuiltInBclLinkerDescriptor.xml b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/targets/BuiltInBclLinkerDescriptor.xml similarity index 100% rename from src/Components/src/Microsoft.AspNetCore.Components.Build/targets/BuiltInBclLinkerDescriptor.xml rename to src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/targets/BuiltInBclLinkerDescriptor.xml diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Build/targets/Publish.targets b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/targets/Publish.targets similarity index 100% rename from src/Components/src/Microsoft.AspNetCore.Components.Build/targets/Publish.targets rename to src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/targets/Publish.targets diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Build/targets/Standalone.Web.config b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/targets/Standalone.Web.config similarity index 100% rename from src/Components/src/Microsoft.AspNetCore.Components.Build/targets/Standalone.Web.config rename to src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/targets/Standalone.Web.config diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Cli/Commands/ServeCommand.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Cli/Commands/ServeCommand.cs index ce16353a74..ae7a4d671a 100644 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Cli/Commands/ServeCommand.cs +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Cli/Commands/ServeCommand.cs @@ -3,19 +3,30 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.CommandLineUtils; -using System; -using System.Diagnostics; -using System.Text.RegularExpressions; namespace Microsoft.AspNetCore.Blazor.Cli.Commands { - class ServeCommand + internal class ServeCommand : CommandLineApplication { - public static void Command(CommandLineApplication command) - { - var remainingArgs = command.RemainingArguments.ToArray(); + public ServeCommand(CommandLineApplication parent) - Server.Program.BuildWebHost(remainingArgs).Run(); + // We pass arbitrary arguments through to the ASP.NET Core configuration + : base(throwOnUnexpectedArg: false) + { + Parent = parent; + + Name = "serve"; + Description = "Serve requests to a Blazor application"; + + HelpOption("-?|-h|--help"); + + OnExecute(Execute); + } + + private int Execute() + { + Server.Program.BuildWebHost(RemainingArguments.ToArray()).Run(); + return 0; } } } diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Cli/Microsoft.AspNetCore.Blazor.Cli.csproj b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Cli/Microsoft.AspNetCore.Blazor.Cli.csproj index 6ea2234ffb..be56d4e617 100644 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Cli/Microsoft.AspNetCore.Blazor.Cli.csproj +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Cli/Microsoft.AspNetCore.Blazor.Cli.csproj @@ -5,6 +5,7 @@ Exe dotnet-blazor Microsoft.AspNetCore.Blazor.Cli + true Microsoft.AspNetCore.Blazor.Cli.Program false @@ -19,5 +20,6 @@ + diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Cli/Program.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Cli/Program.cs index 288715da4b..dcc71099b1 100644 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Cli/Program.cs +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Cli/Program.cs @@ -1,11 +1,8 @@ -// 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. -using Microsoft.AspNetCore.Hosting; -using System; -using System.Linq; -using Microsoft.Extensions.CommandLineUtils; using Microsoft.AspNetCore.Blazor.Cli.Commands; +using Microsoft.Extensions.CommandLineUtils; namespace Microsoft.AspNetCore.Blazor.Cli { @@ -13,22 +10,30 @@ namespace Microsoft.AspNetCore.Blazor.Cli { static int Main(string[] args) { - var app = new CommandLineApplication + var app = new CommandLineApplication(throwOnUnexpectedArg: false) { Name = "blazor-cli" }; app.HelpOption("-?|-h|--help"); - app.Command("serve", ServeCommand.Command); + app.Commands.Add(new ServeCommand(app)); - if (args.Length > 0) - { - return app.Execute(args); - } - else + // A command is always required + app.OnExecute(() => { app.ShowHelp(); return 0; + }); + + try + { + return app.Execute(args); + } + catch (CommandParsingException cex) + { + app.Error.WriteLine(cex.Message); + app.ShowHelp(); + return 1; } } } diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Cli/Server/Startup.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Cli/Server/Startup.cs index 3623b4473f..4400eb11de 100644 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Cli/Server/Startup.cs +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Cli/Server/Startup.cs @@ -1,4 +1,4 @@ -// 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. using Microsoft.AspNetCore.Components.Server; @@ -38,6 +38,7 @@ namespace Microsoft.AspNetCore.Blazor.Cli.Server var clientAssemblyPath = FindClientAssemblyPath(app); app.UseBlazor(new BlazorOptions { ClientAssemblyPath = clientAssemblyPath }); + app.UseBlazorDebugging(); } private static void EnableConfiguredPathbase(IApplicationBuilder app, IConfiguration configuration) diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Server/Microsoft.AspNetCore.Blazor.Server.csproj b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Server/Microsoft.AspNetCore.Blazor.Server.csproj new file mode 100644 index 0000000000..b69e5a6741 --- /dev/null +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Server/Microsoft.AspNetCore.Blazor.Server.csproj @@ -0,0 +1,19 @@ + + + + netstandard2.0 + Runtime server features for ASP.NET Core Blazor applications. + true + + + + + + + + + + + + + diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Server/MonoDebugProxy/MonoDebugProxyAppBuilderExtensions.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Server/MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs similarity index 94% rename from src/Components/src/Microsoft.AspNetCore.Components.Server/MonoDebugProxy/MonoDebugProxyAppBuilderExtensions.cs rename to src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Server/MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs index 7cb83ba9a3..7a1edc2d8c 100644 --- a/src/Components/src/Microsoft.AspNetCore.Components.Server/MonoDebugProxy/MonoDebugProxyAppBuilderExtensions.cs +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Server/MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs @@ -14,9 +14,16 @@ using WsProxy; namespace Microsoft.AspNetCore.Builder { - internal static class MonoDebugProxyAppBuilderExtensions + /// + /// Provides infrastructure for debugging Blazor applications. + /// + public static class BlazorMonoDebugProxyAppBuilderExtensions { - public static void UseMonoDebugProxy(this IApplicationBuilder app) + /// + /// Adds middleware for needed for debugging Blazor applications + /// inside Chromium dev tools. + /// + public static void UseBlazorDebugging(this IApplicationBuilder app) { app.UseWebSockets(); diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Server/MonoDebugProxy/UpdateSources.cmd b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Server/MonoDebugProxy/UpdateSources.cmd similarity index 100% rename from src/Components/src/Microsoft.AspNetCore.Components.Server/MonoDebugProxy/UpdateSources.cmd rename to src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Server/MonoDebugProxy/UpdateSources.cmd diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Server/MonoDebugProxy/ws-proxy/DebugStore.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Server/MonoDebugProxy/ws-proxy/DebugStore.cs similarity index 100% rename from src/Components/src/Microsoft.AspNetCore.Components.Server/MonoDebugProxy/ws-proxy/DebugStore.cs rename to src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Server/MonoDebugProxy/ws-proxy/DebugStore.cs diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Server/MonoDebugProxy/ws-proxy/MonoProxy.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Server/MonoDebugProxy/ws-proxy/MonoProxy.cs similarity index 100% rename from src/Components/src/Microsoft.AspNetCore.Components.Server/MonoDebugProxy/ws-proxy/MonoProxy.cs rename to src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Server/MonoDebugProxy/ws-proxy/MonoProxy.cs diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Server/MonoDebugProxy/ws-proxy/WsProxy.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Server/MonoDebugProxy/ws-proxy/WsProxy.cs similarity index 100% rename from src/Components/src/Microsoft.AspNetCore.Components.Server/MonoDebugProxy/ws-proxy/WsProxy.cs rename to src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Server/MonoDebugProxy/ws-proxy/WsProxy.cs diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/Directory.Build.targets b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/Directory.Build.targets index 6e8eca687c..d69d2a5ba4 100644 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/Directory.Build.targets +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/Directory.Build.targets @@ -1,4 +1,5 @@ + false false diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/Microsoft.AspNetCore.Blazor.Templates.csproj b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/Microsoft.AspNetCore.Blazor.Templates.csproj index a75bd91785..b5053c4993 100644 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/Microsoft.AspNetCore.Blazor.Templates.csproj +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/Microsoft.AspNetCore.Blazor.Templates.csproj @@ -1,7 +1,8 @@  - netstandard20 + netstandard2.0 Microsoft.AspNetCore.Blazor.Templates.nuspec + true False False False diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/BlazorHosted-CSharp.Client.csproj b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/BlazorHosted-CSharp.Client.csproj index 6975bb0f19..942482234b 100644 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/BlazorHosted-CSharp.Client.csproj +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/BlazorHosted-CSharp.Client.csproj @@ -4,14 +4,16 @@ netstandard2.0 Exe - https://dotnet.myget.org/f/blazor-dev/api/v3/index.json; + https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json; + https://dotnet.myget.org/F/blazor-dev/api/v3/index.json; 7.3 - - + + + diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Program.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Program.cs index 0a53a7bafe..459d0050c2 100644 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Program.cs +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Program.cs @@ -1,4 +1,4 @@ -using Microsoft.AspNetCore.Components.Hosting; +using Microsoft.AspNetCore.Blazor.Hosting; namespace BlazorHosted_CSharp.Client { diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/wwwroot/index.html b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/wwwroot/index.html index f7e0e86795..f58f6b62cb 100644 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/wwwroot/index.html +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/wwwroot/index.html @@ -11,6 +11,6 @@ Loading... - + diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Server/BlazorHosted-CSharp.Server.csproj b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Server/BlazorHosted-CSharp.Server.csproj index d60d4c2874..b572454c3d 100644 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Server/BlazorHosted-CSharp.Server.csproj +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Server/BlazorHosted-CSharp.Server.csproj @@ -1,17 +1,17 @@  - netcoreapp2.1 + netcoreapp3.0 - https://dotnet.myget.org/f/blazor-dev/api/v3/index.json; + https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json; + https://dotnet.myget.org/F/blazor-dev/api/v3/index.json; 7.3 - - - + + diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Server/Startup.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Server/Startup.cs index 0c62dfd1ca..43701fe55a 100644 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Server/Startup.cs +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Server/Startup.cs @@ -1,11 +1,9 @@ -using Microsoft.AspNetCore.Components.Server; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.ResponseCompression; using Microsoft.Extensions.DependencyInjection; using Newtonsoft.Json.Serialization; using System.Linq; -using System.Net.Mime; namespace BlazorHosted_CSharp.Server { @@ -16,15 +14,7 @@ namespace BlazorHosted_CSharp.Server public void ConfigureServices(IServiceCollection services) { services.AddMvc(); - - services.AddResponseCompression(options => - { - options.MimeTypes = ResponseCompressionDefaults.MimeTypes.Concat(new[] - { - MediaTypeNames.Application.Octet, - WasmMediaTypeNames.Application.Wasm, - }); - }); + services.AddResponseCompression(); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. @@ -43,6 +33,7 @@ namespace BlazorHosted_CSharp.Server }); app.UseBlazor(); + app.UseBlazorDebugging(); } } } diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorLibrary-CSharp/BlazorLibrary-CSharp.csproj b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorLibrary-CSharp/BlazorLibrary-CSharp.csproj index a8920bb89d..8cbc0774a0 100644 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorLibrary-CSharp/BlazorLibrary-CSharp.csproj +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorLibrary-CSharp/BlazorLibrary-CSharp.csproj @@ -1,12 +1,11 @@ - + netstandard2.0 - Library true - false - https://dotnet.myget.org/f/blazor-dev/api/v3/index.json; + https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json; + https://dotnet.myget.org/F/blazor-dev/api/v3/index.json; 7.3 @@ -19,8 +18,8 @@ - - + + diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone-CSharp/BlazorStandalone-CSharp.csproj b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone-CSharp/BlazorStandalone-CSharp.csproj index 50222ec319..c1c9e18273 100644 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone-CSharp/BlazorStandalone-CSharp.csproj +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone-CSharp/BlazorStandalone-CSharp.csproj @@ -5,14 +5,16 @@ dotnet blazor serve - https://dotnet.myget.org/f/blazor-dev/api/v3/index.json; + https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json; + https://dotnet.myget.org/F/blazor-dev/api/v3/index.json; 7.3 - - + + + diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone-CSharp/Program.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone-CSharp/Program.cs index 3c8cb66f7f..dd72b78e52 100644 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone-CSharp/Program.cs +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone-CSharp/Program.cs @@ -1,4 +1,4 @@ -using Microsoft.AspNetCore.Components.Hosting; +using Microsoft.AspNetCore.Blazor.Hosting; namespace BlazorStandalone_CSharp { diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone-CSharp/wwwroot/index.html b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone-CSharp/wwwroot/index.html index f0f4c327c3..88d5d43394 100644 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone-CSharp/wwwroot/index.html +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone-CSharp/wwwroot/index.html @@ -11,6 +11,6 @@ Loading... - + diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/.template.config.src/dotnetcli.host.json b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/.template.config.src/dotnetcli.host.json deleted file mode 100644 index 11797289ab..0000000000 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/.template.config.src/dotnetcli.host.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/dotnetcli.host", - "symbolInfo": { - "skipRestore": { - "longName": "no-restore", - "shortName": "" - }, - "Framework": { - "longName": "framework" - } - } -} \ No newline at end of file diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/.template.config.src/icon.png b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/.template.config.src/icon.png deleted file mode 100644 index 572a095fa0..0000000000 Binary files a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/.template.config.src/icon.png and /dev/null differ diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/.template.config.src/template.json b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/.template.config.src/template.json deleted file mode 100644 index 6c2215da2c..0000000000 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/.template.config.src/template.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "author": "Microsoft", - "classifications": [ - "Web", - "Blazor", - "ServerSide" - ], - "groupIdentity": "Microsoft.Web.Blazor.ServerSide", - "guids": [ - "4C26868E-5E7C-458D-82E3-040509D0C71F", - "5990939C-7E7B-4CFA-86FF-44CA5756498A", - "650B3CE7-2E93-4CC4-9F46-466686815EAA", - "0AFFA7FD-4E37-4636-AB91-3753E746DB98" - ], - "identity": "Microsoft.Web.Blazor.ServerSide.CSharp", - "name": "Blazor (Server-side in ASP.NET Core)", - "preferNameDirectory": true, - "primaryOutputs": [ - { - "condition": "(HostIdentifier == \"dotnetcli\" || HostIdentifier == \"dotnetcli-preview\")", - "path": "Components-CSharp.sln" - }, - { - "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", - "path": "Components-CSharp.Server/Components-CSharp.Server.csproj" - }, - { - "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", - "path": "Components-CSharp.App/Components-CSharp.App.csproj" - } - ], - "shortName": "Components", - "sourceName": "Components-CSharp", - "sources": [ - { - "source": "./", - "target": "./", - "exclude": [ - ".template.config/**" - ], - "modifiers": [ - { - "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", - "exclude": [ - "*.sln" - ] - } - ] - } - ], - "symbols": { - "Framework": { - "type": "parameter", - "description": "The target framework for the project.", - "datatype": "choice", - "choices": [ - { - "choice": "netcoreapp2.1", - "description": "Target netcoreapp2.1" - } - ], - "replaces": "netcoreapp2.1", - "defaultValue": "netcoreapp2.1" - }, - "HostIdentifier": { - "type": "bind", - "binding": "HostIdentifier" - }, - "IncludeCustomRestoreSourcesSymbol": { - "type": "parameter", - "datatype": "bool", - "description": "If set, includes restore sources for the Blazor MyGet feed.", - "defaultValue": "${IncludeCustomRestoreSources}" - }, - "TemplateBlazorVersionSymbol": { - "type": "parameter", - "datatype": "string", - "description": "Specifies which version of Blazor packages to use.", - "replaces": "$(TemplateBlazorPackageVersion)", - "defaultValue": "${TemplateBlazorVersion}" - }, - "TemplateRazorDesignPackageVersionSymbol": { - "type": "parameter", - "datatype": "string", - "description": "Specifies which version of the Razor.Design package to use.", - "replaces": "$(TemplateRazorDesignPackageVersion)", - "defaultValue": "${TemplateRazorDesignPackageVersion}" - }, - "skipRestore": { - "type": "parameter", - "datatype": "bool", - "description": "If specified, skips the automatic restore of the project on create.", - "defaultValue": "false" - } - }, - "tags": { - "language": "C#", - "type": "project" - }, - "postActions": [ - { - "condition": "(!skipRestore)", - "description": "Restore NuGet packages required by this project.", - "manualInstructions": [ - { - "text": "Run 'dotnet restore'" - } - ], - "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025", - "continueOnError": true - } - ] -} diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/.template.config.src/vs-2017.3.host.json b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/.template.config.src/vs-2017.3.host.json deleted file mode 100644 index 37b33d30b0..0000000000 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/.template.config.src/vs-2017.3.host.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/vs-2017.3.host", - "name": { - "text": "Blazor (Server-side in ASP.NET Core)", - "package": "{0CD94836-1526-4E85-87D3-FB5274C5AFC9}", - "id": "1050" - }, - "description": { - "text": "A project template for creating a Blazor application that runs server-side inside an ASP.NET Core application.", - "package": "{0CD94836-1526-4E85-87D3-FB5274C5AFC9}", - "id": "1051" - }, - "order": 300, - "icon": "icon.png", - "learnMoreLink": "https://github.com/aspnet/blazor", - "uiFilters": [ - "oneaspnet" - ], - "additionalWizardParameters": - { - "$isMultiProjectTemplate$": "true" - } -} \ No newline at end of file diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/App.cshtml b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/App.cshtml deleted file mode 100644 index 59be8326e1..0000000000 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/App.cshtml +++ /dev/null @@ -1,5 +0,0 @@ - - diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Components-CSharp.App.csproj b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Components-CSharp.App.csproj deleted file mode 100644 index 056220a489..0000000000 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Components-CSharp.App.csproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - netstandard2.0 - Exe - - https://dotnet.myget.org/f/blazor-dev/api/v3/index.json; - - 7.3 - - - false - - - - - - - - diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Pages/Counter.cshtml b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Pages/Counter.cshtml deleted file mode 100644 index 973af92354..0000000000 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Pages/Counter.cshtml +++ /dev/null @@ -1,16 +0,0 @@ -@page "/counter" - -

Counter

- -

Current count: @currentCount

- - - -@functions { - int currentCount = 0; - - void IncrementCount() - { - currentCount++; - } -} diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Pages/FetchData.cshtml b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Pages/FetchData.cshtml deleted file mode 100644 index 5b4fafb197..0000000000 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Pages/FetchData.cshtml +++ /dev/null @@ -1,45 +0,0 @@ -@using Components_CSharp.App.Services -@page "/fetchdata" -@inject WeatherForecastService ForecastService - -

Weather forecast

- -

This component demonstrates fetching data from the server.

- -@if (forecasts == null) -{ -

Loading...

-} -else -{ - - - - - - - - - - - @foreach (var forecast in forecasts) - { - - - - - - - } - -
DateTemp. (C)Temp. (F)Summary
@forecast.Date.ToShortDateString()@forecast.TemperatureC@forecast.TemperatureF@forecast.Summary
-} - -@functions { - WeatherForecast[] forecasts; - - protected override async Task OnInitAsync() - { - forecasts = await ForecastService.GetForecastAsync(DateTime.Now); - } -} diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Pages/Index.cshtml b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Pages/Index.cshtml deleted file mode 100644 index e54d914390..0000000000 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Pages/Index.cshtml +++ /dev/null @@ -1,7 +0,0 @@ -@page "/" - -

Hello, world!

- -Welcome to your new app. - - diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Pages/_ViewImports.cshtml b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Pages/_ViewImports.cshtml deleted file mode 100644 index 0f24edaf1d..0000000000 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Pages/_ViewImports.cshtml +++ /dev/null @@ -1 +0,0 @@ -@layout MainLayout diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Program.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Program.cs deleted file mode 100644 index a14704e7c5..0000000000 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Program.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Microsoft.AspNetCore.Components.Hosting; - -namespace Components_CSharp.App -{ - public class Program - { - public static void Main(string[] args) - { - CreateHostBuilder(args).Build().Run(); - } - - public static IWebAssemblyHostBuilder CreateHostBuilder(string[] args) => - BlazorWebAssemblyHost.CreateDefaultBuilder() - .UseBlazorStartup(); - } -} diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Services/WeatherForecast.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Services/WeatherForecast.cs deleted file mode 100644 index 7b740f9958..0000000000 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Services/WeatherForecast.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace Components_CSharp.App.Services -{ - public class WeatherForecast - { - public DateTime Date { get; set; } - public int TemperatureC { get; set; } - public int TemperatureF { get; set; } - public string Summary { get; set; } - } -} diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Services/WeatherForecastService.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Services/WeatherForecastService.cs deleted file mode 100644 index 309f539469..0000000000 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Services/WeatherForecastService.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Linq; -using System.Threading.Tasks; - -namespace Components_CSharp.App.Services -{ - public class WeatherForecastService - { - private static string[] Summaries = new[] - { - "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" - }; - - public Task GetForecastAsync(DateTime startDate) - { - var rng = new Random(); - return Task.FromResult(Enumerable.Range(1, 5).Select(index => new WeatherForecast - { - Date = startDate.AddDays(index), - TemperatureC = rng.Next(-20, 55), - Summary = Summaries[rng.Next(Summaries.Length)] - }).ToArray()); - } - } -} diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Shared/MainLayout.cshtml b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Shared/MainLayout.cshtml deleted file mode 100644 index d5eeb142f8..0000000000 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Shared/MainLayout.cshtml +++ /dev/null @@ -1,15 +0,0 @@ -@inherits LayoutComponentBase - - - -
-
- About -
- -
- @Body -
-
diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Shared/NavMenu.cshtml b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Shared/NavMenu.cshtml deleted file mode 100644 index 9f979e5406..0000000000 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Shared/NavMenu.cshtml +++ /dev/null @@ -1,35 +0,0 @@ - - -
- -
- -@functions { - bool collapseNavMenu = true; - - void ToggleNavMenu() - { - collapseNavMenu = !collapseNavMenu; - } -} diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Shared/SurveyPrompt.cshtml b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Shared/SurveyPrompt.cshtml deleted file mode 100644 index 936495a744..0000000000 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Shared/SurveyPrompt.cshtml +++ /dev/null @@ -1,15 +0,0 @@ - - -@functions { - [Parameter] - string Title { get; set; } // Demonstrates how a parent component can supply parameters -} diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Startup.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Startup.cs deleted file mode 100644 index 1b2beee8d5..0000000000 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/Startup.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Microsoft.AspNetCore.Components.Builder; -using Microsoft.Extensions.DependencyInjection; -using Components_CSharp.App.Services; - -namespace Components_CSharp.App -{ - public class Startup - { - public void ConfigureServices(IServiceCollection services) - { - // Since Blazor is running on the server, we can use an application service - // to read the forecast data. - services.AddSingleton(); - } - - public void Configure(IBlazorApplicationBuilder app) - { - app.AddComponent("app"); - } - } -} diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/_ViewImports.cshtml b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/_ViewImports.cshtml deleted file mode 100644 index 9b0dcb450d..0000000000 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.App/_ViewImports.cshtml +++ /dev/null @@ -1,6 +0,0 @@ -@using System.Net.Http -@using Microsoft.AspNetCore.Components.Layouts -@using Microsoft.AspNetCore.Components.Routing -@using Microsoft.JSInterop -@using Components_CSharp.App -@using Components_CSharp.App.Shared diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.Server/Components-CSharp.Server.csproj b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.Server/Components-CSharp.Server.csproj deleted file mode 100644 index 93388159b2..0000000000 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.Server/Components-CSharp.Server.csproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - netcoreapp2.1 - - https://dotnet.myget.org/f/blazor-dev/api/v3/index.json; - - 7.3 - - - - - - - - - - - - - diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.Server/Program.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.Server/Program.cs deleted file mode 100644 index bd899069b9..0000000000 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.Server/Program.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Microsoft.AspNetCore; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; - -namespace Components_CSharp.Server -{ - public class Program - { - public static void Main(string[] args) - { - BuildWebHost(args).Run(); - } - - public static IWebHost BuildWebHost(string[] args) => - WebHost.CreateDefaultBuilder(args) - .UseConfiguration(new ConfigurationBuilder() - .AddCommandLine(args) - .Build()) - .UseStartup() - .Build(); - } -} diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.Server/Startup.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.Server/Startup.cs deleted file mode 100644 index 82a67af44e..0000000000 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.Server/Startup.cs +++ /dev/null @@ -1,44 +0,0 @@ -using Microsoft.AspNetCore.Components.Server; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.ResponseCompression; -using Microsoft.Extensions.DependencyInjection; -using System.Linq; -using System.Net.Mime; - -namespace Components_CSharp.Server -{ - public class Startup - { - // This method gets called by the runtime. Use this method to add services to the container. - // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 - public void ConfigureServices(IServiceCollection services) - { - // Adds the Server-Side Blazor services, and those registered by the app project's startup. - services.AddServerSideBlazor(); - - services.AddResponseCompression(options => - { - options.MimeTypes = ResponseCompressionDefaults.MimeTypes.Concat(new[] - { - MediaTypeNames.Application.Octet, - WasmMediaTypeNames.Application.Wasm, - }); - }); - } - - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, IHostingEnvironment env) - { - app.UseResponseCompression(); - - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - } - - // Use component registrations and static files from the app project. - app.UseServerSideBlazor(); - } - } -} diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.sln b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.sln deleted file mode 100644 index dd94fc128d..0000000000 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Components-CSharp/Components-CSharp.sln +++ /dev/null @@ -1,50 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27130.2027 -MinimumVisualStudioVersion = 15.0.26124.0 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Components-CSharp.Server", "Components-CSharp.Server\Components-CSharp.Server.csproj", "{650B3CE7-2E93-4CC4-9F46-466686815EAA}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Components-CSharp.App", "Components-CSharp.App\Components-CSharp.App.csproj", "{5990939C-7E7B-4CFA-86FF-44CA5756498A}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {5990939C-7E7B-4CFA-86FF-44CA5756498A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5990939C-7E7B-4CFA-86FF-44CA5756498A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5990939C-7E7B-4CFA-86FF-44CA5756498A}.Debug|x64.ActiveCfg = Debug|Any CPU - {5990939C-7E7B-4CFA-86FF-44CA5756498A}.Debug|x64.Build.0 = Debug|Any CPU - {5990939C-7E7B-4CFA-86FF-44CA5756498A}.Debug|x86.ActiveCfg = Debug|Any CPU - {5990939C-7E7B-4CFA-86FF-44CA5756498A}.Debug|x86.Build.0 = Debug|Any CPU - {5990939C-7E7B-4CFA-86FF-44CA5756498A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5990939C-7E7B-4CFA-86FF-44CA5756498A}.Release|Any CPU.Build.0 = Release|Any CPU - {5990939C-7E7B-4CFA-86FF-44CA5756498A}.Release|x64.ActiveCfg = Release|Any CPU - {5990939C-7E7B-4CFA-86FF-44CA5756498A}.Release|x64.Build.0 = Release|Any CPU - {5990939C-7E7B-4CFA-86FF-44CA5756498A}.Release|x86.ActiveCfg = Release|Any CPU - {5990939C-7E7B-4CFA-86FF-44CA5756498A}.Release|x86.Build.0 = Release|Any CPU - {650B3CE7-2E93-4CC4-9F46-466686815EAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {650B3CE7-2E93-4CC4-9F46-466686815EAA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {650B3CE7-2E93-4CC4-9F46-466686815EAA}.Debug|x64.ActiveCfg = Debug|Any CPU - {650B3CE7-2E93-4CC4-9F46-466686815EAA}.Debug|x64.Build.0 = Debug|Any CPU - {650B3CE7-2E93-4CC4-9F46-466686815EAA}.Debug|x86.ActiveCfg = Debug|Any CPU - {650B3CE7-2E93-4CC4-9F46-466686815EAA}.Debug|x86.Build.0 = Debug|Any CPU - {650B3CE7-2E93-4CC4-9F46-466686815EAA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {650B3CE7-2E93-4CC4-9F46-466686815EAA}.Release|Any CPU.Build.0 = Release|Any CPU - {650B3CE7-2E93-4CC4-9F46-466686815EAA}.Release|x64.ActiveCfg = Release|Any CPU - {650B3CE7-2E93-4CC4-9F46-466686815EAA}.Release|x64.Build.0 = Release|Any CPU - {650B3CE7-2E93-4CC4-9F46-466686815EAA}.Release|x86.ActiveCfg = Release|Any CPU - {650B3CE7-2E93-4CC4-9F46-466686815EAA}.Release|x86.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {4C26868E-5E7C-458D-82E3-040509D0C71F} - EndGlobalSection -EndGlobal diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Directory.Build.props b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Directory.Build.props index 0b2b1789a4..3b45f74eaf 100644 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Directory.Build.props +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/Directory.Build.props @@ -2,4 +2,8 @@ + + + true + diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Browser/Hosting/BlazorWebAssemblyHost.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/BlazorWebAssemblyHost.cs similarity index 93% rename from src/Components/src/Microsoft.AspNetCore.Components.Browser/Hosting/BlazorWebAssemblyHost.cs rename to src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/BlazorWebAssemblyHost.cs index 893485f2ca..224b731c13 100644 --- a/src/Components/src/Microsoft.AspNetCore.Components.Browser/Hosting/BlazorWebAssemblyHost.cs +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/BlazorWebAssemblyHost.cs @@ -1,7 +1,7 @@ // 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.Hosting +namespace Microsoft.AspNetCore.Blazor.Hosting { /// /// Used to to create instances a Blazor host builder for a Browser application. diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Browser/Hosting/IWebAssemblyHost.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/IWebAssemblyHost.cs similarity index 95% rename from src/Components/src/Microsoft.AspNetCore.Components.Browser/Hosting/IWebAssemblyHost.cs rename to src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/IWebAssemblyHost.cs index 5a5a452ad6..8f21f93421 100644 --- a/src/Components/src/Microsoft.AspNetCore.Components.Browser/Hosting/IWebAssemblyHost.cs +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/IWebAssemblyHost.cs @@ -5,7 +5,7 @@ using System; using System.Threading; using System.Threading.Tasks; -namespace Microsoft.AspNetCore.Components.Hosting +namespace Microsoft.AspNetCore.Blazor.Hosting { /// /// A program abstraction. diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Browser/Hosting/IWebAssemblyHostBuilder.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/IWebAssemblyHostBuilder.cs similarity index 65% rename from src/Components/src/Microsoft.AspNetCore.Components.Browser/Hosting/IWebAssemblyHostBuilder.cs rename to src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/IWebAssemblyHostBuilder.cs index 6ede4fa6b6..c5a52bc280 100644 --- a/src/Components/src/Microsoft.AspNetCore.Components.Browser/Hosting/IWebAssemblyHostBuilder.cs +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/IWebAssemblyHostBuilder.cs @@ -5,7 +5,7 @@ using System; using System.Collections.Generic; using Microsoft.Extensions.DependencyInjection; -namespace Microsoft.AspNetCore.Components.Hosting +namespace Microsoft.AspNetCore.Blazor.Hosting { /// /// Abstraction for configuring a Blazor browser-based application. @@ -17,6 +17,18 @@ namespace Microsoft.AspNetCore.Components.Hosting /// IDictionary Properties { get; } + /// + /// Overrides the factory used to create the service provider. + /// + /// The same instance of the for chaining. + IWebAssemblyHostBuilder UseServiceProviderFactory(IServiceProviderFactory factory); + + /// + /// Overrides the factory used to create the service provider. + /// + /// The same instance of the for chaining. + IWebAssemblyHostBuilder UseServiceProviderFactory(Func> factory); + /// /// Adds services to the container. This can be called multiple times and the results will be additive. /// diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/IWebAssemblyServiceFactoryAdapter.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/IWebAssemblyServiceFactoryAdapter.cs new file mode 100644 index 0000000000..c790a3c879 --- /dev/null +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/IWebAssemblyServiceFactoryAdapter.cs @@ -0,0 +1,17 @@ +// 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 Microsoft.Extensions.DependencyInjection; + +namespace Microsoft.AspNetCore.Blazor.Hosting +{ + // Equivalent to https://github.com/aspnet/Extensions/blob/master/src/Hosting/Hosting/src/Internal/IServiceFactoryAdapter.cs + + internal interface IWebAssemblyServiceFactoryAdapter + { + object CreateBuilder(IServiceCollection services); + + IServiceProvider CreateServiceProvider(object containerBuilder); + } +} diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Browser/Builder/WebAssemblyBlazorApplicationBuilder.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyBlazorApplicationBuilder.cs similarity index 86% rename from src/Components/src/Microsoft.AspNetCore.Components.Browser/Builder/WebAssemblyBlazorApplicationBuilder.cs rename to src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyBlazorApplicationBuilder.cs index 95e8190fa6..1a621c30ab 100644 --- a/src/Components/src/Microsoft.AspNetCore.Components.Browser/Builder/WebAssemblyBlazorApplicationBuilder.cs +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyBlazorApplicationBuilder.cs @@ -3,10 +3,10 @@ using System; using System.Collections.Generic; -using Microsoft.AspNetCore.Components.Browser.Rendering; +using Microsoft.AspNetCore.Blazor.Rendering; using Microsoft.AspNetCore.Components.Builder; -namespace Microsoft.AspNetCore.Components.Hosting +namespace Microsoft.AspNetCore.Blazor.Hosting { internal class WebAssemblyBlazorApplicationBuilder : IBlazorApplicationBuilder { @@ -35,9 +35,9 @@ namespace Microsoft.AspNetCore.Components.Hosting Entries.Add((componentType, domElementSelector)); } - public BrowserRenderer CreateRenderer() + public WebAssemblyRenderer CreateRenderer() { - var renderer = new BrowserRenderer(Services); + var renderer = new WebAssemblyRenderer(Services); for (var i = 0; i < Entries.Count; i++) { var entry = Entries[i]; diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Browser/Hosting/WebAssemblyHost.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyHost.cs similarity index 93% rename from src/Components/src/Microsoft.AspNetCore.Components.Browser/Hosting/WebAssemblyHost.cs rename to src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyHost.cs index 80c2cce665..bda84cc2da 100644 --- a/src/Components/src/Microsoft.AspNetCore.Components.Browser/Hosting/WebAssemblyHost.cs +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyHost.cs @@ -6,19 +6,20 @@ using System.Net.Http; using System.Reflection; using System.Threading; using System.Threading.Tasks; -using Microsoft.AspNetCore.Components.Browser.Http; -using Microsoft.AspNetCore.Components.Browser.Rendering; +using Microsoft.AspNetCore.Blazor.Http; +using Microsoft.AspNetCore.Blazor.Rendering; +using Microsoft.AspNetCore.Components.Hosting; using Microsoft.Extensions.DependencyInjection; using Microsoft.JSInterop; -namespace Microsoft.AspNetCore.Components.Hosting +namespace Microsoft.AspNetCore.Blazor.Hosting { internal class WebAssemblyHost : IWebAssemblyHost { private readonly IJSRuntime _runtime; private IServiceScope _scope; - private BrowserRenderer _renderer; + private WebAssemblyRenderer _renderer; public WebAssemblyHost(IServiceProvider services, IJSRuntime runtime) { @@ -116,9 +117,9 @@ namespace Microsoft.AspNetCore.Components.Hosting if (getHttpMessageHandlerField != null) { // Just in case you're not actually using HttpClient, defer the construction - // of the BrowserHttpMessageHandler + // of the WebAssemblyHttpMessageHandler var handlerSingleton = new Lazy( - () => new BrowserHttpMessageHandler()); + () => new WebAssemblyHttpMessageHandler()); Func handlerFactory = () => handlerSingleton.Value; getHttpMessageHandlerField.SetValue(null, handlerFactory); } diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Browser/Hosting/WebAssemblyHostBuilder.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyHostBuilder.cs similarity index 66% rename from src/Components/src/Microsoft.AspNetCore.Components.Browser/Hosting/WebAssemblyHostBuilder.cs rename to src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyHostBuilder.cs index 4e63b86440..424c35153b 100644 --- a/src/Components/src/Microsoft.AspNetCore.Components.Browser/Hosting/WebAssemblyHostBuilder.cs +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyHostBuilder.cs @@ -4,13 +4,13 @@ using System; using System.Collections.Generic; using System.Net.Http; -using Microsoft.AspNetCore.Components.Browser.Services; +using Microsoft.AspNetCore.Blazor.Services; using Microsoft.AspNetCore.Components.Services; using Microsoft.Extensions.DependencyInjection; using Microsoft.JSInterop; using Mono.WebAssembly.Interop; -namespace Microsoft.AspNetCore.Components.Hosting +namespace Microsoft.AspNetCore.Blazor.Hosting { // // This code was taken virtually as-is from the Microsoft.Extensions.Hosting project in aspnet/Hosting and then @@ -21,6 +21,7 @@ namespace Microsoft.AspNetCore.Components.Hosting private List> _configureServicesActions = new List>(); private bool _hostBuilt; private WebAssemblyHostBuilderContext _BrowserHostBuilderContext; + private IWebAssemblyServiceFactoryAdapter _serviceProviderFactory = new WebAssemblyServiceFactoryAdapter(new DefaultServiceProviderFactory()); private IServiceProvider _appServices; /// @@ -39,6 +40,26 @@ namespace Microsoft.AspNetCore.Components.Hosting return this; } + /// + /// Overrides the factory used to create the service provider. + /// + /// The same instance of the for chaining. + public IWebAssemblyHostBuilder UseServiceProviderFactory(IServiceProviderFactory factory) + { + _serviceProviderFactory = new WebAssemblyServiceFactoryAdapter(factory ?? throw new ArgumentNullException(nameof(factory))); + return this; + } + + /// + /// Overrides the factory used to create the service provider. + /// + /// The same instance of the for chaining. + public IWebAssemblyHostBuilder UseServiceProviderFactory(Func> factory) + { + _serviceProviderFactory = new WebAssemblyServiceFactoryAdapter(() => _BrowserHostBuilderContext, factory ?? throw new ArgumentNullException(nameof(factory))); + return this; + } + /// /// Run the given actions to initialize the host. This can only be called once. /// @@ -69,14 +90,14 @@ namespace Microsoft.AspNetCore.Components.Hosting services.AddSingleton(); services.AddSingleton(); - services.AddSingleton(BrowserUriHelper.Instance); + services.AddSingleton(WebAssemblyUriHelper.Instance); services.AddSingleton(s => { // Creating the URI helper needs to wait until the JS Runtime is initialized, so defer it. var uriHelper = s.GetRequiredService(); return new HttpClient { - BaseAddress = new Uri(BrowserUriHelper.Instance.GetBaseUri()) + BaseAddress = new Uri(WebAssemblyUriHelper.Instance.GetBaseUri()) }; }); @@ -85,7 +106,8 @@ namespace Microsoft.AspNetCore.Components.Hosting configureServicesAction(_BrowserHostBuilderContext, services); } - _appServices = services.BuildServiceProvider(); + var builder = _serviceProviderFactory.CreateBuilder(services); + _appServices = _serviceProviderFactory.CreateServiceProvider(builder); } } } \ No newline at end of file diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Browser/Hosting/WebAssemblyHostBuilderContext.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyHostBuilderContext.cs similarity index 95% rename from src/Components/src/Microsoft.AspNetCore.Components.Browser/Hosting/WebAssemblyHostBuilderContext.cs rename to src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyHostBuilderContext.cs index c758a905cd..c7b7dd6f19 100644 --- a/src/Components/src/Microsoft.AspNetCore.Components.Browser/Hosting/WebAssemblyHostBuilderContext.cs +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyHostBuilderContext.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; -namespace Microsoft.AspNetCore.Components.Hosting +namespace Microsoft.AspNetCore.Blazor.Hosting { /// /// Context containing the common services on the . Some properties may be null until set by the . diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Browser/Hosting/WebAssemblyHostBuilderExtensions.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyHostBuilderExtensions.cs similarity index 97% rename from src/Components/src/Microsoft.AspNetCore.Components.Browser/Hosting/WebAssemblyHostBuilderExtensions.cs rename to src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyHostBuilderExtensions.cs index e6338192ef..fd0d795944 100644 --- a/src/Components/src/Microsoft.AspNetCore.Components.Browser/Hosting/WebAssemblyHostBuilderExtensions.cs +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyHostBuilderExtensions.cs @@ -2,9 +2,10 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using Microsoft.AspNetCore.Components.Hosting; using Microsoft.Extensions.DependencyInjection; -namespace Microsoft.AspNetCore.Components.Hosting +namespace Microsoft.AspNetCore.Blazor.Hosting { /// /// Provides Blazor-specific support for . diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Browser/Hosting/WebAssemblyHostExtensions.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyHostExtensions.cs similarity index 94% rename from src/Components/src/Microsoft.AspNetCore.Components.Browser/Hosting/WebAssemblyHostExtensions.cs rename to src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyHostExtensions.cs index 7a55fbd157..988ea88ac0 100644 --- a/src/Components/src/Microsoft.AspNetCore.Components.Browser/Hosting/WebAssemblyHostExtensions.cs +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyHostExtensions.cs @@ -1,7 +1,7 @@ // 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.Hosting +namespace Microsoft.AspNetCore.Blazor.Hosting { /// /// Extension methods for . diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyServiceFactoryAdapter.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyServiceFactoryAdapter.cs new file mode 100644 index 0000000000..fcc879653a --- /dev/null +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyServiceFactoryAdapter.cs @@ -0,0 +1,52 @@ +// 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 Microsoft.Extensions.DependencyInjection; + +namespace Microsoft.AspNetCore.Blazor.Hosting +{ + // Equivalent to https://github.com/aspnet/Extensions/blob/master/src/Hosting/Hosting/src/Internal/ServiceFactoryAdapter.cs + + internal class WebAssemblyServiceFactoryAdapter : IWebAssemblyServiceFactoryAdapter + { + private IServiceProviderFactory _serviceProviderFactory; + private readonly Func _contextResolver; + private Func> _factoryResolver; + + public WebAssemblyServiceFactoryAdapter(IServiceProviderFactory serviceProviderFactory) + { + _serviceProviderFactory = serviceProviderFactory ?? throw new ArgumentNullException(nameof(serviceProviderFactory)); + } + + public WebAssemblyServiceFactoryAdapter(Func contextResolver, Func> factoryResolver) + { + _contextResolver = contextResolver ?? throw new ArgumentNullException(nameof(contextResolver)); + _factoryResolver = factoryResolver ?? throw new ArgumentNullException(nameof(factoryResolver)); + } + + public object CreateBuilder(IServiceCollection services) + { + if (_serviceProviderFactory == null) + { + _serviceProviderFactory = _factoryResolver(_contextResolver()); + + if (_serviceProviderFactory == null) + { + throw new InvalidOperationException("The resolver returned a null IServiceProviderFactory"); + } + } + return _serviceProviderFactory.CreateBuilder(services); + } + + public IServiceProvider CreateServiceProvider(object containerBuilder) + { + if (_serviceProviderFactory == null) + { + throw new InvalidOperationException("CreateBuilder must be called before CreateServiceProvider"); + } + + return _serviceProviderFactory.CreateServiceProvider((TContainerBuilder)containerBuilder); + } + } +} diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Browser/Http/FetchCredentialsOption.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Http/FetchCredentialsOption.cs similarity index 88% rename from src/Components/src/Microsoft.AspNetCore.Components.Browser/Http/FetchCredentialsOption.cs rename to src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Http/FetchCredentialsOption.cs index 63d5f4dde2..37afb23f69 100644 --- a/src/Components/src/Microsoft.AspNetCore.Components.Browser/Http/FetchCredentialsOption.cs +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Http/FetchCredentialsOption.cs @@ -1,7 +1,7 @@ -// 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. -namespace Microsoft.AspNetCore.Components.Browser.Http +namespace Microsoft.AspNetCore.Blazor.Http { /// /// Specifies a value for the 'credentials' option on outbound HTTP requests. diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Browser/Http/BrowserHttpMessageHandler.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Http/WebAssemblyHttpMessageHandler.cs similarity index 95% rename from src/Components/src/Microsoft.AspNetCore.Components.Browser/Http/BrowserHttpMessageHandler.cs rename to src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Http/WebAssemblyHttpMessageHandler.cs index edcb504448..2efaf4c82c 100644 --- a/src/Components/src/Microsoft.AspNetCore.Components.Browser/Http/BrowserHttpMessageHandler.cs +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Http/WebAssemblyHttpMessageHandler.cs @@ -11,12 +11,12 @@ using System.Net.Http; using System.Threading; using System.Threading.Tasks; -namespace Microsoft.AspNetCore.Components.Browser.Http +namespace Microsoft.AspNetCore.Blazor.Http { /// /// A browser-compatible implementation of /// - public class BrowserHttpMessageHandler : HttpMessageHandler + public class WebAssemblyHttpMessageHandler : HttpMessageHandler { /// /// Gets or sets the default value of the 'credentials' option on outbound HTTP requests. @@ -34,7 +34,7 @@ namespace Microsoft.AspNetCore.Components.Browser.Http /// The name of a well-known property that can be added to /// to control the arguments passed to the underlying JavaScript fetch API. /// - public const string FetchArgs = "BrowserHttpMessageHandler.FetchArgs"; + public const string FetchArgs = "WebAssemblyHttpMessageHandler.FetchArgs"; /// protected override async Task SendAsync( @@ -75,7 +75,7 @@ namespace Microsoft.AspNetCore.Components.Browser.Http } else { - throw new NotImplementedException("BrowserHttpMessageHandler only supports running under Mono WebAssembly."); + throw new NotImplementedException("WebAssemblyHttpMessageHandler only supports running under Mono WebAssembly."); } return await tcs.Task; diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Microsoft.AspNetCore.Blazor.csproj b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Microsoft.AspNetCore.Blazor.csproj new file mode 100644 index 0000000000..b01c0d97d0 --- /dev/null +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Microsoft.AspNetCore.Blazor.csproj @@ -0,0 +1,22 @@ + + + + netstandard2.0 + Build client-side single-page applications (SPAs) with Razor Components running under WebAssembly. + true + + + + + + + + + + + + + + + + diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Properties/AssemblyInfo.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..b98f74583c --- /dev/null +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Properties/AssemblyInfo.cs @@ -0,0 +1,3 @@ +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Blazor.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Browser/Rendering/BrowserRenderer.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Rendering/WebAssemblyRenderer.cs similarity index 79% rename from src/Components/src/Microsoft.AspNetCore.Components.Browser/Rendering/BrowserRenderer.cs rename to src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Rendering/WebAssemblyRenderer.cs index 8e5f734e66..e6b4de5dc6 100644 --- a/src/Components/src/Microsoft.AspNetCore.Components.Browser/Rendering/BrowserRenderer.cs +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Rendering/WebAssemblyRenderer.cs @@ -1,40 +1,34 @@ // 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.Components.Browser.Services; +using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Components.Browser; using Microsoft.AspNetCore.Components.Rendering; using Microsoft.JSInterop; using Mono.WebAssembly.Interop; using System; using System.Threading.Tasks; -namespace Microsoft.AspNetCore.Components.Browser.Rendering +namespace Microsoft.AspNetCore.Blazor.Rendering { /// /// Provides mechanisms for rendering instances in a /// web browser, dispatching events to them, and refreshing the UI as required. /// - public class BrowserRenderer : Renderer, IDisposable + public class WebAssemblyRenderer : Renderer, IDisposable { - private readonly int _browserRendererId; + private readonly int _webAssemblyRendererId; /// - /// Constructs an instance of . - /// - public BrowserRenderer(): this(new BrowserServiceProvider()) - { - } - - /// - /// Constructs an instance of . + /// Constructs an instance of . /// /// The to use when initializing components. - public BrowserRenderer(IServiceProvider serviceProvider): base(serviceProvider) + public WebAssemblyRenderer(IServiceProvider serviceProvider): base(serviceProvider) { // The browser renderer registers and unregisters itself with the static // registry. This works well with the WebAssembly runtime, and is simple for the // case where Blazor is running in process. - _browserRendererId = RendererRegistry.Current.Add(this); + _webAssemblyRendererId = RendererRegistry.Current.Add(this); } internal void DispatchBrowserEvent(int componentId, int eventHandlerId, UIEventArgs eventArgs) @@ -53,7 +47,7 @@ namespace Microsoft.AspNetCore.Components.Browser.Rendering } /// - /// Associates the with the , + /// Associates the with the , /// causing it to be displayed in the specified DOM element. /// /// The type of the component. @@ -70,7 +64,7 @@ namespace Microsoft.AspNetCore.Components.Browser.Rendering // asynchronously and ensure we surface any exceptions correctly. ((IJSInProcessRuntime)JSRuntime.Current).Invoke( "Blazor._internal.attachRootComponentToElement", - _browserRendererId, + _webAssemblyRendererId, domElementSelector, componentId); @@ -82,7 +76,7 @@ namespace Microsoft.AspNetCore.Components.Browser.Rendering /// public void Dispose() { - RendererRegistry.Current.TryRemove(_browserRendererId); + RendererRegistry.Current.TryRemove(_webAssemblyRendererId); } /// @@ -92,14 +86,14 @@ namespace Microsoft.AspNetCore.Components.Browser.Rendering { mono.InvokeUnmarshalled( "Blazor._internal.renderBatch", - _browserRendererId, + _webAssemblyRendererId, batch); return Task.CompletedTask; } else { // This renderer is not used for server-side Blazor. - throw new NotImplementedException($"{nameof(BrowserRenderer)} is supported only with in-process JS runtimes."); + throw new NotImplementedException($"{nameof(WebAssemblyRenderer)} is supported only with in-process JS runtimes."); } } } diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Browser/Services/BrowserUriHelper.cs b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Services/WebAssemblyUriHelper.cs similarity index 74% rename from src/Components/src/Microsoft.AspNetCore.Components.Browser/Services/BrowserUriHelper.cs rename to src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Services/WebAssemblyUriHelper.cs index 8cd50f9c54..c0c29fdfb0 100644 --- a/src/Components/src/Microsoft.AspNetCore.Components.Browser/Services/BrowserUriHelper.cs +++ b/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Services/WebAssemblyUriHelper.cs @@ -4,57 +4,55 @@ using System; using Microsoft.AspNetCore.Components.Services; using Microsoft.JSInterop; -using Interop = Microsoft.AspNetCore.Components.Browser.Services.BrowserUriHelperInterop; +using Interop = Microsoft.AspNetCore.Components.Browser.BrowserUriHelperInterop; -namespace Microsoft.AspNetCore.Components.Browser.Services +namespace Microsoft.AspNetCore.Blazor.Services { /// - /// Default browser implementation of . + /// Default client-side implementation of . /// - public class BrowserUriHelper : UriHelperBase + public class WebAssemblyUriHelper : UriHelperBase { /// - /// Gets the instance of . + /// Gets the instance of . /// - public static readonly BrowserUriHelper Instance = new BrowserUriHelper(); + public static readonly WebAssemblyUriHelper Instance = new WebAssemblyUriHelper(); // For simplicity we force public consumption of the BrowserUriHelper through // a singleton. Only a single instance can be updated by the browser through // interop. We can construct instances for testing. - internal BrowserUriHelper() + internal WebAssemblyUriHelper() { } /// - /// Called to initialize BaseURI and current URI before those values the first time. - /// Override this method to dynamically calculate the those values. + /// Called to initialize BaseURI and current URI before those values are used the first time. + /// Override this method to dynamically calculate those values. /// protected override void InitializeState() { ((IJSInProcessRuntime)JSRuntime.Current).Invoke( Interop.EnableNavigationInterception, - typeof(BrowserUriHelper).Assembly.GetName().Name, + typeof(WebAssemblyUriHelper).Assembly.GetName().Name, nameof(NotifyLocationChanged)); - // As described in other comment block above, BrowserUriHelper is only for - // client -side (Mono) use, so it's OK to rely on synchrony here. + // As described in the comment block above, BrowserUriHelper is only for + // client-side (Mono) use, so it's OK to rely on synchronicity here. var baseUri = ((IJSInProcessRuntime)JSRuntime.Current).Invoke(Interop.GetBaseUri); var uri = ((IJSInProcessRuntime)JSRuntime.Current).Invoke(Interop.GetLocationHref); SetAbsoluteBaseUri(baseUri); SetAbsoluteUri(uri); - - Console.WriteLine("Initialized"); } /// - protected override void NavigateToCore(string uri) + protected override void NavigateToCore(string uri, bool forceLoad) { if (uri == null) { throw new ArgumentNullException(nameof(uri)); } - ((IJSInProcessRuntime)JSRuntime.Current).Invoke(Interop.NavigateTo, uri); + ((IJSInProcessRuntime)JSRuntime.Current).Invoke(Interop.NavigateTo, uri, forceLoad); } /// diff --git a/src/Components/test/Microsoft.AspNetCore.Components.Build.Test/BindRazorIntegrationTest.cs b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/BindRazorIntegrationTest.cs similarity index 98% rename from src/Components/test/Microsoft.AspNetCore.Components.Build.Test/BindRazorIntegrationTest.cs rename to src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/BindRazorIntegrationTest.cs index fb913c4fe0..0f217f4e1e 100644 --- a/src/Components/test/Microsoft.AspNetCore.Components.Build.Test/BindRazorIntegrationTest.cs +++ b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/BindRazorIntegrationTest.cs @@ -5,11 +5,17 @@ using System; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Test.Helpers; using Xunit; +using Xunit.Abstractions; -namespace Microsoft.AspNetCore.Components.Build.Test +namespace Microsoft.AspNetCore.Blazor.Build.Test { public class BindRazorIntegrationTest : RazorIntegrationTestBase { + public BindRazorIntegrationTest(ITestOutputHelper output) + : base(output) + { + } + internal override bool UseTwoPhaseCompilation => true; [Fact] diff --git a/src/Components/test/Microsoft.AspNetCore.Components.Build.Test/BootJsonWriterTest.cs b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/BootJsonWriterTest.cs similarity index 97% rename from src/Components/test/Microsoft.AspNetCore.Components.Build.Test/BootJsonWriterTest.cs rename to src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/BootJsonWriterTest.cs index 648f85cb24..3632a082b7 100644 --- a/src/Components/test/Microsoft.AspNetCore.Components.Build.Test/BootJsonWriterTest.cs +++ b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/BootJsonWriterTest.cs @@ -7,7 +7,7 @@ using System; using System.Linq; using Xunit; -namespace Microsoft.AspNetCore.Components.Build.Test +namespace Microsoft.AspNetCore.Blazor.Build.Test { public class BootJsonWriterTest { diff --git a/src/Components/test/Microsoft.AspNetCore.Components.Build.Test/ChildContentRazorIntegrationTest.cs b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/ChildContentRazorIntegrationTest.cs similarity index 71% rename from src/Components/test/Microsoft.AspNetCore.Components.Build.Test/ChildContentRazorIntegrationTest.cs rename to src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/ChildContentRazorIntegrationTest.cs index dcedc6e68f..1b371c815a 100644 --- a/src/Components/test/Microsoft.AspNetCore.Components.Build.Test/ChildContentRazorIntegrationTest.cs +++ b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/ChildContentRazorIntegrationTest.cs @@ -1,15 +1,14 @@ // 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.Linq; -using Microsoft.AspNetCore.Components.Razor; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.RenderTree; using Microsoft.AspNetCore.Components.Test.Helpers; using Microsoft.CodeAnalysis.CSharp; using Xunit; +using Xunit.Abstractions; -namespace Microsoft.AspNetCore.Components.Build.Test +namespace Microsoft.AspNetCore.Blazor.Build.Test { public class ChildContentRazorIntegrationTest : RazorIntegrationTestBase { @@ -84,6 +83,11 @@ namespace Test } "); + public ChildContentRazorIntegrationTest(ITestOutputHelper output) + : base(output) + { + } + internal override bool UseTwoPhaseCompilation => true; [Fact] @@ -293,7 +297,7 @@ namespace Test @addTagHelper *, TestAssembly @{ RenderFragment template = (context) => @
@context.ToLowerInvariant()
; } - + "); // Act @@ -410,174 +414,5 @@ namespace Test frame => AssertFrame.Text(frame, " Content", 9), frame => AssertFrame.Text(frame, "Bye!", 11)); } - - [Fact] - public void Render_ChildContent_AttributeAndBody_ProducesDiagnostic() - { - // Arrange - AdditionalSyntaxTrees.Add(RenderChildContentComponent); - - // Act - var generated = CompileToCSharp(@" -@addTagHelper *, TestAssembly -@{ RenderFragment template = @
@context.ToLowerInvariant()
; } - -Some Content -"); - - // Assert - var diagnostic = Assert.Single(generated.Diagnostics); - Assert.Same(BlazorDiagnosticFactory.ChildContentSetByAttributeAndBody.Id, diagnostic.Id); - } - - [Fact] - public void Render_ChildContent_AttributeAndExplicitChildContent_ProducesDiagnostic() - { - // Arrange - AdditionalSyntaxTrees.Add(RenderChildContentComponent); - - // Act - var generated = CompileToCSharp(@" -@addTagHelper *, TestAssembly -@{ RenderFragment template = @
@context.ToLowerInvariant()
; } - - -Some Content - -"); - - // Assert - var diagnostic = Assert.Single(generated.Diagnostics); - Assert.Same(BlazorDiagnosticFactory.ChildContentSetByAttributeAndBody.Id, diagnostic.Id); - } - - [Fact] - public void Render_ChildContent_ExplicitChildContent_UnrecogizedContent_ProducesDiagnostic() - { - // Arrange - AdditionalSyntaxTrees.Add(RenderChildContentComponent); - - // Act - var generated = CompileToCSharp(@" -@addTagHelper *, TestAssembly - - - -@somethingElse -"); - - // Assert - var diagnostic = Assert.Single(generated.Diagnostics); - Assert.Same(BlazorDiagnosticFactory.ChildContentMixedWithExplicitChildContent.Id, diagnostic.Id); - Assert.Equal( - "Unrecognized child content inside component 'RenderChildContent'. The component 'RenderChildContent' accepts " + - "child content through the following top-level items: 'ChildContent'.", - diagnostic.GetMessage()); - } - - [Fact] - public void Render_ChildContent_ExplicitChildContent_UnrecogizedElement_ProducesDiagnostic() - { - // Arrange - AdditionalSyntaxTrees.Add(RenderChildContentComponent); - - // Act - var generated = CompileToCSharp(@" -@addTagHelper *, TestAssembly - - - - -"); - - // Assert - var diagnostic = Assert.Single(generated.Diagnostics); - Assert.Same(BlazorDiagnosticFactory.ChildContentMixedWithExplicitChildContent.Id, diagnostic.Id); - } - - [Fact] - public void Render_ChildContent_ExplicitChildContent_UnrecogizedAttribute_ProducesDiagnostic() - { - // Arrange - AdditionalSyntaxTrees.Add(RenderChildContentComponent); - - // Act - var generated = CompileToCSharp(@" -@addTagHelper *, TestAssembly - - - -"); - - // Assert - var diagnostic = Assert.Single(generated.Diagnostics); - Assert.Same(BlazorDiagnosticFactory.ChildContentHasInvalidAttribute.Id, diagnostic.Id); - } - - [Fact] - public void Render_ChildContent_ExplicitChildContent_InvalidParameterName_ProducesDiagnostic() - { - // Arrange - AdditionalSyntaxTrees.Add(RenderChildContentStringComponent); - - // Act - var generated = CompileToCSharp(@" -@addTagHelper *, TestAssembly - - - -"); - - // Assert - var diagnostic = Assert.Single(generated.Diagnostics); - Assert.Same(BlazorDiagnosticFactory.ChildContentHasInvalidParameter.Id, diagnostic.Id); - } - - [Fact] - public void Render_ChildContent_ExplicitChildContent_RepeatedParameterName_GeneratesDiagnostic() - { - // Arrange - AdditionalSyntaxTrees.Add(RenderChildContentStringComponent); - - // Act - var generated = CompileToCSharp(@" -@addTagHelper *, TestAssembly - - - - - - - -"); - - // Assert - var diagnostic = Assert.Single(generated.Diagnostics); - Assert.Same(BlazorDiagnosticFactory.ChildContentRepeatedParameterName.Id, diagnostic.Id); - Assert.Equal( - "The child content element 'ChildContent' of component 'RenderChildContentString' uses the same parameter name ('context') as enclosing child content " + - "element 'ChildContent' of component 'RenderChildContentString'. Specify the parameter name like: ' to resolve the ambiguity", - diagnostic.GetMessage()); - } - - [Fact] - public void Render_ChildContent_ContextParameterNameOnComponent_Invalid_ProducesDiagnostic() - { - // Arrange - AdditionalSyntaxTrees.Add(RenderChildContentStringComponent); - - // Act - var generated = CompileToCSharp(@" -@addTagHelper *, TestAssembly - -"); - - // Assert - var diagnostic = Assert.Single(generated.Diagnostics); - Assert.Same(BlazorDiagnosticFactory.ChildContentHasInvalidParameterOnComponent.Id, diagnostic.Id); - Assert.Equal( - "Invalid parameter name. The parameter name attribute 'Context' on component 'RenderChildContentString' can only include literal text.", - diagnostic.GetMessage()); - } } } diff --git a/src/Components/test/Microsoft.AspNetCore.Components.Build.Test/ComponentRenderingRazorIntegrationTest.cs b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/ComponentRenderingRazorIntegrationTest.cs similarity index 95% rename from src/Components/test/Microsoft.AspNetCore.Components.Build.Test/ComponentRenderingRazorIntegrationTest.cs rename to src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/ComponentRenderingRazorIntegrationTest.cs index 42c2848e24..0226c74ba4 100644 --- a/src/Components/test/Microsoft.AspNetCore.Components.Build.Test/ComponentRenderingRazorIntegrationTest.cs +++ b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/ComponentRenderingRazorIntegrationTest.cs @@ -7,11 +7,17 @@ using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.RenderTree; using Microsoft.AspNetCore.Components.Test.Helpers; using Xunit; +using Xunit.Abstractions; -namespace Microsoft.AspNetCore.Components.Build.Test +namespace Microsoft.AspNetCore.Blazor.Build.Test { public class ComponentRenderingRazorIntegrationTest : RazorIntegrationTestBase { + public ComponentRenderingRazorIntegrationTest(ITestOutputHelper output) + : base(output) + { + } + internal override bool UseTwoPhaseCompilation => true; [Fact] @@ -67,7 +73,7 @@ namespace Test var component = CompileToComponent(@" @addTagHelper *, TestAssembly - AssertFrame.Attribute(frame, "style", "background: #FFFFFF;", 2)); } - // Text nodes decode HTML entities - [Fact] + [Fact(Skip = "https://github.com/aspnet/AspNetCore/issues/6185")] public void Render_Component_HtmlEncoded() { // Arrange - var component = CompileToComponent(@"<span>Hi</span>"); + var component = CompileToComponent(@"<span>Hi</span>"); // Act var frames = GetRenderTree(component); @@ -485,8 +490,23 @@ namespace Test frame => AssertFrame.Text(frame, "Hi")); } - // Integration test for HTML block rewriting [Fact] + public void Render_Component_HtmlBlockEncoded() + { + // Arrange + var component = CompileToComponent(@"
<span>Hi</span>
"); + + // Act + var frames = GetRenderTree(component); + + // Assert + Assert.Collection( + frames, + frame => AssertFrame.Markup(frame, "
<span>Hi</span>
")); + } + + // Integration test for HTML block rewriting + [Fact(Skip = "https://github.com/aspnet/AspNetCore/issues/6183")] public void Render_HtmlBlock_Integration() { // Arrange diff --git a/src/Components/test/Microsoft.AspNetCore.Components.Build.Test/DirectiveRazorIntegrationTest.cs b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/DirectiveRazorIntegrationTest.cs similarity index 97% rename from src/Components/test/Microsoft.AspNetCore.Components.Build.Test/DirectiveRazorIntegrationTest.cs rename to src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/DirectiveRazorIntegrationTest.cs index 229956ccc3..14485e1e61 100644 --- a/src/Components/test/Microsoft.AspNetCore.Components.Build.Test/DirectiveRazorIntegrationTest.cs +++ b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/DirectiveRazorIntegrationTest.cs @@ -8,12 +8,18 @@ using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Layouts; using Microsoft.AspNetCore.Components.Test.Helpers; using Xunit; +using Xunit.Abstractions; -namespace Microsoft.AspNetCore.Components.Build.Test +namespace Microsoft.AspNetCore.Blazor.Build.Test { // Integration tests for Blazor's directives public class DirectiveRazorIntegrationTest : RazorIntegrationTestBase { + public DirectiveRazorIntegrationTest(ITestOutputHelper output) + : base(output) + { + } + [Fact] public void ComponentsDoNotHaveLayoutAttributeByDefault() { diff --git a/src/Components/test/Microsoft.AspNetCore.Components.Build.Test/GenericComponentRazorIntegrationTest.cs b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/GenericComponentRazorIntegrationTest.cs similarity index 86% rename from src/Components/test/Microsoft.AspNetCore.Components.Build.Test/GenericComponentRazorIntegrationTest.cs rename to src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/GenericComponentRazorIntegrationTest.cs index 3e37430259..7a8409e806 100644 --- a/src/Components/test/Microsoft.AspNetCore.Components.Build.Test/GenericComponentRazorIntegrationTest.cs +++ b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/GenericComponentRazorIntegrationTest.cs @@ -1,17 +1,17 @@ // 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.Components.Razor; +using System; +using System.Collections.Generic; +using System.Linq; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.RenderTree; using Microsoft.AspNetCore.Components.Test.Helpers; using Microsoft.CodeAnalysis.CSharp; -using System; -using System.Collections.Generic; -using System.Linq; using Xunit; +using Xunit.Abstractions; -namespace Microsoft.AspNetCore.Components.Build.Test +namespace Microsoft.AspNetCore.Blazor.Build.Test { public class GenericComponentRazorIntegrationTest : RazorIntegrationTestBase { @@ -81,6 +81,11 @@ namespace Test } "); + public GenericComponentRazorIntegrationTest(ITestOutputHelper output) + : base(output) + { + } + internal override bool UseTwoPhaseCompilation => true; [Fact] @@ -148,7 +153,7 @@ namespace Test { // Arrange AdditionalSyntaxTrees.Add(GenericContextComponent); - + var component = CompileToComponent(@" @addTagHelper *, TestAssembly () { 1, 2, })""> @@ -313,45 +318,5 @@ namespace Test frame => AssertFrame.Text(frame, "FOO", 1), frame => AssertFrame.Text(frame, "39", 2)); } - - [Fact] - public void GenericComponent_WithoutAnyTypeParameters_TriggersDiagnostic() - { - // Arrange - AdditionalSyntaxTrees.Add(GenericContextComponent); - - // Act - var generated = CompileToCSharp(@" -@addTagHelper *, TestAssembly -"); - - // Assert - var diagnostic = Assert.Single(generated.Diagnostics); - Assert.Same(BlazorDiagnosticFactory.GenericComponentTypeInferenceUnderspecified.Id, diagnostic.Id); - Assert.Equal( - "The type of component 'GenericContext' cannot be inferred based on the values provided. Consider " + - "specifying the type arguments directly using the following attributes: 'TItem'.", - diagnostic.GetMessage()); - } - - [Fact] - public void GenericComponent_WithMissingTypeParameters_TriggersDiagnostic() - { - // Arrange - AdditionalSyntaxTrees.Add(MultipleGenericParameterComponent); - - // Act - var generated = CompileToCSharp(@" -@addTagHelper *, TestAssembly -"); - - // Assert - var diagnostic = Assert.Single(generated.Diagnostics); - Assert.Same(BlazorDiagnosticFactory.GenericComponentMissingTypeArgument.Id, diagnostic.Id); - Assert.Equal( - "The component 'MultipleGenericParameter' is missing required type arguments. " + - "Specify the missing types using the attributes: 'TItem2', 'TItem3'.", - diagnostic.GetMessage()); - } } } diff --git a/src/Components/test/Microsoft.AspNetCore.Components.Build.Test/Microsoft.AspNetCore.Components.Build.Test.csproj b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/Microsoft.AspNetCore.Blazor.Build.Test.csproj similarity index 71% rename from src/Components/test/Microsoft.AspNetCore.Components.Build.Test/Microsoft.AspNetCore.Components.Build.Test.csproj rename to src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/Microsoft.AspNetCore.Blazor.Build.Test.csproj index 6999589921..8003e51a88 100644 --- a/src/Components/test/Microsoft.AspNetCore.Components.Build.Test/Microsoft.AspNetCore.Components.Build.Test.csproj +++ b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/Microsoft.AspNetCore.Blazor.Build.Test.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.0 @@ -23,21 +23,21 @@ - - + + + - - - + + - + diff --git a/src/Components/test/Microsoft.AspNetCore.Components.Build.Test/Razor/NotFoundProjectItem.cs b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/Razor/NotFoundProjectItem.cs similarity index 100% rename from src/Components/test/Microsoft.AspNetCore.Components.Build.Test/Razor/NotFoundProjectItem.cs rename to src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/Razor/NotFoundProjectItem.cs diff --git a/src/Components/test/Microsoft.AspNetCore.Components.Build.Test/Razor/TestFile.cs b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/Razor/TestFile.cs similarity index 100% rename from src/Components/test/Microsoft.AspNetCore.Components.Build.Test/Razor/TestFile.cs rename to src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/Razor/TestFile.cs diff --git a/src/Components/test/Microsoft.AspNetCore.Components.Build.Test/Razor/TestProject.cs b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/Razor/TestProject.cs similarity index 100% rename from src/Components/test/Microsoft.AspNetCore.Components.Build.Test/Razor/TestProject.cs rename to src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/Razor/TestProject.cs diff --git a/src/Components/test/Microsoft.AspNetCore.Components.Build.Test/Razor/VirtualProjectFileSystem.cs b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/Razor/VirtualProjectFileSystem.cs similarity index 100% rename from src/Components/test/Microsoft.AspNetCore.Components.Build.Test/Razor/VirtualProjectFileSystem.cs rename to src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/Razor/VirtualProjectFileSystem.cs diff --git a/src/Components/test/Microsoft.AspNetCore.Components.Build.Test/Razor/VirtualProjectItem.cs b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/Razor/VirtualProjectItem.cs similarity index 66% rename from src/Components/test/Microsoft.AspNetCore.Components.Build.Test/Razor/VirtualProjectItem.cs rename to src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/Razor/VirtualProjectItem.cs index cf00b888a0..68c135d715 100644 --- a/src/Components/test/Microsoft.AspNetCore.Components.Build.Test/Razor/VirtualProjectItem.cs +++ b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/Razor/VirtualProjectItem.cs @@ -1,4 +1,4 @@ -// 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. using System.IO; @@ -9,19 +9,30 @@ namespace Microsoft.AspNetCore.Razor.Language { private readonly byte[] _content; - public VirtualProjectItem(string basePath, string filePath, string physicalPath, string relativePhysicalPath, byte[] content) + public VirtualProjectItem( + string basePath, + string filePath, + string physicalPath, + string relativePhysicalPath, + string fileKind, + byte[] content) { BasePath = basePath; FilePath = filePath; PhysicalPath = physicalPath; RelativePhysicalPath = relativePhysicalPath; _content = content; + + // Base class will detect based on file-extension. + FileKind = fileKind ?? base.FileKind; } public override string BasePath { get; } public override string RelativePhysicalPath { get; } + public override string FileKind { get; } + public override string FilePath { get; } public override string PhysicalPath { get; } diff --git a/src/Components/test/Microsoft.AspNetCore.Components.Build.Test/RazorIntegrationTestBase.cs b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/RazorIntegrationTestBase.cs similarity index 81% rename from src/Components/test/Microsoft.AspNetCore.Components.Build.Test/RazorIntegrationTestBase.cs rename to src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/RazorIntegrationTestBase.cs index 09fdd8a5cd..799f995cde 100644 --- a/src/Components/test/Microsoft.AspNetCore.Components.Build.Test/RazorIntegrationTestBase.cs +++ b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/RazorIntegrationTestBase.cs @@ -8,8 +8,8 @@ using System.Linq; using System.Reflection; using System.Runtime.InteropServices; using System.Text; +using System.Threading; using System.Threading.Tasks; -using Microsoft.AspNetCore.Components.Razor; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Rendering; using Microsoft.AspNetCore.Components.RenderTree; @@ -20,12 +20,15 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Razor; using Xunit; +using Xunit.Abstractions; using Xunit.Sdk; -namespace Microsoft.AspNetCore.Components.Build.Test +namespace Microsoft.AspNetCore.Blazor.Build.Test { public class RazorIntegrationTestBase { + private static readonly AsyncLocal _output = new AsyncLocal(); + internal const string ArbitraryWindowsPath = "x:\\dir\\subdir\\Test"; internal const string ArbitraryMacLinuxPath = "/dir/subdir/Test"; @@ -59,17 +62,23 @@ namespace Microsoft.AspNetCore.Components.Build.Test CSharpParseOptions = new CSharpParseOptions(LanguageVersion.CSharp7_3); } - public RazorIntegrationTestBase() + public RazorIntegrationTestBase(ITestOutputHelper output) { + _output.Value = output; + AdditionalSyntaxTrees = new List(); AdditionalRazorItems = new List(); - - Configuration = BlazorExtensionInitializer.DefaultConfiguration; + Configuration = RazorConfiguration.Create(RazorLanguageVersion.Latest, "MVC-3.0", Array.Empty()); + FileKind = FileKinds.Component; // Treat input files as components by default. FileSystem = new VirtualRazorProjectFileSystem(); PathSeparator = Path.DirectorySeparatorChar.ToString(); WorkingDirectory = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ArbitraryWindowsPath : ArbitraryMacLinuxPath; + // Many of the rendering tests include line endings in the output. + LineEnding = "\n"; + NormalizeSourceLineEndings = true; + DefaultBaseNamespace = "Test"; // Matches the default working directory DefaultFileName = "TestComponent.cshtml"; } @@ -85,7 +94,9 @@ namespace Microsoft.AspNetCore.Components.Build.Test internal virtual string DefaultFileName { get; } internal virtual bool DesignTime { get; } - + + internal virtual string FileKind { get; } + internal virtual VirtualRazorProjectFileSystem FileSystem { get; } // Used to force a specific style of line-endings for testing. This matters @@ -102,9 +113,10 @@ namespace Microsoft.AspNetCore.Components.Build.Test internal virtual string WorkingDirectory { get; } - internal RazorProjectEngine CreateProjectEngine(RazorConfiguration configuration, MetadataReference[] references) + // Intentionally private, we don't want tests messing with this because it's fragile. + private RazorProjectEngine CreateProjectEngine(MetadataReference[] references) { - return RazorProjectEngine.Create(configuration, FileSystem, b => + return RazorProjectEngine.Create(Configuration, FileSystem, b => { // Turn off checksums, we're testing code generation. b.Features.Add(new SuppressChecksum()); @@ -114,7 +126,11 @@ namespace Microsoft.AspNetCore.Components.Build.Test b.Phases.Insert(0, new ForceLineEndingPhase(LineEnding)); } - BlazorExtensionInitializer.Register(b); + // Including MVC here so that we can find any issues that arise from mixed MVC + Components. + Microsoft.AspNetCore.Mvc.Razor.Extensions.RazorExtensions.Register(b); + + // Features that use Roslyn are mandatory for components + Microsoft.CodeAnalysis.Razor.CompilerFeatures.Register(b); b.Features.Add(new CompilationTagHelperFeature()); b.Features.Add(new DefaultMetadataReferenceFeature() @@ -141,10 +157,11 @@ namespace Microsoft.AspNetCore.Components.Build.Test } return new VirtualProjectItem( - WorkingDirectory, - filePath, + WorkingDirectory, + filePath, fullPath, cshtmlRelativePath, + FileKind, Encoding.UTF8.GetBytes(cshtmlContent.TrimStart())); } @@ -159,13 +176,13 @@ namespace Microsoft.AspNetCore.Components.Build.Test { // The first phase won't include any metadata references for component discovery. This mirrors // what the build does. - var projectEngine = CreateProjectEngine(BlazorExtensionInitializer.DeclarationConfiguration, Array.Empty()); - + var projectEngine = CreateProjectEngine(Array.Empty()); + RazorCodeDocument codeDocument; foreach (var item in AdditionalRazorItems) { // Result of generating declarations - codeDocument = projectEngine.Process(item); + codeDocument = projectEngine.ProcessDeclarationOnly(item); Assert.Empty(codeDocument.GetCSharpDocument().Diagnostics); var syntaxTree = Parse(codeDocument.GetCSharpDocument().GeneratedCode, path: item.FilePath); @@ -174,7 +191,7 @@ namespace Microsoft.AspNetCore.Components.Build.Test // Result of generating declarations var projectItem = CreateProjectItem(cshtmlRelativePath, cshtmlContent); - codeDocument = projectEngine.Process(projectItem); + codeDocument = projectEngine.ProcessDeclarationOnly(projectItem); var declaration = new CompileToCSharpResult { BaseCompilation = BaseCompilation.AddSyntaxTrees(AdditionalSyntaxTrees), @@ -186,15 +203,15 @@ namespace Microsoft.AspNetCore.Components.Build.Test // Result of doing 'temp' compilation var tempAssembly = CompileToAssembly(declaration); - // Add the 'temp' compilation as a metadata reference + // Add the 'temp' compilation as a metadata reference var references = BaseCompilation.References.Concat(new[] { tempAssembly.Compilation.ToMetadataReference() }).ToArray(); - projectEngine = CreateProjectEngine(BlazorExtensionInitializer.DefaultConfiguration, references); + projectEngine = CreateProjectEngine(references); // Now update the any additional files foreach (var item in AdditionalRazorItems) { // Result of generating declarations - codeDocument = projectEngine.Process(item); + codeDocument = DesignTime ? projectEngine.ProcessDesignTime(item) : projectEngine.Process(item); Assert.Empty(codeDocument.GetCSharpDocument().Diagnostics); // Replace the 'declaration' syntax tree @@ -205,6 +222,30 @@ namespace Microsoft.AspNetCore.Components.Build.Test // Result of real code generation for the document under test codeDocument = DesignTime ? projectEngine.ProcessDesignTime(projectItem) : projectEngine.Process(projectItem); + + _output.Value.WriteLine("Use this output when opening an issue"); + _output.Value.WriteLine(string.Empty); + + _output.Value.WriteLine($"## Main source file ({projectItem.FileKind}):"); + _output.Value.WriteLine("```"); + _output.Value.WriteLine(ReadProjectItem(projectItem)); + _output.Value.WriteLine("```"); + _output.Value.WriteLine(string.Empty); + + foreach (var item in AdditionalRazorItems) + { + _output.Value.WriteLine($"### Additional source file ({item.FileKind}):"); + _output.Value.WriteLine("```"); + _output.Value.WriteLine(ReadProjectItem(item)); + _output.Value.WriteLine("```"); + _output.Value.WriteLine(string.Empty); + } + + _output.Value.WriteLine("## Generated C#:"); + _output.Value.WriteLine("```C#"); + _output.Value.WriteLine(codeDocument.GetCSharpDocument().GeneratedCode); + _output.Value.WriteLine("```"); + return new CompileToCSharpResult { BaseCompilation = BaseCompilation.AddSyntaxTrees(AdditionalSyntaxTrees), @@ -217,10 +258,26 @@ namespace Microsoft.AspNetCore.Components.Build.Test { // For single phase compilation tests just use the base compilation's references. // This will include the built-in Blazor components. - var projectEngine = CreateProjectEngine(Configuration, BaseCompilation.References.ToArray()); + var projectEngine = CreateProjectEngine(BaseCompilation.References.ToArray()); var projectItem = CreateProjectItem(cshtmlRelativePath, cshtmlContent); var codeDocument = DesignTime ? projectEngine.ProcessDesignTime(projectItem) : projectEngine.Process(projectItem); + + // Log the generated code for test results. + _output.Value.WriteLine("Use this output when opening an issue"); + _output.Value.WriteLine(string.Empty); + + _output.Value.WriteLine($"## Main source file ({projectItem.FileKind}):"); + _output.Value.WriteLine("```"); + _output.Value.WriteLine(ReadProjectItem(projectItem)); + _output.Value.WriteLine("```"); + _output.Value.WriteLine(string.Empty); + + _output.Value.WriteLine("## Generated C#:"); + _output.Value.WriteLine("```C#"); + _output.Value.WriteLine(codeDocument.GetCSharpDocument().GeneratedCode); + _output.Value.WriteLine("```"); + return new CompileToCSharpResult { BaseCompilation = BaseCompilation.AddSyntaxTrees(AdditionalSyntaxTrees), @@ -343,6 +400,14 @@ namespace Microsoft.AspNetCore.Components.Build.Test Assert.Equal(expected, generated.Code.Trim(), ignoreLineEndingDifferences: true); } + private static string ReadProjectItem(RazorProjectItem item) + { + using (var reader = new StreamReader(item.Read())) + { + return reader.ReadToEnd(); + } + } + protected class CompileToCSharpResult { // A compilation that can be used *with* this code to compile an assembly @@ -380,7 +445,7 @@ namespace Microsoft.AspNetCore.Components.Build.Test private class CompilationFailedException : XunitException { - public CompilationFailedException(Compilation compilation) + public CompilationFailedException(Compilation compilation) { Compilation = compilation; } diff --git a/src/Components/test/Microsoft.AspNetCore.Components.Build.Test/RenderingRazorIntegrationTest.cs b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/RenderingRazorIntegrationTest.cs similarity index 97% rename from src/Components/test/Microsoft.AspNetCore.Components.Build.Test/RenderingRazorIntegrationTest.cs rename to src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/RenderingRazorIntegrationTest.cs index 34f957229e..4bb88a2eeb 100644 --- a/src/Components/test/Microsoft.AspNetCore.Components.Build.Test/RenderingRazorIntegrationTest.cs +++ b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/RenderingRazorIntegrationTest.cs @@ -7,13 +7,19 @@ using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.RenderTree; using Microsoft.AspNetCore.Components.Test.Helpers; using Xunit; +using Xunit.Abstractions; -namespace Microsoft.AspNetCore.Components.Build.Test +namespace Microsoft.AspNetCore.Blazor.Build.Test { // Integration tests for the end-to-end of successful Razor compilation of component definitions // Includes running the component code to verify the output. public class RenderingRazorIntegrationTest : RazorIntegrationTestBase { + public RenderingRazorIntegrationTest(ITestOutputHelper output) + : base(output) + { + } + [Fact] public void SupportsPlainText() { @@ -83,7 +89,7 @@ namespace Microsoft.AspNetCore.Components.Build.Test frame => AssertFrame.Text(frame, "there", 2)); } - [Fact(Skip = "Temporarily disable compiling markup frames in 0.5.1")] + [Fact] public void SupportsElementsAsStaticBlock() { // Arrange/Act @@ -144,28 +150,28 @@ namespace Microsoft.AspNetCore.Components.Build.Test frame => AssertFrame.Attribute(frame, "myattr", "val", 2)); } - [Fact(Skip = "Temporarily disable compiling markup frames in 0.5.1")] + [Fact] public void SupportsSelfClosingElementsAsStaticBlock() { // Arrange/Act var component = CompileToComponent("Some text so elem isn't at position 0 "); // Assert - Assert.Collection(GetRenderTree(component), - frame => AssertFrame.Text(frame, "Some text so elem isn't at position 0 ", 0), - frame => AssertFrame.Markup(frame, "", 1)); + Assert.Collection( + GetRenderTree(component), + frame => AssertFrame.Markup(frame, "Some text so elem isn't at position 0 ", 0)); } - [Fact(Skip = "Temporarily disable compiling markup frames in 0.5.1")] + [Fact] public void SupportsVoidHtmlElements() { // Arrange/Act var component = CompileToComponent("Some text so elem isn't at position 0 "); // Assert - Assert.Collection(GetRenderTree(component), - frame => AssertFrame.Text(frame, "Some text so elem isn't at position 0 ", 0), - frame => AssertFrame.Markup(frame, "", 1)); + Assert.Collection( + GetRenderTree(component), + frame => AssertFrame.Markup(frame, "Some text so elem isn't at position 0 ", 0)); } [Fact] @@ -286,7 +292,7 @@ namespace Microsoft.AspNetCore.Components.Build.Test { // Arrange/Act var component = CompileToComponent(@" -@{ +@{ var myValue = ""Expression value""; } "); diff --git a/src/Components/test/Microsoft.AspNetCore.Components.Build.Test/RuntimeDependenciesResolverTest.cs b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/RuntimeDependenciesResolverTest.cs similarity index 96% rename from src/Components/test/Microsoft.AspNetCore.Components.Build.Test/RuntimeDependenciesResolverTest.cs rename to src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/RuntimeDependenciesResolverTest.cs index 0e8c2a805f..c594add472 100644 --- a/src/Components/test/Microsoft.AspNetCore.Components.Build.Test/RuntimeDependenciesResolverTest.cs +++ b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/RuntimeDependenciesResolverTest.cs @@ -6,7 +6,7 @@ using System.IO; using System.Linq; using Xunit; -namespace Microsoft.AspNetCore.Components.Build.Test +namespace Microsoft.AspNetCore.Blazor.Build.Test { public class RuntimeDependenciesResolverTest { @@ -25,6 +25,7 @@ namespace Microsoft.AspNetCore.Components.Build.Test mainAssemblyDirectory, "bclLocations.txt")); var references = new[] { + "Microsoft.AspNetCore.Blazor.dll", "Microsoft.AspNetCore.Components.Browser.dll", "Microsoft.AspNetCore.Components.dll", "Microsoft.Extensions.DependencyInjection.Abstractions.dll", @@ -52,6 +53,8 @@ namespace Microsoft.AspNetCore.Components.Build.Test fewer assemblies from the server, and during publishing, illink would remove all the uncalled implementation code from mscorlib.dll anyway. */ + "Microsoft.AspNetCore.Blazor.dll", + "Microsoft.AspNetCore.Blazor.pdb", "Microsoft.AspNetCore.Components.Browser.dll", "Microsoft.AspNetCore.Components.Browser.pdb", "Microsoft.AspNetCore.Components.dll", diff --git a/src/Components/test/Microsoft.AspNetCore.Components.Browser.Test/Hosting/ConventionBasedStartupTest.cs b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Test/Hosting/ConventionBasedStartupTest.cs similarity index 99% rename from src/Components/test/Microsoft.AspNetCore.Components.Browser.Test/Hosting/ConventionBasedStartupTest.cs rename to src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Test/Hosting/ConventionBasedStartupTest.cs index c1fa676e24..7815e9a6f6 100644 --- a/src/Components/test/Microsoft.AspNetCore.Components.Browser.Test/Hosting/ConventionBasedStartupTest.cs +++ b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Test/Hosting/ConventionBasedStartupTest.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using Microsoft.AspNetCore.Blazor.Hosting; using Microsoft.AspNetCore.Components.Builder; using Microsoft.Extensions.DependencyInjection; using Xunit; diff --git a/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Test/Hosting/WebAssemblyHostBuilderTest.cs b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Test/Hosting/WebAssemblyHostBuilderTest.cs new file mode 100644 index 0000000000..4acf6f99a3 --- /dev/null +++ b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Test/Hosting/WebAssemblyHostBuilderTest.cs @@ -0,0 +1,163 @@ +// 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.Text; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.JSInterop; +using Xunit; + +namespace Microsoft.AspNetCore.Blazor.Hosting.Test +{ + public class WebAssemblyHostBuilderTest + { + [Fact] + public void HostBuilder_CanCallBuild_BuildsServices() + { + // Arrange + var builder = new WebAssemblyHostBuilder(); + + // Act + var host = builder.Build(); + + // Assert + Assert.NotNull(host.Services.GetService(typeof(IWebAssemblyHost))); + } + + [Fact] + public void HostBuilder_CanConfigureAdditionalServices() + { + // Arrange + var builder = new WebAssemblyHostBuilder(); + builder.ConfigureServices((c, s) => s.AddSingleton("foo")); + builder.ConfigureServices((c, s) => s.AddSingleton(new StringBuilder("bar"))); + + // Act + var host = builder.Build(); + + // Assert + Assert.Equal("foo", host.Services.GetService(typeof(string))); + Assert.Equal("bar", host.Services.GetService(typeof(StringBuilder)).ToString()); + } + + [Fact] + public void HostBuilder_UseBlazorStartup_CanConfigureAdditionalServices() + { + // Arrange + var builder = new WebAssemblyHostBuilder(); + builder.UseBlazorStartup(); + builder.ConfigureServices((c, s) => s.AddSingleton(new StringBuilder("bar"))); + + // Act + var host = builder.Build(); + + // Assert + Assert.Equal("foo", host.Services.GetService(typeof(string))); + Assert.Equal("bar", host.Services.GetService(typeof(StringBuilder)).ToString()); + } + + [Fact] + public void HostBuilder_UseBlazorStartup_DoesNotAllowMultiple() + { + // Arrange + var builder = new WebAssemblyHostBuilder(); + builder.UseBlazorStartup(); + + // Act + var ex = Assert.Throws(() => builder.UseBlazorStartup()); + + // Assert + Assert.Equal("A startup class has already been registered.", ex.Message); + } + + private class MyStartup + { + public void ConfigureServices(IServiceCollection services) + { + services.AddSingleton("foo"); + } + } + + [Fact] + public void HostBuilder_CanCustomizeServiceFactory() + { + // Arrange + var builder = new WebAssemblyHostBuilder(); + builder.UseServiceProviderFactory(new TestServiceProviderFactory()); + + // Act + var host = builder.Build(); + + // Assert + Assert.IsType(host.Services); + } + + [Fact] + public void HostBuilder_CanCustomizeServiceFactoryWithContext() + { + // Arrange + var builder = new WebAssemblyHostBuilder(); + builder.UseServiceProviderFactory(context => + { + Assert.NotNull(context.Properties); + Assert.Same(builder.Properties, context.Properties); + return new TestServiceProviderFactory(); + }); + + // Act + var host = builder.Build(); + + // Assert + Assert.IsType(host.Services); + } + + private class TestServiceProvider : IServiceProvider + { + private readonly IServiceProvider _underlyingProvider; + + public TestServiceProvider(IServiceProvider underlyingProvider) + { + _underlyingProvider = underlyingProvider; + } + + public object GetService(Type serviceType) + { + if (serviceType == typeof(IWebAssemblyHost)) + { + // Since the test will make assertions about the resulting IWebAssemblyHost, + // show that custom DI containers have the power to substitute themselves + // as the IServiceProvider + return new WebAssemblyHost( + this, _underlyingProvider.GetRequiredService()); + } + else + { + return _underlyingProvider.GetService(serviceType); + } + } + } + + private class TestServiceProviderFactory : IServiceProviderFactory + { + public IServiceCollection CreateBuilder(IServiceCollection services) + { + return new TestServiceCollection(services); + } + + public IServiceProvider CreateServiceProvider(IServiceCollection serviceCollection) + { + Assert.IsType(serviceCollection); + return new TestServiceProvider(serviceCollection.BuildServiceProvider()); + } + + class TestServiceCollection : List, IServiceCollection + { + public TestServiceCollection(IEnumerable collection) + : base(collection) + { + } + } + } + } +} diff --git a/src/Components/test/Microsoft.AspNetCore.Components.Browser.Test/Hosting/WebAssemblyHostTest.cs b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Test/Hosting/WebAssemblyHostTest.cs similarity index 96% rename from src/Components/test/Microsoft.AspNetCore.Components.Browser.Test/Hosting/WebAssemblyHostTest.cs rename to src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Test/Hosting/WebAssemblyHostTest.cs index 476f888291..9aa07b9c69 100644 --- a/src/Components/test/Microsoft.AspNetCore.Components.Browser.Test/Hosting/WebAssemblyHostTest.cs +++ b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Test/Hosting/WebAssemblyHostTest.cs @@ -4,12 +4,13 @@ using System; using System.Threading.Tasks; using Microsoft.AspNetCore.Components.Builder; +using Microsoft.AspNetCore.Components.Hosting; using Microsoft.Extensions.DependencyInjection; using Microsoft.JSInterop; using Mono.WebAssembly.Interop; using Xunit; -namespace Microsoft.AspNetCore.Components.Hosting +namespace Microsoft.AspNetCore.Blazor.Hosting.Test { public class WebAssemblyHostTest { diff --git a/src/Components/test/Microsoft.AspNetCore.Components.Browser.Test/Microsoft.AspNetCore.Components.Browser.Test.csproj b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Test/Microsoft.AspNetCore.Blazor.Test.csproj similarity index 81% rename from src/Components/test/Microsoft.AspNetCore.Components.Browser.Test/Microsoft.AspNetCore.Components.Browser.Test.csproj rename to src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Test/Microsoft.AspNetCore.Blazor.Test.csproj index 09b7d81cbd..1d8343d0ff 100644 --- a/src/Components/test/Microsoft.AspNetCore.Components.Browser.Test/Microsoft.AspNetCore.Components.Browser.Test.csproj +++ b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Test/Microsoft.AspNetCore.Blazor.Test.csproj @@ -14,10 +14,13 @@ - + + + + diff --git a/src/Components/test/Microsoft.AspNetCore.Components.Browser.Test/BrowserUriHelperTest.cs b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Test/WebAssemblyUriHelperTest.cs similarity index 80% rename from src/Components/test/Microsoft.AspNetCore.Components.Browser.Test/BrowserUriHelperTest.cs rename to src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Test/WebAssemblyUriHelperTest.cs index d4a42809aa..45c94a71d2 100644 --- a/src/Components/test/Microsoft.AspNetCore.Components.Browser.Test/BrowserUriHelperTest.cs +++ b/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Test/WebAssemblyUriHelperTest.cs @@ -1,15 +1,14 @@ // 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.Components.Browser.Services; using System; using Xunit; -namespace Microsoft.AspNetCore.Components.Browser.Test +namespace Microsoft.AspNetCore.Blazor.Services.Test { - public class BrowserUriHelperTest + public class WebAssemblyUriHelperTest { - private BrowserUriHelper _browserUriHelper = new BrowserUriHelper(); + private WebAssemblyUriHelper _uriHelper = new WebAssemblyUriHelper(); [Theory] [InlineData("scheme://host/", "scheme://host/")] @@ -19,7 +18,7 @@ namespace Microsoft.AspNetCore.Components.Browser.Test [InlineData("scheme://host/path/page?query=string&another=here", "scheme://host/path/")] public void ComputesCorrectBaseUri(string baseUri, string expectedResult) { - var actualResult = BrowserUriHelper.ToBaseUri(baseUri); + var actualResult = WebAssemblyUriHelper.ToBaseUri(baseUri); Assert.Equal(expectedResult, actualResult); } @@ -32,7 +31,7 @@ namespace Microsoft.AspNetCore.Components.Browser.Test [InlineData("scheme://host/path/", "scheme://host/path", "")] public void ComputesCorrectValidBaseRelativePaths(string baseUri, string absoluteUri, string expectedResult) { - var actualResult = _browserUriHelper.ToBaseRelativePath(baseUri, absoluteUri); + var actualResult = _uriHelper.ToBaseRelativePath(baseUri, absoluteUri); Assert.Equal(expectedResult, actualResult); } @@ -44,7 +43,7 @@ namespace Microsoft.AspNetCore.Components.Browser.Test { var ex = Assert.Throws(() => { - _browserUriHelper.ToBaseRelativePath(baseUri, absoluteUri); + _uriHelper.ToBaseRelativePath(baseUri, absoluteUri); }); Assert.Equal( diff --git a/src/Components/blazor/tooling/Microsoft.VisualStudio.BlazorExtension/Microsoft.VisualStudio.BlazorExtension.csproj b/src/Components/blazor/tooling/Microsoft.VisualStudio.BlazorExtension/Microsoft.VisualStudio.BlazorExtension.csproj index cc6bba7808..335871c2e4 100644 --- a/src/Components/blazor/tooling/Microsoft.VisualStudio.BlazorExtension/Microsoft.VisualStudio.BlazorExtension.csproj +++ b/src/Components/blazor/tooling/Microsoft.VisualStudio.BlazorExtension/Microsoft.VisualStudio.BlazorExtension.csproj @@ -1,7 +1,7 @@ - 15.0 + 16.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) true @@ -130,20 +130,6 @@ - - Microsoft.AspNetCore.Components.Razor.Extensions - False - - - - - - - Microsoft.AspNetCore.Components.Razor.Extensions.dll - true - PreserveNewest - false - {b9f7f502-6dd2-4e77-8fd1-cbd76f695b26} Microsoft.VisualStudio.LanguageServices.Blazor @@ -159,16 +145,6 @@ PreserveNewest false - - - AngleSharp.dll - true - PreserveNewest - false - diff --git a/src/Components/build.cmd b/src/Components/build.cmd index f4169ea5e4..3b0c1b533a 100644 --- a/src/Components/build.cmd +++ b/src/Components/build.cmd @@ -1,3 +1,3 @@ @ECHO OFF SET RepoRoot="%~dp0..\.." -%RepoRoot%\build.cmd -LockFile %RepoRoot%\korebuild-lock.txt -Path %~dp0 %* +%RepoRoot%\build.cmd -All -RepoRoot %~dp0 %* diff --git a/src/Components/build.sh b/src/Components/build.sh old mode 100644 new mode 100755 index d5bb0cf631..1e74b5d6f7 --- a/src/Components/build.sh +++ b/src/Components/build.sh @@ -4,4 +4,4 @@ set -euo pipefail DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" repo_root="$DIR/../.." -"$repo_root/build.sh" --path "$DIR" --lockfile "$repo_root/korebuild-lock.txt" "$@" +"$repo_root/build.sh" -All -RepoRoot "$DIR" "$@" diff --git a/src/Components/build/arcade.props b/src/Components/build/arcade.props index 6f7432c583..f16f0b2bff 100644 --- a/src/Components/build/arcade.props +++ b/src/Components/build/arcade.props @@ -17,7 +17,6 @@ This files is a temporary while this project transitions to using arcade. $(ArtifactsDir)obj\ $(ArtifactsDir)$(Configuration)\ $(ArtifactsConfigurationDir)bin\ - $(ArtifactsDir)build\ diff --git a/src/Components/build/dependencies.props b/src/Components/build/dependencies.props index d7586f1dda..9e3ba7f2cf 100644 --- a/src/Components/build/dependencies.props +++ b/src/Components/build/dependencies.props @@ -9,15 +9,18 @@ 3.0.0-alpha1-20181011.3 2.2.0-preview1-34576 3.0.0-alpha1-10605 + 3.0.0-alpha1-10605 3.0.0-alpha1-10605 - 3.0.0-preview1-26907-05 + 3.0.0-alpha1-10605 + 3.0.0-preview-19057-06 + 0.10.1 3.0.0-alpha1-10605 - 0.8.0-preview1-20181122.3 + 0.8.0-preview-19064-0339 + 3.0.0-preview-19064-0339 2.1.2 - 3.0.0-alpha1-10605 0.8.0-preview1-20181126.1 - 0.8.0-preview1-20181126.1 + 0.8.0-preview1-20181126.4 diff --git a/src/Components/build/repo.props b/src/Components/build/repo.props index eaba6eac81..1bd453eff9 100644 --- a/src/Components/build/repo.props +++ b/src/Components/build/repo.props @@ -1,16 +1,16 @@  + + false + + true - - Internal.AspNetCore.Universe.Lineup - https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json - true @@ -28,8 +28,7 @@ @@ -37,6 +36,9 @@ + + + diff --git a/src/Components/build/sources.props b/src/Components/build/sources.props index fd0526f6dc..9215df9751 100644 --- a/src/Components/build/sources.props +++ b/src/Components/build/sources.props @@ -8,7 +8,6 @@ https://dotnet.myget.org/F/dotnet-core/api/v3/index.json; https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json; https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json; - https://dotnet.myget.org/f/blazor-dev/api/v3/index.json; $(RestoreSources); diff --git a/src/Components/korebuild.json b/src/Components/korebuild.json deleted file mode 100644 index 1770aaf9fc..0000000000 --- a/src/Components/korebuild.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/master/tools/korebuild.schema.json", - "channel": "master", - "toolsets": { - "visualstudio": { - "required": false, - "includePrerelease": true, - "minVersion": "[15.0.26730.03, 16.0)", - "requiredWorkloads": [ - "Microsoft.VisualStudio.Component.VSSDK" - ] - } - } -} diff --git a/src/Components/samples/ComponentsApp.App/App.cshtml b/src/Components/samples/ComponentsApp.App/App.cshtml index c89d889f5e..adfe72aa7d 100644 --- a/src/Components/samples/ComponentsApp.App/App.cshtml +++ b/src/Components/samples/ComponentsApp.App/App.cshtml @@ -1,5 +1,5 @@ - + diff --git a/src/Components/samples/ComponentsApp.App/ComponentsApp.App.csproj b/src/Components/samples/ComponentsApp.App/ComponentsApp.App.csproj index 3626c48519..6e2b68355e 100644 --- a/src/Components/samples/ComponentsApp.App/ComponentsApp.App.csproj +++ b/src/Components/samples/ComponentsApp.App/ComponentsApp.App.csproj @@ -1,16 +1,21 @@ - + - - netstandard2.0 - Exe - + + netstandard2.0 + - - - - + + - - + + + + + + + + + + + - \ No newline at end of file diff --git a/src/Components/samples/ComponentsApp.App/Pages/FetchData.cshtml b/src/Components/samples/ComponentsApp.App/Pages/FetchData.cshtml index b8c8244128..30677449d6 100644 --- a/src/Components/samples/ComponentsApp.App/Pages/FetchData.cshtml +++ b/src/Components/samples/ComponentsApp.App/Pages/FetchData.cshtml @@ -48,14 +48,14 @@ else WeatherForecast[] forecasts; - public override void SetParameters(ParameterCollection parameters) - { - StartDate = DateTime.Now; - base.SetParameters(parameters); - } - protected override async Task OnParametersSetAsync() { + // If no value was given in the URL for StartDate, apply a default + if (StartDate == default) + { + StartDate = DateTime.Now; + } + forecasts = await ForecastService.GetForecastAsync(StartDate); } } diff --git a/src/Components/samples/ComponentsApp.App/Program.cs b/src/Components/samples/ComponentsApp.App/Program.cs deleted file mode 100644 index 152ed2f4c0..0000000000 --- a/src/Components/samples/ComponentsApp.App/Program.cs +++ /dev/null @@ -1,19 +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.Components.Hosting; - -namespace ComponentsApp.App -{ - public class Program - { - public static void Main(string[] args) - { - CreateHostBuilder(args).Build().Run(); - } - - public static IWebAssemblyHostBuilder CreateHostBuilder(string[] args) => - BlazorWebAssemblyHost.CreateDefaultBuilder() - .UseBlazorStartup(); - } -} diff --git a/src/Components/samples/ComponentsApp.App/Shared/NavMenu.cshtml b/src/Components/samples/ComponentsApp.App/Shared/NavMenu.cshtml index c2824be334..0f4a24e362 100644 --- a/src/Components/samples/ComponentsApp.App/Shared/NavMenu.cshtml +++ b/src/Components/samples/ComponentsApp.App/Shared/NavMenu.cshtml @@ -1,5 +1,5 @@ -