diff --git a/.azure/pipelines/benchmarks.yml b/.azure/pipelines/benchmarks.yml new file mode 100644 index 0000000000..6e319f80da --- /dev/null +++ b/.azure/pipelines/benchmarks.yml @@ -0,0 +1,15 @@ +# This configuration builds the repository and runs benchmarks + +# Don't run CI for this config +trigger: none + +jobs: +- template: jobs/default-build.yml + parameters: + jobName: Windows_Build + jobDisplayName: "Build only : Windows" + agentOs: Windows + buildArgs: -ci -all -pack + artifacts: + - path: artifacts/ + includeForks: true diff --git a/.azure/pipelines/ci-official.yml b/.azure/pipelines/ci-official.yml deleted file mode 100644 index 4c268252e6..0000000000 --- a/.azure/pipelines/ci-official.yml +++ /dev/null @@ -1,222 +0,0 @@ -trigger: - branches: - include: - - master - - release/* - exclude: - - release/2.0 - -name: $(Date:yyMMdd)-$(Rev:rr) - -phases: -- phase: Windows - queue: - name: DotNetCore-Windows - timeoutInMinutes: 120 - matrix: - Release: - BuildConfiguration: Release - variables: - CI: true - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true - - # This variable is required by MicroBuildSigningPlugin to determine permissions for codesigning. - TeamName: AspNetCore - - # SignType = { test, real } - # This is prefixed underscore because variables automatically become environment variables (and therefore MSBuild properties), - # and this one was causing issues in MSBuild projects which use the $(SignType) MSbuild prop. - _SignType: real - - steps: - - task: NodeTool@0 - displayName: Install Node 10.x - inputs: - versionSpec: 10.x - - task: MicroBuildSigningPlugin@1 - displayName: Install MicroBuild plugin - condition: and(succeeded(), in(variables['_SignType'], 'test', 'real')) - inputs: - signType: $(_SignType) - zipSources: false - # TODO: configure build.cmd to build both x64 and x86 in one invocation - - script: build.cmd -ci /p:SkipTests=true /p:Configuration=$(BuildConfiguration) /p:BuildNumber=$(Build.BuildNumber) /t:Build /t:BuildSharedFx /p:SharedFxRID=win-x64 /t:BuildFallbackArchive - displayName: Build NuGet packages and win-x64 runtime - - script: build.cmd -ci /p:SkipTests=true /p:Configuration=$(BuildConfiguration) /p:BuildNumber=$(Build.BuildNumber) /t:BuildSharedFx /p:SharedFxRID=win-x86 - displayName: Build win-x86 runtime - - script: build.cmd -ci /p:SkipTests=true /p:Configuration=$(BuildConfiguration) /p:BuildNumber=$(Build.BuildNumber) /t:BuildSharedFx /p:SharedFxRID=win-arm - displayName: Build win-arm runtime - - powershell: > - src/Installers/Windows/clone_and_build_ancm.ps1 - -GitCredential '$(dn-bot-devdiv-build-rw-code-rw)' - -Config $(BuildConfiguration) - -BuildNumber $(Build.BuildNumber) - -SignType $(_SignType) - displayName: Build ANCM installers - # TODO: configure harvesting to run as a part of build.cmd - - powershell: > - src/Installers/Windows/build.ps1 - -x64 artifacts/runtime/aspnetcore-runtime-internal-3.0.0-alpha1-$(Build.BuildNumber)-win-x64.zip - -x86 artifacts/runtime/aspnetcore-runtime-internal-3.0.0-alpha1-$(Build.BuildNumber)-win-x86.zip - -Config $(BuildConfiguration) - -BuildNumber $(Build.BuildNumber) - -SignType $(_SignType) - displayName: Build Windows installers - - task: PublishTestResults@2 - displayName: Publish test results - condition: always() - inputs: - testRunner: vstest - testResultsFiles: 'artifacts/logs/**/*.trx' - - task: PublishBuildArtifacts@1 - displayName: Upload artifacts - condition: eq(variables['system.pullrequest.isfork'], false) - inputs: - pathtoPublish: ./artifacts/ - artifactName: artifacts-Windows-Release - artifactType: Container - # Detect OSS Components in use in the product. Only needs to run on one OS in the matrix. - - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 - displayName: 'Component Detection' - inputs: - # This funky GUID represents the product "ASP.NET and EF Core" - governanceProduct: 'c641993b-8380-e811-80c3-0004ffb4789e' - snapshotForceEnabled: true - - task: MicroBuildCleanup@1 - displayName: Cleanup MicroBuild tasks - condition: always() - -- phase: macOS - dependsOn: Windows - queue: - name: Hosted macOS Preview - matrix: - Release: - BuildConfiguration: Release - variables: - CI: true - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true - steps: - - task: DownloadBuildArtifacts@0 - displayName: Download artifacts - inputs: - artifactName: artifacts-Windows-Release - downloadPath: $(Build.SourcesDirectory)/.deps - itemPattern: '**/*.nupkg' - # Workaround https://github.com/Microsoft/vsts-tasks/issues/6739 - - task: CopyFiles@2 - displayName: Copy package assets to correct folder - inputs: - sourceFolder: $(Build.SourcesDirectory)/.deps/artifacts-Windows-Release - targetFolder: $(Build.SourcesDirectory)/.deps - - script: > - ./build.sh - --ci - /t:Prepare - /t:Restore - /t:GeneratePropsFiles - /t:BuildSharedFx - /p:SharedFxRID=osx-x64 - /p:BuildNumber=$(Build.BuildNumber) - displayName: Build osx-x64 runtime - - task: PublishTestResults@2 - displayName: Publish test results - condition: always() - inputs: - testRunner: vstest - testResultsFiles: 'artifacts/logs/**/*.trx' - - task: PublishBuildArtifacts@1 - displayName: Upload artifacts - condition: eq(variables['system.pullrequest.isfork'], false) - inputs: - pathtoPublish: ./artifacts/ - artifactName: artifacts-macOS-Release - artifactType: Container - -- phase: Linux - dependsOn: - - Windows - - macOS - queue: - name: DotNetCore-Linux - matrix: - Release: - BuildConfiguration: Release - variables: - CI: true - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true - steps: - - task: DownloadBuildArtifacts@0 - displayName: Download artifacts - inputs: - artifactName: artifacts-Windows-Release - downloadPath: $(Build.SourcesDirectory)/.deps - itemPattern: '**/*.nupkg' - - task: DownloadBuildArtifacts@0 - displayName: Download Windows artifacts - inputs: - artifactName: artifacts-Windows-Release - downloadPath: $(Build.SourcesDirectory)/.r - itemPattern: '**/aspnetcore-runtime-*' - - task: DownloadBuildArtifacts@0 - displayName: Download macOS artifacts - inputs: - artifactName: artifacts-macOS-Release - downloadPath: $(Build.SourcesDirectory)/.r - itemPattern: '**/aspnetcore-runtime-*' - # Workaround https://github.com/Microsoft/vsts-tasks/issues/6739 - - task: CopyFiles@2 - displayName: Copy package assets to correct folder - inputs: - sourceFolder: $(Build.SourcesDirectory)/.deps/artifacts-Windows-Release - targetFolder: $(Build.SourcesDirectory)/.deps - # TODO: Make the cumulative zips build in their own step - - task: CopyFiles@2 - displayName: Copy package assets to correct folder - inputs: - sourceFolder: $(Build.SourcesDirectory)/.r/artifacts-Windows-Release - targetFolder: $(Build.SourcesDirectory)/artifacts/ - - task: CopyFiles@2 - displayName: Copy package assets to correct folder - inputs: - sourceFolder: $(Build.SourcesDirectory)/.r/artifacts-macOS-Release - targetFolder: $(Build.SourcesDirectory)/artifacts/ - - script: > - ./build.sh - --ci - /t:Prepare - /t:Restore - /t:GeneratePropsFiles - /t:BuildSharedFx - /p:SharedFxRID=linux-x64 - /p:BuildNumber=$(Build.BuildNumber) - displayName: Build linux-x64 runtime - - script: > - ./build.sh - --ci - /t:BuildSharedFx - /p:SharedFxRID=linux-arm - /p:BuildNumber=$(Build.BuildNumber) - displayName: Build linux-arm runtime - - script: > - ./dockerbuild.sh - alpine - /t:Prepare - /t:GeneratePropsFiles - /t:BuildSharedFx - /p:SharedFxRID=linux-musl-x64 - /p:BuildNumber=$(Build.BuildNumber) - displayName: Build linux-musl-x64 runtime - - task: PublishTestResults@2 - displayName: Publish test results - condition: always() - inputs: - testRunner: vstest - testResultsFiles: 'artifacts/logs/**/*.trx' - - task: PublishBuildArtifacts@1 - displayName: Upload artifacts - condition: eq(variables['system.pullrequest.isfork'], false) - inputs: - pathtoPublish: ./artifacts/ - artifactName: artifacts-Linux-Release - artifactType: Container diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index cb73aafae5..b4bb44fad4 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -1,48 +1,352 @@ -# Don't run CI for this config yet. We're not ready to move official builds on to Azure Pipelines -trigger: none +# +# See https://docs.microsoft.com/en-us/vsts/pipelines/yaml-schema for details on this file. +# + +# Configure which branches trigger builds +trigger: + batch: true + branches: + include: + - master + - release/* + - internal/release/* + - ci/* # Run PR validation on all branches pr: + autoCancel: true branches: include: - '*' jobs: +- job: Code_check + displayName: Code check + workspace: + clean: all + pool: + vmImage: vs2017-win2016 + steps: + - powershell: ./eng/scripts/CodeCheck.ps1 -ci + displayName: Run eng/scripts/CodeCheck.ps1 + +# Build Windows (x64/x86) - template: jobs/default-build.yml parameters: - jobName: Windows_Build - jobDisplayName: "Build and test: Windows" + codeSign: true + jobName: Windows_build + jobDisplayName: "Build: Windows x64/x86" + agentOs: Windows + buildSteps: + - script: "echo ##vso[build.addbuildtag]daily-build" + condition: and(ne(variables['Build.Reason'], 'PullRequest'), ne(variables['IsFinalBuild'], 'true')) + displayName: 'Set CI tags' + - script: "echo ##vso[build.addbuildtag]release-candidate" + condition: and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['IsFinalBuild'], 'true')) + displayName: 'Set CI tags' + # !!! NOTE !!! Some of these steps have disabled code signing. + # This is intentional to workaround https://github.com/dotnet/arcade/issues/1957 which always re-submits for code-signing, even + # if they have already been signed. This results in slower builds due to re-submitting the same .nupkg many times for signing. + # The sign settings have been configured to + + - script: ./eng/scripts/cibuild.cmd -arch x64 /p:DisableCodeSigning=true + displayName: Build x64 + # TODO: make it possible to build for one Windows architecture at a time + # This is going to actually build x86 native assets. See https://github.com/aspnet/AspNetCore/issues/7196 + + # Build the x86 shared framework + # Set DisableSignCheck because we'll run sign check in an explicit step after installers build + - script: ./eng/scripts/cibuild.cmd -arch x86 /t:BuildSharedFx /p:DisableCodeSigning=true + displayName: Build x86 + + # This is in a separate build step with -forceCoreMsbuild to workaround MAX_PATH limitations - https://github.com/Microsoft/msbuild/issues/53 + - script: ./build.cmd -ci -sign -forceCoreMsbuild /p:DisableCodeSigning=true -projects ./src/SiteExtensions/LoggingAggregate/src/Microsoft.AspNetCore.AzureAppServices.SiteExtension/Microsoft.AspNetCore.AzureAppServices.SiteExtension.csproj + displayName: Build SiteExtension + + # This runs code-signing on all packages, zips, and jar files as defined in build/CodeSign.targets. If https://github.com/dotnet/arcade/issues/1957 is resolved, + # consider running code-signing inline with the other previous steps. + # Sign check is disabled because it is run in a separate step below, after installers are built. + - script: ./build.cmd -ci -sign /t:CodeSign /p:SignType=$(_SignType) /p:DisableSignCheck=true + displayName: Code sign packages + + # Windows installers bundle both x86 and x64 assets + - powershell: ./src/Installers/Windows/build.ps1 -ci /p:SignType=$(_SignType) + displayName: Build Installers + + # Run sign check to verify everything was code signed. + - script: ./build.cmd -ci -sign /t:SignCheck /p:SignType=$(_SignType) + displayName: Run sign check + condition: eq(variables['_SignType'], 'real') + + # Detect OSS Components in use in the product. Only needs to run on one OS in the matrix. + - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 + displayName: Detect components + condition: eq(variables['system.pullrequest.isfork'], false) + artifacts: + - name: Windows_Packages + path: artifacts/packages/ + - name: Windows_VSIX + path: artifacts/VSSetup/ + - name: Windows_Manifests + path: artifacts/manifests/ + - name: Windows_Installers + path: artifacts/installers/ + - name: Windows_Logs + path: artifacts/logs/ + publishOnError: true + +# Build Windows ARM +- template: jobs/default-build.yml + parameters: + codeSign: true + jobName: Windows_arm_build + jobDisplayName: "Build: Windows ARM" + agentOs: Windows + buildScript: ./eng/scripts/cibuild.cmd -NoBuildNodeJS -NoBuildJava + buildArgs: -arch arm /p:SignType=$(_SignType) + installNodeJs: false + installJdk: false + afterBuild: + # Remove packages that are not rid-specific. + # TODO add a flag so builds only produce runtime packages + - powershell: gci artifacts/packages/ -recurse -exclude 'runtime.*' -file | rm -ea ignore + artifacts: + - name: Windows_arm_Packages + path: artifacts/packages/ + - name: Windows_arm_Manifests + path: artifacts/manifests/ + - name: Windows_arm_Installers + path: artifacts/installers/ + - name: Windows_arm_Logs + path: artifacts/logs/ + publishOnError: true + +# Build MacOS +- template: jobs/default-build.yml + parameters: + jobName: MacOs_x64_build + jobDisplayName: "Build: macOS" + agentOs: macOs + buildScript: ./eng/scripts/cibuild.sh + buildArgs: --no-build-nodejs --no-build-java + installNodeJs: false + afterBuild: + # Remove packages that are not rid-specific. + # TODO add a flag so macOS/Linux builds only produce runtime packages + - script: if [ -d 'artifacts/packages' ]; then find artifacts/packages/ -type f -not -name 'runtime.*' -delete; fi + condition: always() + artifacts: + - name: MacOS_x64_Packages + path: artifacts/packages/ + - name: MacOS_x64_Manifests + path: artifacts/manifests/ + - name: MacOS_x64_Installers + path: artifacts/installers/ + - name: MacOS_x64_Logs + path: artifacts/logs/ + publishOnError: true +- template: jobs/codesign-xplat.yml + parameters: + inputName: MacOS_x64 + +# Build Linux x64 +- template: jobs/default-build.yml + parameters: + jobName: Linux_x64_build + jobDisplayName: "Build: Linux x64" + agentOs: Linux + installNodeJs: false + buildSteps: + - script: ./eng/scripts/cibuild.sh --arch x64 --no-build-nodejs --no-build-java + displayName: Run cibuild.sh + - script: | + rm -rf .dotnet/ + git clean -xfd src/ + ./dockerbuild.sh bionic \ + --ci --pack --all --no-build-nodejs --no-build-java \ + --arch x64 \ + -e KOREBUILD_SKIP_INSTALL_NETFX=0 \ + /t:BuildSharedFx \ + /p:BuildRuntimeArchive=false \ + /p:LinuxInstallerType=deb + displayName: Build Debian installers + - script: | + rm -rf .dotnet/ + git clean -xfd src/ + ./dockerbuild.sh rhel \ + --ci --pack --all --no-build-nodejs --no-build-java \ + --arch x64 \ + -e KOREBUILD_SKIP_INSTALL_NETFX=0 \ + /t:BuildSharedFx \ + /p:BuildRuntimeArchive=false \ + /p:LinuxInstallerType=rpm + displayName: Build RPM installers + afterBuild: + # Remove packages that are not rid-specific. + # TODO add a flag so macOS/Linux builds only produce runtime packages + - script: if [ -d 'artifacts/packages' ]; then find artifacts/packages/ -type f -not -name 'runtime.*' -delete; fi + condition: always() + artifacts: + - name: Linux_x64_Packages + path: artifacts/packages/ + - name: Linux_x64_Manifests + path: artifacts/manifests/ + - name: Linux_x64_Installers + path: artifacts/installers/ + - name: Linux_x64_Logs + path: artifacts/logs/ + publishOnError: true +- template: jobs/codesign-xplat.yml + parameters: + inputName: Linux_x64 + +# Build Linux ARM +- template: jobs/default-build.yml + parameters: + jobName: Linux_arm_build + jobDisplayName: "Build: Linux ARM" + agentOs: Linux + buildScript: ./eng/scripts/cibuild.sh + buildArgs: --arch arm --no-build-nodejs --no-build-java + installNodeJs: false + afterBuild: + # Remove packages that are not rid-specific. + # TODO add a flag so macOS/Linux builds only produce runtime packages + - script: if [ -d 'artifacts/packages' ]; then find artifacts/packages/ -type f -not -name 'runtime.*' -delete; fi + condition: always() + artifacts: + - name: Linux_arm_Packages + path: artifacts/packages/ + - name: Linux_arm_Manifests + path: artifacts/manifests/ + - name: Linux_arm_Installers + path: artifacts/installers/ + - name: Linux_arm_Logs + path: artifacts/logs/ + publishOnError: true +- template: jobs/codesign-xplat.yml + parameters: + inputName: Linux_arm + +# Build Linux ARM64 +- template: jobs/default-build.yml + parameters: + jobName: Linux_arm64_build + jobDisplayName: "Build: Linux ARM64" + agentOs: Linux + buildScript: ./eng/scripts/cibuild.sh + buildArgs: --arch arm64 --no-build-nodejs --no-build-java + installNodeJs: false + afterBuild: + # Remove packages that are not rid-specific. + # TODO add a flag so macOS/Linux builds only produce runtime packages + - script: if [ -d 'artifacts/packages' ]; then find artifacts/packages/ -type f -not -name 'runtime.*' -delete; fi + condition: always() + artifacts: + - name: Linux_arm64_Packages + path: artifacts/packages/ + - name: Linux_arm64_Manifests + path: artifacts/manifests/ + - name: Linux_arm64_Installers + path: artifacts/installers/ + - name: Linux_arm64_Logs + path: artifacts/logs/ + publishOnError: true +- template: jobs/codesign-xplat.yml + parameters: + inputName: Linux_arm64 + +# Build Linux Musl x64 +- template: jobs/default-build.yml + parameters: + jobName: Linux_musl_x64_build + jobDisplayName: "Build: Linux Musl x64" + agentOs: Linux + buildScript: ./dockerbuild.sh alpine + buildArgs: --ci --pack --all -e KOREBUILD_SKIP_INSTALL_NETFX=0 --arch x64 --os-name linux-musl --no-build-nodejs --no-build-java -p:RepositoryBranch=$(Build.SourceBranchName) + installNodeJs: false + afterBuild: + # Remove packages that are not rid-specific. + # TODO add a flag so macOS/Linux builds only produce runtime packages + - script: if [ -d 'artifacts/packages' ]; then find artifacts/packages/ -type f -not -name 'runtime.*' -delete; fi + condition: always() + artifacts: + - name: Linux_musl_x64_Packages + path: artifacts/packages/ + - name: Linux_musl_x64_Manifests + path: artifacts/manifests/ + - name: Linux_musl_x64_Installers + path: artifacts/installers/ + - name: Linux_musl_x64_Logs + path: artifacts/logs/ + publishOnError: true +- template: jobs/codesign-xplat.yml + parameters: + inputName: Linux_musl_x64 + +# Test jobs +- template: jobs/default-build.yml + parameters: + condition: ne(variables['SkipTests'], 'true') + jobName: Windows_Test + jobDisplayName: "Test: Windows Server 2016 x64" agentOs: Windows buildScript: ./eng/scripts/cibuild.cmd + buildArgs: -test "/p:SkipIISBackwardsCompatibilityTests=true /p:SkipIISTests=true /p:SkipIISExpressTests=true /p:SkipIISForwardsCompatibilityTests=true" beforeBuild: - powershell: "& ./src/Servers/IIS/tools/UpdateIISExpressCertificate.ps1; & ./src/Servers/IIS/tools/update_schema.ps1" displayName: Setup IISExpress test certificates and schema - buildArgs: "/p:SkipIISBackwardsCompatibilityTests=true /p:SkipIISTests=true /p:SkipIISExpressTests=true /p:SkipIISForwardsCompatibilityTests=true" + artifacts: + - name: Windows_Test_Logs + path: artifacts/logs/ + publishOnError: true - template: jobs/default-build.yml parameters: - jobName: MacOs_Build - jobDisplayName: "Build and test: macOS" + condition: ne(variables['SkipTests'], 'true') + jobName: MacOs_Test + jobDisplayName: "Test: macOS 10.13" agentOs: macOs buildScript: ./eng/scripts/cibuild.sh + buildArgs: --test + beforeBuild: + - bash: "./eng/scripts/install-nginx-mac.sh" + displayName: Installing Nginx + artifacts: + - name: MacOS_Test_Logs + path: artifacts/logs/ + publishOnError: true - template: jobs/default-build.yml parameters: - jobName: Linux_Build - jobDisplayName: "Build and test: Linux" + condition: ne(variables['SkipTests'], 'true') + jobName: Linux_Test + jobDisplayName: "Test: Ubuntu 16.04 x64" agentOs: Linux buildScript: ./eng/scripts/cibuild.sh + buildArgs: --test + beforeBuild: + - bash: "./eng/scripts/install-nginx-linux.sh" + displayName: Installing Nginx + artifacts: + - name: Linux_Test_Logs + path: artifacts/logs/ + publishOnError: true - template: jobs/iisintegration-job.yml parameters: + condition: ne(variables['SkipTests'], 'true') TestGroupName: IIS skipArgs: " /p:SkipIISBackwardsCompatibilityTests=true /p:SkipIISTests=false /p:SkipIISExpressTests=true /p:SkipIISForwardsCompatibilityTests=true" - template: jobs/iisintegration-job.yml parameters: + condition: ne(variables['SkipTests'], 'true') TestGroupName: IISExpress skipArgs: "/p:SkipIISBackwardsCompatibilityTests=true /p:SkipIISTests=true /p:SkipIISExpressTests=false /p:SkipIISForwardsCompatibilityTests=true" - template: jobs/iisintegration-job.yml parameters: + condition: ne(variables['SkipTests'], 'true') TestGroupName: IISForwardCompat skipArgs: "/p:SkipIISBackwardsCompatibilityTests=true /p:SkipIISTests=true /p:SkipIISExpressTests=true /p:SkipIISForwardsCompatibilityTests=false" - template: jobs/iisintegration-job.yml parameters: + condition: ne(variables['SkipTests'], 'true') TestGroupName: IISBackCompat - skipArgs: "/p:SkipIISBackwardsCompatibilityTests=false /p:SkipIISTests=true /p:SkipIISExpressTests=true /p:SkipIISForwardsCompatibilityTests=true" \ No newline at end of file + skipArgs: "/p:SkipIISBackwardsCompatibilityTests=false /p:SkipIISTests=true /p:SkipIISExpressTests=true /p:SkipIISForwardsCompatibilityTests=true" diff --git a/.azure/pipelines/e2e-tests.yml b/.azure/pipelines/e2e-tests.yml deleted file mode 100644 index fecf598d59..0000000000 --- a/.azure/pipelines/e2e-tests.yml +++ /dev/null @@ -1,134 +0,0 @@ -trigger: none -phases: -- phase: Host_Windows - queue: - name: Hosted VS2017 - parallel: 8 - matrix: - Portable_Node8: - Test.RuntimeIdentifier: none - Node.Version: 8.x - Portable_Node10: - Test.RuntimeIdentifier: none - Node.Version: 10.x - SelfContainedWindows_Node8: - Test.RuntimeIdentifier: win-x64 - Node.Version: 8.x - SelfContainedWindows_Node10: - Test.RuntimeIdentifier: win-x64 - Node.Version: 10.x - SelfContainedLinux_Node8: - Test.RuntimeIdentifier: linux-x64 - Node.Version: 8.x - SelfContainedLinux_Node10: - Test.RuntimeIdentifier: linux-x64 - Node.Version: 10.x - SelfContainedMacOs_Node8: - Test.RuntimeIdentifier: osx-x64 - Node.Version: 8.x - SelfContainedMacOs_Node10: - Test.RuntimeIdentifier: osx-x64 - Node.Version: 10.x - steps: - - task: NodeTool@0 - displayName: Install Node $(Node.Version) - inputs: - versionSpec: $(Node.Version) - - powershell: | - test/Cli.FunctionalTests/run-tests.ps1 -ci -ProdConManifestUrl $env:PRODCONMANIFESTURL -TestRuntimeIdentifier $(Test.RuntimeIdentifier) -AdditionalRestoreSources $env:ADDITIONALRESTORESOURCES - condition: ne(variables['PB_SkipTests'], 'true') - displayName: Run E2E tests - - task: PublishTestResults@2 - displayName: Publish test results - condition: always() - inputs: - testRunner: vstest - testResultsFiles: 'artifacts/logs/**/*.trx' -- phase: Host_macOS - queue: - name: Hosted macOS - parallel: 8 - matrix: - Portable_Node8: - Test.RuntimeIdentifier: none - Node.Version: 8.x - Portable_Node10: - Test.RuntimeIdentifier: none - Node.Version: 10.x - SelfContainedWindows_Node8: - Test.RuntimeIdentifier: win-x64 - Node.Version: 8.x - SelfContainedWindows_Node10: - Test.RuntimeIdentifier: win-x64 - Node.Version: 10.x - SelfContainedLinux_Node8: - Test.RuntimeIdentifier: linux-x64 - Node.Version: 8.x - SelfContainedLinux_Node10: - Test.RuntimeIdentifier: linux-x64 - Node.Version: 10.x - SelfContainedMacOs_Node8: - Test.RuntimeIdentifier: osx-x64 - Node.Version: 8.x - SelfContainedMacOs_Node10: - Test.RuntimeIdentifier: osx-x64 - Node.Version: 10.x - steps: - - task: NodeTool@0 - displayName: Install Node $(Node.Version) - inputs: - versionSpec: $(Node.Version) - - powershell: | - test/Cli.FunctionalTests/run-tests.ps1 -ci -ProdConManifestUrl $env:PRODCONMANIFESTURL -TestRuntimeIdentifier $(Test.RuntimeIdentifier) -AdditionalRestoreSources $env:ADDITIONALRESTORESOURCES - condition: ne(variables['PB_SkipTests'], 'true') - displayName: Run E2E tests - - task: PublishTestResults@2 - displayName: Publish test results - condition: always() - inputs: - testRunner: vstest - testResultsFiles: 'artifacts/logs/**/*.trx' -- phase: Host_Linux - queue: - name: Hosted Linux Preview - parallel: 8 - matrix: - Portable_Node8: - Test.RuntimeIdentifier: none - Node.Version: 8.x - Portable_Node10: - Test.RuntimeIdentifier: none - Node.Version: 10.x - SelfContainedWindows_Node8: - Test.RuntimeIdentifier: win-x64 - Node.Version: 8.x - SelfContainedWindows_Node10: - Test.RuntimeIdentifier: win-x64 - Node.Version: 10.x - SelfContainedLinux_Node8: - Test.RuntimeIdentifier: linux-x64 - Node.Version: 8.x - SelfContainedLinux_Node10: - Test.RuntimeIdentifier: linux-x64 - Node.Version: 10.x - SelfContainedMacOs_Node8: - Test.RuntimeIdentifier: osx-x64 - Node.Version: 8.x - SelfContainedMacOs_Node10: - Test.RuntimeIdentifier: osx-x64 - Node.Version: 10.x - steps: - - task: NodeTool@0 - displayName: Install Node $(Node.Version) - inputs: - versionSpec: $(Node.Version) - - powershell: | - test/Cli.FunctionalTests/run-tests.ps1 -ci -ProdConManifestUrl $env:PRODCONMANIFESTURL -TestRuntimeIdentifier $(Test.RuntimeIdentifier) -AdditionalRestoreSources $env:ADDITIONALRESTORESOURCES - condition: ne(variables['PB_SkipTests'], 'true') - displayName: Run E2E tests - - task: PublishTestResults@2 - displayName: Publish test results - condition: always() - inputs: - testRunner: vstest - testResultsFiles: 'artifacts/logs/**/*.trx' diff --git a/.azure/pipelines/jobs/codesign-xplat.yml b/.azure/pipelines/jobs/codesign-xplat.yml new file mode 100644 index 0000000000..ca6897f364 --- /dev/null +++ b/.azure/pipelines/jobs/codesign-xplat.yml @@ -0,0 +1,31 @@ +# This runs code signing for .nupkg files built on MacOS or Linux +parameters: + inputName: '' + +jobs: +- template: default-build.yml + parameters: + codeSign: true + dependsOn: + - ${{ parameters.inputName }}_build + condition: in(variables['_SignType'], 'test', 'real') + jobName: CodeSign_Xplat_${{ parameters.inputName }} + jobDisplayName: "Code-sign ${{ parameters.inputName }} packages" + agentOs: Windows + installNodeJs: false + installJdk: false + buildSteps: + - task: DownloadBuildArtifacts@0 + displayName: Download ${{ parameters.inputName }} artifacts + inputs: + artifactName: ${{ parameters.inputName }}_Packages + downloadPath: $(Build.StagingDirectory)/deps/ + itemPattern: '**/*.nupkg' + - task: MSBuild@1 + displayName: Code-sign .nupkg files + inputs: + solution: eng\tools\XplatPackageSigner\XplatPackageSigner.proj + msbuildArguments: /p:SignType=$(_SignType) /p:DirectoryToSign=$(Build.StagingDirectory)\deps\${{ parameters.inputName }}_Packages\ + artifacts: + - name: ${{ parameters.inputName }}_Packages_Signed + path: $(Build.StagingDirectory)\deps\${{ parameters.inputName }}_Packages\ diff --git a/.azure/pipelines/jobs/default-build.yml b/.azure/pipelines/jobs/default-build.yml index 234e7c00c2..825df89f86 100644 --- a/.azure/pipelines/jobs/default-build.yml +++ b/.azure/pipelines/jobs/default-build.yml @@ -14,13 +14,15 @@ # Note: -ci is always passed # beforeBuild: [steps] # Additional steps to run before build.sh/cmd +# buildSteps: [steps] +# Instead of running build.cmd/sh, run these build steps. # afterBuild: [steps] # Additional steps to run after build.sh/cmd -# artifacts: -# publish: boolean -# Should artifacts be published -# path: string +# artifacts: [array] +# - path: string # The file path to artifacts output +# includeForks: boolean +# Should artifacts from forks be published # name: string # The name of the artifact container # variables: { string: string } @@ -29,6 +31,8 @@ # A map of matrix configurations and variables. https://docs.microsoft.com/en-us/vsts/pipelines/yaml-schema?view=vsts#matrix # dependsOn: string | [ string ] # For fan-out/fan-in. https://docs.microsoft.com/en-us/vsts/pipelines/yaml-schema?view=vsts#phase +# condition: string +# A condition which can be used to skip the job completely # codeSign: boolean # This build definition is enabled for code signing. (Only applies to Windows) # buildDirectory: string @@ -46,23 +50,27 @@ parameters: buildArgs: '' configuration: 'Release' beforeBuild: [] + # buildSteps: [] don't define an empty object default because there is no way in template expression yet to check "if isEmpty(parameters.buildSteps)" afterBuild: [] codeSign: false variables: {} dependsOn: '' + condition: '' # jobName: '' - use agentOs by default. # jobDisplayName: '' - use agentOs by default. # matrix: {} - don't define an empty object default because there is no way in template expression yet to check "if isEmpty(parameters.matrix)" - artifacts: - publish: true - path: 'artifacts/' + artifacts: [] buildDirectory: '' buildScript: '' + installNodeJs: true + installJdk: true jobs: - job: ${{ coalesce(parameters.jobName, parameters.agentOs) }} displayName: ${{ coalesce(parameters.jobDisplayName, parameters.agentOs) }} dependsOn: ${{ parameters.dependsOn }} + ${{ if ne(parameters.condition, '') }}: + condition: ${{ parameters.condition }} timeoutInMinutes: 120 workspace: clean: all @@ -73,14 +81,14 @@ jobs: # Map friendly OS names to the right queue # See https://github.com/dotnet/arcade/blob/master/Documentation/ChoosingAMachinePool.md pool: + ${{ if ne(parameters.poolVmImage, '') }}: + vmImage: ${{ parameters.poolVmImage }} + ${{ if and(eq(parameters.poolVmImage, ''), eq(parameters.agentOs, 'macOS')) }}: + vmImage: macOS-10.13 + ${{ if and(eq(parameters.poolVmImage, ''), eq(parameters.agentOs, 'Linux')) }}: + vmImage: ubuntu-16.04 ${{ if ne(parameters.poolName, '') }}: name: ${{ parameters.poolName }} - ${{ if and(eq(parameters.poolName, ''), eq(parameters.agentOs, 'macOS')) }}: - name: Hosted macOS - vmImage: macOS-10.13 - ${{ if and(eq(parameters.poolName, ''), eq(parameters.agentOs, 'Linux')) }}: - name: Hosted Ubuntu 1604 - vmImage: ubuntu-16.04 ${{ if and(eq(parameters.poolName, ''), eq(parameters.agentOs, 'Windows')) }}: ${{ if eq(variables['System.TeamProject'], 'internal') }}: name: dotnet-internal-temp @@ -94,22 +102,23 @@ jobs: BuildScriptArgs: ${{ parameters.buildArgs }} BuildConfiguration: ${{ parameters.configuration }} BuildDirectory: ${{ parameters.buildDirectory }} + TeamName: AspNetCore ${{ if eq(parameters.agentOs, 'Windows') }}: JAVA_HOME: $(Agent.BuildDirectory)\.tools\jdk ${{ if or(ne(parameters.codeSign, 'true'), ne(variables['System.TeamProject'], 'internal')) }}: - _SignType: + _SignType: '' ${{ if and(eq(parameters.codeSign, 'true'), eq(variables['System.TeamProject'], 'internal')) }}: - TeamName: AspNetCore _SignType: real ${{ insert }}: ${{ parameters.variables }} steps: - checkout: self clean: true - - task: NodeTool@0 - displayName: Install Node 10.x - inputs: - versionSpec: 10.x - - ${{ if eq(parameters.agentOs, 'Windows') }}: + - ${{ if eq(parameters.installNodeJs, 'true') }}: + - task: NodeTool@0 + displayName: Install Node 10.x + inputs: + versionSpec: 10.x + - ${{ if and(eq(parameters.installJdk, 'true'), 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')) }}: @@ -120,17 +129,31 @@ jobs: signType: $(_SignType) zipSources: false feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json + - ${{ parameters.beforeBuild }} - - ${{ if eq(parameters.buildScript, '') }}: - - ${{ if eq(parameters.agentOs, 'Windows') }}: - - script: .\$(BuildDirectory)\build.cmd -ci /p:SignType=$(_SignType) /p:Configuration=$(BuildConfiguration) $(BuildScriptArgs) - displayName: Run build.cmd - - ${{ if ne(parameters.agentOs, 'Windows') }}: - - script: ./$(BuildDirectory)/build.sh -ci -p:Configuration=$(BuildConfiguration) $(BuildScriptArgs) - displayName: Run build.sh - - ${{ if ne(parameters.buildScript, '') }}: - - script: $(BuildScript) /p:Configuration=$(BuildConfiguration) $(BuildScriptArgs) - displayName: run $(BuildScript) + + - ${{ if ne(parameters.buildSteps, '')}}: + - ${{ parameters.buildSteps }} + - ${{ if eq(parameters.buildSteps, '')}}: + - ${{ if eq(parameters.buildScript, '') }}: + - ${{ if eq(parameters.agentOs, 'Windows') }}: + - script: .\$(BuildDirectory)\build.cmd -ci /p:SignType=$(_SignType) /p:Configuration=$(BuildConfiguration) $(BuildScriptArgs) + displayName: Run build.cmd + - powershell: eng\scripts\KillProcesses.ps1 + displayName: Kill processes + condition: always() + - ${{ if ne(parameters.agentOs, 'Windows') }}: + - script: ./$(BuildDirectory)/build.sh -ci -p:Configuration=$(BuildConfiguration) $(BuildScriptArgs) + displayName: Run build.sh + - script: eng/scripts/KillProcesses.sh + displayName: Kill processes + condition: always() + - ${{ if ne(parameters.buildScript, '') }}: + - script: $(BuildScript) /p:Configuration=$(BuildConfiguration) $(BuildScriptArgs) + displayName: run $(BuildScript) + + - ${{ parameters.afterBuild }} + - task: PublishTestResults@2 displayName: Publish test results condition: always() @@ -140,23 +163,23 @@ jobs: testRunner: vstest testResultsFiles: '**/artifacts/**/*.trx' mergeTestResults: true - - ${{ if eq(parameters.artifacts.publish, 'true') }}: + - ${{ each artifact in parameters.artifacts }}: - task: PublishBuildArtifacts@1 - displayName: Upload artifacts - condition: eq(variables['system.pullrequest.isfork'], false) + displayName: Upload artifacts from ${{ artifact.path }} + condition: and(or(succeeded(), eq('${{ artifact.publishOnError }}', 'true')), or(eq(variables['system.pullrequest.isfork'], false), eq('${{ artifact.includeForks }}', 'true'))) continueOnError: true inputs: ${{ if eq(parameters.buildDirectory, '') }}: - pathtoPublish: ${{ parameters.artifacts.path }} + pathtoPublish: ${{ artifact.path }} ${{ if ne(parameters.buildDirectory, '') }}: - pathtoPublish: ${{ parameters.buildDirectory }}\${{ parameters.artifacts.path }} - ${{ if eq(parameters.artifacts.name, '') }}: + pathtoPublish: ${{ parameters.buildDirectory }}\${{ artifact.path }} + ${{ if eq(artifact.name, '') }}: artifactName: artifacts-$(AgentOsName)-$(BuildConfiguration) - ${{ if ne(parameters.artifacts.name, '') }}: - artifactName: ${{ parameters.artifacts.name }} + ${{ if ne(artifact.name, '') }}: + artifactName: ${{ artifact.name }} artifactType: Container parallel: true - - ${{ parameters.afterBuild }} + - ${{ if and(eq(variables['System.TeamProject'], 'internal'), eq(parameters.agentOs, 'Windows')) }}: - task: MicroBuildCleanup@1 displayName: Cleanup MicroBuild tasks diff --git a/.azure/pipelines/jobs/iisintegration-job.yml b/.azure/pipelines/jobs/iisintegration-job.yml index 3ee3a2a307..281bca5278 100644 --- a/.azure/pipelines/jobs/iisintegration-job.yml +++ b/.azure/pipelines/jobs/iisintegration-job.yml @@ -1,14 +1,20 @@ jobs: - template: default-build.yml parameters: - buildScript: ./build.cmd - buildArgs: "-ci -restore -build -test -projects src/Servers/IIS/**/*.csproj ${{ parameters.skipArgs }}" + buildScript: .\build.cmd + buildArgs: "-ci -test -projects src/Servers/IIS/**/*.csproj ${{ parameters.skipArgs }}" + poolName: "Hosted VS2017" + poolVmImage: "vs2017-win2016" beforeBuild: - - powershell: "& ./src/Servers/IIS/tools/UpdateIISExpressCertificate.ps1; & ./src/Servers/IIS/tools/update_schema.ps1; & ./src/Servers/IIS/tools/SetupTestEnvironment.ps1 Setup" + - powershell: "& ./src/Servers/IIS/tools/InstallIISFeatures.ps1; & ./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/Servers/IIS/tools/SetupTestEnvironment.ps1 Shutdown" displayName: Stop AppVerifier condition: always() jobName: ANCM_${{ parameters.TestGroupName }} - jobDisplayName: "Build and test: ANCM ${{ parameters.TestGroupName }}" + jobDisplayName: "Test: ANCM ${{ parameters.TestGroupName }}" + artifacts: + - name: IIS_${{ parameters.TestGroupName }}_Logs + path: artifacts/logs/ + publishOnError: true diff --git a/.azure/pipelines/pr-validation-temp.yml b/.azure/pipelines/pr-validation-temp.yml deleted file mode 100644 index 218598aaeb..0000000000 --- a/.azure/pipelines/pr-validation-temp.yml +++ /dev/null @@ -1,38 +0,0 @@ -# This configuration is temporary while we work on getting all unit tests to pass on PR checks - -# Don't run CI for this config -trigger: none - -# Run PR validation on all branches -pr: - branches: - include: - - '*' - -jobs: -- template: jobs/default-build.yml - parameters: - jobName: Windows_Build - jobDisplayName: "Build only : Windows" - agentOs: Windows - buildArgs: -all -pack -- template: jobs/default-build.yml - parameters: - jobName: macOs_Build - jobDisplayName: "Build only : macOS" - agentOs: macOS - buildArgs: --all --pack -- template: jobs/default-build.yml - parameters: - jobName: Linux_Build - jobDisplayName: "Build only : Linux" - agentOs: Linux - 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/signalr-daily-tests.yml b/.azure/pipelines/signalr-daily-tests.yml index 1b13105f63..2e74597f73 100644 --- a/.azure/pipelines/signalr-daily-tests.yml +++ b/.azure/pipelines/signalr-daily-tests.yml @@ -10,7 +10,7 @@ jobs: - template: jobs/default-build.yml parameters: buildDirectory: src/SignalR - buildArgs: "/p:DailyTests=true /p:SauceUser='$(asplab-sauce-labs-username)' /p:SauceKey='$(asplab-sauce-labs-access-key)'" + buildArgs: "/p:DailyTests=true /p:SauceUser='$(asplab-sauce-labs-username)' /p:SauceKey='$(asplab-sauce-labs-access-key)' -t" agentOs: Windows jobName: SignalRDailyTests jobDisplayName: "SignalR Daily Tests" diff --git a/.azure/pipelines/site-extensions.yml b/.azure/pipelines/site-extensions.yml deleted file mode 100644 index 3d1359e56a..0000000000 --- a/.azure/pipelines/site-extensions.yml +++ /dev/null @@ -1,43 +0,0 @@ -trigger: - branches: - include: - - release/2.2 - paths: - include: - - src/SiteExtensions - -name: $(Date:yyMMdd)-$(Rev:rr) - -phases: -- phase: SiteExtensions - variables: - CI: true - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true - - # This variable is required by MicroBuildSigningPlugin to determine permissions for codesigning. - TeamName: AspNetCore - - # SignType = { test, real } - # This is prefixed underscore because variables automatically become environment variables (and therefore MSBuild properties), - # and this one was causing issues in MSBuild projects which use the $(SignType) MSbuild prop. - _SignType: real - - steps: - - task: MicroBuildSigningPlugin@1 - displayName: Install MicroBuild plugin - condition: and(succeeded(), in(variables['_SignType'], 'test', 'real')) - inputs: - signType: $(_SignType) - zipSources: false - - 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/LoggingAggregate/artifacts/ - artifactName: artifacts-Windows-Release - artifactType: Container - - task: MicroBuildCleanup@1 - displayName: Cleanup MicroBuild tasks - condition: always() diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 9fba304d8e..093a4fcdaa 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -6,7 +6,9 @@ /src/Components/ @SteveSandersonMS /src/DefaultBuilder/ @tratcher /src/Hosting/ @tratcher -/src/Http/ @tratcher +/src/Http/ @tratcher @jkotalik /src/Middleware/ @tratcher /src/Security/ @tratcher -/src/Servers/ @tratcher +/src/Servers/ @tratcher @jkotalik +/src/Middleware/Rewrite @jkotalik +/src/Middleware/HttpsPolicy @jkotalik diff --git a/.gitignore b/.gitignore index 469825be56..0f57015b8c 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,6 @@ korebuild-lock.txt .gradle/ src/SignalR/clients/**/dist/ modules/ + +# Template config files for blazor templates is generated on-build +src/Components/**/.template.config/ diff --git a/Directory.Build.props b/Directory.Build.props index a213e4ada3..406abcec72 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -53,6 +53,25 @@ true true Debug + AnyCPU + $(Platform) + win + osx + linux + x64 + $(TargetOsName)-$(TargetArchitecture) + + + + win-x64; + win-x86; + win-arm; + osx-x64; + linux-musl-x64; + linux-x64; + linux-arm; + linux-arm64 + SHA256 @@ -61,19 +80,12 @@ false + + + strict - - - Microsoft400 - 3PartySHA2 - Microsoft400 - NuGet - VsixSHA2 - MicrosoftJAR - - - + @@ -81,19 +93,29 @@ $(MSBuildThisFileDirectory)artifacts\ $(ArtifactsDir)obj\ $(ArtifactsDir)$(Configuration)\ - $(ArtifactsConfigurationDir)packages\ - $(BasePackageOutputPath)product\ - $(BasePackageOutputPath)internal\ - $(ArtifactsConfigurationDir)installers\ + $(ArtifactsDir)packages\$(Configuration)\ + $(ArtifactsPackagesDir)Shipping\ + $(ArtifactsPackagesDir)NonShipping\ + $(ArtifactsDir)installers\$(Configuration)\ + $(ArtifactsDir)VSSetup\$(Configuration)\ + + + + + + + + - $(RepositoryRoot)bin\$(Configuration)\$(MSBuildProjectName)\ - $(BaseOutputPath) + $(RepositoryRoot)bin\$(MSBuildProjectName)\ + $(BaseOutputPath)$(Configuration)\ + $(BaseOutputPath)$(PlatformName)\$(Configuration)\ + $(RepositoryRoot)obj\$(MSBuildProjectName)\ - $(BaseIntermediateOutputPath)$(Configuration)\ - $(OutputPath)$(Platform)\ - $(IntermediateOutputPath)$(Platform)\ + $(BaseIntermediateOutputPath)$(Configuration)\ + $(BaseIntermediateOutputPath)$(PlatformName)\$(Configuration)\ @@ -112,12 +134,13 @@ $(MSBuildThisFileDirectory)src\Mvc\src\Microsoft.AspNetCore.Mvc.Testing\Microsoft.AspNetCore.Mvc.Testing.targets + + true - diff --git a/Directory.Build.targets b/Directory.Build.targets index de6e19d8e2..1654fd256f 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -6,10 +6,10 @@ By default, all projects which produce packages are not intended to ship to NuGet.org as a product package. Packages which are intended to ship to NuGet.org must opt-in by setting this to true in the project file. --> - false + false - $(ProductPackageOutputPath) - $(InternalPackageOutputPath) + $(ArtifactsShippingPackagesDir) + $(ArtifactsNonShippingPackagesDir) @@ -20,8 +20,6 @@ - - true $(PackagesInPatch.Contains(' $(PackageId);')) diff --git a/build.cmd b/build.cmd index b6c8d24864..592b5d0f95 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 = '';& '%~dp0build.ps1' %*; exit $LASTEXITCODE" +PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = ''; try { & '%~dp0build.ps1' %*; exit $LASTEXITCODE } catch { write-host $_; exit 1 }" diff --git a/build.ps1 b/build.ps1 index 2d08643422..578129a9ac 100644 --- a/build.ps1 +++ b/build.ps1 @@ -9,17 +9,17 @@ This build script installs required tools and runs an MSBuild command on this re 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. +Run restore. -.PARAMETER Build -Compile projects. +.PARAMETER NoRestore +Suppress running restore on projects. + +.PARAMETER NoBuild +Suppress re-compile projects. (Implies -NoRestore) .PARAMETER Pack Produce packages. @@ -30,23 +30,34 @@ Run tests. .PARAMETER Sign Run code signing. +.PARAMETER Architecture +The CPU architecture to build for (x64, x86, arm). Default=x64 + .PARAMETER Projects A list of projects to build. Globbing patterns are supported, such as "$(pwd)/**/*.csproj" .PARAMETER All Build all project types. -.PARAMETER Managed +.PARAMETER BuildManaged Build managed projects (C#, F#, VB). +You can also use -NoBuildManaged to suppress this project type. -.PARAMETER Native +.PARAMETER BuildNative Build native projects (C++). +You can also use -NoBuildNative to suppress this project type. -.PARAMETER NodeJS +.PARAMETER BuildNodeJS Build NodeJS projects (TypeScript, JS). +You can also use -NoBuildNodeJS to suppress this project type. -.PARAMETER Installers +.PARAMETER BuildJava +Build Java projects. +You can also use -NoBuildJava to suppress this project type. + +.PARAMETER BuildInstallers Build Windows Installers. Required .NET 3.5 to be installed (WiX toolset requirement). +You can also use -NoBuildInstallers to suppress this project type. .PARAMETER MSBuildArguments Additional MSBuild arguments to be passed through. @@ -54,7 +65,7 @@ Additional MSBuild arguments to be passed through. .EXAMPLE Building both native and managed projects. - build.ps1 -managed -native + build.ps1 -BuildManaged -BuildNative .EXAMPLE Building a subfolder of code. @@ -71,36 +82,38 @@ Online version: https://github.com/aspnet/AspNetCore/blob/master/docs/BuildFromS #> [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]$Restore, + [switch]$NoRestore, # Suppress restore + [switch]$NoBuild, # Suppress compiling [switch]$Pack, # Produce packages [switch]$Test, # Run tests [switch]$Sign, # Code sign - # Project selection - [Parameter(ParameterSetName = 'All')] - [switch]$All, # Build everything + [ValidateSet('x64', 'x86', 'arm')] + $Architecture = 'x64', # A list of projects which should be built. - [Parameter(ParameterSetName = 'Projects')] [string]$Projects, + # Project selection + [switch]$All, # Build everything + # Build a specified set of project groups - [Parameter(ParameterSetName = 'Groups')] - [switch]$Managed, - [Parameter(ParameterSetName = 'Groups')] - [switch]$Native, - [Parameter(ParameterSetName = 'Groups')] - [switch]$NodeJS, - [Parameter(ParameterSetName = 'Groups')] - [switch]$Installers, + [switch]$BuildManaged, + [switch]$BuildNative, + [switch]$BuildNodeJS, + [switch]$BuildJava, + [switch]$BuildInstallers, + + # Inverse of the previous switches because specifying '-switch:$false' is not intuitive for most command line users + [switch]$NoBuildManaged, + [switch]$NoBuildNative, + [switch]$NoBuildNodeJS, + [switch]$NoBuildJava, + [switch]$NoBuildInstallers, # By default, Windows builds will use MSBuild.exe. Passing this will force the build to run on # dotnet.exe instead, which may cause issues if you invoke build on a project unsupported by @@ -203,7 +216,6 @@ if ($Help) { exit 1 } -$RepoRoot = Resolve-Path $RepoRoot $Channel = 'master' $ToolsSource = 'https://aspnetcore.blob.core.windows.net/buildtools' $ConfigFile = Join-Path $PSScriptRoot 'korebuild.json' @@ -213,8 +225,8 @@ 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} + if (Get-Member -Name 'channel' -InputObject $config) { [string] $Channel = $config.channel } + if (Get-Member -Name 'toolsSource' -InputObject $config) { [string] $ToolsSource = $config.toolsSource} } } catch { Write-Warning "$ConfigFile could not be read. Its settings will be ignored." @@ -245,35 +257,52 @@ elseif ($Projects) { } $MSBuildArguments += "/p:Projects=$Projects" } -else { - # When adding new sub-group build flags, add them to this check. - if((-not $Native) -and (-not $Managed) -and (-not $NodeJS) -and (-not $Installers)) { - Write-Warning "No default group of projects was specified, so building the 'managed' and 'native' subsets of projects. Run ``build.cmd -help`` for more details." +# When adding new sub-group build flags, add them to this check. +elseif((-not $BuildNative) -and (-not $BuildManaged) -and (-not $BuildNodeJS) -and (-not $BuildInstallers) -and (-not $BuildJava)) { + Write-Warning "No default group of projects was specified, so building the 'managed' and 'native' subsets of projects. Run ``build.cmd -help`` for more details." - # This goal of this is to pick a sensible default for `build.cmd` with zero arguments. - # Now that we support subfolder invokations of build.cmd, we will be pushing to have build.cmd build everything (-all) by default + # This goal of this is to pick a sensible default for `build.cmd` with zero arguments. + # Now that we support subfolder invokations of build.cmd, we will be pushing to have build.cmd build everything (-all) by default - $Managed = $true - $Native = $true - } - - $MSBuildArguments += "/p:BuildManaged=$Managed" - $MSBuildArguments += "/p:BuildNative=$Native" - $MSBuildArguments += "/p:BuildNodeJS=$NodeJS" - $MSBuildArguments += "/p:BuildWindowsInstallers=$Installers" + $BuildManaged = $true + $BuildNative = $true } +if ($BuildInstallers) { $MSBuildArguments += "/p:BuildInstallers=true" } +if ($BuildManaged) { $MSBuildArguments += "/p:BuildManaged=true" } +if ($BuildNative) { $MSBuildArguments += "/p:BuildNative=true" } +if ($BuildNodeJS) { $MSBuildArguments += "/p:BuildNodeJS=true" } +if ($BuildJava) { $MSBuildArguments += "/p:BuildJava=true" } + +if ($NoBuildInstallers) { $MSBuildArguments += "/p:BuildInstallers=false" } +if ($NoBuildManaged) { $MSBuildArguments += "/p:BuildManaged=false" } +if ($NoBuildNative) { $MSBuildArguments += "/p:BuildNative=false" } +if ($NoBuildNodeJS) { $MSBuildArguments += "/p:BuildNodeJS=false" } +if ($NoBuildJava) { $MSBuildArguments += "/p:BuildJava=false" } + +$RunBuild = if ($NoBuild) { $false } else { $true } + +# Run restore by default unless -NoRestore is set. +# -NoBuild implies -NoRestore, unless -Restore is explicitly set (as in restore.cmd) +$RunRestore = if ($NoRestore) { $false } + elseif ($Restore) { $true } + elseif ($NoBuild) { $false } + else { $true } + # Target selection -$MSBuildArguments += "/p:_RunRestore=$Restore" -$MSBuildArguments += "/p:_RunBuild=$Build" +$MSBuildArguments += "/p:_RunRestore=$RunRestore" +$MSBuildArguments += "/p:_RunBuild=$RunBuild" $MSBuildArguments += "/p:_RunPack=$Pack" $MSBuildArguments += "/p:_RunTests=$Test" $MSBuildArguments += "/p:_RunSign=$Sign" +$MSBuildArguments += "/p:TargetArchitecture=$Architecture" +$MSBuildArguments += "/p:TargetOsName=win" + Import-Module -Force -Scope Local (Join-Path $korebuildPath 'KoreBuild.psd1') try { - Set-KoreBuildSettings -ToolsSource $ToolsSource -DotNetHome $DotNetHome -RepoPath $RepoRoot -ConfigFile $ConfigFile -CI:$CI + Set-KoreBuildSettings -ToolsSource $ToolsSource -DotNetHome $DotNetHome -RepoPath $PSScriptRoot -ConfigFile $ConfigFile -CI:$CI if ($ForceCoreMsbuild) { $global:KoreBuildSettings.MSBuildType = 'core' } diff --git a/build.sh b/build.sh index 3f99fddf97..bf5e54e8b0 100755 --- a/build.sh +++ b/build.sh @@ -14,20 +14,30 @@ 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' +target_os_name='' ci=false run_restore=true run_build=true run_pack=false run_tests=false build_all=false -build_managed=false -build_nodejs=false +build_managed='' +build_native='' +build_nodejs='' +build_java='' build_projects='' +target_arch='x64' + +if [ "$(uname)" = "Darwin" ]; then + target_os_name='osx' +else + target_os_name='linux' +fi + msbuild_args=() # @@ -37,23 +47,28 @@ __usage() { echo "Usage: $(basename "${BASH_SOURCE[0]}") [options] [[--] ...] Arguments: - ... Arguments passed to the command. Variable number of arguments allowed. + ... Arguments passed to the command. Variable number of arguments allowed. Options: - --[no-]restore Run restore. - --[no-]build Compile projects - --[no-]pack Produce packages. - --[no-]test Run tests. + --arch The CPU architecture to build for (x64, arm, arm64). Default=$target_arch + --os-name The base runtime identifier to build for (linux, osx, linux-musl). Default=$target_os_name - --projects A list of projects to build. (Must be an absolute path.) - Globbing patterns are supported, such as \"$(pwd)/**/*.csproj\". + --[no-]restore Run restore. + --[no-]build Compile projects. (Implies --no-restore) + --[no-]pack Produce packages. + --[no-]test Run tests. - --all Build all project types. - --managed Build managed projects (C#, F#, VB). - --nodejs Build NodeJS projects (TypeScript, JS). + --projects A list of projects to build. (Must be an absolute path.) + Globbing patterns are supported, such as \"$(pwd)/**/*.csproj\". - --ci Apply CI specific settings and environment variables. - --verbose Show verbose output. + --all Build all project types. + --[no-]build-native Build native projects (C, C++). + --[no-]build-managed Build managed projects (C#, F#, VB). + --[no-]build-nodejs Build NodeJS projects (TypeScript, JS). + --[no-]build-java Build Java projects. + + --ci Apply CI specific settings and environment variables. + --verbose Show verbose output. Description: This build script installs required tools and runs an MSBuild command on this repository @@ -151,11 +166,15 @@ while [[ $# -gt 0 ]]; do __usage --no-exit exit 0 ;; - --repo-root|-RepoRoot) + --arch) 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 + target_arch="${1:-}" + [ -z "$target_arch" ] && __error "Missing value for parameter --arch" && __usage + ;; + --os-name) + shift + target_os_name="${1:-}" + [ -z "$target_os_name" ] && __error "Missing value for parameter --os-name" && __usage ;; --restore|-[Rr]estore) run_restore=true @@ -168,6 +187,8 @@ while [[ $# -gt 0 ]]; do ;; --no-build) run_build=false + # --no-build implies --no-restore + run_restore=false ;; --pack|-[Pp]ack) run_pack=true @@ -189,14 +210,29 @@ while [[ $# -gt 0 ]]; do --all|-[Aa]ll) build_all=true ;; - --managed|-[Mm]anaged) + --build-managed|-BuildManaged) build_managed=true ;; - --nodejs|-[Nn]ode[Jj][Ss]) + --no-build-managed|-NoBuildManaged) + build_managed=false + ;; + --build-nodejs|-BuildNodeJs) build_nodejs=true ;; - --native|-[Nn]ative) - __warn 'The C++ projects in this repo only build on Windows. The --native flag will be ignored.' + --no-build-nodejs|-NoBuildNodeJs) + build_nodejs=false + ;; + --build-java|-BuildJava) + build_java=true + ;; + --no-build-java|-NoBuildJava) + build_java=false + ;; + --build-native|-BuildNative) + build_native=true + ;; + --no-build-native|-NoBuildNative) + build_native=false ;; --ci|-[Cc][Ii]) ci=true @@ -259,25 +295,31 @@ if [ "$build_all" = true ]; then msbuild_args[${#msbuild_args[*]}]="-p:BuildAllProjects=true" elif [ ! -z "$build_projects" ]; then msbuild_args[${#msbuild_args[*]}]="-p:Projects=$build_projects" -else - # When adding new sub-group build flags, add them to this check - if [ "$build_managed" = false ] && [ "$build_nodejs" = false ]; then - # This goal of this is to pick a sensible default for `build.sh` with zero arguments. - # We believe the most common thing our contributors will work on is C#, so if no other build group was picked, build the C# projects. - __warn "No default group of projects was specified, so building the 'managed' subset of projects. Run ``build.sh -help`` for more details." - build_managed=true - fi - - msbuild_args[${#msbuild_args[*]}]="-p:BuildManaged=$build_managed" - msbuild_args[${#msbuild_args[*]}]="-p:BuildNodeJS=$build_nodejs" +elif [ -z "$build_managed" ] && [ -z "$build_nodejs" ] && [ -z "$build_java" ] && [ -z "$build_native" ]; then + # This goal of this is to pick a sensible default for `build.sh` with zero arguments. + # We believe the most common thing our contributors will work on is C#, so if no other build group was picked, build the C# projects. + __warn "No default group of projects was specified, so building the 'managed' subset of projects. Run ``build.sh -help`` for more details." + build_managed=true fi +# Only set these MSBuild properties if they were explicitly set by build parameters. +[ ! -z "$build_java" ] && msbuild_args[${#msbuild_args[*]}]="-p:BuildJava=$build_java" +[ ! -z "$build_native" ] && msbuild_args[${#msbuild_args[*]}]="-p:BuildNative=$build_native" +[ ! -z "$build_nodejs" ] && msbuild_args[${#msbuild_args[*]}]="-p:BuildNodeJS=$build_nodejs" +[ ! -z "$build_managed" ] && msbuild_args[${#msbuild_args[*]}]="-p:BuildManaged=$build_managed" + msbuild_args[${#msbuild_args[*]}]="-p:_RunRestore=$run_restore" msbuild_args[${#msbuild_args[*]}]="-p:_RunBuild=$run_build" msbuild_args[${#msbuild_args[*]}]="-p:_RunPack=$run_pack" msbuild_args[${#msbuild_args[*]}]="-p:_RunTests=$run_tests" -set_korebuildsettings "$tools_source" "$DOTNET_HOME" "$repo_path" "$config_file" "$ci" +msbuild_args[${#msbuild_args[*]}]="-p:TargetArchitecture=$target_arch" +msbuild_args[${#msbuild_args[*]}]="-p:TargetOsName=$target_os_name" + +# Disable downloading ref assemblies as a tarball. Use netfx refs from the Microsoft.NETFramework.ReferenceAssemblies NuGet package instead. +[ -z "${KOREBUILD_SKIP_INSTALL_NETFX:-}" ] && KOREBUILD_SKIP_INSTALL_NETFX=1 + +set_korebuildsettings "$tools_source" "$DOTNET_HOME" "$DIR" "$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 diff --git a/build/AzureIntegration.targets b/build/AzureIntegration.targets index bf9fbc0389..90961cf1f4 100644 --- a/build/AzureIntegration.targets +++ b/build/AzureIntegration.targets @@ -3,13 +3,11 @@ $(MSBuildThisFileDirectory)..\src\AzureIntegration\ - + AspNetUniverseBuildOffline=true; RepositoryRoot=$(AzureIntegrationProjectRoot); - DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcesPropsPath); - DotNetPackageVersionPropsPath=$(GeneratedPackageVersionPropsPath); VersionSuffix=$(VersionSuffix); BuildNumberSuffix=$(BuildNumberSuffix); Configuration=$(Configuration); @@ -25,7 +23,7 @@ - + diff --git a/build/CodeSign.props b/build/CodeSign.props index 6aef3ba9c4..7f5d4a527d 100644 --- a/build/CodeSign.props +++ b/build/CodeSign.props @@ -1,85 +1,55 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/build/CodeSign.targets b/build/CodeSign.targets index fecc25ee41..6827c8c2a4 100644 --- a/build/CodeSign.targets +++ b/build/CodeSign.targets @@ -4,71 +4,34 @@ $(CodeSignDependsOn);CollectFileSignInfo - - - - <_RepositoryProject Remove="@(_RepositoryProject)" /> - <_RepositoryProject Include="$(MSBuildProjectFullPath)" Condition="'%(Repository.Identity)' != ''"> - RepositoryRoot=%(Repository.RootPath) - %(Repository.Build) - - <_ShippedRepositoryProject Include="$(MSBuildProjectFullPath)" Condition="'%(ShippedRepository.Identity)' != ''"> - RepositoryRoot=%(ShippedRepository.RootPath) - false - - - + - - AssemblySigningCertName=$(AssemblySigningCertName); - AssemblySigning3rdPartyCertName=$(AssemblySigning3rdPartyCertName); - PowerShellSigningCertName=$(PowerShellSigningCertName); - PackageSigningCertName=$(PackageSigningCertName); - VsixSigningCertName=$(VsixSigningCertName); - JarSigningCertName=$(JarSigningCertName); - ArtifactsDir=$(ArtifactsDir) - + $(IntermediateDir)ar\ + $(BaseRedistNetCorePath)$(TargetRuntimeIdentifier)\ - - - - - - - - - <_FilesToSign Include="@(_RepoFileSignInfo)" Condition="'%(_RepoFileSignInfo.IsFileToSign)' == 'true' AND ('$(_ReposWereBuilt)' == 'true' OR '%(_RepoFileSignInfo.Container)' != '' ) " /> - <_FilesToSign Include="@(_ShippedRepoFileSignInfo)" Condition="'%(_ShippedRepoFileSignInfo.IsFileToSign)' == 'true' AND '%(_ShippedRepoFileSignInfo.Container)' != '' " /> - + + + + + + - - <_Temp Remove="@(_Temp)" /> - <_Temp Include="@(FilesToExcludeFromSigning)" /> - - - <_Temp Remove="@(_Temp)" /> - - - - - - - - - - - <_FileSignInfo Include="@(FilesToSign)" IsFileToSign="true" /> - <_FileSignInfo Include="@(FilesToExcludeFromSigning)" IsFileToExcludeFromSign="true" /> + + + + + + + + + + diff --git a/build/Maestro/Maestro.csproj b/build/Maestro/Maestro.csproj new file mode 100644 index 0000000000..e9af762aa8 --- /dev/null +++ b/build/Maestro/Maestro.csproj @@ -0,0 +1,37 @@ + + + + + netcoreapp3.0 + true + $(ArtifactsDir)manifests\ + true + + + + + + + + + + + + NonShipping=true + + + + + + + + + + diff --git a/build/Publish.targets b/build/Publish.targets deleted file mode 100644 index fa3e8c9d77..0000000000 --- a/build/Publish.targets +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - diff --git a/build/RepositoryBuild.targets b/build/RepositoryBuild.targets deleted file mode 100644 index ba064d3451..0000000000 --- a/build/RepositoryBuild.targets +++ /dev/null @@ -1,160 +0,0 @@ - - - - - false - - <_NoBuildRepos>$(NoBuild) - <_BuildScriptToExecute Condition="'$(OS)'!='Windows_NT'">build.sh - <_BuildScriptToExecute Condition="'$(OS)'=='Windows_NT'">build.cmd - - - - - - $(SubmoduleRoot)%(Identity)\ - - - %(RepositoryBuildOrder.Order) - %(RepositoryBuildOrder.Identity) - - RepositoryToBuild=%(RepositoryBuildOrder.Identity); - BuildRepositoryRoot=$([MSBuild]::NormalizeDirectory(%(RepositoryBuildOrder.RootPath))) - - - - - - - - - - <_ReposWereBuilt>true - <_NoBuildRepos>true - - - - - - - - - - - - - - - - - - - - - - - true - - $(RepositoryBuildArguments) -ci - - $(RepositoryBuildArguments) /p:AspNetUniverseBuildOffline=true - $(RepositoryBuildArguments) /p:IsUniverseBuild=true - - $(RepositoryBuildArguments) /p:DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcesPropsPath) - $(RepositoryBuildArguments) /p:DotNetPackageVersionPropsPath=$(GeneratedPackageVersionPropsPath) - - $(RepositoryBuildArguments) /p:SignType= - $(RepositoryBuildArguments) /p:VersionSuffix=$(VersionSuffix) - $(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 - - - - - - /t:CleanArtifacts /t:Build /p:SkipTests=true $(RepositoryBuildArguments) - $(BuildArguments) /bl:$(LogOutputDir)$(RepositoryToBuild).build.binlog - $(BuildRepositoryRoot)artifacts\msbuild\ - - - - - - - - - - - - - - - - - - - - - - - /t:Test /p:NoBuild=$(_NoBuildRepos) $(RepositoryBuildArguments) - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/SharedFrameworkOnly.props b/build/SharedFrameworkOnly.props index 73b030b5f7..58f688c678 100644 --- a/build/SharedFrameworkOnly.props +++ b/build/SharedFrameworkOnly.props @@ -8,7 +8,6 @@ - @@ -21,7 +20,7 @@ - + diff --git a/build/SharedFx.targets b/build/SharedFx.targets index 08f15d775f..0a3066c666 100644 --- a/build/SharedFx.targets +++ b/build/SharedFx.targets @@ -2,11 +2,8 @@ $(RepositoryRoot)src\Framework\test\Microsoft.AspNetCore.App.UnitTests.csproj $([MSBuild]::NormalizePath($(UnitTestFxProject))) - $(CodeSignDependsOn);GetSharedFxFilesToSign _BuildSharedFxProjects;TestSharedFx $(BuildSharedFxDependsOn);CodeSign - $(IntermediateDir)ar\$(SharedFxRid)\ - $(GetArtifactInfo);GetFxProjectArtifactInfo @@ -15,8 +12,8 @@ - - + + @@ -24,60 +21,32 @@ - - - - - - - - - - - - - - - - - - - - - + <_RestoreGraphProjectInput>@(FxProjectToBuild) - - $(BuildProperties); - SharedFxRid=$(SharedFxRid); - SharedFxArchitecture=$(SharedFxArchitecture); - DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcesPropsPath); - DotNetPackageVersionPropsPath=$(GeneratedPackageVersionPropsPath); - PackageVersion=$(PackageVersion) - + Properties="$(BuildProperties);RestoreGraphProjectInput=$(_RestoreGraphProjectInput);_DummyTarget=Restore" /> - + - $(LogOutputDir)SharedFx-UnitTests-$(Version).trx + $(LogOutputDir)SharedFx-UnitTests-$(PackageVersion)-$(TargetRuntimeIdentifier).trx $(UnitTestFxTrxLogFile) $(HostMachineRepositoryRoot)/artifacts/logs/SharedFx-UnitTests.trx @@ -104,35 +73,4 @@ - - - <_InspectionTargetsFile>$(MSBuildProjectDirectory)\Project.Inspection.targets - - - - <_Temp Remove="@(_Temp)" /> - - - - - - - - - - - - - - - - - - - diff --git a/build/artifacts.props b/build/artifacts.props deleted file mode 100644 index 756194a28b..0000000000 --- a/build/artifacts.props +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/buildorder.props b/build/buildorder.props deleted file mode 100644 index 4cef7bf246..0000000000 --- a/build/buildorder.props +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/build/external-dependencies.props b/build/external-dependencies.props deleted file mode 100644 index e9b08f2897..0000000000 --- a/build/external-dependencies.props +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/publish/Publish.csproj b/build/publish/Publish.csproj deleted file mode 100644 index a136fe7910..0000000000 --- a/build/publish/Publish.csproj +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - netcoreapp3.0 - true - $(ArtifactsDir)manifests\ - https://maestro-prod.westus2.cloudapp.azure.com - - - - - - - - - - - - GetFilesToPublish; - GenerateBuildAssetManifest; - PublishToAzureFeed; - PublishToMyGet; - PublishToBuildAssetRegistry; - - - - - - - - - <_FilesToPublish Include="$(InstallersOutputPath)*.txt"> - text/plain - - - <_FilesToPublish Include="$(InstallersOutputPath)*.version"> - text/plain - no-cache, no-store, must-revalidate - - - <_FilesToPublish Include="$(InstallersOutputPath)*.svg"> - no-cache, no-store, must-revalidate - image/svg+xml - - - - <_FilesToPublish Include="$(InstallersOutputPath)*" Exclude="@(_FilesToPublish)" /> - - - <_FilesToPublish Include="$(ProductPackageOutputPath)*.jar;$(ProductPackageOutputPath)*.pom"> - aspnetcore/jar/$(PackageVersion)/ - - - - - aspnetcore/npm/$(PackageVersion)/ - - <_FilesToPublish Include="@(NpmPackageToPublish)" /> - - - - %(_FilesToPublish.BlobBasePath)%(_FilesToPublish.FileName)%(_FilesToPublish.Extension) - aspnetcore/Runtime/$(PackageVersion)/%(_FilesToPublish.FileName)%(_FilesToPublish.Extension) - - <_FilesToPublish Remove="@(_FilesToPublish)" /> - - - - - - - - - NonShipping=true - - - NonShipping=true - - - - - - - - - - - - - - - - - - - - - - - $(PublishMyGetNpmRegistryUrl.Replace("https:", "")):_authToken - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/repo.props b/build/repo.props index f50b7d4f03..397e3d471d 100644 --- a/build/repo.props +++ b/build/repo.props @@ -1,23 +1,25 @@ - + + $(TargetOsName)-$(TargetArchitecture) + + true true false - true + true false false - $(RepositoryRoot)src\ - - $(ArtifactsDir)$(Configuration)\packages\product\ - $(ArtifactsDir)$(Configuration)\packages\internal\ - $(ArtifactsDir)$(Configuration)\installers\ + $(ArtifactsDir)packages\$(Configuration)\Shipping\ + $(ArtifactsDir)packages\$(Configuration)\NonShipping\ + $(ArtifactsDir)installers\$(Configuration)\ + $(ArtifactsDir)VSSetup\$(Configuration)\ $(RepositoryRoot)eng\signcheck.exclusions.txt @@ -36,8 +38,10 @@ + + + + + @@ -65,60 +80,64 @@ - + - - + + - - - - - - - - + + + + - - + + - - + + - + - - - Platform=x64 - Platform=x86 - - - + + Platform=x64 + Platform=Win32 + + + + + + + Exclude="@(ProjectToExclude)" /> - + + - + + + + + + + + + + - - - - diff --git a/build/repo.targets b/build/repo.targets index 0e3872ef1b..b076164fc8 100644 --- a/build/repo.targets +++ b/build/repo.targets @@ -1,18 +1,13 @@ - - - + $(BuildProperties);BuildToolsTaskAssembly=$(_BuildToolsAssembly) - $(IntermediateDir)dependencies.g.props - $(IntermediateDir)sources.g.props - Prepare @@ -23,36 +18,43 @@ true true - SetTeamCityBuildNumberToVersion;$(PrepareDependsOn) - $(PrepareDependsOn);VerifyPackageArtifactConfig;VerifyExternalDependencyConfig;PrepareOutputPaths - - $(CleanDependsOn);CleanArtifacts;CleanRepoArtifacts + $(CleanDependsOn);CleanArtifacts $(RestoreDependsOn);InstallDotNet;RestoreProjects Restore - $(CompileDependsOn);BuildProjects;PackSharedSources - $(CompileDependsOn);PackProjects;BuildRepositories;BuildSharedFx + $(CompileDependsOn);BuildProjects $(PackageDependsOn);PackProjects - $(PackageDependsOn);RemoveSharedFrameworkOnlyRefsFromNuspec + $(PackageDependsOn);BuildSharedFx;RemoveSharedFrameworkOnlyRefsFromNuspec $(TestDependsOn);Compile $(TestDependsOn);TestProjects - $(TestDependsOn);_TestRepositories - $(GetArtifactInfoDependsOn);GetProjectArtifactInfo - $(GetArtifactInfoDependsOn);ResolveSharedSourcesPackageInfo - $(GetArtifactInfoDependsOn);ResolveRepoInfo + $(BuildDependsOn);GenerateBuildAssetManifest $(CodeSignDependsOn);RemoveSharedFrameworkOnlyRefsFromNuspec - - + + + + + + + + + + + @@ -70,7 +72,7 @@ @@ -86,192 +88,27 @@ - - - - - - - - - - - $(BuildProperties);MicrosoftNETCoreAppPackageVersion=$(MicrosoftNETCoreAppPackageVersion); - - - - <_RepositoryProject Include="$(MSBuildProjectFullPath)" Condition="'%(Repository.Identity)' != ''"> - RepositoryRoot=%(Repository.RootPath) - %(Repository.Build) - - - - - - - - - - - - - - - - - - - - - - <_Temp Remove="@(_Temp)" /> - <_Temp Include="@(PackageArtifact)" /> - - - - - - - - - - - - <_PackageArtifactWithoutMatchingInfo Include="@(_Temp)" Exclude="@(PackageArtifact)" /> - - - - - - - - %(ShippedArtifactInfo.Version) - - - - <_PackageArtifactSpec Include="@(PackageArtifact)" /> - - - - - <_ShippedSolution Update="@(_ShippedSolution)" Build="false" IsPatching="false" /> - <_NoBuildSolution Update="@(_NoBuildSolution)" Build="false" /> - - - - - - - - - <_LineupPackages Include="@(ExternalDependency)" /> - <_LineupPackages Include="%(ArtifactInfo.PackageId)" Version="%(ArtifactInfo.Version)" Condition=" '%(ArtifactInfo.ArtifactType)' == 'NuGetPackage' " /> - - <_RestoreSources Include="$(ProductPackageOutputPath)" /> - <_RestoreSources Include="$(InternalPackageOutputPath)" /> - <_RestoreSources Include="$(RestoreSources)" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_UndeclaredPackageArtifact Include="%(ArtifactInfo.PackageId)" Condition="'%(ArtifactInfo.ArtifactType)' == 'NuGetPackage'" /> - <_UndeclaredPackageArtifact Remove="@(PackageArtifact)" /> - - - - - - - - - - - - - - - - - - - - - <_BuildOutput Include="$(ProductPackageOutputPath)%(PackageArtifact.Identity).*.nupkg" - Condition=" '%(PackageArtifact.Category)' == 'ship' " /> - - + <_BuildOutput Include="$(ArtifactsShippingPackagesDir)*.nupkg" + Exclude="$(ArtifactsShippingPackagesDir)*.symbols.nupkg" /> + FrameworkOnlyPackages="@(SharedFrameworkOnlyPackage)" /> - - - + + + - + + diff --git a/build/runtimes.props b/build/runtimes.props index 469097305f..37259f3135 100644 --- a/build/runtimes.props +++ b/build/runtimes.props @@ -1,6 +1,9 @@ + + + @@ -10,12 +13,6 @@ Arch="x86" Feed="$(DotNetAssetRootUrl)" FeedCredential="$(DotNetAssetRootAccessTokenSuffix)" /> - - - diff --git a/build/sources.props b/build/sources.props index 2b3d86b634..e32fdfb649 100644 --- a/build/sources.props +++ b/build/sources.props @@ -12,29 +12,19 @@ $(RestoreSources); https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json; https://api.nuget.org/v3/index.json; - - - $(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; https://dotnet.myget.org/F/aspnetcore-master/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; - https://dotnet.myget.org/F/roslyn/api/v3/index.json; + https://dotnet.myget.org/F/dotnet-core/api/v3/index.json; https://dotnet.myget.org/F/roslyn-tools/api/v3/index.json; - https://vside.myget.org/F/vssdk/api/v3/index.json; + https://dotnet.myget.org/F/roslyn/api/v3/index.json; + https://vside.myget.org/F/devcore/api/v3/index.json; https://vside.myget.org/F/vsmac/api/v3/index.json; - https://vside.myget.org/F/devcore/api/v3/index.json + https://vside.myget.org/F/vssdk/api/v3/index.json; - - - $(RestoreSources); - https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json; - - - https://dotnetcli.blob.core.windows.net/dotnet/ - $(PublicCoreFeedPrefix) + https://dotnetcli.blob.core.windows.net/dotnet/ diff --git a/build/submodules.props b/build/submodules.props deleted file mode 100644 index 6353244288..0000000000 --- a/build/submodules.props +++ /dev/null @@ -1,45 +0,0 @@ - - - - true - - - ProductChangesOnly - - - - false - ProductChangesOnly - - - - - - true - - - - - - - - - - diff --git a/build/tasks/JoinRepoItems.cs b/build/tasks/JoinRepoItems.cs deleted file mode 100644 index 97f0ab9d0f..0000000000 --- a/build/tasks/JoinRepoItems.cs +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; - -namespace RepoTasks -{ - public class JoinRepoItems : Task - { - [Required] - public ITaskItem[] Left { get; set; } - - [Required] - public ITaskItem[] Right { get; set; } - - // The metadata to use as the new item spec. If not specified, LeftKey is used. - public string LeftItemSpec { get; set; } - - // LeftKey and RightKey: The metadata to join on. If not set, then use the ItemSpec - public string LeftKey { get; set; } - - public string RightKey { get; set; } - - - // LeftMetadata and RightMetadata: The metadata names to include in the result. Specify "*" to include all metadata - public string[] LeftMetadata { get; set; } - - public string[] RightMetadata { get; set; } - - - [Output] - public ITaskItem[] JoinResult { get; private set; } - - public override bool Execute() - { - bool useAllLeftMetadata = LeftMetadata != null && LeftMetadata.Length == 1 && LeftMetadata[0] == "*"; - bool useAllRightMetadata = RightMetadata != null && RightMetadata.Length == 1 && RightMetadata[0] == "*"; - var newItemSpec = string.IsNullOrEmpty(LeftItemSpec) - ? LeftKey - : LeftItemSpec; - - JoinResult = Left.Join(Right, - item => GetKeyValue(LeftKey, item), - item => GetKeyValue(RightKey, item), - (left, right) => - { - // If including all metadata from left items and none from right items, just return left items directly - if (useAllLeftMetadata && - string.IsNullOrEmpty(LeftKey) && - string.IsNullOrEmpty(LeftItemSpec) && - (RightMetadata == null || RightMetadata.Length == 0)) - { - return left; - } - - // If including all metadata from right items and none from left items, just return the right items directly - if (useAllRightMetadata && - string.IsNullOrEmpty(RightKey) && - string.IsNullOrEmpty(LeftItemSpec) && - (LeftMetadata == null || LeftMetadata.Length == 0)) - { - return right; - } - - var ret = new TaskItem(GetKeyValue(newItemSpec, left)); - - // Weird ordering here is to prefer left metadata in all cases, as CopyToMetadata doesn't overwrite any existing metadata - if (useAllLeftMetadata) - { - // CopyMetadata adds an OriginalItemSpec, which we don't want. So we subsequently remove it - left.CopyMetadataTo(ret); - ret.RemoveMetadata("OriginalItemSpec"); - } - - if (!useAllRightMetadata && RightMetadata != null) - { - foreach (string name in RightMetadata) - { - ret.SetMetadata(name, right.GetMetadata(name)); - } - } - - if (!useAllLeftMetadata && LeftMetadata != null) - { - foreach (string name in LeftMetadata) - { - ret.SetMetadata(name, left.GetMetadata(name)); - } - } - - if (useAllRightMetadata) - { - // CopyMetadata adds an OriginalItemSpec, which we don't want. So we subsequently remove it - right.CopyMetadataTo(ret); - ret.RemoveMetadata("OriginalItemSpec"); - } - - return (ITaskItem)ret; - }, - StringComparer.OrdinalIgnoreCase).ToArray(); - - return true; - } - - static string GetKeyValue(string key, ITaskItem item) - { - if (string.IsNullOrEmpty(key)) - { - return item.ItemSpec; - } - else - { - return item.GetMetadata(key); - } - } - } -} diff --git a/build/tasks/OrderBy.cs b/build/tasks/OrderBy.cs deleted file mode 100644 index a761d6f093..0000000000 --- a/build/tasks/OrderBy.cs +++ /dev/null @@ -1,28 +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.Linq; -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; - -namespace RepoTasks -{ - public class OrderBy : Task - { - [Required] - [Output] - public ITaskItem[] Items { get; set; } - - public string Key { get; set; } - - public override bool Execute() - { - var key = string.IsNullOrEmpty(Key) - ? "Identity" - : Key; - Items = Items.OrderBy(k => k.GetMetadata(key)).ToArray(); - return true; - } - } -} diff --git a/build/tasks/PublishToAzureBlob.cs b/build/tasks/PublishToAzureBlob.cs deleted file mode 100644 index 71f1b1c29a..0000000000 --- a/build/tasks/PublishToAzureBlob.cs +++ /dev/null @@ -1,146 +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. - -#if BUILD_AZ_TASKS -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Build.Framework; -using Microsoft.WindowsAzure.Storage; -using Microsoft.WindowsAzure.Storage.Blob; - -namespace RepoTasks -{ - /// - /// Publish files to an Azure storage blob - /// - public class PublishToAzureBlob : Microsoft.Build.Utilities.Task, ICancelableTask - { - private CancellationTokenSource _cts = new CancellationTokenSource(); - - /// - /// The files to publish. - /// - [Required] - public ITaskItem[] Files { get; set; } - - /// - /// The Azure blob storage account name. - /// - [Required] - public string AccountName { get; set; } - - /// - /// The SAS token used to write to Azure. - /// - [Required] - public string SharedAccessToken { get; set; } - - /// - /// The Azure blob storage container name - /// - [Required] - public string ContainerName { get; set; } - - /// - /// The maximum number of parallel pushes. - /// - public int MaxParallelism { get; set; } = 8; - - public void Cancel() => _cts.Cancel(); - - public override bool Execute() - => ExecuteAsync().Result; - - private async Task ExecuteAsync() - { - var connectionString = $"BlobEndpoint=https://{AccountName}.blob.core.windows.net;SharedAccessSignature={SharedAccessToken}"; - - var account = CloudStorageAccount.Parse(connectionString); - var client = account.CreateCloudBlobClient(); - var container = client.GetContainerReference(ContainerName); - - var ctx = new OperationContext(); - var tasks = new List(); - - using (var throttler = new SemaphoreSlim(MaxParallelism)) - { - foreach (var item in Files) - { - _cts.Token.ThrowIfCancellationRequested(); - await throttler.WaitAsync( _cts.Token); - tasks.Add( - Task.Run(async () => - { - try - { - await PushFileAsync(ctx, container, item, _cts.Token); - } - finally - { - throttler.Release(); - } - })); - } - - await Task.WhenAll(tasks); - } - - return !Log.HasLoggedErrors; - } - - private async Task PushFileAsync(OperationContext ctx, CloudBlobContainer container, ITaskItem item, CancellationToken cancellationToken) - { - cancellationToken.ThrowIfCancellationRequested(); - - // normalize slashes - var dest = item.GetMetadata("RelativeBlobPath") - .Replace('\\', '/') - .Replace("//", "/"); - var contentType = item.GetMetadata("ContentType"); - var cacheControl = item.GetMetadata("CacheControl"); - - if (string.IsNullOrEmpty(dest)) - { - Log.LogError($"Item {item.ItemSpec} is missing required metadata 'RelativeBlobPath'"); - return; - } - - var blob = container.GetBlockBlobReference(dest); - - if (!string.IsNullOrEmpty(cacheControl)) - { - blob.Properties.CacheControl = cacheControl; - } - - if (!string.IsNullOrEmpty(contentType)) - { - blob.Properties.ContentType = contentType; - } - - Log.LogMessage(MessageImportance.High, $"Beginning push of {item.ItemSpec} to https://{AccountName}.blob.core.windows.net/{ContainerName}/{dest}"); - - var accessCondition = bool.TryParse(item.GetMetadata("Overwrite"), out var overwrite) && overwrite - ? AccessCondition.GenerateEmptyCondition() - : AccessCondition.GenerateIfNotExistsCondition(); - - try - { - await blob.UploadFromFileAsync(item.ItemSpec, accessCondition, new BlobRequestOptions(), ctx, cancellationToken); - } - catch (Exception ex) - { - Log.LogError($"Error publishing {item.ItemSpec}: {ex}"); - return; - } - finally - { - Log.LogMessage(MessageImportance.High, $"Done publishing {item.ItemSpec} to https://{AccountName}.blob.core.windows.net/{ContainerName}/{dest}"); - } - } - } -} -#endif diff --git a/build/tasks/RepoTasks.csproj b/build/tasks/RepoTasks.csproj index 06c08355a3..2069525e61 100644 --- a/build/tasks/RepoTasks.csproj +++ b/build/tasks/RepoTasks.csproj @@ -4,18 +4,17 @@ netcoreapp2.2 net461 - $(DefineConstants);BUILD_MSI_TASKS - $(DefineConstants);BUILD_AZ_TASKS + $(DefineConstants);BUILD_MSI_TASKS + true - - + diff --git a/build/tasks/RepoTasks.tasks b/build/tasks/RepoTasks.tasks index e073e49173..d253037b90 100644 --- a/build/tasks/RepoTasks.tasks +++ b/build/tasks/RepoTasks.tasks @@ -6,9 +6,6 @@ - - - diff --git a/dockerbuild.sh b/dockerbuild.sh index b34962846e..da76a9f482 100755 --- a/dockerbuild.sh +++ b/dockerbuild.sh @@ -26,6 +26,7 @@ __usage() { echo "" echo "Options:" echo " -v, --volume An additional volume mount to add to the build container" + echo " -e, --env Additional environment variables to add to the build container" echo "" echo "Description:" echo " This will run build.sh inside the dockerfile as defined in build/docker/\$image.Dockerfile." @@ -69,6 +70,13 @@ while [[ $# -gt 0 ]]; do docker_args[${#docker_args[*]}]="--volume" docker_args[${#docker_args[*]}]="$volume_spec" ;; + -e|--env) + shift + env_var="${1:-}" + [ -z "$env_var" ] && __error "Missing value for parameter --env" && __usage + docker_args[${#docker_args[*]}]="-e" + docker_args[${#docker_args[*]}]="$env_var" + ;; *) build_args[${#build_args[*]}]="$1" ;; diff --git a/docs/Artifacts.md b/docs/Artifacts.md index a9378c4672..450d19f627 100644 --- a/docs/Artifacts.md +++ b/docs/Artifacts.md @@ -5,16 +5,20 @@ Building this repo produces build artifacts in the directory structure described ``` artifacts/ - $(Configuration)/ - installers/ + installers/ + $(Configuration)/ *.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'. + packages/ + $(Configuration)/ + Shipping/ = 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/ + NonShipping/ *.nupkg = NuGet packages for internal use only. Used to hand off bits to Microsoft partner teams. Not intended for use by customers. + VSSetup/ + $(Configuration)/ + *.vsix = Visual Studio extensions ``` diff --git a/docs/BuildFromSource.md b/docs/BuildFromSource.md index 624d4ce185..ef3bf330a1 100644 --- a/docs/BuildFromSource.md +++ b/docs/BuildFromSource.md @@ -87,10 +87,13 @@ 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 add all projects to the solution. +**The workaround** for now is to add all projects to the solution. You can either do this one by one using `dotnet sln` dotnet sln add C:\src\AspNetCore\src\Hosting\Abstractions\src\Microsoft.AspNetCore.Hosting.Abstractions.csproj +Or you can use this script to automatically traverse the project reference graph, which then invokes `dotnet sln` for you: [eng/scripts/AddAllProjectRefsToSolution.ps1](/eng/scripts/AddAllProjectRefsToSolution.ps1). + + ./eng/scripts/AddAllProjectRefsToSolution.ps1 -WorkingDir src/Mvc/ #### PATH @@ -164,14 +167,15 @@ Property | Description -------------------------|------------------------------------------------------------------------------------------------------------- BuildNumberSuffix | (string). A specific build number, typically from a CI counter, which is appended to the pre-release label. Configuration | `Debug` or `Release`. Default = `Debug`. -SharedFxRID | The runtime identifier of the shared framework. +TargetArchitecture | The CPU architecture to build for (x64, x86, arm, arm64). +TargetOsName | The base runtime identifier to build for (win, linux, osx, linux-musl). ## Use the result of your build 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. +- Run the installers produced in `artifacts/installers/{Debug, Release}/` for your platform. - Add a NuGet.Config to your project directory with the following content: ```xml @@ -179,7 +183,7 @@ See ["Artifacts"](./Artifacts.md) for more explanation of the different folders - + diff --git a/docs/DailyBuilds.md b/docs/DailyBuilds.md index 0ad337b7d8..6ffb37f781 100644 --- a/docs/DailyBuilds.md +++ b/docs/DailyBuilds.md @@ -5,7 +5,7 @@ Daily builds include the latest source code changes. They are not supported for If you want to download the latest daily build and use it in a project, then you need to: -- Obtain the latest [build of the .NET Core SDK](https://github.com/dotnet/core-sdk#installers-and-binaries) +- Obtain the latest [build of the .NET Core SDK](https://github.com/dotnet/core-sdk#installers-and-binaries). - Add a NuGet.Config to your project directory with the following content: ```xml @@ -23,77 +23,3 @@ If you want to download the latest daily build and use it in a project, then you 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/). - -## NuGet packages - -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: - -[app-metapackage-myget]: https://dotnet.myget.org/feed/dotnet-core/package/nuget/Microsoft.AspNetCore.App -[app-metapackage-myget-badge]: https://img.shields.io/dotnet.myget/dotnet-core/vpre/Microsoft.AspNetCore.App.svg?style=flat-square&label=myget - -[metapackage-myget]: https://dotnet.myget.org/feed/dotnet-core/package/nuget/Microsoft.AspNetCore -[metapackage-myget-badge]: https://img.shields.io/dotnet.myget/dotnet-core/vpre/Microsoft.AspNetCore.svg?style=flat-square&label=myget - -Package | MyGet -:---------------------------------|:--------------------------------------------------------- -Microsoft.AspNetCore.App | [![][app-metapackage-myget-badge]][app-metapackage-myget] -Microsoft.AspNetCore | [![][metapackage-myget-badge]][metapackage-myget] - -## Runtime installers - -Updated versions of the ASP.NET Core runtime can be installed separately from SDK updates. Runtime-only installers can be downloaded here: - -[badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/master/aspnetcore-runtime-win-x64-version-badge.svg -[win-x64-zip]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/master/aspnetcore-runtime-latest-win-x64.zip -[win-x64-exe]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/master/aspnetcore-runtime-latest-win-x64.exe -[win-x86-zip]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/master/aspnetcore-runtime-latest-win-x86.zip -[win-x86-exe]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/master/aspnetcore-runtime-latest-win-x86.exe -[linux-x64-tar]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/master/aspnetcore-runtime-latest-linux-x64.tar.gz -[linux-arm-tar]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/master/aspnetcore-runtime-latest-linux-arm.tar.gz -[linux-arm64-tar]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/master/aspnetcore-runtime-latest-linux-arm64.tar.gz -[osx-x64-tar]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/master/aspnetcore-runtime-latest-osx-x64.tar.gz -[debian-x64-deb]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/master/aspnetcore-runtime-latest-x64.deb -[redhat-x64-rpm]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/master/aspnetcore-runtime-latest-x64.rpm -[linux-musl-x64-tar]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/master/aspnetcore-runtime-latest-linux-musl-x64.tar.gz - -[badge-rel-22]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/release/2.2/aspnetcore-runtime-win-x64-version-badge.svg -[win-x64-zip-rel-22]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/release/2.2/aspnetcore-runtime-latest-win-x64.zip -[win-x64-exe-rel-22]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/release/2.2/aspnetcore-runtime-latest-win-x64.exe -[win-x86-zip-rel-22]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/release/2.2/aspnetcore-runtime-latest-win-x86.zip -[win-x86-exe-rel-22]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/release/2.2/aspnetcore-runtime-latest-win-x86.exe -[linux-x64-tar-rel-22]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/release/2.2/aspnetcore-runtime-latest-linux-x64.tar.gz -[osx-x64-tar-rel-22]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/release/2.2/aspnetcore-runtime-latest-osx-x64.tar.gz -[debian-x64-deb-rel-22]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/release/2.2/aspnetcore-runtime-latest-x64.deb -[redhat-x64-rpm-rel-22]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/release/2.2/aspnetcore-runtime-latest-x64.rpm -[linux-arm-tar-rel-22]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/release/2.2/aspnetcore-runtime-latest-linux-arm.tar.gz -[linux-musl-x64-tar-rel-22]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/release/2.2/aspnetcore-runtime-latest-linux-musl-x64.tar.gz - -[badge-rel-21]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/release/2.1/aspnetcore-runtime-win-x64-version-badge.svg -[win-x64-zip-rel-21]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/release/2.1/aspnetcore-runtime-latest-win-x64.zip -[win-x64-exe-rel-21]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/release/2.1/aspnetcore-runtime-latest-win-x64.exe -[win-x86-zip-rel-21]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/release/2.1/aspnetcore-runtime-latest-win-x86.zip -[win-x86-exe-rel-21]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/release/2.1/aspnetcore-runtime-latest-win-x86.exe -[linux-x64-tar-rel-21]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/release/2.1/aspnetcore-runtime-latest-linux-x64.tar.gz -[osx-x64-tar-rel-21]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/release/2.1/aspnetcore-runtime-latest-osx-x64.tar.gz -[debian-x64-deb-rel-21]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/release/2.1/aspnetcore-runtime-latest-x64.deb -[redhat-x64-rpm-rel-21]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/release/2.1/aspnetcore-runtime-latest-x64.rpm -[linux-arm-tar-rel-21]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/release/2.1/aspnetcore-runtime-latest-linux-arm.tar.gz -[linux-musl-x64-tar-rel-21]: https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/release/2.1/aspnetcore-runtime-latest-linux-musl-x64.tar.gz - -Platform | Latest (master branch)
![][badge-master] | release/2.2
![][badge-rel-22] | release/2.1
![][badge-rel-21] -:---------------------|:----------------------------------------------------------------|:------------------------------------------------------------------------- |:------------------------------------------------------------------------- -Channel name1 | `master` | `release/2.2` | `release/2.1` -Windows (x64) | [Installer (exe)][win-x64-exe]
[Archive (zip)][win-x64-zip] | [Installer (exe)][win-x64-exe-rel-22]
[Archive (zip)][win-x64-zip-rel-22] | [Installer (exe)][win-x64-exe-rel-21]
[Archive (zip)][win-x64-zip-rel-21] -Windows (x86) | [Installer (exe)][win-x86-exe]
[Archive (zip)][win-x86-zip] | [Installer (exe)][win-x86-exe-rel-22]
[Archive (zip)][win-x86-zip-rel-22] | [Installer (exe)][win-x86-exe-rel-21]
[Archive (zip)][win-x86-zip-rel-21] -macOS (x64) | [Archive (tar.gz)][osx-x64-tar] | [Archive (tar.gz)][osx-x64-tar-rel-22] | [Archive (tar.gz)][osx-x64-tar-rel-21] -Linux (x64)
_(for glibc based OS - most common)_ | [Archive (tar.gz)][linux-x64-tar] | [Archive (tar.gz)][linux-x64-tar-rel-22] | [Archive (tar.gz)][linux-x64-tar-rel-21] -Linux (x64 - musl)
_(for musl based OS, such as Alpine Linux)_ | [Archive (tar.gz)][linux-musl-x64-tar] | [Archive (tar.gz)][linux-musl-x64-tar-rel-22] | [Archive (tar.gz)][linux-musl-x64-tar-rel-21] -Linux (arm32) | [Archive (tar.gz)][linux-arm-tar] | [Archive (tar.gz)][linux-arm-tar-rel-22] | [Archive (tar.gz)][linux-arm-tar-rel-21] -Linux (arm64) | [Archive (tar.gz)][linux-arm64-tar] | | -Debian/Ubuntu (x64) | [Installer (deb)][debian-x64-deb] | [Installer (deb)][debian-x64-deb-rel-22] | [Installer (deb)][debian-x64-deb-rel-21] -RedHat/Fedora (x64) | [Installer (rpm)][redhat-x64-rpm] | [Installer (rpm)][redhat-x64-rpm-rel-22] | [Installer (rpm)][redhat-x64-rpm-rel-21] - -> 1 For use with the `-Channel` argument in [dotnet-install.ps1/sh](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script). diff --git a/docs/PreparingPatchUpdates.md b/docs/PreparingPatchUpdates.md index 34813e8162..17f8102539 100644 --- a/docs/PreparingPatchUpdates.md +++ b/docs/PreparingPatchUpdates.md @@ -10,32 +10,7 @@ In order to prepare this repo to build a new servicing update, the following cha + 8 ``` -* Update the package archive baselines. This is used to make sure each build of the package archives we give to Azure only contains new files and does - not require overwriting existing files. See [src/PackageArchive/ZipManifestGenerator/](/src/PackageArchive/ZipManifestGenerator/README.md) for instructions on how to run this tool. - * Update the package baselines. This is used to ensure packages keep a consistent set of dependencies between releases. See [eng/tools/BaselineGenerator/](/eng/tools/BaselineGenerator/README.md) for instructions on how to run this tool. -* **For packages with source code in this repo (not a submodule):** Update the list of packages in [eng/PatchConfig.props](/eng/PatchConfig.props) to list which packages should be patching in this release. - -* **For packages still building from submodules:** Update the list of repositories which will contain changes in [build/submodules.props](/build/submodules.props). - - * `` items represent repos which were released in a previous patch, and will not contain servicing updates in the next patch. - * `` items represent repos which will produce new packages in this patch. - * It is usually best to move everything to `` and then iteratively add them back to `` as new repos receive approval to patch. - * Don't change the `PatchPolicy` attribute. The build system uses this to ensure patching rules are obeyed. - -* For each repository still listed as a ``, update the version.props file in that submodule. For example, https://github.com/aspnet/Templating/pull/824 - - * The version prefix in repos should match the version of ASP.NET Core. - * Exception: SignalR, which is "1.1", not "2.1". - * This leaves holes in versioning, which is okay. This may mean you increment the patch value by more than one. Example: - * EF Core ships patches in 2.1.4 as "2.1.4" - * EF Core does not ship patches in 2.1.5 or 2.1.6 - * EF Core ships in 2.1.7, therefore, EFCore's version.props file should jump from 2.1.4 to 2.1.7. - - ```diff - - - 2.1.4 - + 2.1.7 - ``` +* Update the list of packages in [eng/PatchConfig.props](/eng/PatchConfig.props) to list which packages should be patching in this release. diff --git a/docs/ProjectProperties.md b/docs/ProjectProperties.md index 98332931b9..fe5bba6baf 100644 --- a/docs/ProjectProperties.md +++ b/docs/ProjectProperties.md @@ -5,4 +5,4 @@ In addition to the standard set of MSBuild properties supported by Microsoft.NET 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. +IsShippingPackage | 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/ReferenceResolution.md b/docs/ReferenceResolution.md index e0c3dbf6f4..e34b90a072 100644 --- a/docs/ReferenceResolution.md +++ b/docs/ReferenceResolution.md @@ -18,9 +18,10 @@ The requirements that led to this system are: ## Recommendations for writing a .csproj -* Use `` -* Do not use `` -* Only use `` in test projects +* Use ``. +* Do not use ``. +* If you need to use a new package, add it to `eng/Dependencies.props` and `eng/Versions.props`. +* 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. diff --git a/eng/Dependencies.props b/eng/Dependencies.props index 5bb5c428db..c667bd4414 100644 --- a/eng/Dependencies.props +++ b/eng/Dependencies.props @@ -19,17 +19,35 @@ and are generated based on the last package release. - - + + + + + + + + + + + + + - + + + + + + + + @@ -63,9 +81,9 @@ and are generated based on the last package release. + - @@ -75,27 +93,42 @@ and are generated based on the last package release. - - + + + + + + - - - + + + + + + + + + + + + + + @@ -104,41 +137,19 @@ and are generated based on the last package release. + + + - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/eng/PatchConfig.props b/eng/PatchConfig.props index 976bc15c0f..b1b7e01318 100644 --- a/eng/PatchConfig.props +++ b/eng/PatchConfig.props @@ -19,6 +19,14 @@ Later on, this will be checked using this condition: + @aspnet/signalr; + Microsoft.AspNetCore.AspNetCoreModuleV2; + Microsoft.AspNetCore.Authentication.Google; + Microsoft.AspNetCore.Http; + Microsoft.AspNetCore.Mvc.Core; + Microsoft.AspNetCore.Routing; + Microsoft.AspNetCore.Server.IIS; + java:signalr; diff --git a/eng/ProjectReferences.props b/eng/ProjectReferences.props index cfc816fe0f..51da91165a 100644 --- a/eng/ProjectReferences.props +++ b/eng/ProjectReferences.props @@ -1,5 +1,5 @@ @@ -20,7 +20,6 @@ - @@ -46,11 +45,8 @@ - - - @@ -67,6 +63,7 @@ + @@ -102,6 +99,7 @@ + @@ -125,5 +123,12 @@ + + + + + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c11c8325a8..c98fc8e6e5 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,371 +1,375 @@ - + https://github.com/aspnet/AspNetCore-Tooling - 000000 + bd7fc9ddf67dec0d582168bcd3d1d4681747f81a - + + https://github.com/aspnet/AspNetCore-Tooling + bd7fc9ddf67dec0d582168bcd3d1d4681747f81a + + + https://github.com/aspnet/AspNetCore-Tooling + bd7fc9ddf67dec0d582168bcd3d1d4681747f81a + + + https://github.com/aspnet/AspNetCore-Tooling + bd7fc9ddf67dec0d582168bcd3d1d4681747f81a + + https://github.com/aspnet/EntityFrameworkCore - 000000 + 3d1e08eb08789a9dde3ac20851d3c82fdf9272e5 - + https://github.com/aspnet/EntityFrameworkCore - 000000 + 3d1e08eb08789a9dde3ac20851d3c82fdf9272e5 - + https://github.com/aspnet/EntityFrameworkCore - 000000 + 3d1e08eb08789a9dde3ac20851d3c82fdf9272e5 - + https://github.com/aspnet/EntityFrameworkCore - 000000 + 3d1e08eb08789a9dde3ac20851d3c82fdf9272e5 - + https://github.com/aspnet/EntityFrameworkCore - 000000 + 3d1e08eb08789a9dde3ac20851d3c82fdf9272e5 - + https://github.com/aspnet/EntityFrameworkCore - 000000 + 3d1e08eb08789a9dde3ac20851d3c82fdf9272e5 - + https://github.com/aspnet/EntityFrameworkCore - 000000 + 3d1e08eb08789a9dde3ac20851d3c82fdf9272e5 - - https://github.com/aspnet/EntityFrameworkCore - 000000 - - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - - https://github.com/aspnet/Extensions - 000000 - - + https://github.com/dotnet/corefx - 000000 + 351ca391579740ae8af8a5405cffa16d152ad6b2 - + https://github.com/dotnet/corefx - 000000 + 351ca391579740ae8af8a5405cffa16d152ad6b2 - + https://github.com/dotnet/corefx - 000000 + 351ca391579740ae8af8a5405cffa16d152ad6b2 - + https://github.com/dotnet/corefx - 000000 + 351ca391579740ae8af8a5405cffa16d152ad6b2 - + https://github.com/dotnet/corefx - 000000 + 351ca391579740ae8af8a5405cffa16d152ad6b2 - + https://github.com/dotnet/corefx - 000000 + 351ca391579740ae8af8a5405cffa16d152ad6b2 - + https://github.com/dotnet/corefx - 000000 + 351ca391579740ae8af8a5405cffa16d152ad6b2 - + https://github.com/dotnet/corefx - 000000 + 351ca391579740ae8af8a5405cffa16d152ad6b2 - + https://github.com/dotnet/corefx - 000000 + 351ca391579740ae8af8a5405cffa16d152ad6b2 - + https://github.com/dotnet/corefx - 000000 + 351ca391579740ae8af8a5405cffa16d152ad6b2 - + https://github.com/dotnet/corefx - 000000 + 351ca391579740ae8af8a5405cffa16d152ad6b2 - + https://github.com/dotnet/corefx - 000000 + 351ca391579740ae8af8a5405cffa16d152ad6b2 - + https://github.com/dotnet/corefx - 000000 + 351ca391579740ae8af8a5405cffa16d152ad6b2 - + https://github.com/dotnet/corefx - 000000 + 351ca391579740ae8af8a5405cffa16d152ad6b2 - + https://github.com/dotnet/corefx - 000000 + 351ca391579740ae8af8a5405cffa16d152ad6b2 - + https://github.com/dotnet/corefx - 000000 + 351ca391579740ae8af8a5405cffa16d152ad6b2 - + https://github.com/dotnet/corefx - 000000 + 351ca391579740ae8af8a5405cffa16d152ad6b2 - + https://github.com/dotnet/corefx - 000000 + 351ca391579740ae8af8a5405cffa16d152ad6b2 - + https://github.com/dotnet/corefx - 000000 + 351ca391579740ae8af8a5405cffa16d152ad6b2 - + https://github.com/dotnet/corefx - 000000 + 351ca391579740ae8af8a5405cffa16d152ad6b2 - + https://github.com/dotnet/core-setup - 000000 + 63a01b08e5d1d1a6b8544f598b3d3bda76e6e424 - + https://github.com/dotnet/core-setup - 000000 + 63a01b08e5d1d1a6b8544f598b3d3bda76e6e424 - + https://github.com/dotnet/core-setup - 000000 + 63a01b08e5d1d1a6b8544f598b3d3bda76e6e424 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 - + https://github.com/aspnet/Extensions - 000000 + a58a80bdf5ad971167f73e501661131c3e34a901 diff --git a/eng/Versions.props b/eng/Versions.props index fd7bd4c55c..33bb13d0bc 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -1,3 +1,4 @@ + - 3.0.0-preview-27219-3 - 3.0.0-preview-27219-3 - 3.0.0-preview-27219-3 - + 3.0.0-preview-27324-5 + 3.0.0-preview-27324-5 + 3.0.0-preview-27324-5 - 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 - + 4.6.0-preview.19073.11 + 4.6.0-preview.19073.11 + 4.6.0-preview.19073.11 + 4.6.0-preview.19073.11 + 4.7.0-preview.19073.11 + 4.6.0-preview.19073.11 + 4.6.0-preview.19073.11 + 4.6.0-preview.19073.11 + 4.6.0-preview.19073.11 + 4.6.0-preview.19073.11 + 4.6.0-preview.19073.11 + 1.7.0-preview.19073.11 + 4.6.0-preview.19073.11 + 4.6.0-preview.19073.11 + 4.6.0-preview.19073.11 + 4.6.0-preview.19073.11 + 4.6.0-preview.19073.11 + 4.6.0-preview.19073.11 + 4.6.0-preview.19073.11 + 4.6.0-preview.19073.11 + 4.6.0-preview.19073.11 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - 3.0.0-preview.19059.5 - + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 + 3.0.0-preview.19078.2 - 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.19074.3 + 3.0.0-preview.19074.3 + 3.0.0-preview.19074.3 + 3.0.0-preview.19074.3 + 3.0.0-preview.19074.3 + 3.0.0-preview.19074.3 + 3.0.0-preview.19074.3 - 3.0.0-preview-19064-09 + 3.0.0-preview-19074-06 + 3.0.0-preview-19074-06 + 3.0.0-preview-19074-06 + 3.0.0-preview-19074-06 - $(KoreBuildVersion) - 3.0.0-build-20190110.4 + 3.0.0-build-20190130.1 1.0.0-alpha-004 15.9.0 - 4.5.0 + 4.4.0 4.5.2 - 4.5.2 4.3.2 - + 4.5.2 1.10.0 5.2.6 - 2.3.2 15.8.166 @@ -147,7 +143,13 @@ 1.4.0 5.3.0 8.1.4 - + + 0.8.0-preview-20190125.1 + + 0.8.0-preview1-20181126.4 + + 2.1.1 + 2.2.0 0.9.9 0.10.13 @@ -159,6 +161,7 @@ 3.1.0 1.7.3.4 4.10.0 + 0.10.1 1.0.2 12.0.1 3.12.1 @@ -178,5 +181,4 @@ 2.4.0 2.4.0 - diff --git a/eng/Workarounds.targets b/eng/Workarounds.targets new file mode 100644 index 0000000000..9b1af1b35f --- /dev/null +++ b/eng/Workarounds.targets @@ -0,0 +1,3 @@ + + + diff --git a/eng/scripts/AddAllProjectRefsToSolution.ps1 b/eng/scripts/AddAllProjectRefsToSolution.ps1 new file mode 100644 index 0000000000..274c098fba --- /dev/null +++ b/eng/scripts/AddAllProjectRefsToSolution.ps1 @@ -0,0 +1,60 @@ +<# +.SYNOPSIS +This adds the complete closure of project references to a .sln file + +.EXAMPLE +Let's say you have a folder of projects in src/Banana/, and a file src/Banana/Banana.sln. +To traverse the ProjectReference graph to add all dependency projects, run this script: + + ./eng/scripts/AddAllProjectRefsToSolution.ps1 -WorkingDir ./src/Banana/ + +.EXAMPLE +If src/Banana/ has multiple .sln files, use the -sln parameter. + + ./eng/scripts/AddAllProjectRefsToSolution.ps1 -WorkingDir ./src/Banana/ -SolutionFile src/Banana/Solution1.sln +#> +[CmdletBinding(PositionalBinding = $false)] +param( + [string]$WorkingDir, + [Alias('sln')] + [string]$SolutionFile +) + +$ErrorActionPreference = 'Stop' +$repoRoot = Resolve-Path "$PSScriptRoot/../../" +$listFile = New-TemporaryFile + +if (-not $WorkingDir) { + $WorkingDir = Get-Location +} + +Push-Location $WorkingDir +try { + if (-not $SolutionFile) { + + $slnCount = Get-ChildItem *.sln | Measure + + if ($slnCount.count -eq 0) { + Write-Error "Could not find a solution in this directory. Specify one with -sln " + exit 1 + } + if ($slnCount.count -gt 1) { + Write-Error "Multiple solutions found in this directory. Specify which one to modify with -sln " + exit 1 + } + $SolutionFile = Get-ChildItem *.sln | select -first 1 + } + + & "$repoRoot\build.ps1" -projects "$(Get-Location)\**\*.*proj" /t:ShowProjectClosure "/p:ProjectsReferencedOutFile=$listFile" + + foreach ($proj in (Get-Content $listFile)) { + & dotnet sln $SolutionFile add $proj + if ($lastexitcode -ne 0) { + Write-Warning "Failed to add $proj to $SolutionFile" + } + } +} +finally { + Pop-Location + rm $listFile -ea ignore +} diff --git a/eng/scripts/CodeCheck.ps1 b/eng/scripts/CodeCheck.ps1 index f9db3a159b..0292192844 100644 --- a/eng/scripts/CodeCheck.ps1 +++ b/eng/scripts/CodeCheck.ps1 @@ -26,7 +26,7 @@ try { # if ($ci) { - & $repoRoot/build.cmd /t:InstallDotNet + & $repoRoot/build.ps1 -ci /t:InstallDotNet } Write-Host "Checking that solutions are up to date" @@ -56,13 +56,9 @@ try { Write-Host "Re-running code generation" - Write-Host "Re-generating ProjectReference.props" + Write-Host "Re-generating project lists" Invoke-Block { - [string[]] $generateArgs = @() - if ($ci) { - $generateArgs += '-ci' - } - & $repoRoot/build.cmd /t:GenerateProjectList @generateArgs + & $PSScriptRoot\GenerateProjectList.ps1 -ci:$ci } Write-Host "Re-generating package baselines" @@ -90,7 +86,6 @@ finally { Write-Host "" foreach ($err in $errors) { - Write-Host -f Red "error : $err" } diff --git a/eng/scripts/GenerateProjectList.ps1 b/eng/scripts/GenerateProjectList.ps1 new file mode 100644 index 0000000000..53cbe58138 --- /dev/null +++ b/eng/scripts/GenerateProjectList.ps1 @@ -0,0 +1,8 @@ +param( + [switch]$ci +) +$ErrorActionPreference = 'stop' + +$repoRoot = Resolve-Path "$PSScriptRoot/../.." + +& "$repoRoot\build.ps1" -ci:$ci -all /t:GenerateProjectList diff --git a/eng/scripts/KillProcesses.ps1 b/eng/scripts/KillProcesses.ps1 new file mode 100644 index 0000000000..29b3657281 --- /dev/null +++ b/eng/scripts/KillProcesses.ps1 @@ -0,0 +1,16 @@ +$ErrorActionPreference = 'Continue' + +taskkill /T /F /IM dotnet.exe +taskkill /T /F /IM testhost.exe +taskkill /T /F /IM iisexpress.exe +taskkill /T /F /IM iisexpresstray.exe +taskkill /T /F /IM w3wp.exe +taskkill /T /F /IM msbuild.exe +taskkill /T /F /IM vbcscompiler.exe +taskkill /T /F /IM git.exe +taskkill /T /F /IM vctip.exe +taskkill /T /F /IM chrome.exe +taskkill /T /F /IM h2spec.exe +iisreset /restart + +exit 0 diff --git a/eng/scripts/KillProcesses.sh b/eng/scripts/KillProcesses.sh new file mode 100755 index 0000000000..f52511739b --- /dev/null +++ b/eng/scripts/KillProcesses.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +pkill dotnet || true +exit 0 diff --git a/eng/scripts/cibuild.cmd b/eng/scripts/cibuild.cmd index b1048279a3..1e7d47b39e 100644 --- a/eng/scripts/cibuild.cmd +++ b/eng/scripts/cibuild.cmd @@ -1,3 +1,3 @@ @ECHO OFF SET RepoRoot=%~dp0..\.. -%RepoRoot%\build.cmd -ci -all -restore -build -pack -test -sign %* +%RepoRoot%\build.cmd -ci -all -pack -sign %* diff --git a/eng/scripts/cibuild.sh b/eng/scripts/cibuild.sh index 6eab1faa2f..d5837c0908 100755 --- a/eng/scripts/cibuild.sh +++ b/eng/scripts/cibuild.sh @@ -2,6 +2,8 @@ set -euo pipefail +export PATH="$PATH:$HOME/nginxinstall/sbin/" + DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" repo_root="$DIR/../.." -"$repo_root/build.sh" --ci --all --restore --build --pack --test "$@" +"$repo_root/build.sh" --ci --all --pack "$@" diff --git a/eng/scripts/install-nginx-linux.sh b/eng/scripts/install-nginx-linux.sh new file mode 100755 index 0000000000..a245308a0c --- /dev/null +++ b/eng/scripts/install-nginx-linux.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +curl -sSL http://nginx.org/download/nginx-1.14.2.tar.gz | tar zxfv - -C /tmp && cd /tmp/nginx-1.14.2/ +./configure --prefix=$HOME/nginxinstall --with-http_ssl_module +make +make install diff --git a/eng/scripts/install-nginx-mac.sh b/eng/scripts/install-nginx-mac.sh new file mode 100755 index 0000000000..b44bd5d928 --- /dev/null +++ b/eng/scripts/install-nginx-mac.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +brew update +brew install openssl nginx diff --git a/eng/signcheck.exclusions.txt b/eng/signcheck.exclusions.txt index acbdca8318..93f17f63f5 100644 --- a/eng/signcheck.exclusions.txt +++ b/eng/signcheck.exclusions.txt @@ -1,6 +1,8 @@ -content/sdk/*/AppHostTemplate/apphost.exe;AspNetCoreRuntime.*.nupkg; Exclude the apphost because this is expected to be code-signed by customers after the SDK modifies it. -content/*.js;Microsoft.DotNet.Web.Spa.ProjectTemplates.*.nupkg; Exclude JavaScript files from codesigning in project templates -content/*.js;Microsoft.DotNet.Web.ProjectTemplates.*.nupkg; Exclude JavaScript files from codesigning in project templates -Templates/*.js;Microsoft.VisualStudio.Web.CodeGenerators.Mvc.*.nupkg; Exclude JavaScript files from codesigning in code generators -*.js;signalr-*-javadoc.jar; Exclude JavaScript files in the generated javadocs -*.binlog; Exclude msbuild log files +*/AppHostTemplate/apphost.exe;AspNetCoreRuntime.*.nupkg; Exclude the apphost because this is expected to be code-signed by customers after the SDK modifies it. +*/runtime.*.microsoft.netcore.dotnetapphost/*/apphost.exe;Microsoft.AspNetCore.AzureAppServices.SiteExtension.*.nupkg; Exclude the apphost because this is expected to be code-signed by customers after the SDK modifies it. +*.js;; Exclude all JavaScript files from codesigning because we don't expect these to run on Windows Script Host +*.binlog;; Exclude msbuild log files +*.symbols.nupkg;; Exclude NuGet symbols packages. These are not shipped to customers and should not be code signed. +;*.symbols.nupkg; Exclude everything inside NuGet symbols packages. These are not shipped to customers and should not be code signed. +;runtime.osx-x64.Microsoft.AspNetCore.App.*.nupkg; Exclude the contents of the MacOS runtime package because MacOS only supports codesigning for MacOS native binaries and apps +;runtime.linux-*.Microsoft.AspNetCore.App.*.nupkg; Exclude the contents of the Linux runtime packages because Linux doesn't support validating authenticode signatures diff --git a/eng/targets/CSharp.Common.props b/eng/targets/CSharp.Common.props index 8e774beb44..b8849afad7 100644 --- a/eng/targets/CSharp.Common.props +++ b/eng/targets/CSharp.Common.props @@ -2,17 +2,14 @@ 7.3 - - - SHA256 - + - + diff --git a/eng/targets/Npm.Common.targets b/eng/targets/Npm.Common.targets index 2bbed5f9be..79f975532f 100644 --- a/eng/targets/Npm.Common.targets +++ b/eng/targets/Npm.Common.targets @@ -69,16 +69,4 @@
- - - - NpmPackage - $(PackageId) - $(PackageVersion) - - - - - - diff --git a/eng/targets/Packaging.targets b/eng/targets/Packaging.targets index a49a65b988..5e5b8014d8 100644 --- a/eng/targets/Packaging.targets +++ b/eng/targets/Packaging.targets @@ -7,34 +7,14 @@ See $(RepositoryRoot)eng\tools\BaselineGenerator\README.md for instructions on updating this baseline." />
- - - - - $(PackageOutputPath)$(PackageId).$(PackageVersion).nupkg - - - - - NuGetPackage - $(PackageId) - $(PackageVersion) - $(RepositoryRoot) - true - - - - - <_ProjectPathWithVersion Include="$(MSBuildProjectFullPath)"> - $(MSBuildProjectName) + <_ProjectPathWithVersion Include="$(MSBuildProjectFullPath)" Condition="'$(IsPackable)' == 'true'"> + $(PackageId) $(PackageVersion) + $(PackageId.Replace('.',''))PackageVersion diff --git a/eng/targets/ResolveIisReferences.targets b/eng/targets/ResolveIisReferences.targets index ba0ae8fc46..76c17c8c80 100644 --- a/eng/targets/ResolveIisReferences.targets +++ b/eng/targets/ResolveIisReferences.targets @@ -13,6 +13,7 @@ with the right MSBuild incantations to get output copied to the right place. Platform=%(Platform) + Platform=Win32 %(Platform)\%(HandlerPath)\ diff --git a/eng/targets/ResolveReferences.targets b/eng/targets/ResolveReferences.targets index 03d40146ca..149ec43822 100644 --- a/eng/targets/ResolveReferences.targets +++ b/eng/targets/ResolveReferences.targets @@ -52,10 +52,9 @@ <_ImplicitPackageReference Include="@(PackageReference->WithMetadataValue('IsImplicitlyDefined', 'true'))" /> - <_ExplicitPackageReference Include="@(PackageReference)" Exclude="@(_ImplicitPackageReference)" /> - - <_ExplicitPackageReference Remove="Internal.AspNetCore.Sdk" /> - <_ExplicitPackageReference Remove="Microsoft.NETFramework.ReferenceAssemblies" /> + <_AllowedExplicitPackageReference Include="@(PackageReference->WithMetadataValue('AllowExplicitReference', 'true'))" /> + <_AllowedExplicitPackageReference Include="FSharp.Core" Condition="'$(MSBuildProjectExtension)' == '.fsproj'" /> + <_ExplicitPackageReference Include="@(PackageReference)" Exclude="@(_ImplicitPackageReference);@(_AllowedExplicitPackageReference)" /> <_UnusedProjectReferenceProvider Include="@(ProjectReferenceProvider)" Exclude="@(Reference)" /> @@ -133,9 +132,8 @@ <_ImplicitPackageReference Remove="@(_ImplicitPackageReference)" /> - + <_ExplicitPackageReference Remove="@(_ExplicitPackageReference)" /> @@ -146,7 +144,7 @@ + Text="Could not resolve this reference. Could not locate the package or project for "%(Reference.Identity)". Did you update baselines and dependencies lists? See docs/ReferenceResolution.md for more details." /> @@ -171,4 +169,30 @@ + + + + <_CustomCollectProjectReferenceDependsOn Condition="'$(TargetFramework)' != ''">ResolveProjectReferences + + + + <_TargetFrameworks Include="$(TargetFrameworks)" /> + + + + + + + + diff --git a/eng/targets/RuntimeIdentifiers.props b/eng/targets/RuntimeIdentifiers.props deleted file mode 100644 index b38ec14b94..0000000000 --- a/eng/targets/RuntimeIdentifiers.props +++ /dev/null @@ -1,28 +0,0 @@ - - - - - win-x64 - osx-x64 - linux-x64 - - $(SharedFxRid.Substring($([MSBuild]::Add($(SharedFxRid.LastIndexOf('-')), 1)))) - - - win-x64 - osx-x64 - linux-x64 - - - - win-x64; - win-x86; - win-arm; - osx-x64; - linux-musl-x64; - linux-x64; - linux-arm; - linux-arm64 - - - diff --git a/eng/targets/Wix.Common.targets b/eng/targets/Wix.Common.targets index 7ff9e39fd6..4c6d15a790 100644 --- a/eng/targets/Wix.Common.targets +++ b/eng/targets/Wix.Common.targets @@ -31,7 +31,6 @@ en-US $(Culture) $(Platform) - $(Platform) $(OutputPath) $(DefineConstants);BinPath=$(OutputPath)$(Culture)\ $(WixVariables);$(DefineConstants) diff --git a/eng/tools/XplatPackageSigner/XplatPackageSigner.proj b/eng/tools/XplatPackageSigner/XplatPackageSigner.proj new file mode 100644 index 0000000000..bde2dc9a28 --- /dev/null +++ b/eng/tools/XplatPackageSigner/XplatPackageSigner.proj @@ -0,0 +1,38 @@ + + + + $([MSBuild]::ValueOrDefault($(SignType),'real')) + + + + + + + + $([MSBuild]::NormalizeDirectory($(DirectoryToSign))) + $(RepositoryRoot)obj\$(MSBuildProjectName)\ + + + + + + NuGet + + + + + + + + + + + + + diff --git a/eng/tools/XplatPackageSigner/sign-packages.cmd b/eng/tools/XplatPackageSigner/sign-packages.cmd new file mode 100644 index 0000000000..a46d10192f --- /dev/null +++ b/eng/tools/XplatPackageSigner/sign-packages.cmd @@ -0,0 +1,15 @@ +@ECHO OFF + +SET DirToSign=%1 + +IF "%DirToSign%"=="" ( + echo Error^: Expected argument ^ + echo Usage^: sign-packages.cmd ^ + + exit /b 1 +) + +SET RepoRoot=%~dp0..\..\.. +SET Project=%~dp0\XplatPackageSigner.proj + +%RepoRoot%\build.cmd -NoRestore -projects %project% /p:DirectoryToSign=%DirToSign% /bl:%RepoRoot%\artifacts\logs\XplatSign.binlog diff --git a/global.json b/global.json index 93b9880dae..ad876808c1 100644 --- a/global.json +++ b/global.json @@ -1,8 +1,8 @@ { - "sdk": { - "version": "3.0.100-preview-009750" - }, - "msbuild-sdks": { - "Internal.AspNetCore.Sdk": "3.0.0-build-20190110.4" - } + "sdk": { + "version": "3.0.100-preview-009750" + }, + "msbuild-sdks": { + "Internal.AspNetCore.Sdk": "3.0.0-build-20190130.1" + } } diff --git a/korebuild-lock.txt b/korebuild-lock.txt index 7800fa1cf7..c5201be5e4 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:3.0.0-build-20190110.4 -commithash:356f6ce74815523dfda61e3da6e652ad52f536be +version:3.0.0-build-20190130.1 +commithash:3b24877488f6bbff779aa3bd66fcffb4a6c04daf diff --git a/restore.cmd b/restore.cmd index e6275ff5d1..45e272ec1f 100644 --- a/restore.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 = '';& '%~dp0build.ps1' -all -restore:$true -build:$False %*; exit $LASTEXITCODE" +PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0build.ps1' -all -nobuild -restore %*; exit $LASTEXITCODE" diff --git a/src/Antiforgery/src/Internal/DefaultAntiforgeryTokenStore.cs b/src/Antiforgery/src/Internal/DefaultAntiforgeryTokenStore.cs index 95e6d6f1bc..b0fdd5cd93 100644 --- a/src/Antiforgery/src/Internal/DefaultAntiforgeryTokenStore.cs +++ b/src/Antiforgery/src/Internal/DefaultAntiforgeryTokenStore.cs @@ -46,7 +46,7 @@ namespace Microsoft.AspNetCore.Antiforgery.Internal // We want to delay reading the form as much as possible, for example in case of large file uploads, // request token could be part of the header. - StringValues requestToken; + StringValues requestToken = default; if (_options.HeaderName != null) { requestToken = httpContext.Request.Headers[_options.HeaderName]; diff --git a/src/AuthSamples/.gitignore b/src/AuthSamples/.gitignore deleted file mode 100644 index d15bf87a35..0000000000 --- a/src/AuthSamples/.gitignore +++ /dev/null @@ -1,38 +0,0 @@ -[Oo]bj/ -[Bb]in/ -TestResults/ -.nuget/ -*.sln.ide/ -_ReSharper.*/ -.idea/ -packages/ -artifacts/ -PublishProfiles/ -.vs/ -.vscode/ -*.user -*.suo -*.cache -*.docstates -_ReSharper.* -nuget.exe -*net45.csproj -*net451.csproj -*k10.csproj -*.psess -*.vsp -*.pidb -*.userprefs -*DS_Store -*.ncrunchsolution -*.*sdf -*.ipch -*.swp -*~ -.build/ -.testPublish/ -launchSettings.json -BenchmarkDotNet.Artifacts/ -BDN.Generated/ -binaries/ -global.json diff --git a/src/AuthSamples/AuthSamples.sln b/src/AuthSamples/AuthSamples.sln deleted file mode 100644 index 063f6b6aa4..0000000000 --- a/src/AuthSamples/AuthSamples.sln +++ /dev/null @@ -1,146 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27130.2003 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{CA4538F5-9DA8-4139-B891-A13279889F79}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{DA474CFD-7419-4747-A583-CCDC1FF71EB5}" - ProjectSection(SolutionItems) = preProject - build\common.props = build\common.props - build\dependencies.props = build\dependencies.props - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cookies", "samples\Cookies\Cookies.csproj", "{5FA7ABB3-5285-4101-B25E-0C8178ECDA50}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ClaimsTransformation", "samples\ClaimsTransformation\ClaimsTransformation.csproj", "{526BE3AE-3DD3-4AB6-BC81-AC34ED735482}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{15E42EAC-5CBB-49EC-91FB-53743882CF2B}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AuthSamples.FunctionalTests", "test\AuthSamples.FunctionalTests\AuthSamples.FunctionalTests.csproj", "{B5C26BE6-655E-4D7F-B756-F286750EF172}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PathSchemeSelection", "samples\PathSchemeSelection\PathSchemeSelection.csproj", "{4E91BD2A-616F-45EE-9647-2F1608D17FB9}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Identity.ExternalClaims", "samples\Identity.ExternalClaims\Identity.ExternalClaims.csproj", "{D8804E7A-BD7A-4E4B-ACA7-822A37A81B28}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DynamicSchemes", "samples\DynamicSchemes\DynamicSchemes.csproj", "{F2F7A64C-870C-40C9-B5FC-F8952F1572B3}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CustomPolicyProvider", "samples\CustomPolicyProvider\CustomPolicyProvider.csproj", "{70299871-8FF5-4521-AD56-48BB6E07BA13}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StaticFilesAuth", "samples\StaticFilesAuth\StaticFilesAuth.csproj", "{0F013930-E66F-4F8B-95BE-CDFB417ACE3E}" -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 - {5FA7ABB3-5285-4101-B25E-0C8178ECDA50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5FA7ABB3-5285-4101-B25E-0C8178ECDA50}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5FA7ABB3-5285-4101-B25E-0C8178ECDA50}.Debug|x64.ActiveCfg = Debug|Any CPU - {5FA7ABB3-5285-4101-B25E-0C8178ECDA50}.Debug|x86.ActiveCfg = Debug|Any CPU - {5FA7ABB3-5285-4101-B25E-0C8178ECDA50}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5FA7ABB3-5285-4101-B25E-0C8178ECDA50}.Release|Any CPU.Build.0 = Release|Any CPU - {5FA7ABB3-5285-4101-B25E-0C8178ECDA50}.Release|x64.ActiveCfg = Release|Any CPU - {5FA7ABB3-5285-4101-B25E-0C8178ECDA50}.Release|x86.ActiveCfg = Release|Any CPU - {526BE3AE-3DD3-4AB6-BC81-AC34ED735482}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {526BE3AE-3DD3-4AB6-BC81-AC34ED735482}.Debug|Any CPU.Build.0 = Debug|Any CPU - {526BE3AE-3DD3-4AB6-BC81-AC34ED735482}.Debug|x64.ActiveCfg = Debug|Any CPU - {526BE3AE-3DD3-4AB6-BC81-AC34ED735482}.Debug|x86.ActiveCfg = Debug|Any CPU - {526BE3AE-3DD3-4AB6-BC81-AC34ED735482}.Release|Any CPU.ActiveCfg = Release|Any CPU - {526BE3AE-3DD3-4AB6-BC81-AC34ED735482}.Release|Any CPU.Build.0 = Release|Any CPU - {526BE3AE-3DD3-4AB6-BC81-AC34ED735482}.Release|x64.ActiveCfg = Release|Any CPU - {526BE3AE-3DD3-4AB6-BC81-AC34ED735482}.Release|x86.ActiveCfg = Release|Any CPU - {B5C26BE6-655E-4D7F-B756-F286750EF172}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B5C26BE6-655E-4D7F-B756-F286750EF172}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B5C26BE6-655E-4D7F-B756-F286750EF172}.Debug|x64.ActiveCfg = Debug|Any CPU - {B5C26BE6-655E-4D7F-B756-F286750EF172}.Debug|x64.Build.0 = Debug|Any CPU - {B5C26BE6-655E-4D7F-B756-F286750EF172}.Debug|x86.ActiveCfg = Debug|Any CPU - {B5C26BE6-655E-4D7F-B756-F286750EF172}.Debug|x86.Build.0 = Debug|Any CPU - {B5C26BE6-655E-4D7F-B756-F286750EF172}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B5C26BE6-655E-4D7F-B756-F286750EF172}.Release|Any CPU.Build.0 = Release|Any CPU - {B5C26BE6-655E-4D7F-B756-F286750EF172}.Release|x64.ActiveCfg = Release|Any CPU - {B5C26BE6-655E-4D7F-B756-F286750EF172}.Release|x64.Build.0 = Release|Any CPU - {B5C26BE6-655E-4D7F-B756-F286750EF172}.Release|x86.ActiveCfg = Release|Any CPU - {B5C26BE6-655E-4D7F-B756-F286750EF172}.Release|x86.Build.0 = Release|Any CPU - {4E91BD2A-616F-45EE-9647-2F1608D17FB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4E91BD2A-616F-45EE-9647-2F1608D17FB9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4E91BD2A-616F-45EE-9647-2F1608D17FB9}.Debug|x64.ActiveCfg = Debug|Any CPU - {4E91BD2A-616F-45EE-9647-2F1608D17FB9}.Debug|x64.Build.0 = Debug|Any CPU - {4E91BD2A-616F-45EE-9647-2F1608D17FB9}.Debug|x86.ActiveCfg = Debug|Any CPU - {4E91BD2A-616F-45EE-9647-2F1608D17FB9}.Debug|x86.Build.0 = Debug|Any CPU - {4E91BD2A-616F-45EE-9647-2F1608D17FB9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4E91BD2A-616F-45EE-9647-2F1608D17FB9}.Release|Any CPU.Build.0 = Release|Any CPU - {4E91BD2A-616F-45EE-9647-2F1608D17FB9}.Release|x64.ActiveCfg = Release|Any CPU - {4E91BD2A-616F-45EE-9647-2F1608D17FB9}.Release|x64.Build.0 = Release|Any CPU - {4E91BD2A-616F-45EE-9647-2F1608D17FB9}.Release|x86.ActiveCfg = Release|Any CPU - {4E91BD2A-616F-45EE-9647-2F1608D17FB9}.Release|x86.Build.0 = Release|Any CPU - {D8804E7A-BD7A-4E4B-ACA7-822A37A81B28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D8804E7A-BD7A-4E4B-ACA7-822A37A81B28}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D8804E7A-BD7A-4E4B-ACA7-822A37A81B28}.Debug|x64.ActiveCfg = Debug|Any CPU - {D8804E7A-BD7A-4E4B-ACA7-822A37A81B28}.Debug|x64.Build.0 = Debug|Any CPU - {D8804E7A-BD7A-4E4B-ACA7-822A37A81B28}.Debug|x86.ActiveCfg = Debug|Any CPU - {D8804E7A-BD7A-4E4B-ACA7-822A37A81B28}.Debug|x86.Build.0 = Debug|Any CPU - {D8804E7A-BD7A-4E4B-ACA7-822A37A81B28}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D8804E7A-BD7A-4E4B-ACA7-822A37A81B28}.Release|Any CPU.Build.0 = Release|Any CPU - {D8804E7A-BD7A-4E4B-ACA7-822A37A81B28}.Release|x64.ActiveCfg = Release|Any CPU - {D8804E7A-BD7A-4E4B-ACA7-822A37A81B28}.Release|x64.Build.0 = Release|Any CPU - {D8804E7A-BD7A-4E4B-ACA7-822A37A81B28}.Release|x86.ActiveCfg = Release|Any CPU - {D8804E7A-BD7A-4E4B-ACA7-822A37A81B28}.Release|x86.Build.0 = Release|Any CPU - {F2F7A64C-870C-40C9-B5FC-F8952F1572B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F2F7A64C-870C-40C9-B5FC-F8952F1572B3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F2F7A64C-870C-40C9-B5FC-F8952F1572B3}.Debug|x64.ActiveCfg = Debug|Any CPU - {F2F7A64C-870C-40C9-B5FC-F8952F1572B3}.Debug|x64.Build.0 = Debug|Any CPU - {F2F7A64C-870C-40C9-B5FC-F8952F1572B3}.Debug|x86.ActiveCfg = Debug|Any CPU - {F2F7A64C-870C-40C9-B5FC-F8952F1572B3}.Debug|x86.Build.0 = Debug|Any CPU - {F2F7A64C-870C-40C9-B5FC-F8952F1572B3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F2F7A64C-870C-40C9-B5FC-F8952F1572B3}.Release|Any CPU.Build.0 = Release|Any CPU - {F2F7A64C-870C-40C9-B5FC-F8952F1572B3}.Release|x64.ActiveCfg = Release|Any CPU - {F2F7A64C-870C-40C9-B5FC-F8952F1572B3}.Release|x64.Build.0 = Release|Any CPU - {F2F7A64C-870C-40C9-B5FC-F8952F1572B3}.Release|x86.ActiveCfg = Release|Any CPU - {F2F7A64C-870C-40C9-B5FC-F8952F1572B3}.Release|x86.Build.0 = Release|Any CPU - {70299871-8FF5-4521-AD56-48BB6E07BA13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {70299871-8FF5-4521-AD56-48BB6E07BA13}.Debug|Any CPU.Build.0 = Debug|Any CPU - {70299871-8FF5-4521-AD56-48BB6E07BA13}.Debug|x64.ActiveCfg = Debug|Any CPU - {70299871-8FF5-4521-AD56-48BB6E07BA13}.Debug|x64.Build.0 = Debug|Any CPU - {70299871-8FF5-4521-AD56-48BB6E07BA13}.Debug|x86.ActiveCfg = Debug|Any CPU - {70299871-8FF5-4521-AD56-48BB6E07BA13}.Debug|x86.Build.0 = Debug|Any CPU - {70299871-8FF5-4521-AD56-48BB6E07BA13}.Release|Any CPU.ActiveCfg = Release|Any CPU - {70299871-8FF5-4521-AD56-48BB6E07BA13}.Release|Any CPU.Build.0 = Release|Any CPU - {70299871-8FF5-4521-AD56-48BB6E07BA13}.Release|x64.ActiveCfg = Release|Any CPU - {70299871-8FF5-4521-AD56-48BB6E07BA13}.Release|x64.Build.0 = Release|Any CPU - {70299871-8FF5-4521-AD56-48BB6E07BA13}.Release|x86.ActiveCfg = Release|Any CPU - {70299871-8FF5-4521-AD56-48BB6E07BA13}.Release|x86.Build.0 = Release|Any CPU - {0F013930-E66F-4F8B-95BE-CDFB417ACE3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0F013930-E66F-4F8B-95BE-CDFB417ACE3E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0F013930-E66F-4F8B-95BE-CDFB417ACE3E}.Debug|x64.ActiveCfg = Debug|Any CPU - {0F013930-E66F-4F8B-95BE-CDFB417ACE3E}.Debug|x64.Build.0 = Debug|Any CPU - {0F013930-E66F-4F8B-95BE-CDFB417ACE3E}.Debug|x86.ActiveCfg = Debug|Any CPU - {0F013930-E66F-4F8B-95BE-CDFB417ACE3E}.Debug|x86.Build.0 = Debug|Any CPU - {0F013930-E66F-4F8B-95BE-CDFB417ACE3E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0F013930-E66F-4F8B-95BE-CDFB417ACE3E}.Release|Any CPU.Build.0 = Release|Any CPU - {0F013930-E66F-4F8B-95BE-CDFB417ACE3E}.Release|x64.ActiveCfg = Release|Any CPU - {0F013930-E66F-4F8B-95BE-CDFB417ACE3E}.Release|x64.Build.0 = Release|Any CPU - {0F013930-E66F-4F8B-95BE-CDFB417ACE3E}.Release|x86.ActiveCfg = Release|Any CPU - {0F013930-E66F-4F8B-95BE-CDFB417ACE3E}.Release|x86.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {5FA7ABB3-5285-4101-B25E-0C8178ECDA50} = {CA4538F5-9DA8-4139-B891-A13279889F79} - {526BE3AE-3DD3-4AB6-BC81-AC34ED735482} = {CA4538F5-9DA8-4139-B891-A13279889F79} - {B5C26BE6-655E-4D7F-B756-F286750EF172} = {15E42EAC-5CBB-49EC-91FB-53743882CF2B} - {4E91BD2A-616F-45EE-9647-2F1608D17FB9} = {CA4538F5-9DA8-4139-B891-A13279889F79} - {D8804E7A-BD7A-4E4B-ACA7-822A37A81B28} = {CA4538F5-9DA8-4139-B891-A13279889F79} - {F2F7A64C-870C-40C9-B5FC-F8952F1572B3} = {CA4538F5-9DA8-4139-B891-A13279889F79} - {70299871-8FF5-4521-AD56-48BB6E07BA13} = {CA4538F5-9DA8-4139-B891-A13279889F79} - {0F013930-E66F-4F8B-95BE-CDFB417ACE3E} = {CA4538F5-9DA8-4139-B891-A13279889F79} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {39E3AF62-B1FD-4156-92AA-F4FA99B5AD89} - EndGlobalSection -EndGlobal diff --git a/src/AuthSamples/Directory.Build.props b/src/AuthSamples/Directory.Build.props deleted file mode 100644 index 7a5b31911d..0000000000 --- a/src/AuthSamples/Directory.Build.props +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - Microsoft ASP.NET Core - https://github.com/aspnet/AspNetCore - git - $(MSBuildThisFileDirectory) - $(NoWarn);NU1605 - - - - - - - diff --git a/src/AuthSamples/Directory.Build.targets b/src/AuthSamples/Directory.Build.targets deleted file mode 100644 index 7a09b207eb..0000000000 --- a/src/AuthSamples/Directory.Build.targets +++ /dev/null @@ -1,5 +0,0 @@ - - - $(MicrosoftNETCoreAppPackageVersion) - - diff --git a/src/AuthSamples/NuGetPackageVerifier.json b/src/AuthSamples/NuGetPackageVerifier.json deleted file mode 100644 index 22ef3c09c0..0000000000 --- a/src/AuthSamples/NuGetPackageVerifier.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "Default": { - "rules": [ - "DefaultCompositeRule" - ] - } -} diff --git a/src/AuthSamples/README.md b/src/AuthSamples/README.md deleted file mode 100644 index f147a95edd..0000000000 --- a/src/AuthSamples/README.md +++ /dev/null @@ -1,15 +0,0 @@ -AuthSamples -================= - -This repo contains ASP.NET Core samples for Authentication, Authorization, Identity, etc.. - -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. - -Before opening this project in Visual Studio or VS Code, execute `build.cmd /t:Restore` (Windows) or `./build.sh /t:Restore` (Linux/macOS). -This will execute only the part of the build script that downloads and initializes a few required build tools and packages. - -See [developer documentation](https://github.com/aspnet/Home/wiki) for more details. \ No newline at end of file diff --git a/src/AuthSamples/build/dependencies.props b/src/AuthSamples/build/dependencies.props deleted file mode 100644 index 8212c5b564..0000000000 --- a/src/AuthSamples/build/dependencies.props +++ /dev/null @@ -1,52 +0,0 @@ - - - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - - - 0.9.9 - 3.0.0-alpha1-20181031.6 - 3.0.0-alpha1-10772 - 3.0.0-alpha1-10772 - 3.0.0-alpha1-10772 - 3.0.0-alpha1-10772 - 3.0.0-alpha1-10772 - 3.0.0-a-alpha1-authz-middleware-16949 - 3.0.0-a-alpha1-authz-middleware-16949 - 3.0.0-alpha1-10772 - 3.0.0-alpha1-10772 - 3.0.0-alpha1-10772 - 3.0.0-alpha1-10772 - 3.0.0-alpha1-10772 - 3.0.0-alpha1-10772 - 3.0.0-alpha1-10772 - 3.0.0-alpha1-10772 - 3.0.0-alpha1-10772 - 3.0.0-alpha1-10772 - 3.0.0-alpha1-10772 - 3.0.0-alpha1-10772 - 3.0.0-alpha1-10772 - 3.0.0-alpha1-10772 - 3.0.0-alpha1-10772 - 3.0.0-alpha1-10772 - 3.0.0-alpha1-10772 - 3.0.0-alpha1-10772 - 3.0.0-alpha1-10772 - 3.0.0-preview-181106-14 - 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-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/sources.props b/src/AuthSamples/build/sources.props deleted file mode 100644 index 9215df9751..0000000000 --- a/src/AuthSamples/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/AuthSamples/samples/ClaimsTransformation/ClaimsTransformation.csproj b/src/AuthSamples/samples/ClaimsTransformation/ClaimsTransformation.csproj deleted file mode 100644 index 4d5a7f2ddd..0000000000 --- a/src/AuthSamples/samples/ClaimsTransformation/ClaimsTransformation.csproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - false - netcoreapp3.0 - - - - - - - - - - - diff --git a/src/AuthSamples/samples/Cookies/Cookies.csproj b/src/AuthSamples/samples/Cookies/Cookies.csproj deleted file mode 100644 index 4d5a7f2ddd..0000000000 --- a/src/AuthSamples/samples/Cookies/Cookies.csproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - false - netcoreapp3.0 - - - - - - - - - - - diff --git a/src/AuthSamples/samples/CustomPolicyProvider/CustomPolicyProvider.csproj b/src/AuthSamples/samples/CustomPolicyProvider/CustomPolicyProvider.csproj deleted file mode 100644 index f6b155cca3..0000000000 --- a/src/AuthSamples/samples/CustomPolicyProvider/CustomPolicyProvider.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - netcoreapp3.0 - - - - - - - - - - diff --git a/src/AuthSamples/samples/DynamicSchemes/DynamicSchemes.csproj b/src/AuthSamples/samples/DynamicSchemes/DynamicSchemes.csproj deleted file mode 100644 index f7e8d9fc5a..0000000000 --- a/src/AuthSamples/samples/DynamicSchemes/DynamicSchemes.csproj +++ /dev/null @@ -1,23 +0,0 @@ - - - netcoreapp3.0 - - - - - - - - - - - - - - - - - - - - diff --git a/src/AuthSamples/samples/Identity.ExternalClaims/Identity.ExternalClaims.csproj b/src/AuthSamples/samples/Identity.ExternalClaims/Identity.ExternalClaims.csproj deleted file mode 100644 index 4101262cc5..0000000000 --- a/src/AuthSamples/samples/Identity.ExternalClaims/Identity.ExternalClaims.csproj +++ /dev/null @@ -1,30 +0,0 @@ - - - netcoreapp3.0 - aspnet-Identity.ExternalClaims-E95BE154-CB1B-4633-A2E0-B2DF12FE8BD3 - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/AuthSamples/samples/PathSchemeSelection/PathSchemeSelection.csproj b/src/AuthSamples/samples/PathSchemeSelection/PathSchemeSelection.csproj deleted file mode 100644 index d788a9bdd2..0000000000 --- a/src/AuthSamples/samples/PathSchemeSelection/PathSchemeSelection.csproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - false - netcoreapp3.0 - - - - - - - - - - - diff --git a/src/AuthSamples/test/AuthSamples.FunctionalTests/AuthSamples.FunctionalTests.csproj b/src/AuthSamples/test/AuthSamples.FunctionalTests/AuthSamples.FunctionalTests.csproj deleted file mode 100644 index 540b771a93..0000000000 --- a/src/AuthSamples/test/AuthSamples.FunctionalTests/AuthSamples.FunctionalTests.csproj +++ /dev/null @@ -1,26 +0,0 @@ - - - - netcoreapp3.0 - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Azure/AzureAD/Authentication.AzureAD.UI/src/AzureADDefaults.cs b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/AzureADDefaults.cs index eb0d5f26fa..a344514155 100644 --- a/src/Azure/AzureAD/Authentication.AzureAD.UI/src/AzureADDefaults.cs +++ b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/AzureADDefaults.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; @@ -13,29 +13,29 @@ namespace Microsoft.AspNetCore.Authentication.AzureAD.UI /// The scheme name for Open ID Connect when using /// . /// - public static readonly string OpenIdScheme = "AzureADOpenID"; + public const string OpenIdScheme = "AzureADOpenID"; /// /// The scheme name for cookies when using /// . /// - public static readonly string CookieScheme = "AzureADCookie"; + public const string CookieScheme = "AzureADCookie"; /// /// The default scheme for Azure Active Directory Bearer. /// - public static readonly string BearerAuthenticationScheme = "AzureADBearer"; + public const string BearerAuthenticationScheme = "AzureADBearer"; /// /// The scheme name for JWT Bearer when using /// . /// - public static readonly string JwtBearerAuthenticationScheme = "AzureADJwtBearer"; + public const string JwtBearerAuthenticationScheme = "AzureADJwtBearer"; /// /// The default scheme for Azure Active Directory. /// - public static readonly string AuthenticationScheme = "AzureAD"; + public const string AuthenticationScheme = "AzureAD"; /// /// The display name for Azure Active Directory. diff --git a/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Microsoft.AspNetCore.Authentication.AzureAD.UI.csproj b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Microsoft.AspNetCore.Authentication.AzureAD.UI.csproj index 4a7df9d5a8..1605940b28 100644 --- a/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Microsoft.AspNetCore.Authentication.AzureAD.UI.csproj +++ b/src/Azure/AzureAD/Authentication.AzureAD.UI/src/Microsoft.AspNetCore.Authentication.AzureAD.UI.csproj @@ -6,7 +6,7 @@ netcoreapp3.0 aspnetcore;authentication;AzureAD true - true + true Microsoft.AspNetCore.Mvc.ApplicationParts.NullApplicationPartFactory, Microsoft.AspNetCore.Mvc.Core <_EnableAllInclusiveRazorSdk>true diff --git a/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/AzureAdB2CDefaults.cs b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/AzureAdB2CDefaults.cs index 3bfe9bcbb0..769eea589b 100644 --- a/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/AzureAdB2CDefaults.cs +++ b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/AzureAdB2CDefaults.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; @@ -20,29 +20,29 @@ namespace Microsoft.AspNetCore.Authentication.AzureADB2C.UI /// The scheme name for Open ID Connect when using /// . /// - public static readonly string OpenIdScheme = "AzureADB2COpenID"; + public const string OpenIdScheme = "AzureADB2COpenID"; /// /// The scheme name for cookies when using /// . /// - public static readonly string CookieScheme = "AzureADB2CCookie"; + public const string CookieScheme = "AzureADB2CCookie"; /// /// The default scheme for Azure Active Directory B2C Bearer. /// - public static readonly string BearerAuthenticationScheme = "AzureADB2CBearer"; + public const string BearerAuthenticationScheme = "AzureADB2CBearer"; /// /// The scheme name for JWT Bearer when using /// . /// - public static readonly string JwtBearerAuthenticationScheme = "AzureADB2CJwtBearer"; + public const string JwtBearerAuthenticationScheme = "AzureADB2CJwtBearer"; /// /// The default scheme for Azure Active Directory B2C. /// - public static readonly string AuthenticationScheme = "AzureADB2C"; + public const string AuthenticationScheme = "AzureADB2C"; /// /// The display name for Azure Active Directory B2C. diff --git a/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.csproj b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.csproj index 3c3a584bfd..485d3a4085 100644 --- a/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.csproj +++ b/src/Azure/AzureAD/Authentication.AzureADB2C.UI/src/Microsoft.AspNetCore.Authentication.AzureADB2C.UI.csproj @@ -6,7 +6,7 @@ netcoreapp3.0 aspnetcore;authentication;AzureADB2C true - true + true Microsoft.AspNetCore.Mvc.ApplicationParts.NullApplicationPartFactory, Microsoft.AspNetCore.Mvc.Core <_EnableAllInclusiveRazorSdk>true diff --git a/src/Azure/AzureAppServices.HostingStartup/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj b/src/Azure/AzureAppServices.HostingStartup/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj index ac74adf4d7..821f07eb68 100644 --- a/src/Azure/AzureAppServices.HostingStartup/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj +++ b/src/Azure/AzureAppServices.HostingStartup/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj @@ -7,7 +7,7 @@ netcoreapp3.0 true aspnetcore;azure;appservices - true + true diff --git a/src/Azure/AzureAppServicesIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration.csproj b/src/Azure/AzureAppServicesIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration.csproj index fbbef613fd..7cd3dc1453 100644 --- a/src/Azure/AzureAppServicesIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration.csproj +++ b/src/Azure/AzureAppServicesIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration.csproj @@ -7,7 +7,7 @@ true true aspnetcore;azure;appservices - true + true diff --git a/src/Components/.editorconfig b/src/Components/.editorconfig deleted file mode 100644 index f9d02415ce..0000000000 --- a/src/Components/.editorconfig +++ /dev/null @@ -1,55 +0,0 @@ -# All Files -[*] -charset = utf-8 -end_of_line = crlf -indent_style = space -indent_size = 4 -insert_final_newline = false -trim_trailing_whitespace = true - -# Solution Files -[*.sln] -indent_style = tab - -# Markdown Files -[*.md] -trim_trailing_whitespace = false - -# Web Files -[*.{htm,html,js,ts,css,scss,less}] -insert_final_newline = true -indent_size = 2 - -[*.{yml,json}] -indent_size = 2 - -[*.{xml,csproj,config,*proj,targets,props}] -indent_size = 2 - -# Dotnet code style settings: -[*.cs] -# Sort using and Import directives with System.* appearing first -dotnet_sort_system_directives_first = true - -# Don't use this. qualifier -dotnet_style_qualification_for_field = false:suggestion -dotnet_style_qualification_for_property = false:suggestion - -# use int x = .. over Int32 -dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion - -# use int.MaxValue over Int32.MaxValue -dotnet_style_predefined_type_for_member_access = true:suggestion - -# Require var all the time. -csharp_style_var_for_built_in_types = true:suggestion -csharp_style_var_when_type_is_apparent = true:suggestion -csharp_style_var_elsewhere = true:suggestion - -# Newline settings -csharp_new_line_before_open_brace = all -csharp_new_line_before_else = true -csharp_new_line_before_catch = true -csharp_new_line_before_finally = true -csharp_new_line_before_members_in_object_initializers = true -csharp_new_line_before_members_in_anonymous_types = true diff --git a/src/Components/.gitignore b/src/Components/.gitignore deleted file mode 100644 index 33382d59a5..0000000000 --- a/src/Components/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -.vs/ -bin/ -obj/ -*.user -launchSettings.json -artifacts/ -msbuild.binlog -.vscode/ -BenchmarkDotNet.Artifacts/ -*.binlog diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Analyzers/ComponentParametersShouldNotBePublicAnalyzer.cs b/src/Components/Analyzers/src/ComponentParametersShouldNotBePublicAnalyzer.cs similarity index 100% rename from src/Components/src/Microsoft.AspNetCore.Components.Analyzers/ComponentParametersShouldNotBePublicAnalyzer.cs rename to src/Components/Analyzers/src/ComponentParametersShouldNotBePublicAnalyzer.cs diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Analyzers/ComponentParametersShouldNotBePublicCodeFixProvider.cs b/src/Components/Analyzers/src/ComponentParametersShouldNotBePublicCodeFixProvider.cs similarity index 100% rename from src/Components/src/Microsoft.AspNetCore.Components.Analyzers/ComponentParametersShouldNotBePublicCodeFixProvider.cs rename to src/Components/Analyzers/src/ComponentParametersShouldNotBePublicCodeFixProvider.cs diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Analyzers/Microsoft.AspNetCore.Components.Analyzers.csproj b/src/Components/Analyzers/src/Microsoft.AspNetCore.Components.Analyzers.csproj similarity index 68% rename from src/Components/src/Microsoft.AspNetCore.Components.Analyzers/Microsoft.AspNetCore.Components.Analyzers.csproj rename to src/Components/Analyzers/src/Microsoft.AspNetCore.Components.Analyzers.csproj index 276f246bcd..b38c807057 100644 --- a/src/Components/src/Microsoft.AspNetCore.Components.Analyzers/Microsoft.AspNetCore.Components.Analyzers.csproj +++ b/src/Components/Analyzers/src/Microsoft.AspNetCore.Components.Analyzers.csproj @@ -6,20 +6,22 @@ true false Roslyn analyzers for ASP.NET Core Components. - true + true + + false - + - + True True @@ -32,8 +34,4 @@ - - - - diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Analyzers/Resources.Designer.cs b/src/Components/Analyzers/src/Resources.Designer.cs similarity index 100% rename from src/Components/src/Microsoft.AspNetCore.Components.Analyzers/Resources.Designer.cs rename to src/Components/Analyzers/src/Resources.Designer.cs diff --git a/src/Components/src/Microsoft.AspNetCore.Components.Analyzers/Resources.resx b/src/Components/Analyzers/src/Resources.resx similarity index 100% rename from src/Components/src/Microsoft.AspNetCore.Components.Analyzers/Resources.resx rename to src/Components/Analyzers/src/Resources.resx diff --git a/src/Components/test/Microsoft.AspNetCore.Components.Analyzers.Test/ComponentParametersShouldNotBePublicTest.cs b/src/Components/Analyzers/test/ComponentParametersShouldNotBePublicTest.cs similarity index 100% rename from src/Components/test/Microsoft.AspNetCore.Components.Analyzers.Test/ComponentParametersShouldNotBePublicTest.cs rename to src/Components/Analyzers/test/ComponentParametersShouldNotBePublicTest.cs diff --git a/src/Components/test/Microsoft.AspNetCore.Components.Analyzers.Test/Helpers/CodeFixVerifier.Helper.cs b/src/Components/Analyzers/test/Helpers/CodeFixVerifier.Helper.cs similarity index 100% rename from src/Components/test/Microsoft.AspNetCore.Components.Analyzers.Test/Helpers/CodeFixVerifier.Helper.cs rename to src/Components/Analyzers/test/Helpers/CodeFixVerifier.Helper.cs diff --git a/src/Components/test/Microsoft.AspNetCore.Components.Analyzers.Test/Helpers/DiagnosticResult.cs b/src/Components/Analyzers/test/Helpers/DiagnosticResult.cs similarity index 100% rename from src/Components/test/Microsoft.AspNetCore.Components.Analyzers.Test/Helpers/DiagnosticResult.cs rename to src/Components/Analyzers/test/Helpers/DiagnosticResult.cs diff --git a/src/Components/test/Microsoft.AspNetCore.Components.Analyzers.Test/Helpers/DiagnosticVerifier.Helper.cs b/src/Components/Analyzers/test/Helpers/DiagnosticVerifier.Helper.cs similarity index 100% rename from src/Components/test/Microsoft.AspNetCore.Components.Analyzers.Test/Helpers/DiagnosticVerifier.Helper.cs rename to src/Components/Analyzers/test/Helpers/DiagnosticVerifier.Helper.cs diff --git a/src/Components/Analyzers/test/Microsoft.AspNetCore.Components.Analyzers.Tests.csproj b/src/Components/Analyzers/test/Microsoft.AspNetCore.Components.Analyzers.Tests.csproj new file mode 100644 index 0000000000..a31c1a8f0e --- /dev/null +++ b/src/Components/Analyzers/test/Microsoft.AspNetCore.Components.Analyzers.Tests.csproj @@ -0,0 +1,17 @@ + + + + netcoreapp3.0 + + + + + + + + + + + + + diff --git a/src/Components/test/Microsoft.AspNetCore.Components.Analyzers.Test/Verifiers/CodeFixVerifier.cs b/src/Components/Analyzers/test/Verifiers/CodeFixVerifier.cs similarity index 100% rename from src/Components/test/Microsoft.AspNetCore.Components.Analyzers.Test/Verifiers/CodeFixVerifier.cs rename to src/Components/Analyzers/test/Verifiers/CodeFixVerifier.cs diff --git a/src/Components/test/Microsoft.AspNetCore.Components.Analyzers.Test/Verifiers/DiagnosticVerifier.cs b/src/Components/Analyzers/test/Verifiers/DiagnosticVerifier.cs similarity index 100% rename from src/Components/test/Microsoft.AspNetCore.Components.Analyzers.Test/Verifiers/DiagnosticVerifier.cs rename to src/Components/Analyzers/test/Verifiers/DiagnosticVerifier.cs diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/BlazorWebAssemblyHost.cs b/src/Components/Blazor/Blazor/src/Hosting/BlazorWebAssemblyHost.cs similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/BlazorWebAssemblyHost.cs rename to src/Components/Blazor/Blazor/src/Hosting/BlazorWebAssemblyHost.cs diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/IWebAssemblyHost.cs b/src/Components/Blazor/Blazor/src/Hosting/IWebAssemblyHost.cs similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/IWebAssemblyHost.cs rename to src/Components/Blazor/Blazor/src/Hosting/IWebAssemblyHost.cs diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/IWebAssemblyHostBuilder.cs b/src/Components/Blazor/Blazor/src/Hosting/IWebAssemblyHostBuilder.cs similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/IWebAssemblyHostBuilder.cs rename to src/Components/Blazor/Blazor/src/Hosting/IWebAssemblyHostBuilder.cs diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/IWebAssemblyServiceFactoryAdapter.cs b/src/Components/Blazor/Blazor/src/Hosting/IWebAssemblyServiceFactoryAdapter.cs similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/IWebAssemblyServiceFactoryAdapter.cs rename to src/Components/Blazor/Blazor/src/Hosting/IWebAssemblyServiceFactoryAdapter.cs diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyBlazorApplicationBuilder.cs b/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyBlazorApplicationBuilder.cs similarity index 94% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyBlazorApplicationBuilder.cs rename to src/Components/Blazor/Blazor/src/Hosting/WebAssemblyBlazorApplicationBuilder.cs index 1a621c30ab..13d0c70602 100644 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyBlazorApplicationBuilder.cs +++ b/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyBlazorApplicationBuilder.cs @@ -8,7 +8,7 @@ using Microsoft.AspNetCore.Components.Builder; namespace Microsoft.AspNetCore.Blazor.Hosting { - internal class WebAssemblyBlazorApplicationBuilder : IBlazorApplicationBuilder + internal class WebAssemblyBlazorApplicationBuilder : IComponentsApplicationBuilder { public WebAssemblyBlazorApplicationBuilder(IServiceProvider services) { diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyHost.cs b/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHost.cs similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyHost.cs rename to src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHost.cs diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyHostBuilder.cs b/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostBuilder.cs similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyHostBuilder.cs rename to src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostBuilder.cs diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyHostBuilderContext.cs b/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostBuilderContext.cs similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyHostBuilderContext.cs rename to src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostBuilderContext.cs diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyHostBuilderExtensions.cs b/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostBuilderExtensions.cs similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyHostBuilderExtensions.cs rename to src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostBuilderExtensions.cs diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyHostExtensions.cs b/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostExtensions.cs similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyHostExtensions.cs rename to src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostExtensions.cs diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyServiceFactoryAdapter.cs b/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyServiceFactoryAdapter.cs similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Hosting/WebAssemblyServiceFactoryAdapter.cs rename to src/Components/Blazor/Blazor/src/Hosting/WebAssemblyServiceFactoryAdapter.cs diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Http/FetchCredentialsOption.cs b/src/Components/Blazor/Blazor/src/Http/FetchCredentialsOption.cs similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Http/FetchCredentialsOption.cs rename to src/Components/Blazor/Blazor/src/Http/FetchCredentialsOption.cs diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Http/WebAssemblyHttpMessageHandler.cs b/src/Components/Blazor/Blazor/src/Http/WebAssemblyHttpMessageHandler.cs similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Http/WebAssemblyHttpMessageHandler.cs rename to src/Components/Blazor/Blazor/src/Http/WebAssemblyHttpMessageHandler.cs diff --git a/src/Components/Blazor/Blazor/src/Microsoft.AspNetCore.Blazor.csproj b/src/Components/Blazor/Blazor/src/Microsoft.AspNetCore.Blazor.csproj new file mode 100644 index 0000000000..97fba4e00a --- /dev/null +++ b/src/Components/Blazor/Blazor/src/Microsoft.AspNetCore.Blazor.csproj @@ -0,0 +1,19 @@ + + + + netstandard2.0 + Build client-side single-page applications (SPAs) with Razor Components running under WebAssembly. + true + + + + + + + + + + + + + diff --git a/src/Components/Blazor/Blazor/src/Properties/AssemblyInfo.cs b/src/Components/Blazor/Blazor/src/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..d0b4317656 --- /dev/null +++ b/src/Components/Blazor/Blazor/src/Properties/AssemblyInfo.cs @@ -0,0 +1,3 @@ +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Blazor.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Rendering/WebAssemblyRenderer.cs b/src/Components/Blazor/Blazor/src/Rendering/WebAssemblyRenderer.cs similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Rendering/WebAssemblyRenderer.cs rename to src/Components/Blazor/Blazor/src/Rendering/WebAssemblyRenderer.cs diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Services/WebAssemblyUriHelper.cs b/src/Components/Blazor/Blazor/src/Services/WebAssemblyUriHelper.cs similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor/Services/WebAssemblyUriHelper.cs rename to src/Components/Blazor/Blazor/src/Services/WebAssemblyUriHelper.cs diff --git a/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Test/Hosting/ConventionBasedStartupTest.cs b/src/Components/Blazor/Blazor/test/Hosting/ConventionBasedStartupTest.cs similarity index 98% rename from src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Test/Hosting/ConventionBasedStartupTest.cs rename to src/Components/Blazor/Blazor/test/Hosting/ConventionBasedStartupTest.cs index 7815e9a6f6..cbc73b79f8 100644 --- a/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Test/Hosting/ConventionBasedStartupTest.cs +++ b/src/Components/Blazor/Blazor/test/Hosting/ConventionBasedStartupTest.cs @@ -200,7 +200,7 @@ namespace Microsoft.AspNetCore.Components.Hosting { public List Arguments { get; } = new List(); - public void Configure(IBlazorApplicationBuilder app, string foo) + public void Configure(IComponentsApplicationBuilder app, string foo) { Arguments.Add(app); Arguments.Add(foo); diff --git a/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Test/Hosting/WebAssemblyHostBuilderTest.cs b/src/Components/Blazor/Blazor/test/Hosting/WebAssemblyHostBuilderTest.cs similarity index 100% rename from src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Test/Hosting/WebAssemblyHostBuilderTest.cs rename to src/Components/Blazor/Blazor/test/Hosting/WebAssemblyHostBuilderTest.cs diff --git a/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Test/Hosting/WebAssemblyHostTest.cs b/src/Components/Blazor/Blazor/test/Hosting/WebAssemblyHostTest.cs similarity index 95% rename from src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Test/Hosting/WebAssemblyHostTest.cs rename to src/Components/Blazor/Blazor/test/Hosting/WebAssemblyHostTest.cs index 9aa07b9c69..ce2e831427 100644 --- a/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Test/Hosting/WebAssemblyHostTest.cs +++ b/src/Components/Blazor/Blazor/test/Hosting/WebAssemblyHostTest.cs @@ -20,7 +20,7 @@ namespace Microsoft.AspNetCore.Blazor.Hosting.Test // Arrange var builder = new WebAssemblyHostBuilder(); var host = builder.Build(); - + // Act var ex = await Assert.ThrowsAsync(async () => await host.StartAsync()); @@ -69,7 +69,7 @@ namespace Microsoft.AspNetCore.Blazor.Hosting.Test { public bool ConfigureCalled { get; set; } - public void Configure(IBlazorApplicationBuilder app, IServiceProvider services) + public void Configure(IComponentsApplicationBuilder app, IServiceProvider services) { ConfigureCalled = true; } diff --git a/src/Components/Blazor/Blazor/test/Microsoft.AspNetCore.Blazor.Tests.csproj b/src/Components/Blazor/Blazor/test/Microsoft.AspNetCore.Blazor.Tests.csproj new file mode 100644 index 0000000000..43c8df3786 --- /dev/null +++ b/src/Components/Blazor/Blazor/test/Microsoft.AspNetCore.Blazor.Tests.csproj @@ -0,0 +1,11 @@ + + + + netcoreapp3.0 + + + + + + + diff --git a/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Test/WebAssemblyUriHelperTest.cs b/src/Components/Blazor/Blazor/test/WebAssemblyUriHelperTest.cs similarity index 100% rename from src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Test/WebAssemblyUriHelperTest.cs rename to src/Components/Blazor/Blazor/test/WebAssemblyUriHelperTest.cs diff --git a/src/Components/blazor/tooling/Microsoft.VisualStudio.BlazorExtension/AboutDialogInfoAttribute.cs b/src/Components/Blazor/BlazorExtension/src/AboutDialogInfoAttribute.cs similarity index 100% rename from src/Components/blazor/tooling/Microsoft.VisualStudio.BlazorExtension/AboutDialogInfoAttribute.cs rename to src/Components/Blazor/BlazorExtension/src/AboutDialogInfoAttribute.cs diff --git a/src/Components/blazor/tooling/Microsoft.VisualStudio.BlazorExtension/AutoRebuild/AutoRebuildService.cs b/src/Components/Blazor/BlazorExtension/src/AutoRebuild/AutoRebuildService.cs similarity index 95% rename from src/Components/blazor/tooling/Microsoft.VisualStudio.BlazorExtension/AutoRebuild/AutoRebuildService.cs rename to src/Components/Blazor/BlazorExtension/src/AutoRebuild/AutoRebuildService.cs index 49977fccfa..f3aa9b195b 100644 --- a/src/Components/blazor/tooling/Microsoft.VisualStudio.BlazorExtension/AutoRebuild/AutoRebuildService.cs +++ b/src/Components/Blazor/BlazorExtension/src/AutoRebuild/AutoRebuildService.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.VisualStudio.Shell.Interop; @@ -33,12 +33,12 @@ namespace Microsoft.VisualStudio.BlazorExtension public void Listen() { - AddBuildServiceNamedPipeServer(); + _ = AddBuildServiceNamedPipeServerAsync(); } - private void AddBuildServiceNamedPipeServer() + private Task AddBuildServiceNamedPipeServerAsync() { - Task.Factory.StartNew(async () => + return Task.Factory.StartNew(async () => { try { @@ -69,7 +69,7 @@ namespace Microsoft.VisualStudio.BlazorExtension // As soon as we receive a connection, spin up another background // listener to wait for the next connection await serverPipe.WaitForConnectionAsync(); - AddBuildServiceNamedPipeServer(); + _ = AddBuildServiceNamedPipeServerAsync(); await HandleRequestAsync(serverPipe, isServerElevated); } diff --git a/src/Components/blazor/tooling/Microsoft.VisualStudio.BlazorExtension/AutoRebuild/BuildEventsWatcher.cs b/src/Components/Blazor/BlazorExtension/src/AutoRebuild/BuildEventsWatcher.cs similarity index 91% rename from src/Components/blazor/tooling/Microsoft.VisualStudio.BlazorExtension/AutoRebuild/BuildEventsWatcher.cs rename to src/Components/Blazor/BlazorExtension/src/AutoRebuild/BuildEventsWatcher.cs index 1c56be2254..e05f05f28f 100644 --- a/src/Components/blazor/tooling/Microsoft.VisualStudio.BlazorExtension/AutoRebuild/BuildEventsWatcher.cs +++ b/src/Components/Blazor/BlazorExtension/src/AutoRebuild/BuildEventsWatcher.cs @@ -1,10 +1,9 @@ -// 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; using System.Collections.Generic; using System.Threading.Tasks; -using Microsoft.VisualStudio.ProjectSystem.Properties; using Microsoft.VisualStudio.Shell; using Microsoft.VisualStudio.Shell.Interop; @@ -74,14 +73,16 @@ namespace Microsoft.VisualStudio.BlazorExtension public int UpdateProjectCfg_Begin(IVsHierarchy pHierProj, IVsCfg pCfgProj, IVsCfg pCfgSln, uint dwAction, ref int pfCancel) { + ThreadHelper.ThrowIfNotOnUIThread(); + if (IsBlazorProject(pHierProj)) { // This method runs both for manually-invoked builds and for builds triggered automatically // by PerformNewBuildAsync(). In the case where it's a manually-invoked build, make sure // there's an in-progress BuildInfo so that if there are further builds requests while the // build is still in progress we can join them onto this existing build. - var ctx = (IVsBrowseObjectContext)pCfgProj; - var projectPath = ctx.UnconfiguredProject.FullPath; + + var projectPath = GetProjectPath(pHierProj); lock (mostRecentBuildInfosLock) { var hasBuildInProgress = @@ -99,11 +100,12 @@ namespace Microsoft.VisualStudio.BlazorExtension public int UpdateProjectCfg_Done(IVsHierarchy pHierProj, IVsCfg pCfgProj, IVsCfg pCfgSln, uint dwAction, int fSuccess, int fCancel) { + ThreadHelper.ThrowIfNotOnUIThread(); + if (IsBlazorProject(pHierProj)) { var buildResult = fSuccess == 1; - var ctx = (IVsBrowseObjectContext)pCfgProj; - var projectPath = ctx.UnconfiguredProject.FullPath; + var projectPath = GetProjectPath(pHierProj); // Mark pending build info as completed BuildInfo foundInfo = null; @@ -160,6 +162,13 @@ namespace Microsoft.VisualStudio.BlazorExtension private static bool IsBlazorProject(IVsHierarchy pHierProj) => pHierProj.IsCapabilityMatch(BlazorProjectCapability); + private static string GetProjectPath(IVsHierarchy pHierProj) + { + ThreadHelper.ThrowIfNotOnUIThread(); + ErrorHandler.ThrowOnFailure(((IVsProject)pHierProj).GetMkDocument((uint)VSConstants.VSITEMID.Root, out var projectPath), VSConstants.E_NOTIMPL); + return projectPath; + } + class BuildInfo { public DateTime StartTime { get; } diff --git a/src/Components/blazor/tooling/Microsoft.VisualStudio.BlazorExtension/AutoRebuild/StreamProtocolExtensions.cs b/src/Components/Blazor/BlazorExtension/src/AutoRebuild/StreamProtocolExtensions.cs similarity index 100% rename from src/Components/blazor/tooling/Microsoft.VisualStudio.BlazorExtension/AutoRebuild/StreamProtocolExtensions.cs rename to src/Components/Blazor/BlazorExtension/src/AutoRebuild/StreamProtocolExtensions.cs diff --git a/src/Components/Blazor/BlazorExtension/src/BlazorPackage.cs b/src/Components/Blazor/BlazorExtension/src/BlazorPackage.cs new file mode 100644 index 0000000000..fd956856ac --- /dev/null +++ b/src/Components/Blazor/BlazorExtension/src/BlazorPackage.cs @@ -0,0 +1,44 @@ +// 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.Runtime.InteropServices; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.VisualStudio.Shell; +using Microsoft.VisualStudio.Shell.Interop; +using Task = System.Threading.Tasks.Task; + +namespace Microsoft.VisualStudio.BlazorExtension +{ + // We mainly have a package so we can have an "About" dialog entry. + [PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)] + [AboutDialogInfo(PackageGuidString, "ASP.NET Core Blazor Language Services", "#110", "112")] + [Guid(BlazorPackage.PackageGuidString)] + [ProvideAutoLoad(UIContextGuids80.SolutionExists, PackageAutoLoadFlags.BackgroundLoad)] + public sealed class BlazorPackage : AsyncPackage + { + public const string PackageGuidString = "d9fe04bc-57a7-4107-915e-3a5c2f9e19fb"; + + protected async override Task InitializeAsync(CancellationToken cancellationToken, IProgress progress) + { + await base.InitializeAsync(cancellationToken, progress); + + await JoinableTaskFactory.SwitchToMainThreadAsync(); + + // Create build watcher. No need to unadvise, as this only happens once anyway. + var solution = (IVsSolution)await GetServiceAsync(typeof(IVsSolution)); + var buildManager = (IVsSolutionBuildManager)await GetServiceAsync(typeof(SVsSolutionBuildManager)); + + // According to the docs, this can happen if VS shuts down while our package is loading. + if (solution == null || buildManager == null) + { + var buildWatcher = new BuildEventsWatcher(solution, buildManager); + var hr = buildManager.AdviseUpdateSolutionEvents(buildWatcher, out var cookie); + Marshal.ThrowExceptionForHR(hr); + + new AutoRebuildService(buildWatcher).Listen(); + } + } + } +} diff --git a/src/Components/blazor/tooling/Microsoft.VisualStudio.BlazorExtension/CodeSnippets.pkgdef b/src/Components/Blazor/BlazorExtension/src/CodeSnippets.pkgdef similarity index 100% rename from src/Components/blazor/tooling/Microsoft.VisualStudio.BlazorExtension/CodeSnippets.pkgdef rename to src/Components/Blazor/BlazorExtension/src/CodeSnippets.pkgdef diff --git a/src/Components/blazor/tooling/Microsoft.VisualStudio.BlazorExtension/CodeSnippets/Blazor/para.snippet b/src/Components/Blazor/BlazorExtension/src/CodeSnippets/Blazor/para.snippet similarity index 100% rename from src/Components/blazor/tooling/Microsoft.VisualStudio.BlazorExtension/CodeSnippets/Blazor/para.snippet rename to src/Components/Blazor/BlazorExtension/src/CodeSnippets/Blazor/para.snippet diff --git a/src/Components/blazor/tooling/Microsoft.VisualStudio.BlazorExtension/Content/WebConfiguration.png b/src/Components/Blazor/BlazorExtension/src/Content/WebConfiguration.png similarity index 100% rename from src/Components/blazor/tooling/Microsoft.VisualStudio.BlazorExtension/Content/WebConfiguration.png rename to src/Components/Blazor/BlazorExtension/src/Content/WebConfiguration.png diff --git a/src/Components/blazor/tooling/Microsoft.VisualStudio.BlazorExtension/Microsoft.VisualStudio.BlazorExtension.csproj b/src/Components/Blazor/BlazorExtension/src/Microsoft.VisualStudio.BlazorExtension.csproj similarity index 70% rename from src/Components/blazor/tooling/Microsoft.VisualStudio.BlazorExtension/Microsoft.VisualStudio.BlazorExtension.csproj rename to src/Components/Blazor/BlazorExtension/src/Microsoft.VisualStudio.BlazorExtension.csproj index 335871c2e4..ad62a6c9a3 100644 --- a/src/Components/blazor/tooling/Microsoft.VisualStudio.BlazorExtension/Microsoft.VisualStudio.BlazorExtension.csproj +++ b/src/Components/Blazor/BlazorExtension/src/Microsoft.VisualStudio.BlazorExtension.csproj @@ -4,14 +4,21 @@ 16.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) true - - false - false - $(MSBuildThisFileDirectory)..\..\..\ + true + true + bin\$(Configuration)\ + obj\$(Configuration)\ + + false + false + false + false + false + false + true - - + - - - true - ..\..\..\build\Key.snk - - 15.7 - $(VsixVersion).$(BuildNumber) - $(VsixVersion).999999 - $(VsixVersion).ERROR-MISSING_BUILD_NUMBER + 16.0 + 424242.424242 + $(BuildNumberSuffix.Replace('-', '.')) + $(VsixVersionPrefix).$(VsixVersionSuffix) + + + + $(VisualStudioSetupOutputPath)$(MSBuildProjectName).vsix + + + Program @@ -71,9 +81,9 @@ true true - + - + ProjectTemplates\ @@ -89,25 +99,7 @@ - - - - false - - - - - - - + + + diff --git a/src/Components/blazor/tooling/Microsoft.VisualStudio.BlazorExtension/Resources.resx b/src/Components/Blazor/BlazorExtension/src/Resources.resx similarity index 100% rename from src/Components/blazor/tooling/Microsoft.VisualStudio.BlazorExtension/Resources.resx rename to src/Components/Blazor/BlazorExtension/src/Resources.resx diff --git a/src/Components/blazor/tooling/Microsoft.VisualStudio.BlazorExtension/Resources/BlazorPackage.ico b/src/Components/Blazor/BlazorExtension/src/Resources/BlazorPackage.ico similarity index 100% rename from src/Components/blazor/tooling/Microsoft.VisualStudio.BlazorExtension/Resources/BlazorPackage.ico rename to src/Components/Blazor/BlazorExtension/src/Resources/BlazorPackage.ico diff --git a/src/Components/Blazor/BlazorExtension/src/Templates.pkgdef b/src/Components/Blazor/BlazorExtension/src/Templates.pkgdef new file mode 100644 index 0000000000..a5b41e7c29 --- /dev/null +++ b/src/Components/Blazor/BlazorExtension/src/Templates.pkgdef @@ -0,0 +1,2 @@ +[$RootKey$\TemplateEngine\Templates\Blazor\0.8.0] +"InstalledPath"="$PackageFolder$\ProjectTemplates" \ No newline at end of file diff --git a/src/Components/blazor/tooling/Microsoft.VisualStudio.BlazorExtension/source.extension.vsixmanifest b/src/Components/Blazor/BlazorExtension/src/source.extension.vsixmanifest similarity index 72% rename from src/Components/blazor/tooling/Microsoft.VisualStudio.BlazorExtension/source.extension.vsixmanifest rename to src/Components/Blazor/BlazorExtension/src/source.extension.vsixmanifest index 838bc66b88..869961f74e 100644 --- a/src/Components/blazor/tooling/Microsoft.VisualStudio.BlazorExtension/source.extension.vsixmanifest +++ b/src/Components/Blazor/BlazorExtension/src/source.extension.vsixmanifest @@ -12,19 +12,17 @@ Content\WebConfiguration.png - + - + - - - + - + diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Cli/Commands/ResolveRuntimeDependenciesCommand.cs b/src/Components/Blazor/Build/src/Cli/Commands/ResolveRuntimeDependenciesCommand.cs similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Cli/Commands/ResolveRuntimeDependenciesCommand.cs rename to src/Components/Blazor/Build/src/Cli/Commands/ResolveRuntimeDependenciesCommand.cs diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Cli/Commands/WriteBootJsonCommand.cs b/src/Components/Blazor/Build/src/Cli/Commands/WriteBootJsonCommand.cs similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Cli/Commands/WriteBootJsonCommand.cs rename to src/Components/Blazor/Build/src/Cli/Commands/WriteBootJsonCommand.cs diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Cli/Program.cs b/src/Components/Blazor/Build/src/Cli/Program.cs similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Cli/Program.cs rename to src/Components/Blazor/Build/src/Cli/Program.cs diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Core/BootJsonWriter.cs b/src/Components/Blazor/Build/src/Core/BootJsonWriter.cs similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Core/BootJsonWriter.cs rename to src/Components/Blazor/Build/src/Core/BootJsonWriter.cs diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Core/EmbeddedResources/EmbeddedResourceInfo.cs b/src/Components/Blazor/Build/src/Core/EmbeddedResources/EmbeddedResourceInfo.cs similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Core/EmbeddedResources/EmbeddedResourceInfo.cs rename to src/Components/Blazor/Build/src/Core/EmbeddedResources/EmbeddedResourceInfo.cs diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Core/EmbeddedResources/EmbeddedResourceKind.cs b/src/Components/Blazor/Build/src/Core/EmbeddedResources/EmbeddedResourceKind.cs similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Core/EmbeddedResources/EmbeddedResourceKind.cs rename to src/Components/Blazor/Build/src/Core/EmbeddedResources/EmbeddedResourceKind.cs diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Core/EmbeddedResources/EmbeddedResourcesProcessor.cs b/src/Components/Blazor/Build/src/Core/EmbeddedResources/EmbeddedResourcesProcessor.cs similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Core/EmbeddedResources/EmbeddedResourcesProcessor.cs rename to src/Components/Blazor/Build/src/Core/EmbeddedResources/EmbeddedResourcesProcessor.cs diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Core/RuntimeDependenciesResolver.cs b/src/Components/Blazor/Build/src/Core/RuntimeDependenciesResolver.cs similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Core/RuntimeDependenciesResolver.cs rename to src/Components/Blazor/Build/src/Core/RuntimeDependenciesResolver.cs diff --git a/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.csproj b/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.csproj new file mode 100644 index 0000000000..61c027e175 --- /dev/null +++ b/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.csproj @@ -0,0 +1,48 @@ + + + + netcoreapp3.0 + Build mechanism for ASP.NET Core Blazor applications. + Exe + true + true + + + + + + false + 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/Build/src/Microsoft.AspNetCore.Blazor.Build.nuspec similarity index 91% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Microsoft.AspNetCore.Blazor.Build.nuspec rename to src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.nuspec index 7a8a465048..3e85a96e10 100644 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/Microsoft.AspNetCore.Blazor.Build.nuspec +++ b/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.nuspec @@ -22,6 +22,6 @@ - + diff --git a/src/Components/Blazor/Build/src/Properties/AssemblyInfo.cs b/src/Components/Blazor/Build/src/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..aac42c25cc --- /dev/null +++ b/src/Components/Blazor/Build/src/Properties/AssemblyInfo.cs @@ -0,0 +1,3 @@ +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Blazor.Build.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/ReferenceFromSource.props b/src/Components/Blazor/Build/src/ReferenceFromSource.props similarity index 81% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/ReferenceFromSource.props rename to src/Components/Blazor/Build/src/ReferenceFromSource.props index 0d1f091e35..5802a69132 100644 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/ReferenceFromSource.props +++ b/src/Components/Blazor/Build/src/ReferenceFromSource.props @@ -9,11 +9,11 @@ This is only intended for use by other projects in this repo. --> - + true - $(MSBuildThisFileDirectory)../../../src/Microsoft.AspNetCore.Components.Browser.JS/dist/components.*.js + $(RepositoryRoot)src\Components\Browser.JS\src\dist\components.*.js @@ -29,12 +29,12 @@ --> dotnet - <_BlazorCliLocation>$(MSBuildThisFileDirectory)../Microsoft.AspNetCore.Blazor.Cli/bin/$(Configuration)/netcoreapp3.0/dotnet-blazor.dll + <_BlazorCliLocation>$(MSBuildThisFileDirectory)../../Cli/src/bin/$(Configuration)/netcoreapp3.0/dotnet-blazor.dll exec "$(_BlazorCliLocation)" serve $(AdditionalRunArguments) - + diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/build/netstandard1.0/Microsoft.AspNetCore.Blazor.Build.props b/src/Components/Blazor/Build/src/build/netstandard1.0/Microsoft.AspNetCore.Blazor.Build.props similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/build/netstandard1.0/Microsoft.AspNetCore.Blazor.Build.props rename to src/Components/Blazor/Build/src/build/netstandard1.0/Microsoft.AspNetCore.Blazor.Build.props diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/build/netstandard1.0/Microsoft.AspNetCore.Blazor.Build.targets b/src/Components/Blazor/Build/src/build/netstandard1.0/Microsoft.AspNetCore.Blazor.Build.targets similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/build/netstandard1.0/Microsoft.AspNetCore.Blazor.Build.targets rename to src/Components/Blazor/Build/src/build/netstandard1.0/Microsoft.AspNetCore.Blazor.Build.targets diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/targets/All.props b/src/Components/Blazor/Build/src/targets/All.props similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/targets/All.props rename to src/Components/Blazor/Build/src/targets/All.props diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/targets/All.targets b/src/Components/Blazor/Build/src/targets/All.targets similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/targets/All.targets rename to src/Components/Blazor/Build/src/targets/All.targets diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/targets/Blazor.MonoRuntime.props b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.props similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/targets/Blazor.MonoRuntime.props rename to src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.props diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/targets/Blazor.MonoRuntime.targets b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/targets/Blazor.MonoRuntime.targets rename to src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/targets/BuiltInBclLinkerDescriptor.xml b/src/Components/Blazor/Build/src/targets/BuiltInBclLinkerDescriptor.xml similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/targets/BuiltInBclLinkerDescriptor.xml rename to src/Components/Blazor/Build/src/targets/BuiltInBclLinkerDescriptor.xml diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/targets/Publish.targets b/src/Components/Blazor/Build/src/targets/Publish.targets similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/targets/Publish.targets rename to src/Components/Blazor/Build/src/targets/Publish.targets diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/targets/Standalone.Web.config b/src/Components/Blazor/Build/src/targets/Standalone.Web.config similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Build/targets/Standalone.Web.config rename to src/Components/Blazor/Build/src/targets/Standalone.Web.config diff --git a/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/BindRazorIntegrationTest.cs b/src/Components/Blazor/Build/test/BindRazorIntegrationTest.cs similarity index 98% rename from src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/BindRazorIntegrationTest.cs rename to src/Components/Blazor/Build/test/BindRazorIntegrationTest.cs index 0f217f4e1e..7e001e6c30 100644 --- a/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/BindRazorIntegrationTest.cs +++ b/src/Components/Blazor/Build/test/BindRazorIntegrationTest.cs @@ -62,14 +62,16 @@ namespace Test // Arrange AdditionalSyntaxTrees.Add(Parse(@" using System; +using System.Threading.Tasks; using Microsoft.AspNetCore.Components; namespace Test { public class MyComponent : ComponentBase, IComponent { - void IComponent.SetParameters(ParameterCollection parameters) + Task IComponent.SetParametersAsync(ParameterCollection parameters) { + return Task.CompletedTask; } } }")); @@ -136,14 +138,16 @@ namespace Test // Arrange AdditionalSyntaxTrees.Add(Parse(@" using System; +using System.Threading.Tasks; using Microsoft.AspNetCore.Components; namespace Test { public class MyComponent : ComponentBase, IComponent { - void IComponent.SetParameters(ParameterCollection parameters) + Task IComponent.SetParametersAsync(ParameterCollection parameters) { + return Task.CompletedTask; } } }")); diff --git a/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/BootJsonWriterTest.cs b/src/Components/Blazor/Build/test/BootJsonWriterTest.cs similarity index 100% rename from src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/BootJsonWriterTest.cs rename to src/Components/Blazor/Build/test/BootJsonWriterTest.cs diff --git a/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/ChildContentRazorIntegrationTest.cs b/src/Components/Blazor/Build/test/ChildContentRazorIntegrationTest.cs similarity index 100% rename from src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/ChildContentRazorIntegrationTest.cs rename to src/Components/Blazor/Build/test/ChildContentRazorIntegrationTest.cs diff --git a/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/ComponentRenderingRazorIntegrationTest.cs b/src/Components/Blazor/Build/test/ComponentRenderingRazorIntegrationTest.cs similarity index 99% rename from src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/ComponentRenderingRazorIntegrationTest.cs rename to src/Components/Blazor/Build/test/ComponentRenderingRazorIntegrationTest.cs index 0226c74ba4..2078a3e1df 100644 --- a/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/ComponentRenderingRazorIntegrationTest.cs +++ b/src/Components/Blazor/Build/test/ComponentRenderingRazorIntegrationTest.cs @@ -162,14 +162,16 @@ namespace Test { // Arrange AdditionalSyntaxTrees.Add(Parse(@" +using System.Threading.Tasks; using Microsoft.AspNetCore.Components; namespace Test { public class MyComponent : ComponentBase, IComponent { - void IComponent.SetParameters(ParameterCollection parameters) + Task IComponent.SetParametersAsync(ParameterCollection parameters) { + return Task.CompletedTask; } } } diff --git a/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/DirectiveRazorIntegrationTest.cs b/src/Components/Blazor/Build/test/DirectiveRazorIntegrationTest.cs similarity index 96% rename from src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/DirectiveRazorIntegrationTest.cs rename to src/Components/Blazor/Build/test/DirectiveRazorIntegrationTest.cs index 14485e1e61..a82da4b755 100644 --- a/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/DirectiveRazorIntegrationTest.cs +++ b/src/Components/Blazor/Build/test/DirectiveRazorIntegrationTest.cs @@ -4,6 +4,7 @@ using System; using System.Linq; using System.Reflection; +using System.Threading.Tasks; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Layouts; using Microsoft.AspNetCore.Components.Test.Helpers; @@ -149,12 +150,13 @@ namespace Microsoft.AspNetCore.Blazor.Build.Test [Parameter] RenderFragment Body { get; set; } - public void Init(RenderHandle renderHandle) + public void Configure(RenderHandle renderHandle) { } - public void SetParameters(ParameterCollection parameters) + public Task SetParametersAsync(ParameterCollection parameters) { + return Task.CompletedTask; } } diff --git a/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/GenericComponentRazorIntegrationTest.cs b/src/Components/Blazor/Build/test/GenericComponentRazorIntegrationTest.cs similarity index 100% rename from src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/GenericComponentRazorIntegrationTest.cs rename to src/Components/Blazor/Build/test/GenericComponentRazorIntegrationTest.cs diff --git a/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/Microsoft.AspNetCore.Blazor.Build.Test.csproj b/src/Components/Blazor/Build/test/Microsoft.AspNetCore.Blazor.Build.Tests.csproj similarity index 56% rename from src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/Microsoft.AspNetCore.Blazor.Build.Test.csproj rename to src/Components/Blazor/Build/test/Microsoft.AspNetCore.Blazor.Build.Tests.csproj index 8003e51a88..37a3d5ebb7 100644 --- a/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/Microsoft.AspNetCore.Blazor.Build.Test.csproj +++ b/src/Components/Blazor/Build/test/Microsoft.AspNetCore.Blazor.Build.Tests.csproj @@ -3,8 +3,6 @@ netcoreapp3.0 - false - $(DefaultItemExcludes);TestFiles\**\* @@ -23,21 +21,17 @@ - - - - - - - + + + + + - - + - - + diff --git a/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/Razor/NotFoundProjectItem.cs b/src/Components/Blazor/Build/test/Razor/NotFoundProjectItem.cs similarity index 100% rename from src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/Razor/NotFoundProjectItem.cs rename to src/Components/Blazor/Build/test/Razor/NotFoundProjectItem.cs diff --git a/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/Razor/TestFile.cs b/src/Components/Blazor/Build/test/Razor/TestFile.cs similarity index 100% rename from src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/Razor/TestFile.cs rename to src/Components/Blazor/Build/test/Razor/TestFile.cs diff --git a/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/Razor/TestProject.cs b/src/Components/Blazor/Build/test/Razor/TestProject.cs similarity index 100% rename from src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/Razor/TestProject.cs rename to src/Components/Blazor/Build/test/Razor/TestProject.cs diff --git a/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/Razor/VirtualProjectFileSystem.cs b/src/Components/Blazor/Build/test/Razor/VirtualProjectFileSystem.cs similarity index 100% rename from src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/Razor/VirtualProjectFileSystem.cs rename to src/Components/Blazor/Build/test/Razor/VirtualProjectFileSystem.cs diff --git a/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/Razor/VirtualProjectItem.cs b/src/Components/Blazor/Build/test/Razor/VirtualProjectItem.cs similarity index 100% rename from src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/Razor/VirtualProjectItem.cs rename to src/Components/Blazor/Build/test/Razor/VirtualProjectItem.cs diff --git a/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/RazorIntegrationTestBase.cs b/src/Components/Blazor/Build/test/RazorIntegrationTestBase.cs similarity index 97% rename from src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/RazorIntegrationTestBase.cs rename to src/Components/Blazor/Build/test/RazorIntegrationTestBase.cs index 799f995cde..c3f207e299 100644 --- a/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/RazorIntegrationTestBase.cs +++ b/src/Components/Blazor/Build/test/RazorIntegrationTestBase.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Reflection; +using System.Runtime.ExceptionServices; using System.Runtime.InteropServices; using System.Text; using System.Threading; @@ -376,7 +377,13 @@ namespace Microsoft.AspNetCore.Blazor.Build.Test { var renderer = new TestRenderer(); renderer.AttachComponent(component); - component.SetParameters(ParameterCollection.Empty); + var task = component.SetParametersAsync(ParameterCollection.Empty); + // we will have to change this method if we add a test that does actual async work. + Assert.True(task.Status.HasFlag(TaskStatus.RanToCompletion) || task.Status.HasFlag(TaskStatus.Faulted)); + if (task.IsFaulted) + { + ExceptionDispatchInfo.Capture(task.Exception.InnerException).Throw(); + } return renderer.LatestBatchReferenceFrames; } diff --git a/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/RenderingRazorIntegrationTest.cs b/src/Components/Blazor/Build/test/RenderingRazorIntegrationTest.cs similarity index 100% rename from src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/RenderingRazorIntegrationTest.cs rename to src/Components/Blazor/Build/test/RenderingRazorIntegrationTest.cs diff --git a/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/RuntimeDependenciesResolverTest.cs b/src/Components/Blazor/Build/test/RuntimeDependenciesResolverTest.cs similarity index 89% rename from src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/RuntimeDependenciesResolverTest.cs rename to src/Components/Blazor/Build/test/RuntimeDependenciesResolverTest.cs index c594add472..4e880ee59f 100644 --- a/src/Components/blazor/test/Microsoft.AspNetCore.Blazor.Build.Test/RuntimeDependenciesResolverTest.cs +++ b/src/Components/Blazor/Build/test/RuntimeDependenciesResolverTest.cs @@ -2,14 +2,23 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using System.Collections.Generic; using System.IO; using System.Linq; using Xunit; +using Xunit.Abstractions; namespace Microsoft.AspNetCore.Blazor.Build.Test { public class RuntimeDependenciesResolverTest { + private readonly ITestOutputHelper _output; + + public RuntimeDependenciesResolverTest(ITestOutputHelper output) + { + _output = output; + } + [Fact] public void FindsReferenceAssemblyGraph_ForStandaloneApp() { @@ -76,6 +85,7 @@ namespace Microsoft.AspNetCore.Blazor.Build.Test "System.Core.dll", "System.Data.dll", "System.Diagnostics.Debug.dll", + "System.Diagnostics.Tracing.dll", "System.Drawing.dll", "System.IO.Compression.dll", "System.IO.Compression.FileSystem.dll", @@ -112,6 +122,14 @@ namespace Microsoft.AspNetCore.Blazor.Build.Test .OrderBy(i => i, StringComparer.Ordinal) .ToArray(); + var expected = new HashSet(expectedContents); + var actual = new HashSet(contents); + _output.WriteLine("Expected contents to have:"); + _output.WriteLine(string.Join(",", expected.Except(actual))); + + _output.WriteLine("Unexpected contents:"); + _output.WriteLine(string.Join(",", actual.Except(expected))); + // Assert Assert.Equal(expectedContents, contents); } diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Cli/Commands/ServeCommand.cs b/src/Components/Blazor/Cli/src/Commands/ServeCommand.cs similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Cli/Commands/ServeCommand.cs rename to src/Components/Blazor/Cli/src/Commands/ServeCommand.cs diff --git a/src/Components/Blazor/Cli/src/Microsoft.AspNetCore.Blazor.Cli.csproj b/src/Components/Blazor/Cli/src/Microsoft.AspNetCore.Blazor.Cli.csproj new file mode 100644 index 0000000000..5b49f24fba --- /dev/null +++ b/src/Components/Blazor/Cli/src/Microsoft.AspNetCore.Blazor.Cli.csproj @@ -0,0 +1,47 @@ + + + + netcoreapp3.0 + Exe + dotnet-blazor + Microsoft.AspNetCore.Blazor.Cli + true + Microsoft.AspNetCore.Blazor.Cli.Program + Development server for use when building Blazor applications. + + false + + + + + + + + + + + + + + Microsoft.AspNetCore.Blazor.Cli.nuspec + + outdir=$(OutDir); + componentsrootdir=..\..\..\; + blazorversion=$(PackageVersion); + aspnetcoreversion=$(ComponentsPackageVersion); + sharedfxversion=$(SharedFxVersion); + repositorycommit=$(RepositoryCommit); + + + + + + diff --git a/src/Components/Blazor/Cli/src/Microsoft.AspNetCore.Blazor.Cli.nuspec b/src/Components/Blazor/Cli/src/Microsoft.AspNetCore.Blazor.Cli.nuspec new file mode 100644 index 0000000000..cfbc5f966f --- /dev/null +++ b/src/Components/Blazor/Cli/src/Microsoft.AspNetCore.Blazor.Cli.nuspec @@ -0,0 +1,32 @@ + + + + Microsoft.AspNetCore.Blazor.Cli + $blazorversion$ + Microsoft + Microsoft + true + https://raw.githubusercontent.com/aspnet/AspNetCore/2.0.0/LICENSE.txt + https://asp.net/ + https://go.microsoft.com/fwlink/?LinkID=288859 + Development server for use when building Blazor applications. + +This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/$repositorycommit$ + © Microsoft Corporation. All rights reserved. + aspnetcore components + true + + + + + + + + + + + + + + + diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Cli/Program.cs b/src/Components/Blazor/Cli/src/Program.cs similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Cli/Program.cs rename to src/Components/Blazor/Cli/src/Program.cs diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Cli/Server/Program.cs b/src/Components/Blazor/Cli/src/Server/Program.cs similarity index 52% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Cli/Server/Program.cs rename to src/Components/Blazor/Cli/src/Server/Program.cs index 29f05fc9b7..4d5360d207 100644 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Cli/Server/Program.cs +++ b/src/Components/Blazor/Cli/src/Server/Program.cs @@ -6,9 +6,19 @@ using Microsoft.Extensions.Configuration; namespace Microsoft.AspNetCore.Blazor.Cli.Server { - internal class Program + // This project is a CLI tool, so we don't expect anyone to reference it + // as a runtime library. As such we consider it reasonable to mark the + // following method as public purely so the E2E tests project can invoke it. + + /// + /// Intended for framework test use only. + /// + public class Program { - internal static IWebHost BuildWebHost(string[] args) => + /// + /// Intended for framework test use only. + /// + public static IWebHost BuildWebHost(string[] args) => WebHost.CreateDefaultBuilder(args) .UseConfiguration(new ConfigurationBuilder() .AddCommandLine(args) diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Cli/Server/Startup.cs b/src/Components/Blazor/Cli/src/Server/Startup.cs similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Cli/Server/Startup.cs rename to src/Components/Blazor/Cli/src/Server/Startup.cs diff --git a/src/Components/Blazor/Cli/src/temporaryruntimeconfig.json b/src/Components/Blazor/Cli/src/temporaryruntimeconfig.json new file mode 100644 index 0000000000..ab764021e6 --- /dev/null +++ b/src/Components/Blazor/Cli/src/temporaryruntimeconfig.json @@ -0,0 +1,9 @@ +{ + "runtimeOptions": { + "tfm": "netcoreapp3.0", + "framework": { + "name": "Microsoft.AspNetCore.App", + "version": "${sharedfxversion}" + } + } +} diff --git a/src/Components/Blazor/Directory.Build.props b/src/Components/Blazor/Directory.Build.props new file mode 100644 index 0000000000..cb599cac75 --- /dev/null +++ b/src/Components/Blazor/Directory.Build.props @@ -0,0 +1,10 @@ + + + + + $(PackageVersion) + $(BlazorComponentsVersionPrefix) + $(VersionPrefix) + $(VersionPrefix)-$(VersionSuffix) + + diff --git a/src/Components/Blazor/Server/src/Microsoft.AspNetCore.Blazor.Server.csproj b/src/Components/Blazor/Server/src/Microsoft.AspNetCore.Blazor.Server.csproj new file mode 100644 index 0000000000..6cc0b40a19 --- /dev/null +++ b/src/Components/Blazor/Server/src/Microsoft.AspNetCore.Blazor.Server.csproj @@ -0,0 +1,19 @@ + + + + netcoreapp3.0 + Runtime server features for ASP.NET Core Blazor applications. + true + + + + + + + + + + + + + diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Server/MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs b/src/Components/Blazor/Server/src/MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Server/MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs rename to src/Components/Blazor/Server/src/MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Server/MonoDebugProxy/UpdateSources.cmd b/src/Components/Blazor/Server/src/MonoDebugProxy/UpdateSources.cmd similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Server/MonoDebugProxy/UpdateSources.cmd rename to src/Components/Blazor/Server/src/MonoDebugProxy/UpdateSources.cmd diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Server/MonoDebugProxy/ws-proxy/DebugStore.cs b/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/DebugStore.cs similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Server/MonoDebugProxy/ws-proxy/DebugStore.cs rename to src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/DebugStore.cs diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Server/MonoDebugProxy/ws-proxy/MonoProxy.cs b/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/MonoProxy.cs similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Server/MonoDebugProxy/ws-proxy/MonoProxy.cs rename to src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/MonoProxy.cs diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Server/MonoDebugProxy/ws-proxy/WsProxy.cs b/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/WsProxy.cs similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Server/MonoDebugProxy/ws-proxy/WsProxy.cs rename to src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/WsProxy.cs diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/.gitignore b/src/Components/Blazor/Templates/.gitignore similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/.gitignore rename to src/Components/Blazor/Templates/.gitignore diff --git a/src/Components/Blazor/Templates/src/Directory.Build.props b/src/Components/Blazor/Templates/src/Directory.Build.props new file mode 100644 index 0000000000..c5666650b9 --- /dev/null +++ b/src/Components/Blazor/Templates/src/Directory.Build.props @@ -0,0 +1,14 @@ + + + + + false + + + + + 0.8.0-preview-19064-0339 + 3.0.0-preview-19064-0339 + + + diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/Directory.Build.targets b/src/Components/Blazor/Templates/src/Directory.Build.targets similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/Directory.Build.targets rename to src/Components/Blazor/Templates/src/Directory.Build.targets diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/Microsoft.AspNetCore.Blazor.Templates.csproj b/src/Components/Blazor/Templates/src/Microsoft.AspNetCore.Blazor.Templates.csproj similarity index 89% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/Microsoft.AspNetCore.Blazor.Templates.csproj rename to src/Components/Blazor/Templates/src/Microsoft.AspNetCore.Blazor.Templates.csproj index b5053c4993..f33d8fcc67 100644 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/Microsoft.AspNetCore.Blazor.Templates.csproj +++ b/src/Components/Blazor/Templates/src/Microsoft.AspNetCore.Blazor.Templates.csproj @@ -2,20 +2,15 @@ netstandard2.0 Microsoft.AspNetCore.Blazor.Templates.nuspec - true + true False False False 2008 Templates for ASP.NET Core Blazor projects. + 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/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/BlazorHosted-CSharp.Client.csproj similarity index 87% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/BlazorHosted-CSharp.Client.csproj rename to src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/BlazorHosted-CSharp.Client.csproj index 942482234b..e213d7de3d 100644 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/BlazorHosted-CSharp.Client.csproj +++ b/src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/BlazorHosted-CSharp.Client.csproj @@ -13,7 +13,6 @@ - diff --git a/src/Components/blazor/samples/StandaloneApp/Pages/Counter.cshtml b/src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Pages/Counter.cshtml similarity index 100% rename from src/Components/blazor/samples/StandaloneApp/Pages/Counter.cshtml rename to src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Pages/Counter.cshtml diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Pages/FetchData.cshtml b/src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Pages/FetchData.cshtml similarity index 94% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Pages/FetchData.cshtml rename to src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Pages/FetchData.cshtml index 623bcf1771..2f8e580529 100644 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Pages/FetchData.cshtml +++ b/src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Pages/FetchData.cshtml @@ -1,5 +1,5 @@ -@using BlazorHosted_CSharp.Shared -@page "/fetchdata" +@page "/fetchdata" +@using BlazorHosted_CSharp.Shared @inject HttpClient Http

Weather forecast

diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Pages/Index.cshtml b/src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Pages/Index.cshtml similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Pages/Index.cshtml rename to src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Pages/Index.cshtml diff --git a/src/Components/blazor/benchmarks/Microsoft.AspNetCore.Blazor.E2EPerformance/Pages/_ViewImports.cshtml b/src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Pages/_ViewImports.cshtml similarity index 100% rename from src/Components/blazor/benchmarks/Microsoft.AspNetCore.Blazor.E2EPerformance/Pages/_ViewImports.cshtml rename to src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Pages/_ViewImports.cshtml diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Program.cs b/src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Program.cs similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Program.cs rename to src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Program.cs diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Shared/MainLayout.cshtml b/src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Shared/MainLayout.cshtml similarity index 100% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Shared/MainLayout.cshtml rename to src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Shared/MainLayout.cshtml diff --git a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Shared/NavMenu.cshtml b/src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Shared/NavMenu.cshtml similarity index 78% rename from src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Shared/NavMenu.cshtml rename to src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Shared/NavMenu.cshtml index b29ab68e03..6fd8763b01 100644 --- a/src/Components/blazor/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Shared/NavMenu.cshtml +++ b/src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Shared/NavMenu.cshtml @@ -1,14 +1,14 @@  -
+