From 94e349587932058b127b8e9004913c0a79775cde Mon Sep 17 00:00:00 2001 From: William Li Date: Wed, 2 Jan 2019 14:01:35 -0800 Subject: [PATCH] Remove 'old' folder (#235) old/ is convenient during migration. It is not used after it is done. --- old/Directory.Build.props | 69 -- old/build.cmd | 7 - old/build.proj | 62 -- old/build/AppHostTemplate.proj | 49 -- old/build/AzureInfo.props | 48 -- .../BackwardsCompatibilityRuntimes.props | 57 -- old/build/BranchInfo.props | 6 - old/build/Branding.props | 38 - ...ishAllLinuxDistrosNativeInstallers.targets | 30 - old/build/BuildDefaults.props | 41 - old/build/BuildInfo.targets | 46 -- old/build/BundledDotnetTools.proj | 27 - old/build/BundledRuntimes.props | 139 ---- old/build/BundledTemplates.proj | 36 - old/build/BundledToolset.props | 21 - old/build/CLI_Baseline.csv | 30 - old/build/ComposeSdk.targets | 13 - old/build/CrossGen.props | 17 - old/build/DerivedHostMachineInfo.props | 8 - old/build/DownloadPackageVersions.targets | 11 - old/build/FileExtensions.props | 30 - old/build/GenerateResxSource.targets | 49 -- old/build/GitCommitInfo.targets | 50 -- old/build/HostInfo.targets | 26 - old/build/InitRepo.props | 11 - old/build/InitRepo.targets | 15 - old/build/InputDirectories.props | 7 - old/build/InstallerInfo.props | 14 - old/build/LinuxDistrosNativeInstaller.props | 14 - old/build/MicroBuild.props | 8 - old/build/Microsoft.DotNet.Cli.tasks | 39 - old/build/NugetConfigFile.targets | 72 -- old/build/OutputDirectories.props | 33 - old/build/Package.targets | 36 - old/build/Prepare.targets | 153 ---- old/build/Publish.targets | 95 --- old/build/RestoreDependency.proj | 46 -- old/build/SandBoxAndPackage.proj | 79 -- old/build/SandBoxAndPackageInParallel.proj | 16 - old/build/SetupPreviousStage.props | 13 - old/build/Signing.proj | 115 --- old/build/TargetFramework.props | 9 - old/build/Test.targets | 138 ---- old/build/Version.props | 26 - .../security/DotNet-CLI-Security-Windows.json | 764 ------------------ .../security/Get-LatestVersion.ps1 | 71 -- old/build/buildpipeline/security/dir.props | 4 - .../buildpipeline/security/pipeline.json | 22 - .../buildpipeline/security/syncAzure.proj | 21 - .../buildpipeline/security/syncAzure.targets | 31 - old/build/package/Archive.targets | 56 -- .../package/CopySandBoxPackageOut.targets | 9 - old/build/package/Layout.targets | 68 -- old/build/package/Symbols.csproj | 17 - old/build/package/Symbols.targets | 29 - .../dotnet-deb-tool-consumer.csproj | 9 - .../CentosCoreclrAndCoreFxDependencies.props | 12 - old/build/prepare/CheckPrereqs.targets | 40 - .../DebianPackageBuildDependencies.props | 8 - .../UbuntuCoreclrAndCoreFxDependencies.props | 49 -- old/build/publish/Badge.targets | 42 - old/build/publish/Checksum.targets | 22 - old/build/publish/FinishBuild.targets | 46 -- old/build/publish/PublishContent.targets | 61 -- old/build/publish/RuntimeCoherence.targets | 26 - old/build/run-build.ps1 | 0 old/build/test/RunTest.proj | 27 - old/build/test/TestAssetProjects.targets | 60 -- old/build/test/TestPackageProjects.targets | 60 -- old/build/test/TestProjects.targets | 21 - ...icrosoft.DotNet.Cli.Build.Framework.csproj | 18 - .../InvokeWithStage0.proj | 9 - .../InvokeWithStage2.proj | 27 - .../dotnet-cli-build/AzureHelper.cs | 401 --------- .../ChangeEntryPointLibraryName.cs | 24 - .../CheckIfAllBuildsHavePublished.cs | 93 --- .../dotnet-cli-build/CopyBlobsToLatest.cs | 116 --- .../dotnet-cli-build/CreateAzureContainer.cs | 167 ---- .../dotnet-cli-build/DotNetBuild.cs | 80 -- .../dotnet-cli-build/DotNetBuildPJ.cs | 66 -- .../dotnet-cli-build/DotNetMSBuild.cs | 30 - .../dotnet-cli-build/DotNetMSBuildTool.cs | 51 -- .../dotnet-cli-build/DotNetNew.cs | 22 - .../dotnet-cli-build/DotNetPack.cs | 119 --- .../dotnet-cli-build/DotNetPublish.cs | 126 --- .../dotnet-cli-build/DotNetRestore.cs | 90 --- .../dotnet-cli-build/DotNetRestorePJ.cs | 59 -- .../dotnet-cli-build/DotNetTest.cs | 66 -- .../EnsureFileExistsOnAzureBlobStorage.cs | 40 - .../dotnet-cli-build/GenerateChecksums.cs | 66 -- .../GenerateMSBuildExtensionsSWR.cs | 81 -- .../GenerateNuGetPackagesArchiveVersion.cs | 104 --- .../dotnet-cli-build/GenerateResxSource.cs | 58 -- .../GitHubWriteVersionUpdater.cs | 137 ---- .../dotnet-cli-build/MakeRelative.cs | 42 - .../RemoveAssetFromDepsPackages.cs | 64 -- .../SetBlobPropertiesBasedOnFileTypeTask.cs | 71 -- .../dotnet-cli-build/SetEnvVar.cs | 25 - .../dotnet-cli-build/UploadClient.cs | 183 ----- .../dotnet-cli-build/UploadToAzure.cs | 186 ----- .../WriteVersionToVersionsRepo.cs | 44 - .../dotnet-cli-build/dotnet-cli-build.csproj | 32 - .../BuildFailureException.cs | 22 - .../Publishing/AzurePublisher.cs | 234 ------ .../Utils/EnvVars.cs | 21 - .../shared-build-targets-utils/Utils/FS.cs | 22 - .../Utils/PublishMutationUtilties.cs | 63 -- .../shared-build-targets-utils/Utils/Utils.cs | 20 - .../shared-build-targets-utils.csproj | 25 - .../update-dependencies/Config.cs | 119 --- .../update-dependencies/Directory.Build.props | 8 - .../update-dependencies/Dirs.cs | 12 - .../update-dependencies/Program.cs | 138 ---- .../update-dependencies.csproj | 18 - .../update-dependencies.ps1 | 70 -- old/dir.props | 4 - old/dir.tasks | 3 - old/packaging/windows/eula.rtf | 97 --- .../windows/msbuildextensions/generatemsi.ps1 | 140 ---- .../msbuildextensions/msbuildextensions.wxs | 34 - .../windows/msbuildextensions/provider.wxs | 9 - .../msbuildextensions/registrykeys.wxs | 13 - .../windows/msbuildextensions/variables.wxi | 24 - old/scripts/clean/clear-nuget-cache.ps1 | 27 - old/scripts/clean/clear-nuget-cache.sh | 37 - old/scripts/cli-build-env.bat | 17 - old/scripts/cli-build-env.sh | 23 - old/scripts/common/_common.ps1 | 26 - old/scripts/common/_common.sh | 29 - old/scripts/common/_utility.ps1 | 76 -- old/scripts/dockerrun-as-current-user.sh | 9 - old/testAsset.props | 14 - .../CrossGen.Dependencies.csproj | 11 - .../Signing.Dependencies.csproj | 10 - .../TestAssetsDependencies.csproj | 7 - old/tools/test_key.snk | Bin 596 -> 0 bytes 136 files changed, 7503 deletions(-) delete mode 100644 old/Directory.Build.props delete mode 100644 old/build.cmd delete mode 100644 old/build.proj delete mode 100644 old/build/AppHostTemplate.proj delete mode 100644 old/build/AzureInfo.props delete mode 100644 old/build/BackwardsCompatibilityRuntimes.props delete mode 100644 old/build/BranchInfo.props delete mode 100644 old/build/Branding.props delete mode 100644 old/build/BuildAndPublishAllLinuxDistrosNativeInstallers.targets delete mode 100644 old/build/BuildDefaults.props delete mode 100644 old/build/BuildInfo.targets delete mode 100644 old/build/BundledDotnetTools.proj delete mode 100644 old/build/BundledRuntimes.props delete mode 100644 old/build/BundledTemplates.proj delete mode 100644 old/build/BundledToolset.props delete mode 100644 old/build/CLI_Baseline.csv delete mode 100644 old/build/ComposeSdk.targets delete mode 100644 old/build/CrossGen.props delete mode 100644 old/build/DerivedHostMachineInfo.props delete mode 100644 old/build/DownloadPackageVersions.targets delete mode 100644 old/build/FileExtensions.props delete mode 100644 old/build/GenerateResxSource.targets delete mode 100644 old/build/GitCommitInfo.targets delete mode 100644 old/build/HostInfo.targets delete mode 100644 old/build/InitRepo.props delete mode 100644 old/build/InitRepo.targets delete mode 100644 old/build/InputDirectories.props delete mode 100644 old/build/InstallerInfo.props delete mode 100644 old/build/LinuxDistrosNativeInstaller.props delete mode 100644 old/build/MicroBuild.props delete mode 100644 old/build/Microsoft.DotNet.Cli.tasks delete mode 100644 old/build/NugetConfigFile.targets delete mode 100644 old/build/OutputDirectories.props delete mode 100644 old/build/Package.targets delete mode 100644 old/build/Prepare.targets delete mode 100644 old/build/Publish.targets delete mode 100644 old/build/RestoreDependency.proj delete mode 100644 old/build/SandBoxAndPackage.proj delete mode 100644 old/build/SandBoxAndPackageInParallel.proj delete mode 100644 old/build/SetupPreviousStage.props delete mode 100644 old/build/Signing.proj delete mode 100644 old/build/TargetFramework.props delete mode 100644 old/build/Test.targets delete mode 100644 old/build/Version.props delete mode 100644 old/build/buildpipeline/security/DotNet-CLI-Security-Windows.json delete mode 100644 old/build/buildpipeline/security/Get-LatestVersion.ps1 delete mode 100644 old/build/buildpipeline/security/dir.props delete mode 100644 old/build/buildpipeline/security/pipeline.json delete mode 100644 old/build/buildpipeline/security/syncAzure.proj delete mode 100644 old/build/buildpipeline/security/syncAzure.targets delete mode 100644 old/build/package/Archive.targets delete mode 100644 old/build/package/CopySandBoxPackageOut.targets delete mode 100644 old/build/package/Layout.targets delete mode 100644 old/build/package/Symbols.csproj delete mode 100644 old/build/package/Symbols.targets delete mode 100644 old/build/package/dotnet-deb-tool-consumer/dotnet-deb-tool-consumer.csproj delete mode 100644 old/build/prepare/CentosCoreclrAndCoreFxDependencies.props delete mode 100644 old/build/prepare/CheckPrereqs.targets delete mode 100644 old/build/prepare/DebianPackageBuildDependencies.props delete mode 100644 old/build/prepare/UbuntuCoreclrAndCoreFxDependencies.props delete mode 100644 old/build/publish/Badge.targets delete mode 100644 old/build/publish/Checksum.targets delete mode 100644 old/build/publish/FinishBuild.targets delete mode 100644 old/build/publish/PublishContent.targets delete mode 100644 old/build/publish/RuntimeCoherence.targets delete mode 100644 old/build/run-build.ps1 delete mode 100644 old/build/test/RunTest.proj delete mode 100644 old/build/test/TestAssetProjects.targets delete mode 100644 old/build/test/TestPackageProjects.targets delete mode 100644 old/build/test/TestProjects.targets delete mode 100644 old/build_projects/Microsoft.DotNet.Cli.Build.Framework/Microsoft.DotNet.Cli.Build.Framework.csproj delete mode 100644 old/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage0.proj delete mode 100644 old/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage2.proj delete mode 100644 old/build_projects/dotnet-cli-build/AzureHelper.cs delete mode 100644 old/build_projects/dotnet-cli-build/ChangeEntryPointLibraryName.cs delete mode 100644 old/build_projects/dotnet-cli-build/CheckIfAllBuildsHavePublished.cs delete mode 100644 old/build_projects/dotnet-cli-build/CopyBlobsToLatest.cs delete mode 100644 old/build_projects/dotnet-cli-build/CreateAzureContainer.cs delete mode 100644 old/build_projects/dotnet-cli-build/DotNetBuild.cs delete mode 100644 old/build_projects/dotnet-cli-build/DotNetBuildPJ.cs delete mode 100644 old/build_projects/dotnet-cli-build/DotNetMSBuild.cs delete mode 100644 old/build_projects/dotnet-cli-build/DotNetMSBuildTool.cs delete mode 100644 old/build_projects/dotnet-cli-build/DotNetNew.cs delete mode 100644 old/build_projects/dotnet-cli-build/DotNetPack.cs delete mode 100644 old/build_projects/dotnet-cli-build/DotNetPublish.cs delete mode 100644 old/build_projects/dotnet-cli-build/DotNetRestore.cs delete mode 100644 old/build_projects/dotnet-cli-build/DotNetRestorePJ.cs delete mode 100644 old/build_projects/dotnet-cli-build/DotNetTest.cs delete mode 100644 old/build_projects/dotnet-cli-build/EnsureFileExistsOnAzureBlobStorage.cs delete mode 100644 old/build_projects/dotnet-cli-build/GenerateChecksums.cs delete mode 100644 old/build_projects/dotnet-cli-build/GenerateMSBuildExtensionsSWR.cs delete mode 100644 old/build_projects/dotnet-cli-build/GenerateNuGetPackagesArchiveVersion.cs delete mode 100644 old/build_projects/dotnet-cli-build/GenerateResxSource.cs delete mode 100644 old/build_projects/dotnet-cli-build/GitHubWriteVersionUpdater.cs delete mode 100644 old/build_projects/dotnet-cli-build/MakeRelative.cs delete mode 100644 old/build_projects/dotnet-cli-build/RemoveAssetFromDepsPackages.cs delete mode 100644 old/build_projects/dotnet-cli-build/SetBlobPropertiesBasedOnFileTypeTask.cs delete mode 100644 old/build_projects/dotnet-cli-build/SetEnvVar.cs delete mode 100644 old/build_projects/dotnet-cli-build/UploadClient.cs delete mode 100644 old/build_projects/dotnet-cli-build/UploadToAzure.cs delete mode 100644 old/build_projects/dotnet-cli-build/WriteVersionToVersionsRepo.cs delete mode 100644 old/build_projects/dotnet-cli-build/dotnet-cli-build.csproj delete mode 100644 old/build_projects/shared-build-targets-utils/BuildFailureException.cs delete mode 100644 old/build_projects/shared-build-targets-utils/Publishing/AzurePublisher.cs delete mode 100644 old/build_projects/shared-build-targets-utils/Utils/EnvVars.cs delete mode 100644 old/build_projects/shared-build-targets-utils/Utils/FS.cs delete mode 100644 old/build_projects/shared-build-targets-utils/Utils/PublishMutationUtilties.cs delete mode 100644 old/build_projects/shared-build-targets-utils/Utils/Utils.cs delete mode 100644 old/build_projects/shared-build-targets-utils/shared-build-targets-utils.csproj delete mode 100644 old/build_projects/update-dependencies/Config.cs delete mode 100644 old/build_projects/update-dependencies/Directory.Build.props delete mode 100644 old/build_projects/update-dependencies/Dirs.cs delete mode 100644 old/build_projects/update-dependencies/Program.cs delete mode 100644 old/build_projects/update-dependencies/update-dependencies.csproj delete mode 100644 old/build_projects/update-dependencies/update-dependencies.ps1 delete mode 100644 old/dir.props delete mode 100644 old/dir.tasks delete mode 100644 old/packaging/windows/eula.rtf delete mode 100644 old/packaging/windows/msbuildextensions/generatemsi.ps1 delete mode 100644 old/packaging/windows/msbuildextensions/msbuildextensions.wxs delete mode 100644 old/packaging/windows/msbuildextensions/provider.wxs delete mode 100644 old/packaging/windows/msbuildextensions/registrykeys.wxs delete mode 100644 old/packaging/windows/msbuildextensions/variables.wxi delete mode 100644 old/scripts/clean/clear-nuget-cache.ps1 delete mode 100644 old/scripts/clean/clear-nuget-cache.sh delete mode 100644 old/scripts/cli-build-env.bat delete mode 100644 old/scripts/cli-build-env.sh delete mode 100644 old/scripts/common/_common.ps1 delete mode 100644 old/scripts/common/_common.sh delete mode 100644 old/scripts/common/_utility.ps1 delete mode 100644 old/scripts/dockerrun-as-current-user.sh delete mode 100644 old/testAsset.props delete mode 100644 old/tools/CrossGen.Dependencies/CrossGen.Dependencies.csproj delete mode 100644 old/tools/Signing.Dependencies/Signing.Dependencies.csproj delete mode 100644 old/tools/TestAssetsDependencies/TestAssetsDependencies.csproj delete mode 100644 old/tools/test_key.snk diff --git a/old/Directory.Build.props b/old/Directory.Build.props deleted file mode 100644 index 48f34b459..000000000 --- a/old/Directory.Build.props +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - $(MSBuildThisFileDirectory) - - $(NUGET_PACKAGES) - $(RepoRoot)/.nuget/packages - - build_projects/dotnet-cli-build/bin - dotnet-cli-build.dll - $(RepoRoot)/$(RelativeCLIBuildBinaries)/$(RelativeCLIBuildDllName) - $(RepoRoot)/build_projects/dotnet-cli-build/bin/Microsoft.DotNet.Build.Tasks.Feed.dll - - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/old/build.cmd b/old/build.cmd deleted file mode 100644 index ce681438b..000000000 --- a/old/build.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@echo off - -REM Copyright (c) .NET Foundation and contributors. All rights reserved. -REM Licensed under the MIT license. See LICENSE file in the project root for full license information. - -powershell -ExecutionPolicy Bypass -NoProfile -NoLogo -Command "& \"%~dp0run-build.ps1\" %*; exit $LastExitCode;" -if %errorlevel% neq 0 exit /b %errorlevel% diff --git a/old/build.proj b/old/build.proj deleted file mode 100644 index ef413f9e9..000000000 --- a/old/build.proj +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(ExtraRestoreArgs) /p:GeneratePropsFile=$(GeneratePropsFile) - $(ExtraRestoreArgs) --disable-parallel - - - - - - - - - - - - - - - - - - - - - diff --git a/old/build/AppHostTemplate.proj b/old/build/AppHostTemplate.proj deleted file mode 100644 index b470c0be7..000000000 --- a/old/build/AppHostTemplate.proj +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - .exe - AppHost$(NativeExecutableExtension) - - - - - - - - - - - - - - - - - - - - - - --runtime $(Rid) - $(AppHostTemplateRestoreAdditionalParameters) /p:TargetFramework=$(CliTargetFramework) - $(AppHostTemplateRestoreAdditionalParameters) /p:TemplateFillInPackageName=$(TemplateFillInPackageName) - $(AppHostTemplateRestoreAdditionalParameters) /p:TemplateFillInPackageVersion=$(TemplateFillInPackageVersion) - $(AppHostTemplateRestoreAdditionalParameters) /p:RestorePackagesPath=$(AppHostIntermediateDirectory) - - - - - diff --git a/old/build/AzureInfo.props b/old/build/AzureInfo.props deleted file mode 100644 index 151da5d6c..000000000 --- a/old/build/AzureInfo.props +++ /dev/null @@ -1,48 +0,0 @@ - - - Sdk - true - false - $(Product) - assets/$(Product) - - - https://dotnetcli.azureedge.net/dotnet/ - $(PB_AssetRootUrl) - $(DefaultCoreSetupBlobRootUrl) - $(DefaultCoreSetupBlobRootUrl) - $(PB_AssetRootAccessTokenSuffix) - ?$(CoreSetupBlobAccessToken) - - $(PB_AssetRootUrl) - https://dotnetcli.blob.core.windows.net/dotnet/ - - - $(ARTIFACT_STORAGE_ACCOUNT) - dotnetcli - $(ARTIFACT_STORAGE_CONTAINER) - dotnet - $(PB_PublishBlobFeedKey) - $(ARTIFACT_STORAGE_KEY) - $(PB_PublishBlobFeedUrl) - https://$(ArtifactCloudDropAccountName).blob.core.windows.net/$(ArtifactContainerName)/index.json - - - $(CHECKSUM_STORAGE_ACCOUNT) - dotnetclichecksums - $(CHECKSUM_STORAGE_CONTAINER) - dotnet - $(PB_PublishBlobFeedKey) - $(CHECKSUM_STORAGE_KEY) - $(PB_PublishBlobFeedUrl) - https://$(ChecksumCloudDropAccountName).blob.core.windows.net/$(ChecksumContainerName)/index.json - - - $(BLOBFEED_STORAGE_CONTAINER) - dotnet-core - $(PB_PublishBlobFeedUrl) - https://dotnetfeed.blob.core.windows.net/$(BlobFeedContainerName)/index.json - $(PB_PublishBlobFeedKey) - $(BLOBFEED_STORAGE_KEY) - - diff --git a/old/build/BackwardsCompatibilityRuntimes.props b/old/build/BackwardsCompatibilityRuntimes.props deleted file mode 100644 index 6f612ac1f..000000000 --- a/old/build/BackwardsCompatibilityRuntimes.props +++ /dev/null @@ -1,57 +0,0 @@ - - - release/1.1.0 - 1.1.2 - 1.1.0 - 1.1.0 - - dotnet-host-$(HostMonikerRid).$(BackwardsCompatibility110SharedHostVersion)$(InstallerExtension) - $(PackagesDirectory)/$(BackwardsCompatibility110DownloadedSharedHostInstallerFileName) - - dotnet-hostfxr-$(HostMonikerRid).$(BackwardsCompatibility110HostFxrVersion)$(InstallerExtension) - $(PackagesDirectory)/$(BackwardsCompatibility110DownloadedHostFxrInstallerFileName) - - dotnet-sharedframework-$(HostMonikerRid).$(BackwardsCompatibility110SharedFrameworkVersion)$(InstallerExtension) - $(PackagesDirectory)/$(BackwardsCompatibility110DownloadedSharedFrameworkInstallerFileName) - - dotnet-$(HostMonikerRid).$(BackwardsCompatibility110SharedFrameworkVersion)$(ArchiveExtension) - - $(BackwardsCompatibilityCoreSetupBlobRootUrl)$(BackwardsCompatibility110CoreSetupChannel) - $(BackwardsCompatibility110CoreSetupBlobRootUrlWithChannel)/Binaries/$(BackwardsCompatibility110SharedFrameworkVersion) - $(BackwardsCompatibility110CoreSetupBlobRootUrlWithChannel)/Installers - $(IntermediateDirectory)/coreSetupDownload/$(BackwardsCompatibility110SharedFrameworkVersion) - $(BackwardsCompatibility110CoreSetupDownloadDirectory)/combinedSharedHostAndFrameworkArchive$(ArchiveExtension) - - - - <_DownloadAndExtractItem Include="BackwardsCompatibility110CombinedSharedHostAndFrameworkArchive" - Condition="!Exists('$(BackwardsCompatibility110CombinedSharedHostAndFrameworkArchive)') And !$(Architecture.StartsWith('arm'))"> - $(BackwardsCompatibility110SharedFrameworkArchiveBlobRootUrl)/$(BackwardsCompatibility110CombinedFrameworkHostCompressedFileName)$(CoreSetupBlobAccessTokenParam) - $(BackwardsCompatibility110CombinedSharedHostAndFrameworkArchive) - $(BackwardsCompatibleSharedFrameworksPublishDirectory) - - False - - - <_DownloadAndExtractItem Include="BackwardsCompatibility110DownloadedSharedFrameworkInstallerFile" - Condition="!Exists('$(BackwardsCompatibility110DownloadedSharedFrameworkInstallerFile)') And '$(OSName)' != 'linux' And !$(Architecture.StartsWith('arm'))"> - $(BackwardsCompatibility110CoreSetupInstallerBlobRootUrl)/$(BackwardsCompatibility110SharedFrameworkVersion)/$(BackwardsCompatibility110DownloadedSharedFrameworkInstallerFileName)$(CoreSetupBlobAccessTokenParam) - $(BackwardsCompatibility110DownloadedSharedFrameworkInstallerFile) - - - - <_DownloadAndExtractItem Include="BackwardsCompatibility110DownloadedSharedHostInstallerFile" - Condition="!Exists('$(BackwardsCompatibility110DownloadedSharedHostInstallerFile)') And '$(OSName)' != 'linux' And !$(Architecture.StartsWith('arm'))"> - $(BackwardsCompatibility110CoreSetupInstallerBlobRootUrl)/$(BackwardsCompatibility110SharedHostVersion)/$(BackwardsCompatibility110DownloadedSharedHostInstallerFileName)$(CoreSetupBlobAccessTokenParam) - $(BackwardsCompatibility110DownloadedSharedHostInstallerFile) - - - - <_DownloadAndExtractItem Include="BackwardsCompatibility110DownloadedHostFxrInstallerFile" - Condition="!Exists('$(BackwardsCompatibility110DownloadedHostFxrInstallerFile)') And '$(OSName)' != 'linux' And !$(Architecture.StartsWith('arm'))"> - $(BackwardsCompatibility110CoreSetupInstallerBlobRootUrl)/$(BackwardsCompatibility110HostFxrVersion)/$(BackwardsCompatibility110DownloadedHostFxrInstallerFileName)$(CoreSetupBlobAccessTokenParam) - $(BackwardsCompatibility110DownloadedHostFxrInstallerFile) - - - - diff --git a/old/build/BranchInfo.props b/old/build/BranchInfo.props deleted file mode 100644 index f62c8fd00..000000000 --- a/old/build/BranchInfo.props +++ /dev/null @@ -1,6 +0,0 @@ - - - master - master - - diff --git a/old/build/Branding.props b/old/build/Branding.props deleted file mode 100644 index c01460cc7..000000000 --- a/old/build/Branding.props +++ /dev/null @@ -1,38 +0,0 @@ - - - cli - Microsoft .NET Core SDK $(CliBrandingVersion) - .NET Standard Support for Visual Studio 2015 - Microsoft .NET Core Runtime 3.0.0 - Preview - Microsoft .NET Core Host 3.0.0 - Preview - Microsoft .NET Core Host FX Resolver 3.0.0 - Preview - - Microsoft.NETCore.App - $(SharedFrameworkName) - - $(Rid) - $(OSName)-$(Architecture) - - $(HostRid) - $(HostOSName)-$(Architecture) - $(HostMonikerRid) - $(Architecture) - - dotnet-sdk-internal - dotnet-sdk - - $(ArtifactNameSdk)-$(SdkVersion)-$(ProductMonikerRid) - dotnet-standard-support-vs2015-$(SdkVersion)-$(ProductMonikerRid) - $(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)-$(ProductMonikerRid) - $(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)- - $(DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdkWithoutHostMonikerRid)$(HostMonikerRidForFileName) - - diff --git a/old/build/BuildAndPublishAllLinuxDistrosNativeInstallers.targets b/old/build/BuildAndPublishAllLinuxDistrosNativeInstallers.targets deleted file mode 100644 index 28d2c8b2d..000000000 --- a/old/build/BuildAndPublishAllLinuxDistrosNativeInstallers.targets +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - true - - - diff --git a/old/build/BuildDefaults.props b/old/build/BuildDefaults.props deleted file mode 100644 index dd22d20d3..000000000 --- a/old/build/BuildDefaults.props +++ /dev/null @@ -1,41 +0,0 @@ - - - Prepare;ComposeSdk;Test;Package;Publish - Debug - true - false - - true - true - true - - - true - - - - - - NU1701;NU5104 - - true - true - - - true - false - - diff --git a/old/build/BuildInfo.targets b/old/build/BuildInfo.targets deleted file mode 100644 index 2358a8538..000000000 --- a/old/build/BuildInfo.targets +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - True - $(HostOSName) - $(HostOSPlatform) - linux - linux - - x64 - $(OSName)-$(Architecture) - - -<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <Rid>$(Rid)</Rid> - <Architecture>$(Architecture)</Architecture> - <OSName>$(OSName)</OSName> - <OSPlatform>$(OSPlatform)</OSPlatform> - </PropertyGroup> -</Project> - - - - $([System.IO.File]::ReadAllText($(BuildInfoProps))) - - - false - true - - - - - diff --git a/old/build/BundledDotnetTools.proj b/old/build/BundledDotnetTools.proj deleted file mode 100644 index 57837ea01..000000000 --- a/old/build/BundledDotnetTools.proj +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - --runtime any /p:RestoreProjectStyle=DotnetToolReference - $(DotnetToolsRestoreAdditionalParameters) /p:TargetFramework=$(CliTargetFramework) - $(DotnetToolsRestoreAdditionalParameters) /p:TemplateFillInPackageName=$(TemplateFillInPackageName) - $(DotnetToolsRestoreAdditionalParameters) /p:TemplateFillInPackageVersion=$(TemplateFillInPackageVersion) - $(DotnetToolsRestoreAdditionalParameters) /p:RestorePackagesPath=$(DotnetToolsLayoutDirectory) - - - - - diff --git a/old/build/BundledRuntimes.props b/old/build/BundledRuntimes.props deleted file mode 100644 index 5c1bed87d..000000000 --- a/old/build/BundledRuntimes.props +++ /dev/null @@ -1,139 +0,0 @@ - - - $(HostRid) - $(HostMonikerRid) - - - -internal - - - dotnet-runtime-deps-$(SharedHostVersion)-$(CoreSetupRid)$(InstallerExtension) - $(PackagesDirectory)/$(DownloadedRuntimeDepsInstallerFileName) - - - $(CoreSetupRid) - x64 - - dotnet-host$(InstallerStartSuffix)-$(SharedHostVersion)-$(SharedFrameworkInstallerFileRid)$(InstallerExtension) - $(PackagesDirectory)/$(DownloadedSharedHostInstallerFileName) - - dotnet-hostfxr$(InstallerStartSuffix)-$(HostFxrVersion)-$(SharedFrameworkInstallerFileRid)$(InstallerExtension) - $(PackagesDirectory)/$(DownloadedHostFxrInstallerFileName) - - dotnet-runtime$(InstallerStartSuffix)-$(MicrosoftNETCoreAppPackageVersion)-$(SharedFrameworkInstallerFileRid)$(InstallerExtension) - $(PackagesDirectory)/$(DownloadedSharedFrameworkInstallerFileName) - - dotnet-extension-$(MicrosoftWindowsDesktopPackageVersion)-$(SharedFrameworkInstallerFileRid)$(InstallerExtension) - $(PackagesDirectory)/$(DownloadedWinFormsAndWpfSharedFrameworkInstallerFileName) - - - $(CoreSetupRid) - $(ProductMonikerRid) - linux-$(Architecture) - dotnet-runtime-$(MicrosoftNETCoreAppPackageVersion)-$(SharedFrameworkRid)$(ArchiveExtension) - - $(SharedFrameworkRid) - linux-x64 - $(AspNetCoreSharedFxInstallerRid) - x64 - - aspnetcore-runtime-$(AspNetCoreVersion)-$(AspNetCoreSharedFxInstallerRid)$(InstallerExtension) - - aspnetcore-runtime-internal-$(AspNetCoreVersion)-$(AspNetCoreSharedFxInstallerRid).wixlib - $(PackagesDirectory)/$(DownloadedAspNetCoreSharedFxInstallerFileName) - - aspnetcore-runtime-internal-$(AspNetCoreVersion)-$(AspNetCoreSharedFxArchiveRid)$(ArchiveExtension) - $(PackagesDirectory)/$(AspNetCoreSharedFxArchiveFileName) - - dotnet-extension-$(MicrosoftWindowsDesktopPackageVersion)-$(Architecture)$(ArchiveExtension) - $(PackagesDirectory)/$(WinFormsAndWpfSharedFxArchiveFileName) - - - aspnetcore_base_runtime.version - $(PackagesDirectory)/$(AspNetCoreSharedFxBaseRuntimeVersionFileName) - - - - $(CoreSetupBlobRootUrl)Runtime/ - $(CoreSetupBlobRootUrl)aspnetcore/Runtime/ - $(DotnetExtensionsBlobRootUrl)dotnet-extensions/ - $(IntermediateDirectory)/coreSetupDownload/$(MicrosoftNETCoreAppPackageVersion) - $(CoreSetupDownloadDirectory)/combinedSharedHostAndFrameworkArchive$(ArchiveExtension) - - - - <_DownloadAndExtractItem Include="CombinedSharedHostAndFrameworkArchive" - Condition="!Exists('$(CombinedSharedHostAndFrameworkArchive)')"> - $(CoreSetupRootUrl)$(MicrosoftNETCoreAppPackageVersion)/$(CombinedFrameworkHostCompressedFileName)$(CoreSetupBlobAccessTokenParam) - $(CombinedSharedHostAndFrameworkArchive) - $(SharedFrameworkPublishDirectory) - - - <_DownloadAndExtractItem Include="DownloadedRuntimeDepsInstallerFile" - Condition="('$(IsDebianBaseDistro)' == 'true' OR '$(IsRPMBasedDistro)' == 'true') And '$(SkipBuildingInstallers)' != 'true' And !Exists('$(DownloadedRuntimeDepsInstallerFile)') And '$(InstallerExtension)' != '' And !$(Architecture.StartsWith('arm'))"> - $(CoreSetupRootUrl)$(MicrosoftNETCoreAppPackageVersion)/$(DownloadedRuntimeDepsInstallerFileName)$(CoreSetupBlobAccessTokenParam) - $(DownloadedRuntimeDepsInstallerFile) - - - - <_DownloadAndExtractItem Include="DownloadedSharedFrameworkInstallerFile" - Condition="'$(SkipBuildingInstallers)' != 'true' And !Exists('$(DownloadedSharedFrameworkInstallerFile)') And '$(InstallerExtension)' != '' And !$(Architecture.StartsWith('arm'))"> - $(CoreSetupRootUrl)$(MicrosoftNETCoreAppPackageVersion)/$(DownloadedSharedFrameworkInstallerFileName)$(CoreSetupBlobAccessTokenParam) - $(DownloadedSharedFrameworkInstallerFile) - - - - <_DownloadAndExtractItem Include="DownloadedSharedHostInstallerFile" - Condition="'$(SkipBuildingInstallers)' != 'true' And !Exists('$(DownloadedSharedHostInstallerFile)') And '$(InstallerExtension)' != '' And !$(Architecture.StartsWith('arm'))"> - $(CoreSetupRootUrl)$(SharedHostVersion)/$(DownloadedSharedHostInstallerFileName)$(CoreSetupBlobAccessTokenParam) - $(DownloadedSharedHostInstallerFile) - - - - <_DownloadAndExtractItem Include="DownloadedHostFxrInstallerFile" - Condition="'$(SkipBuildingInstallers)' != 'true' And !Exists('$(DownloadedHostFxrInstallerFile)') And '$(InstallerExtension)' != '' And !$(Architecture.StartsWith('arm'))"> - $(CoreSetupRootUrl)$(HostFxrVersion)/$(DownloadedHostFxrInstallerFileName)$(CoreSetupBlobAccessTokenParam) - $(DownloadedHostFxrInstallerFile) - - - - - - <_DownloadAndExtractItem Include="AspNetCoreSharedFxArchiveFile" - Condition="!Exists('$(AspNetCoreSharedFxArchiveFile)')"> - $(AspNetCoreSharedFxRootUrl)$(AspNetCoreVersion)/$(AspNetCoreSharedFxArchiveFileName)$(CoreSetupBlobAccessTokenParam) - $(AspNetCoreSharedFxArchiveFile) - $(AspNetCoreSharedFxPublishDirectory) - - - <_DownloadAndExtractItem Include="DownloadedAspNetCoreSharedFxInstallerFile" - Condition="'$(SkipBuildingInstallers)' != 'true' AND '$(DownloadedAspNetCoreSharedFxInstallerFile)' != '' AND !Exists($(DownloadedAspNetCoreSharedFxInstallerFile)) And '$(InstallerExtension)' != '' And !$(Architecture.StartsWith('arm'))"> - $(AspNetCoreSharedFxRootUrl)$(AspNetCoreVersion)/$(DownloadedAspNetCoreSharedFxInstallerFileName)$(CoreSetupBlobAccessTokenParam) - $(DownloadedAspNetCoreSharedFxInstallerFile) - - - - <_DownloadAndExtractItem Include="AspNetCoreSharedFxBaseRuntimeVersionFile" - Condition="!Exists('$(AspNetCoreSharedFxBaseRuntimeVersionFile)') And !$(Architecture.StartsWith('arm'))"> - $(AspNetCoreSharedFxRootUrl)$(AspNetCoreVersion)/$(AspNetCoreSharedFxBaseRuntimeVersionFileName)$(CoreSetupBlobAccessTokenParam) - $(AspNetCoreSharedFxBaseRuntimeVersionFile) - - - - - - <_DownloadAndExtractItem Include="WinFormsAndWpfSharedFxArchiveFile" - Condition="!Exists('$(WinFormsAndWpfSharedFxArchiveFile)')"> - $(WinFormsAndWpfSharedFxRootUrl)$(MicrosoftWindowsDesktopPackageVersion)/$(WinFormsAndWpfSharedFxArchiveFileName)$(CoreSetupBlobAccessTokenParam) - $(WinFormsAndWpfSharedFxArchiveFile) - $(WinFormsAndWpfSharedFxPublishDirectory)/shared - - - <_DownloadAndExtractItem Include="DownloadedWinFormsAndWpfSharedFrameworkInstallerFile" - Condition="'$(SkipBuildingInstallers)' != 'true' And !Exists('$(DownloadedWinFormsAndWpfSharedFrameworkInstallerFile)') And '$(InstallerExtension)' != '' And !$(Architecture.StartsWith('arm'))"> - $(WinFormsAndWpfSharedFxRootUrl)$(MicrosoftWindowsDesktopPackageVersion)/$(DownloadedWinFormsAndWpfSharedFrameworkInstallerFileName)$(CoreSetupBlobAccessTokenParam) - $(DownloadedWinFormsAndWpfSharedFrameworkInstallerFile) - - - - diff --git a/old/build/BundledTemplates.proj b/old/build/BundledTemplates.proj deleted file mode 100644 index 4d215f874..000000000 --- a/old/build/BundledTemplates.proj +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - $(NuGetPackagesDir)/$(TemplateFillInPackageName.ToLower())/$(TemplateFillInPackageVersion.ToLower()) - - - diff --git a/old/build/BundledToolset.props b/old/build/BundledToolset.props deleted file mode 100644 index 89de64249..000000000 --- a/old/build/BundledToolset.props +++ /dev/null @@ -1,21 +0,0 @@ - - - dotnet-toolset-internal-$(ToolsetVersion).zip - - - - $(CoreSetupBlobRootUrl)Toolset/$(ToolsetVersion)/ - $(ToolsetRootUrl)$(ToolsetCompressedFileName)$(CoreSetupBlobAccessTokenParam) - $(IntermediateDirectory)/toolsetDownload/$(ToolsetVersion)/ - $(ToolsetDownloadDirectory)$(ToolsetCompressedFileName) - - - - <_DownloadAndExtractItem Include="ToolsetArchive" - Condition="!Exists('$(ToolsetArchive)')"> - $(ToolsetDownloadUrl) - $(ToolsetArchive) - $(ToolsetPublishDirectory) - - - diff --git a/old/build/CLI_Baseline.csv b/old/build/CLI_Baseline.csv deleted file mode 100644 index 6bafd8e04..000000000 --- a/old/build/CLI_Baseline.csv +++ /dev/null @@ -1,30 +0,0 @@ -sdk\*\microsoft.testplatform.vstestconsole.translationlayer.xml,unsigned,oss -sdk\*\sdks\nuget.build.tasks.pack\*\nuget.build.tasks.pack.xml,unsigned,oss -sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\additional-methods.js,unsigned,oss -sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\additional-methods.js,unsigned,oss -sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\additional-methods.min.js,unsigned,oss -sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\bootstrap.js,unsigned,oss -sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\bootstrap.min.js,unsigned,oss -sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\glyphicons-halflings-regular.ttf,unsigned,oss -sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\jquery.js,unsigned,oss -sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\jquery.min.js,unsigned,oss -sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\jquery.validate.js,unsigned,oss -sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\jquery.validate.min.js,unsigned,oss -sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\jquery.validate.unobtrusive.js,unsigned,oss -sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\jquery.validate.unobtrusive.min.js,unsigned,oss -sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\npm.js,unsigned,oss -sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\site.js,unsigned,oss -sdk\*\templates\microsoft_dotnet_web_projecttemplates*nupkgdir\site.min.js,unsigned,oss -sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\app.js,unsigned,oss -sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\app.test.js,unsigned,oss -sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\configurestore.js,unsigned,oss -sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\counter.js,unsigned,oss -sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\fetchdata.js,unsigned,oss -sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\home.js,unsigned,oss -sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\index.js,unsigned,oss -sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\karma.conf.js,unsigned,oss -sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\layout.js,unsigned,oss -sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\navmenu.js,unsigned,oss -sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\protractor.conf.js,unsigned,oss -sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\registerserviceworker.js,unsigned,oss -sdk\*\templates\microsoft_dotnet_web_spa_projecttemplates*nupkgdir\weatherforecasts.js,unsigned,oss \ No newline at end of file diff --git a/old/build/ComposeSdk.targets b/old/build/ComposeSdk.targets deleted file mode 100644 index fedae8d31..000000000 --- a/old/build/ComposeSdk.targets +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - $(SdkOutputDirectory) - - - - - - diff --git a/old/build/CrossGen.props b/old/build/CrossGen.props deleted file mode 100644 index a2ea1afc3..000000000 --- a/old/build/CrossGen.props +++ /dev/null @@ -1,17 +0,0 @@ - - - runtime.$(SharedFrameworkRid).microsoft.netcore.app - <_crossDir Condition="'$(Architecture)' == 'arm64'">/x64_arm64 - <_crossDir Condition="'$(Architecture)' == 'arm' And '$(OSName)' == 'win'">/x86_arm - <_crossDir Condition="'$(Architecture)' == 'arm' And '$(OSName)' == 'linux'">/x64_arm - $(NuGetPackagesDir)/$(RuntimeNETCoreAppPackageName)/$(MicrosoftNETCoreAppPackageVersion)/tools$(_crossDir)/crossgen$(ExeExtension) - $(SharedFrameworkRid) - x64_arm64 - x86_arm - x64_arm - $(NuGetPackagesDir)/$(RuntimeNETCoreAppPackageName)/$(MicrosoftNETCoreAppPackageVersion)/runtimes/$(LibCLRJitRid)/native/$(DynamicLibPrefix)clrjit$(DynamicLibExtension) - $(OutputDirectory)/shared/$(SharedFrameworkName)/$(MicrosoftNETCoreAppPackageVersion) - * - x86 - - diff --git a/old/build/DerivedHostMachineInfo.props b/old/build/DerivedHostMachineInfo.props deleted file mode 100644 index 2bb794527..000000000 --- a/old/build/DerivedHostMachineInfo.props +++ /dev/null @@ -1,8 +0,0 @@ - - - true - true - true - true - - diff --git a/old/build/DownloadPackageVersions.targets b/old/build/DownloadPackageVersions.targets deleted file mode 100644 index ff47bd99e..000000000 --- a/old/build/DownloadPackageVersions.targets +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - diff --git a/old/build/FileExtensions.props b/old/build/FileExtensions.props deleted file mode 100644 index c9f943b13..000000000 --- a/old/build/FileExtensions.props +++ /dev/null @@ -1,30 +0,0 @@ - - - .zip - .tar.gz - - .msi - .pkg - .deb - .rpm - - .exe - $(InstallerExtension) - $(InstallerExtension) - $(InstallerExtension) - - lib - - - .so - .dll - .dylib - - .exe - - - .ps1 - .sh - - - diff --git a/old/build/GenerateResxSource.targets b/old/build/GenerateResxSource.targets deleted file mode 100644 index 1eb51907e..000000000 --- a/old/build/GenerateResxSource.targets +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - %(EmbeddedResource.Namespace).%(EmbeddedResource.Filename) - - - %(XlfSource.Namespace).%(XlfSource.Filename) - %(XlfSource.Namespace).%(XlfSource.Filename) - - - - - - - - - - - - - $(IntermediateOutputPath)%(EmbeddedResourceSG.ManifestResourceName).cs - - - - - diff --git a/old/build/GitCommitInfo.targets b/old/build/GitCommitInfo.targets deleted file mode 100644 index baf01a253..000000000 --- a/old/build/GitCommitInfo.targets +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - %(GitInfoCommitCountLines.Identity) - $(GitInfoCommitCount.PadLeft(6,'0')) - - %(GitInfoCommitHashLines.Identity) - - -<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <CommitCount>$(GitInfoCommitCount)</CommitCount> - <CommitHash>$(GitInfoCommitHash)</CommitHash> - </PropertyGroup> -</Project> - - - - $([System.IO.File]::ReadAllText($(GitCommitInfoProps))) - - - false - true - - - - - diff --git a/old/build/HostInfo.targets b/old/build/HostInfo.targets deleted file mode 100644 index ed1046cc0..000000000 --- a/old/build/HostInfo.targets +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - -<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <HostRid>$(HostRid)</HostRid> - <HostOSName>$(HostOSName)</HostOSName> - </PropertyGroup> -</Project> - - - - - - diff --git a/old/build/InitRepo.props b/old/build/InitRepo.props deleted file mode 100644 index 077c23937..000000000 --- a/old/build/InitRepo.props +++ /dev/null @@ -1,11 +0,0 @@ - - - bin/obj - $(RepoRoot)/$(RelativeGeneratedPropsDir) - $(GeneratedPropsDir)/GitCommitInfo.props - $(GeneratedPropsDir)/HostInfo.props - $(GeneratedPropsDir)/BuildInfo.props - $(GeneratedPropsDir)/OrchestratedPackageVersionsProps.props - $(RepoRoot)/NuGet.Config - - diff --git a/old/build/InitRepo.targets b/old/build/InitRepo.targets deleted file mode 100644 index 9db639072..000000000 --- a/old/build/InitRepo.targets +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - diff --git a/old/build/InputDirectories.props b/old/build/InputDirectories.props deleted file mode 100644 index 7564abe34..000000000 --- a/old/build/InputDirectories.props +++ /dev/null @@ -1,7 +0,0 @@ - - - $(RepoRoot)/build_projects/dotnet-cli-build - $(RepoRoot)/src - $(RepoRoot)/test/ - - diff --git a/old/build/InstallerInfo.props b/old/build/InstallerInfo.props deleted file mode 100644 index 31fadd75e..000000000 --- a/old/build/InstallerInfo.props +++ /dev/null @@ -1,14 +0,0 @@ - - - $(PackagesDirectory) - $(InstallerOutputDirectory)/$(ArtifactNameWithVersionSdk)$(InstallerExtension) - $(InstallerOutputDirectory)/$(ArtifactNameWithVersionMSBuildExtensions)$(InstallerExtension) - $(InstallerOutputDirectory)/$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(BundleExtension) - - $(IntermediateDirectory)/debian/sdk - $(SdkDebianIntermediateDirectory)/debianLayoutDirectory - $(IntermediateDirectory)/layouts - $(LayoutDirectory)/$(ArtifactNameSdk) - $(LayoutDirectory)/MSBuildExtensions - - diff --git a/old/build/LinuxDistrosNativeInstaller.props b/old/build/LinuxDistrosNativeInstaller.props deleted file mode 100644 index d153e267a..000000000 --- a/old/build/LinuxDistrosNativeInstaller.props +++ /dev/null @@ -1,14 +0,0 @@ - - - - debian - deb - x64 - - - rhel - rpm - x64 - - - diff --git a/old/build/MicroBuild.props b/old/build/MicroBuild.props deleted file mode 100644 index b32b9f115..000000000 --- a/old/build/MicroBuild.props +++ /dev/null @@ -1,8 +0,0 @@ - - - - $(RepoRoot)/.nuget/packages - - $(NuGetPackagesDir)/microbuild.core/$(MicroBuildCorePackageVersion)/build/ - - diff --git a/old/build/Microsoft.DotNet.Cli.tasks b/old/build/Microsoft.DotNet.Cli.tasks deleted file mode 100644 index 67085b6fc..000000000 --- a/old/build/Microsoft.DotNet.Cli.tasks +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/old/build/NugetConfigFile.targets b/old/build/NugetConfigFile.targets deleted file mode 100644 index 8929e74dd..000000000 --- a/old/build/NugetConfigFile.targets +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - ]]> - - - - - - - - - - - - - - - - - - - - - ]]> - - - - - - - - - ]]> - - - - - - - - - - - - - - diff --git a/old/build/OutputDirectories.props b/old/build/OutputDirectories.props deleted file mode 100644 index 197a96abc..000000000 --- a/old/build/OutputDirectories.props +++ /dev/null @@ -1,33 +0,0 @@ - - - $([MSBuild]::Add($(CliOuterBuildStage), '1')) - 2 - - - $(RepoRoot)/bin/$(CliBuildStage)/$(Rid) - $([System.IO.Path]::GetFullPath('$(BaseOutputDirectory)/bin/$(MSBuildProjectName)')) - - $([System.IO.Path]::GetFullPath('$(BaseOutputDirectory)/obj/$(MSBuildProjectName)')) - $(BaseOutputDirectory)/dotnet - $(BaseOutputDirectory)/dotnetWithBackwardsCompatibleRuntimes - $(OutputDirectory)/sdk/$(SdkVersion) - $(BaseOutputDirectory)/symbols - $(SdkOutputDirectory)/Roslyn - $(SdkOutputDirectory)/FSharp - $(BaseOutputDirectory)/compilation - $(BaseOutputDirectory)/int - $(BaseOutputDirectory)/packages - $(IntermediateDirectory)/sharedFrameworkPublish - $(IntermediateDirectory)/toolsetPublish - $(IntermediateDirectory)/aspnetSharedFxPublish - $(IntermediateDirectory)/winFormsAndWpfSharedFxPublish - $(IntermediateDirectory)/backwardsCompatibleSharedFrameworksPublish - $(BaseOutputDirectory)/test/ - $(OutputDirectory)/dotnet$(ExeExtension) - $(IntermediateDirectory)/GeneratedMSBuildExtensions - $(IntermediateDirectory)/MSBuildExtensionsLayout - $(BaseOutputDirectory)/PreviousStage.props - - diff --git a/old/build/Package.targets b/old/build/Package.targets deleted file mode 100644 index 9d4e65f60..000000000 --- a/old/build/Package.targets +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/old/build/Prepare.targets b/old/build/Prepare.targets deleted file mode 100644 index 6ae5d8fef..000000000 --- a/old/build/Prepare.targets +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - %(_DownloadAndExtractItem.OverwriteDestination) - True - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<Project> - <PropertyGroup> - <PreviousStageDirectory>$(OutputDirectory)</PreviousStageDirectory> - <PreviousStageDotnet>$(DotnetInOutputDirectory)</PreviousStageDotnet> - <CliOuterBuildStage>$(CliBuildStage)</CliOuterBuildStage> - </PropertyGroup> -</Project> - - - - $([System.IO.File]::ReadAllText($(NextStagePropsPath))) - - - false - true - - - - - - - diff --git a/old/build/Publish.targets b/old/build/Publish.targets deleted file mode 100644 index d6cef3199..000000000 --- a/old/build/Publish.targets +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(BlobStoragePartialRelativePath)/$(FullNugetVersion)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('\' ,'/')) - ShipInstaller=dotnetcli - - - - - - - - - - - - - - - - $(BlobStoragePartialRelativePath)/$(FullNugetVersion)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('\' ,'/')) - ShipInstaller=dotnetcli - - - - - - - - diff --git a/old/build/RestoreDependency.proj b/old/build/RestoreDependency.proj deleted file mode 100644 index 19f209ce0..000000000 --- a/old/build/RestoreDependency.proj +++ /dev/null @@ -1,46 +0,0 @@ - - - - - $([MSBuild]::Unescape($(CLIBuildDll))) - - - - - - - - - - - - - - - - - - - - - - - $(NuGetPackagesDir)/$(DependencyPackageName.ToLower())/$(DependencyPackageVersion.ToLower()) - - - diff --git a/old/build/SandBoxAndPackage.proj b/old/build/SandBoxAndPackage.proj deleted file mode 100644 index 54b0b7d9d..000000000 --- a/old/build/SandBoxAndPackage.proj +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - bin/WorkingCopy - $(SandBoxFolderName)/RelativeSandBoxPackageOutputFolder - $(RepoRoot)/$(SandBoxFolderName)/$(LinuxDistrosNeedNativeInstaller) - .nuget - bin/2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(SandBoxRepoRoot)/build.sh - $(CommandToInvokeBuildScriptInDockerToPackageInSandBox) --configuration $(CONFIGURATION) - $(CommandToInvokeBuildScriptInDockerToPackageInSandBox) --docker $(DockerFolder) - $(CommandToInvokeBuildScriptInDockerToPackageInSandBox) --skip-prereqs - $(CommandToInvokeBuildScriptInDockerToPackageInSandBox) /t:GenerateInstallersAndCopyOutOfSandBox - $(CommandToInvokeBuildScriptInDockerToPackageInSandBox) /p:RelativeSandBoxPackageOutputFolder=$(RelativeSandBoxPackageOutputFolder) - 0 - 2>&1 - - - - - - - - true - - - - - - - - - - - - diff --git a/old/build/SandBoxAndPackageInParallel.proj b/old/build/SandBoxAndPackageInParallel.proj deleted file mode 100644 index 735ecf99a..000000000 --- a/old/build/SandBoxAndPackageInParallel.proj +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - diff --git a/old/build/SetupPreviousStage.props b/old/build/SetupPreviousStage.props deleted file mode 100644 index 7545eddc7..000000000 --- a/old/build/SetupPreviousStage.props +++ /dev/null @@ -1,13 +0,0 @@ - - - $(RepoRoot)/.dotnet_stage0/$(Architecture) - $(PreviousStageDirectory)/dotnet$(ExeExtension) - - - - - - False - True - - diff --git a/old/build/Signing.proj b/old/build/Signing.proj deleted file mode 100644 index 4f250061c..000000000 --- a/old/build/Signing.proj +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - true - 135020001 - Microsoft402 - NuGet - - - - - - - - - - - - - - - - $(BaseOutputDirectory) - $(IntermediateDirectory) - - - - - - - - - - $(ExternalCertificateId) - - - - $(InternalCertificateId) - - - - $(InternalCertificateId) - - - - - - - - - - - - - - - - $(InternalCertificateId) - - - $(InternalCertificateId) - - - - - - - - - - $(InternalCertificateId) - - - - - - - - - - $(InternalCertificateId) - - - - - - diff --git a/old/build/TargetFramework.props b/old/build/TargetFramework.props deleted file mode 100644 index 2bfa25b66..000000000 --- a/old/build/TargetFramework.props +++ /dev/null @@ -1,9 +0,0 @@ - - - netcoreapp3.0 - - - 3.0 - - diff --git a/old/build/Test.targets b/old/build/Test.targets deleted file mode 100644 index 0c3e8b5c8..000000000 --- a/old/build/Test.targets +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - : - %3b - $(OutputDirectory)$(PathListSeparator)$(PATH) - $(OutputDirectory) - $(TestOutputDir)/packages/ - $(TestOutputDir)/artifacts/ - $(TestOutputDir)/results/ - $(TestArtifactsDir)/ExternalRestoreSourcesForTestsContainer.txt - - - - - - - - - - - CLIBuildDll=$(CLIBuildDll); - Configuration=$(Configuration); - TestArtifactsDir=$(TestArtifactsDir); - TestPackagesDir=$(TestPackagesDir); - PreviousStageProps=$(NextStagePropsPath); - TestProject=%(TestProjects.Identity); - TestResultXmlDir=$(TestResultXmlDir); - ToolPath=$(OutputDirectory); - WorkingDirectory=$([System.IO.Directory]::GetParent(%(TestProjects.Identity))) - - - - - - - - $(OutputDirectory)/shared/Microsoft.NETCore.App/$(SharedFrameworkStableVersion) - $(Stage2WithBackwardsCompatibleRuntimesOutputDirectory)/shared/Microsoft.NETCore.App/$(SharedFrameworkStableVersion) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/old/build/Version.props b/old/build/Version.props deleted file mode 100644 index 1fb7c125c..000000000 --- a/old/build/Version.props +++ /dev/null @@ -1,26 +0,0 @@ - - - 3 - 0 - 100 - preview - - $(VersionMajor).$(VersionMinor) - $(VersionMajor).$(VersionMinor).$(VersionPatch) - $(CliVersionNoSuffix)-$(ReleaseSuffix) - $(CliVersionNoSuffix) - $(ReleaseSuffix) - $(CliVersionNoSuffix) - $(CliVersionNoSuffix).$(CommitCount) - $(CliVersionNoSuffix) - - $(ReleaseSuffix)-$(CommitCount) - - $(CliVersionNoSuffix)-$(ReleaseSuffix)-$(CommitCount) - - $(FullNugetVersion) - $(CliVersionNoSuffix) - - $(NugetVersion) - $(NugetVersion) - - diff --git a/old/build/buildpipeline/security/DotNet-CLI-Security-Windows.json b/old/build/buildpipeline/security/DotNet-CLI-Security-Windows.json deleted file mode 100644 index 74362e939..000000000 --- a/old/build/buildpipeline/security/DotNet-CLI-Security-Windows.json +++ /dev/null @@ -1,764 +0,0 @@ -{ - "build": [ - { - "enabled": true, - "continueOnError": false, - "alwaysRun": false, - "displayName": "Workaround for BuildTools - Clone Core-Setup", - "timeoutInMinutes": 0, - "condition": "succeeded()", - "task": { - "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", - "versionSpec": "1.*", - "definitionType": "task" - }, - "inputs": { - "filename": "$(PB_Git)", - "arguments": "clone $(CoreSetupUrl) core-setup", - "workingFolder": "$(Build.SourcesDirectory)", - "failOnStandardError": "false" - } - }, - { - "enabled": true, - "continueOnError": false, - "alwaysRun": false, - "displayName": "Workaround for BuildTools - Checkout Core-Setup master", - "timeoutInMinutes": 0, - "condition": "succeeded()", - "task": { - "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", - "versionSpec": "1.*", - "definitionType": "task" - }, - "inputs": { - "filename": "$(PB_Git)", - "arguments": "checkout master", - "workingFolder": "$(build.SourcesDirectory)\\core-setup", - "failOnStandardError": "false" - } - }, - { - "enabled": true, - "continueOnError": false, - "alwaysRun": false, - "displayName": "Workaround for BuildTools - Run init-tools.cmd", - "timeoutInMinutes": 0, - "condition": "succeeded()", - "task": { - "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", - "versionSpec": "1.*", - "definitionType": "task" - }, - "inputs": { - "filename": "init-tools.cmd", - "arguments": "", - "workingFolder": "$(Build.SourcesDirectory)\\core-setup", - "failOnStandardError": "false" - } - }, - { - "enabled": true, - "continueOnError": true, - "alwaysRun": false, - "displayName": "Workaround for BuildTools - Delete CLI dir.props", - "timeoutInMinutes": 0, - "condition": "succeeded()", - "task": { - "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", - "versionSpec": "1.*", - "definitionType": "task" - }, - "inputs": { - "scriptType": "inlineScript", - "scriptName": "", - "arguments": "-path \"$(Build.SourcesDirectory)\"", - "workingFolder": "$(Build.SourcesDirectory)", - "inlineScript": "param ($path)\ngci \"$path\\dir.props\" | Remove-Item -Force", - "failOnStandardError": "true" - } - }, - { - "enabled": true, - "continueOnError": true, - "alwaysRun": false, - "displayName": "Download blobs from container $(PB_CloudDropAccountName)", - "timeoutInMinutes": 0, - "condition": "succeeded()", - "task": { - "id": "c6c4c611-aa2e-4a33-b606-5eaba2196824", - "versionSpec": "1.*", - "definitionType": "task" - }, - "inputs": { - "solution": "$(Build.SourcesDirectory)\\build\\buildpipeline\\security\\syncAzure.proj", - "msbuildLocationMethod": "version", - "msbuildVersion": "latest", - "msbuildArchitecture": "x64", - "msbuildLocation": "", - "platform": "x64", - "configuration": "$(BuildConfiguration)", - "msbuildArguments": "/p:AzureAccount=\"$(PB_CloudDropAccountName)\" /p:AzureToken=\"$(PB_CloudDropAccessToken)\" /p:BlobName=\"$(PB_BlobNameFilter)\" /verbosity:diag", - "clean": "false", - "maximumCpuCount": "false", - "restoreNugetPackages": "false", - "logProjectEvents": "false", - "createLogFile": "false" - } - }, - { - "enabled": true, - "continueOnError": true, - "alwaysRun": false, - "displayName": "Copy downloaded packages to security folder", - "timeoutInMinutes": 0, - "condition": "succeeded()", - "refName": "PowerShell_23", - "task": { - "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", - "versionSpec": "1.*", - "definitionType": "task" - }, - "inputs": { - "scriptType": "inlineScript", - "scriptName": "", - "arguments": "-SrcDir \"$(Build.SourcesDirectory)\"", - "workingFolder": "$(Build.SourcesDirectory)", - "inlineScript": "param($SrcDir)\n$secDir = Join-Path \"$SrcDir\" \"security\"\n$pkgDir = \"$SrcDir\\core-setup\\packages\\AzureTransfer\"\nCopy-Item \"$pkgDir \" \"$secDir\" -Force -Recurse\n", - "failOnStandardError": "true" - } - }, - { - "enabled": true, - "continueOnError": true, - "alwaysRun": false, - "displayName": "Extract downloaded packages", - "timeoutInMinutes": 0, - "condition": "succeeded()", - "task": { - "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", - "versionSpec": "1.*", - "definitionType": "task" - }, - "inputs": { - "scriptType": "inlineScript", - "scriptName": "", - "arguments": "-SrcDir \"$(Build.SourcesDirectory)\"", - "workingFolder": "$(Build.SourcesDirectory)", - "inlineScript": "param($SrcDir)\n$secDir = Join-Path \"$SrcDir\" \"security\"\ngci \"$secDir\\*.zip\" | % {\n$dstDir = Join-Path \"$secDir\" $($_.BaseName)\nExpand-Archive -Path $($_.FullName) -DestinationPath \"$dstDir\" -Force\nWrite-Host \"Expanded: $($_.FullName)\"\nRemove-Item $_.FullName -Force\n}\n", - "failOnStandardError": "true" - } - }, - { - "enabled": true, - "continueOnError": true, - "alwaysRun": false, - "displayName": "List all files", - "timeoutInMinutes": 0, - "condition": "succeeded()", - "task": { - "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", - "versionSpec": "1.*", - "definitionType": "task" - }, - "inputs": { - "scriptType": "inlineScript", - "scriptName": "", - "arguments": "$(Build.SourcesDirectory)", - "workingFolder": "$(Build.SourcesDirectory)", - "inlineScript": "param($SrcDir)\n$fileCount = 0\ngci $SrcDir -recurse | % {\nWrite-Host $($_.FullName)\n$fileCount += 1\n}\nWrite-Host \"File Count: $fileCount\"\n", - "failOnStandardError": "true" - } - }, - { - "environment": {}, - "enabled": true, - "continueOnError": true, - "alwaysRun": false, - "displayName": "Remove non-CLI folders", - "timeoutInMinutes": 0, - "condition": "succeeded()", - "refName": "PowerShell_22", - "task": { - "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", - "versionSpec": "1.*", - "definitionType": "task" - }, - "inputs": { - "scriptType": "inlineScript", - "scriptName": "", - "arguments": "-SrcDir \"$(Build.SourcesDirectory)\"", - "workingFolder": "$(Build.SourcesDirectory)", - "inlineScript": "param($SrcDir)\n$secDir = Join-Path \"$SrcDir\" \"security\"\n\ngci \"$secDir\" | where {$_.PSIsContainer} | % {\n gci $_.FullName | where {$_.PSIsContainer} | % {\n if ($_.BaseName -ine \"sdk\" -and $_.BaseName -notmatch \"symbols\")\n {\n Remove-Item $_.FullName -Recurse -Force -ErrorAction Continue\n Write-Host \"Removed $($_.FullName)\"\n }\n }\n}", - "failOnStandardError": "false" - } - }, - { - "enabled": true, - "continueOnError": true, - "alwaysRun": false, - "displayName": "Workaround for long path - DELETE files with path length greater than or equal to 240 characters", - "timeoutInMinutes": 0, - "condition": "succeeded()", - "refName": "Task_10", - "task": { - "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", - "versionSpec": "1.*", - "definitionType": "task" - }, - "inputs": { - "scriptType": "inlineScript", - "scriptName": "", - "arguments": "-SrcDir \"$(Build.SourcesDirectory)\"", - "workingFolder": "$(Build.SourcesDirectory)", - "inlineScript": "param($SrcDir)\n$longPath = New-Object System.Collections.ArrayList\ngci \"$SrcDir\\*\" -recurse | where {!$_.PSIsContainer} | % {\nif ($($_.FullName.Length) -ge 240)\n{\n$longPath.Add($($_.Directory.FullName)) | Out-Null\n}\n}\n$longPath | % {\nStart-Process \"cmd\" -ArgumentList \"/c rd /S /Q $_\" -Wait\nWrite-Host \"DELETED $_\"\n}\n", - "failOnStandardError": "false" - } - }, - { - "enabled": true, - "continueOnError": true, - "alwaysRun": false, - "displayName": "List all files - post delete", - "timeoutInMinutes": 0, - "condition": "succeeded()", - "refName": "Task_11", - "task": { - "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", - "versionSpec": "1.*", - "definitionType": "task" - }, - "inputs": { - "scriptType": "inlineScript", - "scriptName": "", - "arguments": "$(Build.SourcesDirectory)", - "workingFolder": "$(Build.SourcesDirectory)", - "inlineScript": "param($SrcDir)\n$fileCount = 0\ngci $SrcDir -recurse | % {\nWrite-Host $($_.FullName)\n$fileCount += 1\n}\nWrite-Host \"File Count: $fileCount\"\n", - "failOnStandardError": "true" - } - }, - { - "environment": {}, - "enabled": true, - "continueOnError": false, - "alwaysRun": false, - "displayName": "Get latest version info", - "timeoutInMinutes": 0, - "condition": "succeeded()", - "refName": "PowerShell23", - "task": { - "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", - "versionSpec": "1.*", - "definitionType": "task" - }, - "inputs": { - "scriptType": "filePath", - "scriptName": "$(Build.SourcesDirectory)\\build\\buildpipeline\\security\\Get-LatestVersion.ps1", - "arguments": "-Branch \"$(CodeBase)\"", - "workingFolder": "", - "failOnStandardError": "true" - } - }, - { - "environment": {}, - "enabled": true, - "continueOnError": false, - "alwaysRun": false, - "displayName": "Workaround for long package Id", - "timeoutInMinutes": 0, - "condition": "succeeded()", - "refName": "PowerShell24", - "task": { - "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", - "versionSpec": "1.*", - "definitionType": "task" - }, - "inputs": { - "scriptType": "inlineScript", - "scriptName": "", - "arguments": "-packageId $(CliLatestPackageId)", - "workingFolder": "", - "inlineScript": "param($packageId)\n\nif ($packageId.Length -ge 16)\n{\n Write-Host \"Build number for security build is the package Id. TSA has a limit of 16 characters for build number. Since package Id is greater than 16 characters, build number will be set to current date time in yyyymmddHHMMss format.\"\n $CliLatestPackageId = Get-Date -Format yyyymmddHHMMss\n Write-Host \"##vso[task.setvariable variable=CliLatestPackageId;]$CliLatestPackageId\"\n}", - "failOnStandardError": "true" - } - }, - { - "enabled": true, - "continueOnError": true, - "alwaysRun": false, - "displayName": "Run BinSkim ", - "timeoutInMinutes": 0, - "condition": "succeeded()", - "task": { - "id": "3056813a-40e9-4b2f-8f6b-612d1bc4e045", - "versionSpec": "3.*", - "definitionType": "task" - }, - "inputs": { - "InputType": "CommandLine", - "arguments": "analyze $(Build.SourcesDirectory)\\security\\*.dll $(Build.SourcesDirectory)\\security\\*.exe --recurse --sympath $(Build.SourcesDirectory)\\security\\*.pdb --verbose --statistics", - "Function": "analyze", - "AnalyzeTarget": "$(Build.ArtifactStagingDirectory)", - "AnalyzeSymPath": "", - "AnalyzeConfigPath": "default", - "AnalyzePluginPath": "", - "AnalyzeRecurse": "true", - "AnalyzeVerbose": "true", - "AnalyzeHashes": "true", - "AnalyzeStatistics": "false", - "AnalyzeEnvironment": "false", - "ExportRulesOutputType": "SARIF", - "DumpTarget": "$(Build.ArtifactStagingDirectory)", - "DumpRecurse": "true", - "DumpVerbose": "true", - "toolVersion": "Latest" - } - }, - { - "enabled": true, - "continueOnError": true, - "alwaysRun": false, - "displayName": "Run APIScan", - "timeoutInMinutes": 0, - "condition": "succeeded()", - "task": { - "id": "9adea2b1-3752-438c-80c6-a6f0a812abdd", - "versionSpec": "1.*", - "definitionType": "task" - }, - "inputs": { - "targetMode": "binarysym", - "softwareFolder": "$(Build.SourcesDirectory)\\security", - "mpdFolder": "", - "softwareName": "CLI", - "softwareVersionNum": "$(CliLatestPackageId)", - "softwareBuildNum": "$(CliLatestPackageId)", - "modeType": "prerelease", - "noCopySymbols": "false", - "noCopyBinaries": "false", - "noDecompress": "true", - "exclusionList": "", - "email": "", - "symbolsFolder": "$(Build.SourcesDirectory)\\security", - "preBbtBinariesFolder": "", - "preBbtSymbolsFolder": "", - "isLargeApp": "false", - "analyzerTimeout": "00:00:00", - "preserveTempFiles": "false", - "toolVersion": "Latest" - } - }, - { - "enabled": true, - "continueOnError": false, - "alwaysRun": false, - "displayName": "Checkout CLI at SHA listed in latest.version", - "timeoutInMinutes": 0, - "condition": "succeeded()", - "task": { - "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", - "versionSpec": "1.*", - "definitionType": "task" - }, - "inputs": { - "scriptType": "inlineScript", - "scriptName": "", - "arguments": "-sha \"$(CliLatestCommitSha)\" -git \"$(PB_Git)\"", - "workingFolder": "$(Build.SourcesDirectory)", - "inlineScript": "param($sha, $git)\n\nStart-Process \"$git\" -ArgumentList \"clean -df\" -Wait -Verbose -ErrorAction Stop\nStart-Process \"$git\" -ArgumentList \"checkout $sha\" -Wait -Verbose -ErrorAction Stop\nWrite-Host \"Checked out at $sha\"\n", - "failOnStandardError": "true" - } - }, - { - "enabled": true, - "continueOnError": true, - "alwaysRun": false, - "displayName": "Run Core-Setup clean.cmd", - "timeoutInMinutes": 0, - "condition": "succeeded()", - "task": { - "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", - "versionSpec": "1.*", - "definitionType": "task" - }, - "inputs": { - "filename": "clean.cmd", - "arguments": "-all", - "workingFolder": "$(Build.SourcesDirectory)\\core-setup", - "failOnStandardError": "false" - } - }, - { - "enabled": true, - "continueOnError": true, - "alwaysRun": false, - "displayName": "Delete Core-Setup folder", - "timeoutInMinutes": 0, - "condition": "succeeded()", - "task": { - "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", - "versionSpec": "1.*", - "definitionType": "task" - }, - "inputs": { - "scriptType": "inlineScript", - "scriptName": "", - "arguments": "-path \"$(Build.SourcesDirectory)\\core-setup\"", - "workingFolder": "", - "inlineScript": "param ($path)\nRemove-Item \"$path\" -Force -Recurse -ErrorAction Continue\n", - "failOnStandardError": "true" - } - }, - { - "enabled": true, - "continueOnError": true, - "alwaysRun": false, - "displayName": "List all files - post checkout", - "timeoutInMinutes": 0, - "condition": "succeeded()", - "task": { - "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", - "versionSpec": "1.*", - "definitionType": "task" - }, - "inputs": { - "scriptType": "inlineScript", - "scriptName": "", - "arguments": "$(Build.SourcesDirectory)", - "workingFolder": "$(Build.SourcesDirectory)", - "inlineScript": "param($SrcDir)\n$fileCount = 0\ngci $SrcDir -recurse | % {\nWrite-Host $($_.FullName)\n$fileCount += 1\n}\nWrite-Host \"File Count: $fileCount\"\n", - "failOnStandardError": "true" - } - }, - { - "enabled": true, - "continueOnError": true, - "alwaysRun": false, - "displayName": "Run CredScan", - "timeoutInMinutes": 0, - "condition": "succeeded()", - "task": { - "id": "ea576cd4-c61f-48f8-97e7-a3cb07b90a6f", - "versionSpec": "2.*", - "definitionType": "task" - }, - "inputs": { - "outputFormat": "pre", - "toolVersion": "Latest", - "scanFolder": "$(Build.SourcesDirectory)", - "searchersFileType": "Default", - "searchersFile": "", - "suppressionsFile": "", - "suppressAsError": "false", - "batchSize": "" - } - }, - { - "enabled": true, - "continueOnError": true, - "alwaysRun": false, - "displayName": "Run PoliCheck", - "timeoutInMinutes": 0, - "condition": "succeeded()", - "task": { - "id": "d785890c-0d0d-46bd-8167-8fa9d49990c7", - "versionSpec": "1.*", - "definitionType": "task" - }, - "inputs": { - "inputType": "Basic", - "cmdLineArgs": "/F:$(Build.SourcesDirectory) /T:9 /O:PoliCheck.xml", - "targetType": "F", - "targetArgument": "$(Build.SourcesDirectory)", - "importEx": "0", - "termTypeT": "0029a9", - "termTypeTCustom": "9", - "termTypeK": "", - "termTypeL": "", - "EXGT": "false", - "result": "PoliCheck.xml", - "optionsFC": "1", - "optionsXS": "1", - "optionsCTGLEN": "", - "optionsSEV": "", - "optionsPE": "", - "optionsHMENABLE": "", - "optionsHPATH": "", - "optionsHVER": "", - "optionsRulesDBPath": "", - "optionsRule": "", - "optionsXCLASS": "", - "optionsTASKNAME": "", - "optionsWORKINGDIRECTORY": "", - "optionsFTPATH": "", - "optionsD": "", - "optionsB1": "", - "optionsB2": "", - "optionsB3": "", - "optionsOCDB": "", - "toolVersion": "Latest" - } - }, - { - "enabled": true, - "continueOnError": true, - "alwaysRun": false, - "displayName": "Post Analysis", - "timeoutInMinutes": 0, - "condition": "succeeded()", - "task": { - "id": "f5679091-e6da-4974-a8dc-0eec03a8ea63", - "versionSpec": "1.*", - "definitionType": "task" - }, - "inputs": { - "APIScan": "true", - "BinScope": "false", - "BinSkim": "true", - "BinSkimBreakOn": "Error", - "CredScan": "true", - "FortifySCA": "false", - "FxCop": "false", - "FxCopBreakOn": "ErrorAbove", - "ModernCop": "false", - "ModernCopBreakOn": "Error", - "PoliCheck": "true", - "PoliCheckBreakOn": "Severity1", - "SDLNativeRules": "false", - "TSLint": "false", - "TSLintBreakOn": "Error" - } - }, - { - "enabled": true, - "continueOnError": true, - "alwaysRun": false, - "displayName": "Publish Security Analysis Logs", - "timeoutInMinutes": 0, - "condition": "succeeded()", - "task": { - "id": "4096c760-3a8a-435d-9689-88c0311bbc0e", - "versionSpec": "2.*", - "definitionType": "task" - }, - "inputs": { - "ArtifactName": "CodeAnalysisLogs", - "ArtifactType": "Container", - "TargetPath": "\\\\my\\share\\$(Build.DefinitionName)\\$(Build.BuildNumber)", - "RvName": "", - "ProductComponentName": "", - "ProductVersionNumber": "", - "PlatformName": "", - "SDLToolName": "", - "SDLToolResultFile": "" - } - }, - { - "enabled": true, - "continueOnError": true, - "alwaysRun": false, - "displayName": "TSA upload to Codebase: DotNet-CLI-Trusted_$(CodeBase) Stamp: Azure", - "timeoutInMinutes": 0, - "condition": "succeeded()", - "task": { - "id": "3da26988-bb64-4a23-8f06-45531d297dae", - "versionSpec": "1.*", - "definitionType": "task" - }, - "inputs": { - "codebase": "NewOrUpdate", - "tsaStamp": "Azure", - "tsaWebApiUrl": "$(TSAStamp)", - "codeBaseName": "DotNet-CLI-Trusted_$(CodeBase)", - "notificationAlias": "$(NotificationAlias)", - "codeBaseAdmins": "NORTHAMERICA\\raeda", - "instanceUrlAzure": "MSAZURE", - "instanceUrlBing": "", - "instanceUrlCarbon": "", - "instanceUrlDevDiv": "DEVDIV", - "instanceUrlSkype": "", - "instanceUrlTsa": "", - "instanceUrlPpe": "", - "projectNameDAIPVSTF": "", - "projectNameDYNAMICSCRM": "", - "projectNameMSAZURE": "One", - "projectNameMSDYENG": "", - "projectNameMSECG": "", - "projectNameIDENTITYDIVISION": "Code Scan - TSA", - "projectNameVSTFRD": "", - "projectNameMSASG": "", - "projectNameMICROSOFTVSTS": "", - "projectNameMSDATA": "", - "projectNameMSENG": "", - "projectNameDEVDIV": "DevDiv", - "projectNameSKYPETEST2": "", - "projectNameONEDRIVE": "", - "projectNameSQLBUVSTS": "", - "projectNamePOWERBI": "", - "projectNameAZUREVSTFPPE": "", - "projectNameSKYPE": "", - "projectNameDOMOREEXP": "", - "projectNameSQLBUVSTSTEST": "", - "areaPath": "One\\DevDiv\\DotNetCore", - "iterationPath": "One", - "uploadAPIScan": "true", - "uploadBinScope": "false", - "uploadBinSkim": "true", - "uploadCredScan": "true", - "uploadFortifySCA": "false", - "uploadFxCop": "false", - "uploadModernCop": "false", - "uploadPoliCheck": "true", - "uploadPREfast": "false", - "validateToolOutput": "Warning", - "validateCompatibility": "Error", - "uploadAsync": "true" - } - } - ], - "options": [ - { - "enabled": false, - "definition": { - "id": "5bc3cfb7-6b54-4a4b-b5d2-a3905949f8a6" - }, - "inputs": {} - }, - { - "enabled": false, - "definition": { - "id": "7c555368-ca64-4199-add6-9ebaf0b0137d" - }, - "inputs": { - "multipliers": "[]", - "parallel": "false", - "continueOnError": "true", - "additionalFields": "{}" - } - }, - { - "enabled": false, - "definition": { - "id": "a9db38f9-9fdc-478c-b0f9-464221e58316" - }, - "inputs": { - "workItemType": "234347", - "assignToRequestor": "true", - "additionalFields": "{}" - } - }, - { - "enabled": false, - "definition": { - "id": "57578776-4c22-4526-aeb0-86b6da17ee9c" - }, - "inputs": {} - }, - { - "enabled": false, - "definition": { - "id": "5d58cc01-7c75-450c-be18-a388ddb129ec" - }, - "inputs": { - "branchFilters": "[\"+refs/heads/*\"]", - "additionalFields": "{}" - } - } - ], - "variables": { - "system.debug": { - "value": "false" - } - }, - "demands": [ - "Agent.OS -equals windows_nt", - "msbuild" - ], - "retentionRules": [ - { - "branches": [ - "+refs/heads/*" - ], - "artifacts": [ - "build.SourceLabel" - ], - "artifactTypesToDelete": [], - "daysToKeep": 10, - "minimumToKeep": 1, - "deleteBuildRecord": true, - "deleteTestResults": true - } - ], - "_links": { - "self": { - "href": "https://devdiv.visualstudio.com/0bdbc590-a062-4c3f-b0f6-9383f67865ee/_apis/build/Definitions/6661" - }, - "web": { - "href": "https://devdiv.visualstudio.com/_permalink/_build/index?collectionId=011b8bdf-6d56-4f87-be0d-0092136884d9&projectId=0bdbc590-a062-4c3f-b0f6-9383f67865ee&definitionId=6661" - }, - "editor": { - "href": "https://devdiv.visualstudio.com/_permalink/_build/definitionEditor?collectionId=011b8bdf-6d56-4f87-be0d-0092136884d9&projectId=0bdbc590-a062-4c3f-b0f6-9383f67865ee&definitionId=6661" - }, - "badge": { - "href": "https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/6661/badge" - } - }, - "buildNumberFormat": "$(date:yyyyMMdd)$(rev:-rr)", - "jobAuthorizationScope": 1, - "jobTimeoutInMinutes": 600, - "jobCancelTimeoutInMinutes": 5, - "badgeEnabled": true, - "repository": { - "properties": { - "cleanOptions": "3", - "labelSources": "0", - "labelSourcesFormat": "$(build.buildNumber)", - "reportBuildStatus": "true", - "gitLfsSupport": "false", - "skipSyncSource": "false", - "checkoutNestedSubmodules": "false", - "fetchDepth": "0" - }, - "id": "ceac4423-53f8-4c97-bc62-173630412581", - "type": "TfsGit", - "name": "DotNet-Cli-Trusted", - "url": "https://devdiv.visualstudio.com/DevDiv/_git/DotNet-Cli-Trusted", - "defaultBranch": "refs/heads/master", - "clean": "true", - "checkoutSubmodules": false - }, - "processParameters": {}, - "quality": "definition", - "authoredBy": { - "id": "9d5fdf9f-36b6-4d0c-a12e-2737a673af94", - "displayName": "Ravi Eda", - "uniqueName": "raeda@microsoft.com", - "url": "https://app.vssps.visualstudio.com/Aa44b2c06-f247-425c-8464-4a0676af910a/_apis/Identities/9d5fdf9f-36b6-4d0c-a12e-2737a673af94", - "imageUrl": "https://devdiv.visualstudio.com/_api/_common/identityImage?id=9d5fdf9f-36b6-4d0c-a12e-2737a673af94" - }, - "queue": { - "id": 36, - "name": "DotNet-Build", - "pool": { - "id": 39, - "name": "DotNet-Build" - } - }, - "id": 6733, - "name": "DotNet-CLI-Security-Windows", - "url": "https://devdiv.visualstudio.com/0bdbc590-a062-4c3f-b0f6-9383f67865ee/_apis/build/Definitions/6661", - "uri": "vstfs:///Build/Definition/6733", - "path": "\\", - "type": 2, - "revision": 6, - "createdDate": "2017-06-21T21:58:12.397Z", - "project": { - "id": "0bdbc590-a062-4c3f-b0f6-9383f67865ee", - "name": "DevDiv", - "description": "Visual Studio and DevDiv team project for git source code repositories. Work items will be added for Adams, Dev14 work items are tracked in vstfdevdiv. ", - "url": "https://devdiv.visualstudio.com/_apis/projects/0bdbc590-a062-4c3f-b0f6-9383f67865ee", - "state": "wellFormed", - "revision": 418097676, - "visibility": 0 - } -} diff --git a/old/build/buildpipeline/security/Get-LatestVersion.ps1 b/old/build/buildpipeline/security/Get-LatestVersion.ps1 deleted file mode 100644 index 2f921ef3a..000000000 --- a/old/build/buildpipeline/security/Get-LatestVersion.ps1 +++ /dev/null @@ -1,71 +0,0 @@ -<# -.SYNOPSIS - Retrieves the latest commit SHA and the corresponding package Id for the specified branch of CLI. - This retrieval is achieved by downloading the latest.version file, which contains the commit SHA and package Id info. - If retrieval succeeds, then the commit is set as a VSTS Task Variable named CliLatestCommitSha, and similarly package Id is set as CliLatestPackageId. -.PARAMETER $Branch - Name of the CLI branch. -.PARAMETER $Filename - Name of the file that contains latest version info i.e. commit SHA and package Id. - If not specified, then the default value is latest.version -.PARAMETER $UrlPrefix - URL prefix for $Filename. - If not specified, then the default value is https://dotnetcli.blob.core.windows.net/dotnet/Sdk -#> - -param( - [Parameter(Mandatory=$true)] - [string]$Branch, - [string]$Filename="latest.version", - [string]$UrlPrefix="https://dotnetcli.blob.core.windows.net/dotnet/Sdk" -) - -function Get-VersionInfo -{ - Write-Host "Attempting to retrieve latest version info from $latestVersionUrl" - $retries = 3 - $retryCount = 1 - $oldEap = $ErrorActionPreference - - while ($retryCount -le $retries) - { - $ErrorActionPreference = "Stop" - - try - { - $content = (Invoke-WebRequest -Uri "$latestVersionUrl" -UseBasicParsing).Content - return $content.Split([Environment]::NewLine, [System.StringSplitOptions]::RemoveEmptyEntries) - } - catch - { - Sleep -Seconds (Get-Random -minimum 3 -maximum 10) - Write-Host "Exception occurred while attempting to get latest version info from $latestVersionUrl. $_" - Write-Host "Retry $retryCount of $retries" - } - finally - { - $ErrorActionPreference = $oldEap - } - - $retryCount++ - } -} - -$latestVersionUrl = "$UrlPrefix/$Branch/$Filename" -$latestVersionContent = Get-VersionInfo - -if ($latestVersionContent -ne $null -and $latestVersionContent.Length -eq 2) -{ - $CliLatestCommitSha = $latestVersionContent[0] - $CliLatestPackageId = $latestVersionContent[1] - - Write-Host "##vso[task.setvariable variable=CliLatestCommitSha;]$CliLatestCommitSha" - Write-Host "##vso[task.setvariable variable=CliLatestPackageId;]$CliLatestPackageId" - - Write-Host "The latest commit SHA in CLI $Branch is $CliLatestCommitSha" - Write-Host "The latest package Id in CLI $Branch is $CliLatestPackageId" -} -else -{ - Write-Error "Unable to get latest version info from $latestVersionUrl" -} diff --git a/old/build/buildpipeline/security/dir.props b/old/build/buildpipeline/security/dir.props deleted file mode 100644 index 3e28b4a52..000000000 --- a/old/build/buildpipeline/security/dir.props +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/old/build/buildpipeline/security/pipeline.json b/old/build/buildpipeline/security/pipeline.json deleted file mode 100644 index dbac3626b..000000000 --- a/old/build/buildpipeline/security/pipeline.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "Repository": "cli", - "Definitions": { - "Path": ".", - "Type": "VSTS", - "BaseUrl": "https://devdiv.visualstudio.com/DefaultCollection", - "SkipBranchAndVersionOverrides": "false" - }, - "Pipelines": [ - { - "Name": "Security Build for Windows", - "Parameters": { - "TreatWarningsAsErrors": "false" - }, - "Definitions": [ - { - "Name": "DotNet-CLI-Security-Windows" - } - ] - } - ] -} diff --git a/old/build/buildpipeline/security/syncAzure.proj b/old/build/buildpipeline/security/syncAzure.proj deleted file mode 100644 index 45d7657eb..000000000 --- a/old/build/buildpipeline/security/syncAzure.proj +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - $(BuildToolsTaskDesktopDir)Microsoft.DotNet.Build.CloudTestTasks.dll - dotnet - $(PackagesDir)AzureTransfer - - - - - - - - - - - - - diff --git a/old/build/buildpipeline/security/syncAzure.targets b/old/build/buildpipeline/security/syncAzure.targets deleted file mode 100644 index 4cc360a11..000000000 --- a/old/build/buildpipeline/security/syncAzure.targets +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - $(PackagesDir)/AzureTransfer - - - - - - - - - <_OSFilteredBlobNames Include="@(_BlobList)" - Condition="'$(OSGroup)' == 'Windows_NT' AND - ('%(_BlobList.Extension)' == '.zip' OR '%(_BlobList.Extension)' == '.exe' OR '%(_BlobList.Extension)' == '.version')" /> - - - - - diff --git a/old/build/package/Archive.targets b/old/build/package/Archive.targets deleted file mode 100644 index d86e435fc..000000000 --- a/old/build/package/Archive.targets +++ /dev/null @@ -1,56 +0,0 @@ - - - - $(PackagesDirectory) - - - - - - $(ArchiveOutputDirectory)/%(GenerateArchivesInputsOutputs.OutFileName)$(ArchiveExtension) - - - - - - - - - - - - - - - - %(LayoutDefinition.OutputFiles) - $(ArchiveOutputDirectory)/%(LayoutDefinition.NameWithVersion)$(ArchiveExtension) - $(LayoutDirectory)/%(LayoutDefinition.Name) - %(LayoutDefinition.NameWithVersion) - %(LayoutDefinition.ExcludePatterns) - - - - - - - - - diff --git a/old/build/package/CopySandBoxPackageOut.targets b/old/build/package/CopySandBoxPackageOut.targets deleted file mode 100644 index a7bf6b524..000000000 --- a/old/build/package/CopySandBoxPackageOut.targets +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - diff --git a/old/build/package/Layout.targets b/old/build/package/Layout.targets deleted file mode 100644 index 4c248608b..000000000 --- a/old/build/package/Layout.targets +++ /dev/null @@ -1,68 +0,0 @@ - - - - $(LayoutDirectory)/$(ArtifactNameCombinedHostHostFxrFrameworkSdk) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @(SdkLayoutInput) - @(SdkRelativeOutputFiles -> '$(SdkLayoutOutputDirectory)/%(Identity)') - $(ArtifactNameWithVersionSdk) - $(ArtifactNameSdk) - - - - @(CombinedHostHostFxrFrameworkSdkInput) - @(CombinedHostHostFxrFrameworkSdkRelativeOutputFiles -> '$(CombinedHostHostFxrFrameworkSdkOutputDirectory)/%(Identity)') - $(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk) - $(ArtifactNameCombinedHostHostFxrFrameworkSdk) - $(WindowsSatelliteAssembliesRegEx) - $(SatelliteAssemblies) - - - - - - - - - - - diff --git a/old/build/package/Symbols.csproj b/old/build/package/Symbols.csproj deleted file mode 100644 index 7a4bbfd6e..000000000 --- a/old/build/package/Symbols.csproj +++ /dev/null @@ -1,17 +0,0 @@ - - - - - netcoreapp1.0 - false - true - false - - $(SymbolsNupkgPackageId) - $(SdkVersion) - - - - - - diff --git a/old/build/package/Symbols.targets b/old/build/package/Symbols.targets deleted file mode 100644 index d85180233..000000000 --- a/old/build/package/Symbols.targets +++ /dev/null @@ -1,29 +0,0 @@ - - - - $(MSBuildThisFileDirectory)/Symbols.csproj - runtime.$(ProductMonikerRid).Microsoft.DotNet.SDK - - - - - - - - - - - - - - - - diff --git a/old/build/package/dotnet-deb-tool-consumer/dotnet-deb-tool-consumer.csproj b/old/build/package/dotnet-deb-tool-consumer/dotnet-deb-tool-consumer.csproj deleted file mode 100644 index 6446ffad1..000000000 --- a/old/build/package/dotnet-deb-tool-consumer/dotnet-deb-tool-consumer.csproj +++ /dev/null @@ -1,9 +0,0 @@ - - - netcoreapp2.0 - $(MicrosoftNETCoreAppPackageVersion) - - - - - diff --git a/old/build/prepare/CentosCoreclrAndCoreFxDependencies.props b/old/build/prepare/CentosCoreclrAndCoreFxDependencies.props deleted file mode 100644 index 1b9f08b19..000000000 --- a/old/build/prepare/CentosCoreclrAndCoreFxDependencies.props +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/old/build/prepare/CheckPrereqs.targets b/old/build/prepare/CheckPrereqs.targets deleted file mode 100644 index 03d743c35..000000000 --- a/old/build/prepare/CheckPrereqs.targets +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/old/build/prepare/DebianPackageBuildDependencies.props b/old/build/prepare/DebianPackageBuildDependencies.props deleted file mode 100644 index fd8890447..000000000 --- a/old/build/prepare/DebianPackageBuildDependencies.props +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/old/build/prepare/UbuntuCoreclrAndCoreFxDependencies.props b/old/build/prepare/UbuntuCoreclrAndCoreFxDependencies.props deleted file mode 100644 index 4d7dd66f1..000000000 --- a/old/build/prepare/UbuntuCoreclrAndCoreFxDependencies.props +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/old/build/publish/Badge.targets b/old/build/publish/Badge.targets deleted file mode 100644 index 3493b5880..000000000 --- a/old/build/publish/Badge.targets +++ /dev/null @@ -1,42 +0,0 @@ - - - - $(RepoRoot)/resources/images/version_badge.svg - - - - - - - - - - - - - - - - - $(OSName)_$(Architecture) - rhel.6_x64 - linux_musl_x64 - linux_$(Architecture) - all_linux_distros_native_installer - - $(BaseOutputDirectory)/$(VersionBadgeMoniker)_$(Configuration)_version_badge.svg - $(BaseOutputDirectory)/$(VersionBadgeMoniker)_$(Configuration)_coherent_badge.svg - - - diff --git a/old/build/publish/Checksum.targets b/old/build/publish/Checksum.targets deleted file mode 100644 index 527edf31d..000000000 --- a/old/build/publish/Checksum.targets +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - %(ForPublishing.FullPath).sha - %(ForPublishing.RelativeBlobPath).sha - ShipInstaller=dotnetclichecksums - - - - diff --git a/old/build/publish/FinishBuild.targets b/old/build/publish/FinishBuild.targets deleted file mode 100644 index e67faa14c..000000000 --- a/old/build/publish/FinishBuild.targets +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/old/build/publish/PublishContent.targets b/old/build/publish/PublishContent.targets deleted file mode 100644 index 41b7886a8..000000000 --- a/old/build/publish/PublishContent.targets +++ /dev/null @@ -1,61 +0,0 @@ - - - - false - - - - - - - - - - - - $([System.String]::Copy('%(RecursiveDir)%(Filename)%(Extension)').Replace('\' ,'/')) - ShipInstaller=dotnetcli - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/old/build/publish/RuntimeCoherence.targets b/old/build/publish/RuntimeCoherence.targets deleted file mode 100644 index 4fb8f4d4e..000000000 --- a/old/build/publish/RuntimeCoherence.targets +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - false - true - - - diff --git a/old/build/run-build.ps1 b/old/build/run-build.ps1 deleted file mode 100644 index e69de29bb..000000000 diff --git a/old/build/test/RunTest.proj b/old/build/test/RunTest.proj deleted file mode 100644 index 0454d8a6f..000000000 --- a/old/build/test/RunTest.proj +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - $([MSBuild]::Unescape($(CLIBuildDll))) - - - - - - - - - - - - - - \ No newline at end of file diff --git a/old/build/test/TestAssetProjects.targets b/old/build/test/TestAssetProjects.targets deleted file mode 100644 index fc73bd17a..000000000 --- a/old/build/test/TestAssetProjects.targets +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - %(TestAssetProjects.ProjectPath) - - - - - @(TestAssetProjectInputs) - - - - - - - - %(TestAssetProjects.ProjectPath) - - - - - - - - - - - - - - - %(RelativeDir)**/*.* - %(RelativeDir)bin/**/*.*;%(RelativeDir)obj/**/*.* - $([System.IO.Directory]::GetParent(%(Identity))) - %(Identity) - - - - $([System.IO.Path]::GetFileName(%(ProjectDir))) - MyApp - AppWithContentPackage - - - - %(TestAssetProjects.RelativeDir)bin/$(Configuration)/netcoreapp1.0/%(TestAssetProjects.OutputName).dll - - - - \ No newline at end of file diff --git a/old/build/test/TestPackageProjects.targets b/old/build/test/TestPackageProjects.targets deleted file mode 100644 index 82230a578..000000000 --- a/old/build/test/TestPackageProjects.targets +++ /dev/null @@ -1,60 +0,0 @@ - - - - $(TestOutputDir)/packagesBuild/ - - - - - - - - - - - - - - - - - - dotnet-portable - dotnet-portable.csproj - True - True - 1.0.0 - - - True - - - dotnet-prefercliruntime - dotnet-prefercliruntime.csproj - True - True - 1.0.0 - - - True - - - - $(RepoRoot)%(Identity)/ - $(TestPackagesBuildDir)%(Identity)/bin/$(Configuration)/ - - - - %(ProjectDir)%(ProjectName) - - - - - - - %(Name) - - - diff --git a/old/build/test/TestProjects.targets b/old/build/test/TestProjects.targets deleted file mode 100644 index bd75ef4c0..000000000 --- a/old/build/test/TestProjects.targets +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/old/build_projects/Microsoft.DotNet.Cli.Build.Framework/Microsoft.DotNet.Cli.Build.Framework.csproj b/old/build_projects/Microsoft.DotNet.Cli.Build.Framework/Microsoft.DotNet.Cli.Build.Framework.csproj deleted file mode 100644 index ea3d8e435..000000000 --- a/old/build_projects/Microsoft.DotNet.Cli.Build.Framework/Microsoft.DotNet.Cli.Build.Framework.csproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - netstandard1.5 - true - true - Microsoft.DotNet.Cli.Build.Framework - $(AssetTargetFallback);dnxcore50 - - - - - - - - - - diff --git a/old/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage0.proj b/old/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage0.proj deleted file mode 100644 index 6a85183ca..000000000 --- a/old/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage0.proj +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/old/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage2.proj b/old/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage2.proj deleted file mode 100644 index cb833d480..000000000 --- a/old/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage2.proj +++ /dev/null @@ -1,27 +0,0 @@ - - - - $([System.IO.Path]::GetDirectoryName($(ToolPath)/)) - - - - false - true - false - true - - - - - - - - - - - - \ No newline at end of file diff --git a/old/build_projects/dotnet-cli-build/AzureHelper.cs b/old/build_projects/dotnet-cli-build/AzureHelper.cs deleted file mode 100644 index 5f0e375f4..000000000 --- a/old/build_projects/dotnet-cli-build/AzureHelper.cs +++ /dev/null @@ -1,401 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; -using System.Net.Http; -using System.Net.Http.Headers; -using System.Security.Cryptography; -using System.Text; -using System.Text.RegularExpressions; -using System.Threading; -using System.Threading.Tasks; - -namespace Microsoft.DotNet.Build.CloudTestTasks -{ - public static class AzureHelper - { - /// - /// The storage api version. - /// - public static readonly string StorageApiVersion = "2015-04-05"; - - public const string DateHeaderString = "x-ms-date"; - - public const string VersionHeaderString = "x-ms-version"; - - public const string AuthorizationHeaderString = "Authorization"; - - public enum SasAccessType - { - Read, - Write, - }; - - public static string AuthorizationHeader( - string storageAccount, - string storageKey, - string method, - DateTime now, - HttpRequestMessage request, - string ifMatch = "", - string contentMD5 = "", - string size = "", - string contentType = "") - { - string stringToSign = string.Format( - "{0}\n\n\n{1}\n{5}\n{6}\n\n\n{2}\n\n\n\n{3}{4}", - method, - (size == string.Empty) ? string.Empty : size, - ifMatch, - GetCanonicalizedHeaders(request), - GetCanonicalizedResource(request.RequestUri, storageAccount), - contentMD5, - contentType); - - byte[] signatureBytes = Encoding.UTF8.GetBytes(stringToSign); - string authorizationHeader; - using (HMACSHA256 hmacsha256 = new HMACSHA256(Convert.FromBase64String(storageKey))) - { - authorizationHeader = "SharedKey " + storageAccount + ":" - + Convert.ToBase64String(hmacsha256.ComputeHash(signatureBytes)); - } - - return authorizationHeader; - } - - public static string CreateContainerSasToken( - string accountName, - string containerName, - string key, - SasAccessType accessType, - int validityTimeInDays) - { - string signedPermissions = string.Empty; - switch (accessType) - { - case SasAccessType.Read: - signedPermissions = "r"; - break; - case SasAccessType.Write: - signedPermissions = "wdl"; - break; - default: - throw new ArgumentOutOfRangeException(nameof(accessType), accessType, "Unrecognized value"); - } - - string signedStart = DateTime.UtcNow.ToString("O"); - string signedExpiry = DateTime.UtcNow.AddDays(validityTimeInDays).ToString("O"); - string canonicalizedResource = "/blob/" + accountName + "/" + containerName; - string signedIdentifier = string.Empty; - string signedVersion = StorageApiVersion; - - string stringToSign = ConstructServiceStringToSign( - signedPermissions, - signedVersion, - signedExpiry, - canonicalizedResource, - signedIdentifier, - signedStart); - - byte[] signatureBytes = Encoding.UTF8.GetBytes(stringToSign); - string signature; - using (HMACSHA256 hmacSha256 = new HMACSHA256(Convert.FromBase64String(key))) - { - signature = Convert.ToBase64String(hmacSha256.ComputeHash(signatureBytes)); - } - - string sasToken = string.Format( - "?sv={0}&sr={1}&sig={2}&st={3}&se={4}&sp={5}", - WebUtility.UrlEncode(signedVersion), - WebUtility.UrlEncode("c"), - WebUtility.UrlEncode(signature), - WebUtility.UrlEncode(signedStart), - WebUtility.UrlEncode(signedExpiry), - WebUtility.UrlEncode(signedPermissions)); - - return sasToken; - } - - public static string GetCanonicalizedHeaders(HttpRequestMessage request) - { - StringBuilder sb = new StringBuilder(); - List headerNameList = (from headerName in request.Headers - where - headerName.Key.ToLowerInvariant() - .StartsWith("x-ms-", StringComparison.Ordinal) - select headerName.Key.ToLowerInvariant()).ToList(); - headerNameList.Sort(); - foreach (string headerName in headerNameList) - { - StringBuilder builder = new StringBuilder(headerName); - string separator = ":"; - foreach (string headerValue in GetHeaderValues(request.Headers, headerName)) - { - string trimmedValue = headerValue.Replace("\r\n", string.Empty); - builder.Append(separator); - builder.Append(trimmedValue); - separator = ","; - } - - sb.Append(builder); - sb.Append("\n"); - } - - return sb.ToString(); - } - - public static string GetCanonicalizedResource(Uri address, string accountName) - { - StringBuilder str = new StringBuilder(); - StringBuilder builder = new StringBuilder("/"); - builder.Append(accountName); - builder.Append(address.AbsolutePath); - str.Append(builder); - Dictionary> queryKeyValues = ExtractQueryKeyValues(address); - Dictionary> dictionary = GetCommaSeparatedList(queryKeyValues); - - foreach (KeyValuePair> pair in dictionary.OrderBy(p => p.Key)) - { - StringBuilder stringBuilder = new StringBuilder(string.Empty); - stringBuilder.Append(pair.Key + ":"); - string commaList = string.Join(",", pair.Value); - stringBuilder.Append(commaList); - str.Append("\n"); - str.Append(stringBuilder); - } - - return str.ToString(); - } - - public static List GetHeaderValues(HttpRequestHeaders headers, string headerName) - { - List list = new List(); - IEnumerable values; - headers.TryGetValues(headerName, out values); - if (values != null) - { - list.Add((values.FirstOrDefault() ?? string.Empty).TrimStart(null)); - } - - return list; - } - - private static bool IsWithinRetryRange(HttpStatusCode statusCode) - { - // Retry on http client and server error codes (4xx - 5xx) as well as redirect - - var rawStatus = (int)statusCode; - if (rawStatus == 302) - return true; - else if (rawStatus >= 400 && rawStatus <= 599) - return true; - else - return false; - } - - public static async Task RequestWithRetry(TaskLoggingHelper loggingHelper, HttpClient client, - Func createRequest, Func validationCallback = null, int retryCount = 5, - int retryDelaySeconds = 5) - { - if (loggingHelper == null) - throw new ArgumentNullException(nameof(loggingHelper)); - if (client == null) - throw new ArgumentNullException(nameof(client)); - if (createRequest == null) - throw new ArgumentNullException(nameof(createRequest)); - if (retryCount < 1) - throw new ArgumentException(nameof(retryCount)); - if (retryDelaySeconds < 1) - throw new ArgumentException(nameof(retryDelaySeconds)); - - int retries = 0; - HttpResponseMessage response = null; - - // add a bit of randomness to the retry delay - var rng = new Random(); - - while (retries < retryCount) - { - if (retries > 0) - { - if (response != null) - { - response.Dispose(); - response = null; - } - - int delay = retryDelaySeconds * retries * rng.Next(1, 5); - loggingHelper.LogMessage(MessageImportance.Low, "Waiting {0} seconds before retry", delay); - await System.Threading.Tasks.Task.Delay(delay * 1000); - } - - try - { - using (var request = createRequest()) - response = await client.SendAsync(request); - } - catch (Exception e) - { - loggingHelper.LogWarningFromException(e, true); - - // if this is the final iteration let the exception bubble up - if (retries + 1 == retryCount) - throw; - } - - // response can be null if we fail to send the request - if (response != null) - { - if (validationCallback == null) - { - // check if the response code is within the range of failures - if (IsWithinRetryRange(response.StatusCode)) - { - loggingHelper.LogWarning("Request failed with status code {0}", response.StatusCode); - } - else - { - loggingHelper.LogMessage(MessageImportance.Low, "Response completed with status code {0}", response.StatusCode); - return response; - } - } - else - { - bool isSuccess = validationCallback(response); - if (!isSuccess) - { - loggingHelper.LogMessage("Validation callback returned retry for status code {0}", response.StatusCode); - } - else - { - loggingHelper.LogMessage("Validation callback returned success for status code {0}", response.StatusCode); - return response; - } - } - } - - ++retries; - } - - // retry count exceeded - loggingHelper.LogWarning("Retry count {0} exceeded", retryCount); - - // set some default values in case response is null - var statusCode = "None"; - var contentStr = "Null"; - if (response != null) - { - statusCode = response.StatusCode.ToString(); - contentStr = await response.Content.ReadAsStringAsync(); - response.Dispose(); - } - - throw new HttpRequestException(string.Format("Request failed with status {0} response {1}", statusCode, contentStr)); - } - - private static string ConstructServiceStringToSign( - string signedPermissions, - string signedVersion, - string signedExpiry, - string canonicalizedResource, - string signedIdentifier, - string signedStart, - string signedIP = "", - string signedProtocol = "", - string rscc = "", - string rscd = "", - string rsce = "", - string rscl = "", - string rsct = "") - { - // constructing string to sign based on spec in https://msdn.microsoft.com/en-us/library/azure/dn140255.aspx - var stringToSign = string.Join( - "\n", - signedPermissions, - signedStart, - signedExpiry, - canonicalizedResource, - signedIdentifier, - signedIP, - signedProtocol, - signedVersion, - rscc, - rscd, - rsce, - rscl, - rsct); - return stringToSign; - } - - private static Dictionary> ExtractQueryKeyValues(Uri address) - { - Dictionary> values = new Dictionary>(); - //Decode this to allow the regex to pull out the correct groups for signing - address = new Uri(WebUtility.UrlDecode(address.ToString())); - Regex newreg = new Regex(@"\?(\w+)\=([\w|\=]+)|\&(\w+)\=([\w|\=]+)"); - MatchCollection matches = newreg.Matches(address.Query); - foreach (Match match in matches) - { - string key, value; - if (!string.IsNullOrEmpty(match.Groups[1].Value)) - { - key = match.Groups[1].Value; - value = match.Groups[2].Value; - } - else - { - key = match.Groups[3].Value; - value = match.Groups[4].Value; - } - - HashSet setOfValues; - if (values.TryGetValue(key, out setOfValues)) - { - setOfValues.Add(value); - } - else - { - HashSet newSet = new HashSet { value }; - values.Add(key, newSet); - } - } - - return values; - } - - private static Dictionary> GetCommaSeparatedList( - Dictionary> queryKeyValues) - { - Dictionary> dictionary = new Dictionary>(); - - foreach (string queryKeys in queryKeyValues.Keys) - { - HashSet setOfValues; - queryKeyValues.TryGetValue(queryKeys, out setOfValues); - List list = new List(); - list.AddRange(setOfValues); - list.Sort(); - string commaSeparatedValues = string.Join(",", list); - string key = queryKeys.ToLowerInvariant(); - HashSet setOfValues2; - if (dictionary.TryGetValue(key, out setOfValues2)) - { - setOfValues2.Add(commaSeparatedValues); - } - else - { - HashSet newSet = new HashSet { commaSeparatedValues }; - dictionary.Add(key, newSet); - } - } - - return dictionary; - } - } -} diff --git a/old/build_projects/dotnet-cli-build/ChangeEntryPointLibraryName.cs b/old/build_projects/dotnet-cli-build/ChangeEntryPointLibraryName.cs deleted file mode 100644 index d60d51a6a..000000000 --- a/old/build_projects/dotnet-cli-build/ChangeEntryPointLibraryName.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; - -namespace Microsoft.DotNet.Cli.Build -{ - public class ChangeEntryPointLibraryName : Task - { - [Required] - public string DepsFile { get; set; } - - [Required] - public string NewName { get; set; } - - public override bool Execute() - { - PublishMutationUtilties.ChangeEntryPointLibraryName(DepsFile, NewName); - - return true; - } - } -} diff --git a/old/build_projects/dotnet-cli-build/CheckIfAllBuildsHavePublished.cs b/old/build_projects/dotnet-cli-build/CheckIfAllBuildsHavePublished.cs deleted file mode 100644 index 7377e7042..000000000 --- a/old/build_projects/dotnet-cli-build/CheckIfAllBuildsHavePublished.cs +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -#if !SOURCE_BUILD - -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; - -namespace Microsoft.DotNet.Cli.Build -{ - public class CheckIfAllBuildsHavePublished : Task - { - private AzurePublisher _azurePublisher; - - [Required] - public string AccountName { get; set; } - - [Required] - public string AccountKey { get; set; } - - [Required] - public string ContainerName { get; set; } - - [Required] - public string NugetVersion { get; set; } - - [Required] - public string VersionBadgeMoniker { get; set; } - - [Output] - public string HaveAllBuildsPublished { get; set; } - - private AzurePublisher AzurePublisherTool - { - get - { - if (_azurePublisher == null) - { - _azurePublisher = new AzurePublisher(AccountName, AccountKey, ContainerName); - } - - return _azurePublisher; - } - } - - public override bool Execute() - { - var badges = new Dictionary() - { - { "win_x86", false }, - { "win_x64", false }, - { "freebsd_x64", false }, - { "osx_x64", false }, - { "linux_x64", false }, - { "rhel.6_x64", false }, - { "linux_musl_x64", false }, - { "all_linux_distros_native_installer", false }, - { "linux_arm", false }, - { "linux_arm64", false }, - { "win_arm", false } - }; - - if (!badges.ContainsKey(VersionBadgeMoniker)) - { - throw new ArgumentException($"A new OS build '{VersionBadgeMoniker}' was added without adding the moniker to the {nameof(badges)} lookup"); - } - - IEnumerable blobs = AzurePublisherTool.ListBlobs(AzurePublisher.Product.Sdk, NugetVersion); - foreach (string file in blobs) - { - string name = Path.GetFileName(file); - foreach (string img in badges.Keys) - { - if ((name.StartsWith($"{img}_")) && (name.EndsWith(".svg"))) - { - badges[img] = true; - break; - } - } - } - - HaveAllBuildsPublished = badges.Values.All(v => v).ToString(); - - return true; - } - } -} - -#endif diff --git a/old/build_projects/dotnet-cli-build/CopyBlobsToLatest.cs b/old/build_projects/dotnet-cli-build/CopyBlobsToLatest.cs deleted file mode 100644 index 1adab0114..000000000 --- a/old/build_projects/dotnet-cli-build/CopyBlobsToLatest.cs +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -#if !SOURCE_BUILD -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using System.IO; -using System.Linq; -using System.Text.RegularExpressions; - -namespace Microsoft.DotNet.Cli.Build -{ - public class CopyBlobsToLatest : Task - { - private AzurePublisher _azurePublisher; - - [Required] - public string AccountName { get; set; } - - [Required] - public string AccountKey { get; set; } - - [Required] - public string Channel { get; set; } - - [Required] - public string CommitHash { get; set; } - - [Required] - public string ContainerName { get; set; } - - [Required] - public string NugetVersion { get; set; } - - public bool Coherent { get; set; } - - private AzurePublisher AzurePublisherTool - { - get - { - if (_azurePublisher == null) - { - _azurePublisher = new AzurePublisher(AccountName, AccountKey, ContainerName); - } - - return _azurePublisher; - } - } - - public override bool Execute() - { - string targetFolder = $"{AzurePublisher.Product.Sdk}/{Channel}"; - - string targetVersionFile = $"{targetFolder}/{CommitHash}"; - string semaphoreBlob = $"{targetFolder}/publishSemaphore"; - AzurePublisherTool.CreateBlobIfNotExists(semaphoreBlob); - string leaseId = AzurePublisherTool.AcquireLeaseOnBlob(semaphoreBlob); - - // Prevent race conditions by dropping a version hint of what version this is. If we see this file - // and it is the same as our version then we know that a race happened where two+ builds finished - // at the same time and someone already took care of publishing and we have no work to do. - if (AzurePublisherTool.IsLatestSpecifiedVersion(targetVersionFile)) - { - AzurePublisherTool.ReleaseLeaseOnBlob(semaphoreBlob, leaseId); - return true; - } - else - { - Regex versionFileRegex = new Regex(@"(?[\w\d]{40})"); - - // Delete old version files - AzurePublisherTool.ListBlobs(targetFolder) - .Where(s => versionFileRegex.IsMatch(s)) - .ToList() - .ForEach(f => AzurePublisherTool.TryDeleteBlob(f)); - - // Drop the version file signaling such for any race-condition builds (see above comment). - AzurePublisherTool.DropLatestSpecifiedVersion(targetVersionFile); - } - - try - { - CopyBlobs(targetFolder); - - string cliVersion = Utils.GetVersionFileContent(CommitHash, NugetVersion); - AzurePublisherTool.PublishStringToBlob($"{targetFolder}/latest.version", cliVersion); - if (Coherent == true) - { - AzurePublisherTool.PublishStringToBlob($"{targetFolder}/latest.coherent.version", cliVersion); - } - } - finally - { - AzurePublisherTool.ReleaseLeaseOnBlob(semaphoreBlob, leaseId); - } - - return true; - } - - private void CopyBlobs(string destinationFolder) - { - Log.LogMessage("Copying blobs to {0}/{1}", ContainerName, destinationFolder); - - foreach (string blob in AzurePublisherTool.ListBlobs(AzurePublisher.Product.Sdk, NugetVersion)) - { - string targetName = Path.GetFileName(blob) - .Replace(NugetVersion, "latest"); - - string target = $"{destinationFolder}/{targetName}"; - - AzurePublisherTool.CopyBlob(blob, target); - } - } - } -} -#endif diff --git a/old/build_projects/dotnet-cli-build/CreateAzureContainer.cs b/old/build_projects/dotnet-cli-build/CreateAzureContainer.cs deleted file mode 100644 index 4df677734..000000000 --- a/old/build_projects/dotnet-cli-build/CreateAzureContainer.cs +++ /dev/null @@ -1,167 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Globalization; -using System.IO; -using System.Net; -using System.Threading.Tasks; -using System.Net.Http; -using Microsoft.Build.Framework; - -using Task = Microsoft.Build.Utilities.Task; - -namespace Microsoft.DotNet.Build.CloudTestTasks -{ - public sealed class CreateAzureContainer : Task - { - /// - /// The Azure account key used when creating the connection string. - /// - [Required] - public string AccountKey { get; set; } - - /// - /// The Azure account name used when creating the connection string. - /// - [Required] - public string AccountName { get; set; } - - /// - /// The name of the container to create. The specified name must be in the correct format, see the - /// following page for more info. https://msdn.microsoft.com/en-us/library/azure/dd135715.aspx - /// - [Required] - public string ContainerName { get; set; } - - /// - /// When false, if the specified container already exists get a reference to it. - /// When true, if the specified container already exists the task will fail. - /// - public bool FailIfExists { get; set; } - - /// - /// The read-only SAS token created when ReadOnlyTokenDaysValid is greater than zero. - /// - [Output] - public string ReadOnlyToken { get; set; } - - /// - /// The number of days for which the read-only token should be valid. - /// - public int ReadOnlyTokenDaysValid { get; set; } - - /// - /// The URI of the created container. - /// - [Output] - public string StorageUri { get; set; } - - /// - /// The write-only SAS token create when WriteOnlyTokenDaysValid is greater than zero. - /// - [Output] - public string WriteOnlyToken { get; set; } - - /// - /// The number of days for which the write-only token should be valid. - /// - public int WriteOnlyTokenDaysValid { get; set; } - - public override bool Execute() - { - return ExecuteAsync().GetAwaiter().GetResult(); - } - - public async Task ExecuteAsync() - { - Log.LogMessage( - MessageImportance.High, - "Creating container named '{0}' in storage account {1}.", - ContainerName, - AccountName); - string url = string.Format( - "https://{0}.blob.core.windows.net/{1}?restype=container", - AccountName, - ContainerName); - StorageUri = string.Format( - "https://{0}.blob.core.windows.net/{1}/", - AccountName, - ContainerName); - - Log.LogMessage(MessageImportance.Low, "Sending request to create Container"); - using (HttpClient client = new HttpClient()) - { - Func createRequest = () => - { - DateTime dt = DateTime.UtcNow; - var req = new HttpRequestMessage(HttpMethod.Put, url); - req.Headers.Add(AzureHelper.DateHeaderString, dt.ToString("R", CultureInfo.InvariantCulture)); - req.Headers.Add(AzureHelper.VersionHeaderString, AzureHelper.StorageApiVersion); - req.Headers.Add(AzureHelper.AuthorizationHeaderString, AzureHelper.AuthorizationHeader( - AccountName, - AccountKey, - "PUT", - dt, - req)); - byte[] bytestoWrite = new byte[0]; - int bytesToWriteLength = 0; - - Stream postStream = new MemoryStream(); - postStream.Write(bytestoWrite, 0, bytesToWriteLength); - req.Content = new StreamContent(postStream); - - return req; - }; - - Func validate = (HttpResponseMessage response) => - { - // the Conflict status (409) indicates that the container already exists, so - // if FailIfExists is set to false and we get a 409 don't fail the task. - return response.IsSuccessStatusCode || (!FailIfExists && response.StatusCode == HttpStatusCode.Conflict); - }; - - using (HttpResponseMessage response = await AzureHelper.RequestWithRetry(Log, client, createRequest, validate)) - { - try - { - Log.LogMessage( - MessageImportance.Low, - "Received response to create Container {0}: Status Code: {1} {2}", - ContainerName, response.StatusCode, response.Content.ToString()); - - // specifying zero is valid, it means "I don't want a token" - if (ReadOnlyTokenDaysValid > 0) - { - ReadOnlyToken = AzureHelper.CreateContainerSasToken( - AccountName, - ContainerName, - AccountKey, - AzureHelper.SasAccessType.Read, - ReadOnlyTokenDaysValid); - } - - // specifying zero is valid, it means "I don't want a token" - if (WriteOnlyTokenDaysValid > 0) - { - WriteOnlyToken = AzureHelper.CreateContainerSasToken( - AccountName, - ContainerName, - AccountKey, - AzureHelper.SasAccessType.Write, - WriteOnlyTokenDaysValid); - } - } - catch (Exception e) - { - Log.LogErrorFromException(e, true); - return false; - } - } - } - - return true; - } - } -} diff --git a/old/build_projects/dotnet-cli-build/DotNetBuild.cs b/old/build_projects/dotnet-cli-build/DotNetBuild.cs deleted file mode 100644 index 513542710..000000000 --- a/old/build_projects/dotnet-cli-build/DotNetBuild.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -namespace Microsoft.DotNet.Cli.Build -{ - public class DotNetBuild : DotNetMSBuildTool - { - protected override string Command - { - get { return "build"; } - } - - protected override string Args - { - get { return $"{base.Args} {GetProjectPath()} {GetConfiguration()} {GetFramework()} {GetRuntime()} {GetOutputPath()}"; } - } - - public string BuildBasePath { get; set; } - - public string Configuration { get; set; } - - public string Framework { get; set; } - - public string Runtime { get; set; } - - public string ProjectPath { get; set; } - - public string OutputPath { get; set; } - - private string GetOutputPath() - { - if (!string.IsNullOrEmpty(OutputPath)) - { - return $"--output {OutputPath}"; - } - - return null; - } - - private string GetConfiguration() - { - if (!string.IsNullOrEmpty(Configuration)) - { - return $"--configuration {Configuration}"; - } - - return null; - } - - private string GetFramework() - { - if (!string.IsNullOrEmpty(Framework)) - { - return $"--framework {Framework}"; - } - - return null; - } - - private string GetRuntime() - { - if (!string.IsNullOrEmpty(Runtime)) - { - return $"--runtime {Runtime}"; - } - - return null; - } - - private string GetProjectPath() - { - if (!string.IsNullOrEmpty(ProjectPath)) - { - return $"{ProjectPath}"; - } - - return null; - } - } -} diff --git a/old/build_projects/dotnet-cli-build/DotNetBuildPJ.cs b/old/build_projects/dotnet-cli-build/DotNetBuildPJ.cs deleted file mode 100644 index e0650cbe3..000000000 --- a/old/build_projects/dotnet-cli-build/DotNetBuildPJ.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -namespace Microsoft.DotNet.Cli.Build -{ - public class DotNetBuildPJ : DotNetTool - { - protected override string Command - { - get { return "build"; } - } - - protected override string Args - { - get { return $"{GetProjectPath()} {GetConfiguration()} {GetFramework()} {GetBuildBasePath()}"; } - } - - public string BuildBasePath { get; set; } - - public string Configuration { get; set; } - - public string Framework { get; set; } - - public string ProjectPath { get; set; } - - private string GetBuildBasePath() - { - if (!string.IsNullOrEmpty(BuildBasePath)) - { - return $"--build-base-path {BuildBasePath}"; - } - - return null; - } - - private string GetConfiguration() - { - if (!string.IsNullOrEmpty(Configuration)) - { - return $"--configuration {Configuration}"; - } - - return null; - } - - private string GetFramework() - { - if (!string.IsNullOrEmpty(Framework)) - { - return $"--framework {Framework}"; - } - - return null; - } - - private string GetProjectPath() - { - if (!string.IsNullOrEmpty(ProjectPath)) - { - return $"{ProjectPath}"; - } - - return null; - } - } -} diff --git a/old/build_projects/dotnet-cli-build/DotNetMSBuild.cs b/old/build_projects/dotnet-cli-build/DotNetMSBuild.cs deleted file mode 100644 index 6ff30abd8..000000000 --- a/old/build_projects/dotnet-cli-build/DotNetMSBuild.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -namespace Microsoft.DotNet.Cli.Build -{ - public class DotNetMSBuild : DotNetMSBuildTool - { - protected override string Command - { - get { return "msbuild"; } - } - - protected override string Args - { - get { return $"{base.Args} {GetArguments()}"; } - } - - public string Arguments { get; set; } - - private string GetArguments() - { - if (!string.IsNullOrEmpty(Arguments)) - { - return $"{Arguments}"; - } - - return null; - } - } -} diff --git a/old/build_projects/dotnet-cli-build/DotNetMSBuildTool.cs b/old/build_projects/dotnet-cli-build/DotNetMSBuildTool.cs deleted file mode 100644 index f0ab3f3a5..000000000 --- a/old/build_projects/dotnet-cli-build/DotNetMSBuildTool.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; - -using Microsoft.DotNet.Cli.Build.Framework; - -namespace Microsoft.DotNet.Cli.Build -{ - public abstract class DotNetMSBuildTool : DotNetTool - { - public int MaxCpuCount { get; set; } = 0; - - public string Verbosity { get; set; } - - public string AdditionalParameters { get; set; } - - protected override string Args - { - get - { - return $"{GetVerbosityArg()} {GetMaxCpuCountArg()} {GetAdditionalParameters()}"; - } - } - - private string GetMaxCpuCountArg() - { - if (MaxCpuCount > 0) - { - return $"/m:{MaxCpuCount}"; - } - - return null; - } - - private string GetVerbosityArg() - { - if (!string.IsNullOrEmpty(Verbosity)) - { - return $"--verbosity:{Verbosity}"; - } - - return null; - } - - private string GetAdditionalParameters() - { - return AdditionalParameters; - } - } -} diff --git a/old/build_projects/dotnet-cli-build/DotNetNew.cs b/old/build_projects/dotnet-cli-build/DotNetNew.cs deleted file mode 100644 index 9ea92cef4..000000000 --- a/old/build_projects/dotnet-cli-build/DotNetNew.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -namespace Microsoft.DotNet.Cli.Build -{ - public class DotNetNew : DotNetTool - { - protected override string Command - { - get { return "new"; } - } - - protected override string Args - { - get { return $"{TemplateType} {TemplateArgs}"; } - } - - public string TemplateType { get; set; } - - public string TemplateArgs { get; set; } - } -} diff --git a/old/build_projects/dotnet-cli-build/DotNetPack.cs b/old/build_projects/dotnet-cli-build/DotNetPack.cs deleted file mode 100644 index 6a79ca74a..000000000 --- a/old/build_projects/dotnet-cli-build/DotNetPack.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -namespace Microsoft.DotNet.Cli.Build -{ - public class DotNetPack : DotNetMSBuildTool - { - protected override string Command - { - get { return "pack"; } - } - - protected override string Args - { - get { return $"{base.Args} {GetProjectPath()} {GetConfiguration()} {GetNoBuild()} {GetOutput()} {GetVersionSuffix()} {GetReleaseSuffix()} {GetRuntime()} {GetIncludeSymbols()} {MsbuildArgs}"; } - } - - public string Configuration { get; set; } - - public bool NoBuild { get; set; } - - public string MsbuildArgs { get; set; } - - public string Output { get; set; } - - public string ProjectPath { get; set; } - - public string VersionSuffix { get; set; } - - public string ReleaseSuffix { get; set; } - - public string Runtime { get; set; } - - public bool IncludeSymbols { get; set; } - - private string GetConfiguration() - { - if (!string.IsNullOrEmpty(Configuration)) - { - return $"--configuration {Configuration}"; - } - - return null; - } - - private string GetNoBuild() - { - if (NoBuild) - { - return $"--no-build"; - } - - return null; - } - - private string GetOutput() - { - if (!string.IsNullOrEmpty(Output)) - { - return $"--output {Output}"; - } - - return null; - } - - private string GetProjectPath() - { - if (!string.IsNullOrEmpty(ProjectPath)) - { - return $"{ProjectPath}"; - } - - return null; - } - - private string GetVersionSuffix() - { - if (!string.IsNullOrEmpty(VersionSuffix)) - { - return $"--version-suffix {VersionSuffix}"; - } - else - { - return $"--version-suffix \"\""; - } - } - - private string GetReleaseSuffix() - { - if (!string.IsNullOrEmpty(ReleaseSuffix)) - { - return $"-property:ReleaseSuffix={ReleaseSuffix}"; - } - - return null; - } - - private string GetRuntime() - { - if (!string.IsNullOrEmpty(Runtime)) - { - return $"-property:RuntimeIdentifier={Runtime}"; - } - - return null; - } - - private string GetIncludeSymbols() - { - if (IncludeSymbols) - { - return $"--include-symbols"; - } - - return null; - } - - } -} diff --git a/old/build_projects/dotnet-cli-build/DotNetPublish.cs b/old/build_projects/dotnet-cli-build/DotNetPublish.cs deleted file mode 100644 index f4c2aec24..000000000 --- a/old/build_projects/dotnet-cli-build/DotNetPublish.cs +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -namespace Microsoft.DotNet.Cli.Build -{ - public class DotNetPublish : DotNetMSBuildTool - { - protected override string Command - { - get { return "publish"; } - } - - protected override string Args - { - get { return $"{base.Args} {GetProjectPath()} {GetConfiguration()} {GetFramework()} {GetNativeSubdirectory()} {GetBuildBasePath()} {GetOutput()} {GetVersionSuffix()} {GetRuntime()} {GetMSBuildArgs()}"; } - } - - public string BuildBasePath { get; set; } - - public string Configuration { get; set; } - - public string Framework { get; set; } - - public bool NativeSubDirectory { get; set; } - - public string MSBuildArgs { get; set; } - - public string Output { get; set; } - - public string ProjectPath { get; set; } - - public string Runtime { get; set; } - - public string VersionSuffix { get; set; } - - private string GetBuildBasePath() - { - if (!string.IsNullOrEmpty(BuildBasePath)) - { - return $"--build-base-path {BuildBasePath}"; - } - - return null; - } - - private string GetConfiguration() - { - if (!string.IsNullOrEmpty(Configuration)) - { - return $"--configuration {Configuration}"; - } - - return null; - } - - private string GetFramework() - { - if (!string.IsNullOrEmpty(Framework)) - { - return $"--framework {Framework}"; - } - - return null; - } - - private string GetNativeSubdirectory() - { - if (NativeSubDirectory) - { - return $"--native-subdirectory"; - } - - return null; - } - - private string GetMSBuildArgs() - { - if (!string.IsNullOrEmpty(MSBuildArgs)) - { - return $"{MSBuildArgs}"; - } - - return null; - } - - private string GetOutput() - { - if (!string.IsNullOrEmpty(Output)) - { - return $"--output {Output}"; - } - - return null; - } - - private string GetProjectPath() - { - if (!string.IsNullOrEmpty(ProjectPath)) - { - return $"{ProjectPath}"; - } - - return null; - } - - private string GetRuntime() - { - if (!string.IsNullOrEmpty(Runtime)) - { - return $"--runtime {Runtime}"; - } - - return null; - } - - private string GetVersionSuffix() - { - if (!string.IsNullOrEmpty(VersionSuffix)) - { - return $"--version-suffix {VersionSuffix}"; - } - - return null; - } - } -} diff --git a/old/build_projects/dotnet-cli-build/DotNetRestore.cs b/old/build_projects/dotnet-cli-build/DotNetRestore.cs deleted file mode 100644 index 8f6f20b03..000000000 --- a/old/build_projects/dotnet-cli-build/DotNetRestore.cs +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -namespace Microsoft.DotNet.Cli.Build -{ - public class DotNetRestore : DotNetMSBuildTool - { - protected override string Command - { - get { return "restore"; } - } - - protected override string Args - { - get { return $"{base.Args} {GetProjectPath()} {GetConfigFile()} {GetSource()} {GetPackages()} {GetSkipInvalidConfigurations()} {GetRuntime()} {AdditionalParameters}"; } - } - - public string ConfigFile { get; set; } - - public string ProjectPath { get; set; } - - public string Source { get; set; } - - public string Packages { get; set; } - - public bool SkipInvalidConfigurations { get; set; } - - public string Runtime { get; set; } - - private string GetConfigFile() - { - if (!string.IsNullOrEmpty(ConfigFile)) - { - return $"--configfile {ConfigFile}"; - } - - return null; - } - - private string GetSource() - { - if (!string.IsNullOrEmpty(Source)) - { - return $"--source {Source}"; - } - - return null; - } - - private string GetPackages() - { - if (!string.IsNullOrEmpty(Packages)) - { - return $"--packages {Packages}"; - } - - return null; - } - - private string GetProjectPath() - { - if (!string.IsNullOrEmpty(ProjectPath)) - { - return $"{ProjectPath}"; - } - - return null; - } - - private string GetSkipInvalidConfigurations() - { - if (SkipInvalidConfigurations) - { - return "-property:SkipInvalidConfigurations=true"; - } - - return null; - } - - private string GetRuntime() - { - if (!string.IsNullOrEmpty(Runtime)) - { - return $"-property:RuntimeIdentifier={Runtime}"; - } - - return null; - } - } -} diff --git a/old/build_projects/dotnet-cli-build/DotNetRestorePJ.cs b/old/build_projects/dotnet-cli-build/DotNetRestorePJ.cs deleted file mode 100644 index 74b621e97..000000000 --- a/old/build_projects/dotnet-cli-build/DotNetRestorePJ.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -namespace Microsoft.DotNet.Cli.Build -{ - public class DotNetRestorePJ : DotNetTool - { - protected override string Command - { - get { return "restore"; } - } - - protected override string Args - { - get { return $"{GetVerbosity()} {GetFallbackSource()} {GetPackages()} {GetDisableParallel()}"; } - } - - public string FallbackSource { get; set; } - - public string Packages { get; set; } - - public string Verbosity { get; set; } - - private string GetFallbackSource() - { - if (!string.IsNullOrEmpty(FallbackSource)) - { - return $"--fallbacksource {FallbackSource}"; - } - - return null; - } - - private string GetPackages() - { - if (!string.IsNullOrEmpty(Packages)) - { - return $"--packages {Packages}"; - } - - return null; - } - - private string GetVerbosity() - { - if (!string.IsNullOrEmpty(Verbosity)) - { - return $"--verbosity {Verbosity}"; - } - - return null; - } - - private string GetDisableParallel() - { - return "--disable-parallel"; - } - } -} diff --git a/old/build_projects/dotnet-cli-build/DotNetTest.cs b/old/build_projects/dotnet-cli-build/DotNetTest.cs deleted file mode 100644 index 6ed55055c..000000000 --- a/old/build_projects/dotnet-cli-build/DotNetTest.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -namespace Microsoft.DotNet.Cli.Build -{ - public class DotNetTest : DotNetMSBuildTool - { - protected override string Command - { - get { return "test"; } - } - - protected override string Args - { - get { return $"{base.Args} {GetProjectPath()} {GetConfiguration()} {GetLogger()} {GetNoBuild()}"; } - } - - public string Configuration { get; set; } - - public string Logger { get; set; } - - public string ProjectPath { get; set; } - - public bool NoBuild { get; set; } - - private string GetConfiguration() - { - if (!string.IsNullOrEmpty(Configuration)) - { - return $"--configuration {Configuration}"; - } - - return null; - } - - private string GetLogger() - { - if (!string.IsNullOrEmpty(Logger)) - { - return $"--logger:{Logger}"; - } - - return null; - } - - private string GetProjectPath() - { - if (!string.IsNullOrEmpty(ProjectPath)) - { - return $"{ProjectPath}"; - } - - return null; - } - - private string GetNoBuild() - { - if (NoBuild) - { - return "--no-build"; - } - - return null; - } - } -} diff --git a/old/build_projects/dotnet-cli-build/EnsureFileExistsOnAzureBlobStorage.cs b/old/build_projects/dotnet-cli-build/EnsureFileExistsOnAzureBlobStorage.cs deleted file mode 100644 index e795349ff..000000000 --- a/old/build_projects/dotnet-cli-build/EnsureFileExistsOnAzureBlobStorage.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using Microsoft.Build.Framework; -using Microsoft.WindowsAzure.Storage.Blob; -using System.Threading.Tasks; - -namespace Microsoft.DotNet.Build.CloudTestTasks -{ - public class EnsureFileExistsOnAzureBlobStorage : Microsoft.Build.Utilities.Task - { - [Required] - public string FileUrl{ get; set; } - - public override bool Execute() - { - if (!ExecuteAsync().GetAwaiter().GetResult()) - { - throw new FileDoesNotExistOnAzureBlobStorageException(FileUrl); - - } - return true; - } - - private Task ExecuteAsync() - { - var blobClient = new CloudBlockBlob(new Uri(FileUrl)); - return blobClient.ExistsAsync(); - } - - public class FileDoesNotExistOnAzureBlobStorageException : Exception - { - public FileDoesNotExistOnAzureBlobStorageException(string message) : base(message + " cannot be found on Azure Blob Storage") - { - } - } - } -} diff --git a/old/build_projects/dotnet-cli-build/GenerateChecksums.cs b/old/build_projects/dotnet-cli-build/GenerateChecksums.cs deleted file mode 100644 index 4bd1ef7c0..000000000 --- a/old/build_projects/dotnet-cli-build/GenerateChecksums.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using System; -using System.IO; -using System.Security.Cryptography; - -namespace Microsoft.DotNet.Build.Tasks -{ - public class GenerateChecksums : Task - { - /// - /// An item collection of files for which to generate checksums. Each item must have metadata - /// 'DestinationPath' that specifies the path of the checksum file to create. - /// - [Required] - public ITaskItem[] Items { get; set; } - - public override bool Execute() - { - foreach (ITaskItem item in Items) - { - try - { - string destinationPath = item.GetMetadata("DestinationPath"); - if (string.IsNullOrEmpty(destinationPath)) - { - throw new Exception($"Metadata 'DestinationPath' is missing for item '{item.ItemSpec}'."); - } - - if (!File.Exists(item.ItemSpec)) - { - throw new Exception($"The file '{item.ItemSpec}' does not exist."); - } - - Log.LogMessage( - MessageImportance.High, - "Generating checksum for '{0}' into '{1}'...", - item.ItemSpec, - destinationPath); - - using (FileStream stream = File.OpenRead(item.ItemSpec)) - { - HashAlgorithm hashAlgorithm = SHA512.Create(); - byte[] hash = hashAlgorithm.ComputeHash(stream); - string checksum = BitConverter.ToString(hash).Replace("-", string.Empty); - File.WriteAllText(destinationPath, checksum); - } - } - catch (Exception e) - { - // We have 2 log calls because we want a nice error message but we also want to capture the - // callstack in the log. - Log.LogError("An exception occurred while trying to generate a checksum for '{0}'.", item.ItemSpec); - Log.LogMessage(MessageImportance.Low, e.ToString()); - return false; - } - } - - return true; - } - } -} diff --git a/old/build_projects/dotnet-cli-build/GenerateMSBuildExtensionsSWR.cs b/old/build_projects/dotnet-cli-build/GenerateMSBuildExtensionsSWR.cs deleted file mode 100644 index ed0d3fd62..000000000 --- a/old/build_projects/dotnet-cli-build/GenerateMSBuildExtensionsSWR.cs +++ /dev/null @@ -1,81 +0,0 @@ -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; - -namespace Microsoft.DotNet.Cli.Build -{ - public class GenerateMSBuildExtensionsSWR : Task - { - [Required] - public string MSBuildExtensionsLayoutDirectory { get; set; } - - [Required] - public string OutputFile { get; set; } - - public override bool Execute() - { - StringBuilder sb = new StringBuilder(SWR_HEADER); - - AddFolder(sb, - @"MSBuildSdkResolver", - @"MSBuild\15.0\Bin\SdkResolvers\Microsoft.DotNet.MSBuildSdkResolver"); - - AddFolder(sb, - @"msbuildExtensions", - @"MSBuild"); - - AddFolder(sb, - @"msbuildExtensions-ver", - @"MSBuild\15.0"); - - File.WriteAllText(OutputFile, sb.ToString()); - - return true; - } - - private void AddFolder(StringBuilder sb, string relativeSourcePath, string swrInstallDir) - { - string sourceFolder = Path.Combine(MSBuildExtensionsLayoutDirectory, relativeSourcePath); - var files = Directory.GetFiles(sourceFolder) - .Where(f => !Path.GetExtension(f).Equals(".pdb", StringComparison.OrdinalIgnoreCase)) - .ToList(); - if (files.Any()) - { - sb.Append(@"folder ""InstallDir:\"); - sb.Append(swrInstallDir); - sb.AppendLine(@"\"""); - - foreach (var file in files) - { - sb.Append(@" file source=""!(bindpath.sources)\Redist\Common\NetCoreSDK\MSBuildExtensions\"); - sb.Append(Path.Combine(relativeSourcePath, Path.GetFileName(file))); - sb.AppendLine("\""); - } - - sb.AppendLine(); - } - - foreach (var subfolder in Directory.GetDirectories(sourceFolder)) - { - string subfolderName = Path.GetFileName(subfolder); - string newRelativeSourcePath = Path.Combine(relativeSourcePath, subfolderName); - string newSwrInstallDir = Path.Combine(swrInstallDir, subfolderName); - - AddFolder(sb, newRelativeSourcePath, newSwrInstallDir); - } - } - - readonly string SWR_HEADER = @"use vs - -package name=Microsoft.Net.Core.SDK.MSBuildExtensions - version=$(Version) - vs.package.branch=$(VsSingletonPackageBranch) - vs.package.internalRevision=$(PackageInternalRevision) - -"; - } -} diff --git a/old/build_projects/dotnet-cli-build/GenerateNuGetPackagesArchiveVersion.cs b/old/build_projects/dotnet-cli-build/GenerateNuGetPackagesArchiveVersion.cs deleted file mode 100644 index 4ba8fb393..000000000 --- a/old/build_projects/dotnet-cli-build/GenerateNuGetPackagesArchiveVersion.cs +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using Microsoft.Build.Construction; -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using System; -using System.IO; -using System.Linq; -using System.Security.Cryptography; -using System.Text; - -namespace Microsoft.DotNet.Cli.Build -{ - public class GenerateNuGetPackagesArchiveVersion : Task - { - public GenerateNuGetPackagesArchiveVersion() - { - } - - [Required] - public string SDKVersion { get; set; } - - [Required] - public string ToolPath { get; set; } - - [Output] - public String Version { get; set; } - - private static string[][] _templatesAndArgs = new string[][] - { - new string[] { "mvc", "-au individual" }, - }; - - public override bool Execute() - { - var dataToHash = string.Empty; - - foreach (var newArgs in _templatesAndArgs) - { - var targetDir = Path.GetTempFileName(); - File.Delete(targetDir); - Directory.CreateDirectory(targetDir); - var outputDir = Path.Combine(targetDir, newArgs[0]); - Directory.CreateDirectory(outputDir); - var newTask = new DotNetNew - { - ToolPath = ToolPath, - TemplateType = newArgs[0], - TemplateArgs = newArgs[1] + $" --debug:ephemeral-hive -n TempProject -o \"{outputDir}\" --no-restore", - HostObject = HostObject, - BuildEngine = BuildEngine - }; - newTask.Execute(); - var templatePath = Path.Combine(outputDir, "TempProject.csproj"); - - var rootElement = ProjectRootElement.Open(templatePath); - var packageRefs = rootElement.Items.Where(i => i.ItemType == "PackageReference").ToList(); - - foreach (var packageRef in packageRefs) - { - dataToHash += $"{packageRef.Include},"; - if (packageRef.HasMetadata) - { - foreach (var metadata in packageRef.Metadata) - { - dataToHash += $"{metadata.Name}={metadata.Value};"; - } - } - } - - var frameworkVersion = rootElement.Properties.LastOrDefault(p => p.Name == "RuntimeFrameworkVersion"); - if (frameworkVersion != null) - { - dataToHash += $"RuntimeFrameworkVersion={frameworkVersion.Value}"; - } - - Directory.Delete(targetDir, true); - } - - dataToHash += SDKVersion; - - Log.LogMessage($"NuGet Packages Archive Data To Hash: '{dataToHash}'"); - - var sha256 = SHA256.Create(); - var hashBytes = sha256.ComputeHash(Encoding.Unicode.GetBytes(dataToHash)); - Version = GetHashString(hashBytes); - - Log.LogMessage($"NuGet Packages Archive Version: '{Version}'"); - - return true; - } - - private string GetHashString(byte[] hashBytes) - { - StringBuilder builder = new StringBuilder(hashBytes.Length * 2); - foreach (var b in hashBytes) - { - builder.AppendFormat("{0:x2}", b); - } - return builder.ToString(); - } - } -} diff --git a/old/build_projects/dotnet-cli-build/GenerateResxSource.cs b/old/build_projects/dotnet-cli-build/GenerateResxSource.cs deleted file mode 100644 index 05cbca9a1..000000000 --- a/old/build_projects/dotnet-cli-build/GenerateResxSource.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using System.IO; -using System.Linq; -using System.Text; -using System.Xml.Linq; - -namespace Microsoft.DotNet.Cli.Build -{ - public class GenerateResxSource : Task - { - - [Required] - public string ResxFile { get; set; } - - [Required] - public string ResourceName { get; set; } - - [Required] - public string SourceOutputPath { get; set; } - - public override bool Execute() - { - var source = new StringBuilder(); - void _(string line) { source.AppendLine(line); } - - string @namespace = Path.GetFileNameWithoutExtension(ResourceName); - string @class = Path.GetExtension(ResourceName).TrimStart('.'); - - _($"using System;"); - _($"using System.Globalization;"); - _($"using System.Reflection;"); - _($"using System.Resources;"); - _($""); - _($"namespace {@namespace}"); - _($"{{"); - _($" internal static class {@class}"); - _($" {{"); - _($" internal static CultureInfo Culture {{ get; set; }}"); - _($" internal static ResourceManager ResourceManager {{ get; }} = new ResourceManager(\"{ResourceName}\", typeof({@class}).GetTypeInfo().Assembly);"); - - foreach (var key in XDocument.Load(ResxFile) - .Descendants("data") - .Select(n => n.Attribute("name").Value)) - { - _($" internal static string {key} => ResourceManager.GetString(\"{key}\", Culture);"); - } - _($" }}"); - _($"}}"); - - File.WriteAllText(SourceOutputPath, source.ToString()); - return true; - } - } -} diff --git a/old/build_projects/dotnet-cli-build/GitHubWriteVersionUpdater.cs b/old/build_projects/dotnet-cli-build/GitHubWriteVersionUpdater.cs deleted file mode 100644 index f07c951d7..000000000 --- a/old/build_projects/dotnet-cli-build/GitHubWriteVersionUpdater.cs +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -#if !SOURCE_BUILD -using Microsoft.DotNet.VersionTools.Automation; -using Microsoft.DotNet.VersionTools.Automation.GitHubApi; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Net.Http; -using System.Threading.Tasks; - -namespace Microsoft.DotNet.Cli.Build -{ - // This code is a slightly modified port of GitHubVersionsRepoUpdater from - // https://raw.githubusercontent.com/dotnet/buildtools/master/src/Microsoft.DotNet.VersionTools/Automation/GitHubVersionsRepoUpdater.cs - internal class GitHubWriteVersionUpdater: VersionsRepoUpdater - { - private const int MaxTries = 10; - private const int RetryMillisecondsDelay = 5000; - - private GitHubAuth _gitHubAuth; - private GitHubProject _project; - - public GitHubWriteVersionUpdater( - GitHubAuth gitHubAuth, - string versionsRepoOwner = null, - string versionsRepo = null) - : this( - gitHubAuth, - new GitHubProject(versionsRepo ?? "versions", versionsRepoOwner)) - { - } - - public GitHubWriteVersionUpdater(GitHubAuth gitHubAuth, GitHubProject project) - { - if (gitHubAuth == null) - { - throw new ArgumentNullException(nameof(gitHubAuth)); - } - _gitHubAuth = gitHubAuth; - - if (project == null) - { - throw new ArgumentNullException(nameof(project)); - } - _project = project; - } - /// If true, updates Latest.txt with a prerelease moniker. If there isn't one, makes the file empty. - /// If true, updates Latest_Packages.txt. - public async Task UpdateBuildInfoAsync( - string versionIdentifier, - string version, - string versionsRepoPath, - bool updateLatestPackageList = true, - bool updateLatestVersion = true) - { - if (versionIdentifier == null) - { - throw new ArgumentNullException(nameof(versionIdentifier)); - } - if (version == null) - { - throw new ArgumentNullException(nameof(version)); - } - if (versionsRepoPath == null) - { - throw new ArgumentNullException(nameof(versionsRepoPath)); - } - - using (GitHubClient client = new GitHubClient(_gitHubAuth)) - { - for (int i = 0; i < MaxTries; i++) - { - try - { - // Master commit to use as new commit's parent. - string masterRef = "heads/master"; - GitReference currentMaster = await client.GetReferenceAsync(_project, masterRef); - string masterSha = currentMaster.Object.Sha; - - List objects = new List(); - - if (updateLatestVersion) - { - objects.Add(new GitObject - { - Path = $"{versionsRepoPath}/Latest.txt", - Type = GitObject.TypeBlob, - Mode = GitObject.ModeFile, - Content = version - }); - } - if (updateLatestPackageList) - { - objects.Add(new GitObject - { - Path = $"{versionsRepoPath}/Latest_Packages.txt", - Type = GitObject.TypeBlob, - Mode = GitObject.ModeFile, - Content = $"{versionIdentifier} {version}{Environment.NewLine}" - }); - } - string message = $"Updating {versionsRepoPath}"; - - GitTree tree = await client.PostTreeAsync(_project, masterSha, objects.ToArray()); - GitCommit commit = await client.PostCommitAsync(_project, message, tree.Sha, new[] { masterSha }); - - // Only fast-forward. Don't overwrite other changes: throw exception instead. - await client.PatchReferenceAsync(_project, masterRef, commit.Sha, force: false); - - Trace.TraceInformation($"Committed build-info update on attempt {i + 1}."); - break; - } - catch (HttpRequestException ex) - { - int nextTry = i + 1; - if (nextTry < MaxTries) - { - Trace.TraceInformation($"Encountered exception committing build-info update: {ex.Message}"); - Trace.TraceInformation($"Trying again in {RetryMillisecondsDelay}ms. {MaxTries - nextTry} tries left."); - await Task.Delay(RetryMillisecondsDelay); - } - else - { - Trace.TraceInformation("Encountered exception committing build-info update."); - throw; - } - } - } - } - } - } -} -#endif diff --git a/old/build_projects/dotnet-cli-build/MakeRelative.cs b/old/build_projects/dotnet-cli-build/MakeRelative.cs deleted file mode 100644 index 6361f341c..000000000 --- a/old/build_projects/dotnet-cli-build/MakeRelative.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using System; -using System.IO; -using Microsoft.Build.Utilities; -using Microsoft.Build.Framework; -using Microsoft.DotNet.Cli.Build.Framework; - -namespace Microsoft.DotNet.Cli.Build -{ - public class MakeRelative : Task - { - [Required] - public string Path1 { get; set; } - - [Required] - public string Path2 { get; set; } - - [Output] - public ITaskItem RelativePath { get; set; } - - public override bool Execute() - { - RelativePath = ToTaskItem(Path1, Path2, Path.GetRelativePath(Path1, Path2)); - - return true; - } - - private static TaskItem ToTaskItem(string path1, string path2, string relativePath) - { - var framework = new TaskItem(); - framework.ItemSpec = relativePath; - - framework.SetMetadata("Path1", path1); - framework.SetMetadata("Path2", path2); - framework.SetMetadata("RelativePath", relativePath); - - return framework; - } - } -} diff --git a/old/build_projects/dotnet-cli-build/RemoveAssetFromDepsPackages.cs b/old/build_projects/dotnet-cli-build/RemoveAssetFromDepsPackages.cs deleted file mode 100644 index 0660b24ef..000000000 --- a/old/build_projects/dotnet-cli-build/RemoveAssetFromDepsPackages.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using System.IO; -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; - -namespace Microsoft.DotNet.Cli.Build -{ - public class RemoveAssetFromDepsPackages : Task - { - [Required] - public string DepsFile { get; set; } - - [Required] - public string SectionName { get; set; } - - [Required] - public string AssetPath { get; set; } - - public override bool Execute() - { - DoRemoveAssetFromDepsPackages(DepsFile, SectionName, AssetPath); - - return true; - } - - public static void DoRemoveAssetFromDepsPackages(string depsFile, string sectionName, string assetPath) - { - JToken deps; - using (var file = File.OpenText(depsFile)) - using (JsonTextReader reader = new JsonTextReader(file)) - { - deps = JObject.ReadFrom(reader); - } - - foreach (JProperty target in deps["targets"]) - { - foreach (JProperty pv in target.Value.Children()) - { - var section = pv.Value[sectionName]; - if (section != null) - { - foreach (JProperty relPath in section) - { - if (assetPath.Equals(relPath.Name)) - { - relPath.Remove(); - break; - } - } - } - } - } - using (var file = File.CreateText(depsFile)) - using (var writer = new JsonTextWriter(file) { Formatting = Formatting.Indented }) - { - deps.WriteTo(writer); - } - } - } -} diff --git a/old/build_projects/dotnet-cli-build/SetBlobPropertiesBasedOnFileTypeTask.cs b/old/build_projects/dotnet-cli-build/SetBlobPropertiesBasedOnFileTypeTask.cs deleted file mode 100644 index 6a7c8d446..000000000 --- a/old/build_projects/dotnet-cli-build/SetBlobPropertiesBasedOnFileTypeTask.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -#if !SOURCE_BUILD - -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text.RegularExpressions; -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; - -namespace Microsoft.DotNet.Cli.Build -{ - public class SetBlobPropertiesBasedOnFileType : Task - { - private AzurePublisher _azurePublisher; - - [Required] - public string AccountName { get; set; } - - [Required] - public string AccountKey { get; set; } - - [Required] - public string ContainerName { get; set; } - - [Required] - public ITaskItem[] Items { get; set; } - - private AzurePublisher AzurePublisherTool - { - get - { - if (_azurePublisher == null) - { - _azurePublisher = new AzurePublisher(AccountName, AccountKey, ContainerName); - } - - return _azurePublisher; - } - } - - public override bool Execute() - { - if (Items.Length == 0) - { - Log.LogError("No items were provided for upload."); - return false; - } - - foreach (var item in Items) - { - string relativeBlobPath = item.GetMetadata("RelativeBlobPath"); - if (string.IsNullOrEmpty(relativeBlobPath)) - { - throw new Exception(string.Format( - "Metadata 'RelativeBlobPath' is missing for item '{0}'.", - item.ItemSpec)); - } - - AzurePublisherTool.SetBlobPropertiesBasedOnFileType(relativeBlobPath); - } - - return true; - } - } -} - -#endif \ No newline at end of file diff --git a/old/build_projects/dotnet-cli-build/SetEnvVar.cs b/old/build_projects/dotnet-cli-build/SetEnvVar.cs deleted file mode 100644 index 8c011930b..000000000 --- a/old/build_projects/dotnet-cli-build/SetEnvVar.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using System; -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; - -namespace Microsoft.DotNet.Cli.Build -{ - public class SetEnvVar : Task - { - [Required] - public string Name { get; set; } - - [Required] - public string Value { get; set; } - - public override bool Execute() - { - Environment.SetEnvironmentVariable(Name, Value); - - return true; - } - } -} diff --git a/old/build_projects/dotnet-cli-build/UploadClient.cs b/old/build_projects/dotnet-cli-build/UploadClient.cs deleted file mode 100644 index 246a38641..000000000 --- a/old/build_projects/dotnet-cli-build/UploadClient.cs +++ /dev/null @@ -1,183 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using System; -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using System.Net; -using System.Net.Http; -using System.Text; -using System.Threading; -using Task = System.Threading.Tasks.Task; - -namespace Microsoft.DotNet.Build.CloudTestTasks -{ - public class UploadClient - { - private TaskLoggingHelper log; - - public UploadClient(TaskLoggingHelper loggingHelper) - { - log = loggingHelper; - } - - public string EncodeBlockIds(int numberOfBlocks, int lengthOfId) - { - string numberOfBlocksString = numberOfBlocks.ToString("D" + lengthOfId); - if (Encoding.UTF8.GetByteCount(numberOfBlocksString) <= 64) - { - byte[] bytes = Encoding.UTF8.GetBytes(numberOfBlocksString); - return Convert.ToBase64String(bytes); - } - else - { - throw new Exception("Task failed - Could not encode block id."); - } - } - - public async Task UploadBlockBlobAsync( - CancellationToken ct, - string AccountName, - string AccountKey, - string ContainerName, - string filePath, - string destinationBlob) - { - - string resourceUrl = string.Format("https://{0}.blob.core.windows.net/{1}", AccountName, ContainerName); - - string fileName = destinationBlob; - fileName = fileName.Replace("\\", "/"); - string blobUploadUrl = resourceUrl + "/" + fileName; - int size = (int)new FileInfo(filePath).Length; - int blockSize = 4 * 1024 * 1024; //4MB max size of a block blob - int bytesLeft = size; - List blockIds = new List(); - int numberOfBlocks = (size / blockSize) + 1; - int countForId = 0; - using (FileStream fileStreamTofilePath = new FileStream(filePath, FileMode.Open)) - { - int offset = 0; - - while (bytesLeft > 0) - { - int nextBytesToRead = (bytesLeft < blockSize) ? bytesLeft : blockSize; - byte[] fileBytes = new byte[blockSize]; - int read = fileStreamTofilePath.Read(fileBytes, 0, nextBytesToRead); - - if (nextBytesToRead != read) - { - throw new Exception(string.Format( - "Number of bytes read ({0}) from file {1} isn't equal to the number of bytes expected ({2}) .", - read, fileName, nextBytesToRead)); - } - - string blockId = EncodeBlockIds(countForId, numberOfBlocks.ToString().Length); - - blockIds.Add(blockId); - string blockUploadUrl = blobUploadUrl + "?comp=block&blockid=" + WebUtility.UrlEncode(blockId); - - using (HttpClient client = new HttpClient()) - { - client.DefaultRequestHeaders.Clear(); - Func createRequest = () => - { - DateTime dt = DateTime.UtcNow; - var req = new HttpRequestMessage(HttpMethod.Put, blockUploadUrl); - req.Headers.Add( - AzureHelper.DateHeaderString, - dt.ToString("R", CultureInfo.InvariantCulture)); - req.Headers.Add(AzureHelper.VersionHeaderString, AzureHelper.StorageApiVersion); - req.Headers.Add( - AzureHelper.AuthorizationHeaderString, - AzureHelper.AuthorizationHeader( - AccountName, - AccountKey, - "PUT", - dt, - req, - string.Empty, - string.Empty, - nextBytesToRead.ToString(), - string.Empty)); - - Stream postStream = new MemoryStream(); - postStream.Write(fileBytes, 0, nextBytesToRead); - postStream.Seek(0, SeekOrigin.Begin); - req.Content = new StreamContent(postStream); - return req; - }; - - log.LogMessage(MessageImportance.Low, "Sending request to upload part {0} of file {1}", countForId, fileName); - - using (HttpResponseMessage response = await AzureHelper.RequestWithRetry(log, client, createRequest)) - { - log.LogMessage( - MessageImportance.Low, - "Received response to upload part {0} of file {1}: Status Code:{2} Status Desc: {3}", - countForId, - fileName, - response.StatusCode, - await response.Content.ReadAsStringAsync()); - } - } - - offset += read; - bytesLeft -= nextBytesToRead; - countForId += 1; - } - } - - string blockListUploadUrl = blobUploadUrl + "?comp=blocklist"; - - using (HttpClient client = new HttpClient()) - { - Func createRequest = () => - { - DateTime dt1 = DateTime.UtcNow; - var req = new HttpRequestMessage(HttpMethod.Put, blockListUploadUrl); - req.Headers.Add(AzureHelper.DateHeaderString, dt1.ToString("R", CultureInfo.InvariantCulture)); - req.Headers.Add(AzureHelper.VersionHeaderString, AzureHelper.StorageApiVersion); - - var body = new StringBuilder(""); - foreach (object item in blockIds) - body.AppendFormat("{0}", item); - - body.Append(""); - byte[] bodyData = Encoding.UTF8.GetBytes(body.ToString()); - req.Headers.Add( - AzureHelper.AuthorizationHeaderString, - AzureHelper.AuthorizationHeader( - AccountName, - AccountKey, - "PUT", - dt1, - req, - string.Empty, - string.Empty, - bodyData.Length.ToString(), - "")); - Stream postStream = new MemoryStream(); - postStream.Write(bodyData, 0, bodyData.Length); - postStream.Seek(0, SeekOrigin.Begin); - req.Content = new StreamContent(postStream); - return req; - }; - - using (HttpResponseMessage response = await AzureHelper.RequestWithRetry(log, client, createRequest)) - { - log.LogMessage( - MessageImportance.Low, - "Received response to combine block list for file {0}: Status Code:{1} Status Desc: {2}", - fileName, - response.StatusCode, - await response.Content.ReadAsStringAsync()); - } - } - } - } -} diff --git a/old/build_projects/dotnet-cli-build/UploadToAzure.cs b/old/build_projects/dotnet-cli-build/UploadToAzure.cs deleted file mode 100644 index 550f4dfbf..000000000 --- a/old/build_projects/dotnet-cli-build/UploadToAzure.cs +++ /dev/null @@ -1,186 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using System.Net; -using System.Threading; -using System.Threading.Tasks; -using System.Xml; -using System.Linq; -using System.Net.Http; - -using Microsoft.Build.Framework; - -using Task = Microsoft.Build.Utilities.Task; -using ThreadingTask = System.Threading.Tasks.Task; - -namespace Microsoft.DotNet.Build.CloudTestTasks -{ - public class UploadToAzure : Task, ICancelableTask - { - private static readonly CancellationTokenSource TokenSource = new CancellationTokenSource(); - private static readonly CancellationToken CancellationToken = TokenSource.Token; - - /// - /// The Azure account key used when creating the connection string. - /// - [Required] - public string AccountKey { get; set; } - - /// - /// The Azure account name used when creating the connection string. - /// - [Required] - public string AccountName { get; set; } - - /// - /// The name of the container to access. The specified name must be in the correct format, see the - /// following page for more info. https://msdn.microsoft.com/en-us/library/azure/dd135715.aspx - /// - [Required] - public string ContainerName { get; set; } - - /// - /// An item group of files to upload. Each item must have metadata RelativeBlobPath - /// that specifies the path relative to ContainerName where the item will be uploaded. - /// - [Required] - public ITaskItem[] Items { get; set; } - - /// - /// Indicates if the destination blob should be overwritten if it already exists. The default if false. - /// - public bool Overwrite { get; set; } = false; - - /// - /// Specifies the maximum number of clients to concurrently upload blobs to azure - /// - public int MaxClients { get; set; } = 8; - - public void Cancel() - { - TokenSource.Cancel(); - } - - public override bool Execute() - { - return ExecuteAsync(CancellationToken).GetAwaiter().GetResult(); - } - - public async Task ExecuteAsync(CancellationToken ct) - { - Log.LogMessage( - MessageImportance.High, - "Begin uploading blobs to Azure account {0} in container {1}.", - AccountName, - ContainerName); - - if (Items.Length == 0) - { - Log.LogError("No items were provided for upload."); - return false; - } - - // first check what blobs are present - string checkListUrl = string.Format( - "https://{0}.blob.core.windows.net/{1}?restype=container&comp=list", - AccountName, - ContainerName); - - HashSet blobsPresent = new HashSet(StringComparer.OrdinalIgnoreCase); - - try - { - using (HttpClient client = new HttpClient()) - { - Func createRequest = () => - { - DateTime dt = DateTime.UtcNow; - var req = new HttpRequestMessage(HttpMethod.Get, checkListUrl); - req.Headers.Add(AzureHelper.DateHeaderString, dt.ToString("R", CultureInfo.InvariantCulture)); - req.Headers.Add(AzureHelper.VersionHeaderString, AzureHelper.StorageApiVersion); - req.Headers.Add(AzureHelper.AuthorizationHeaderString, AzureHelper.AuthorizationHeader( - AccountName, - AccountKey, - "GET", - dt, - req)); - return req; - }; - - Log.LogMessage(MessageImportance.Low, "Sending request to check whether Container blobs exist"); - using (HttpResponseMessage response = await AzureHelper.RequestWithRetry(Log, client, createRequest)) - { - var doc = new XmlDocument(); - doc.LoadXml(await response.Content.ReadAsStringAsync()); - - XmlNodeList nodes = doc.DocumentElement.GetElementsByTagName("Blob"); - - foreach (XmlNode node in nodes) - { - blobsPresent.Add(node["Name"].InnerText); - } - - Log.LogMessage(MessageImportance.Low, "Received response to check whether Container blobs exist"); - } - } - - using (var clientThrottle = new SemaphoreSlim(this.MaxClients, this.MaxClients)) - { - await ThreadingTask.WhenAll(Items.Select(item => UploadAsync(ct, item, blobsPresent, clientThrottle))); - } - - Log.LogMessage(MessageImportance.High, "Upload to Azure is complete, a total of {0} items were uploaded.", Items.Length); - return true; - } - catch (Exception e) - { - Log.LogErrorFromException(e, true); - return false; - } - } - - private async ThreadingTask UploadAsync(CancellationToken ct, ITaskItem item, HashSet blobsPresent, SemaphoreSlim clientThrottle) - { - if (ct.IsCancellationRequested) - { - Log.LogError("Task UploadToAzure cancelled"); - ct.ThrowIfCancellationRequested(); - } - - string relativeBlobPath = item.GetMetadata("RelativeBlobPath"); - if (string.IsNullOrEmpty(relativeBlobPath)) - throw new Exception(string.Format("Metadata 'RelativeBlobPath' is missing for item '{0}'.", item.ItemSpec)); - - if (!File.Exists(item.ItemSpec)) - throw new Exception(string.Format("The file '{0}' does not exist.", item.ItemSpec)); - - if (!Overwrite && blobsPresent.Contains(relativeBlobPath)) - throw new Exception(string.Format("The blob '{0}' already exists.", relativeBlobPath)); - - await clientThrottle.WaitAsync(); - - try - { - Log.LogMessage("Uploading {0} to {1}.", item.ItemSpec, ContainerName); - UploadClient uploadClient = new UploadClient(Log); - await - uploadClient.UploadBlockBlobAsync( - ct, - AccountName, - AccountKey, - ContainerName, - item.ItemSpec, - relativeBlobPath); - } - finally - { - clientThrottle.Release(); - } - } - } -} diff --git a/old/build_projects/dotnet-cli-build/WriteVersionToVersionsRepo.cs b/old/build_projects/dotnet-cli-build/WriteVersionToVersionsRepo.cs deleted file mode 100644 index e9a57e984..000000000 --- a/old/build_projects/dotnet-cli-build/WriteVersionToVersionsRepo.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -#if !SOURCE_BUILD -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using Microsoft.DotNet.VersionTools.Automation; -using Microsoft.DotNet.VersionTools.Automation.GitHubApi; -using System.IO; - -namespace Microsoft.DotNet.Cli.Build -{ - public class WriteVersionToVersionsRepo : Task - { - [Required] - public string BranchName { get; set; } - - [Required] - public string Name { get; set; } - - [Required] - public string Version { get; set; } - - [Required] - public string GitHubPassword { get; set; } - - [Required] - public string VersionsRepoPath { get; set; } - - public override bool Execute() - { - GitHubAuth auth = new GitHubAuth(GitHubPassword); - - GitHubWriteVersionUpdater repoUpdater = new GitHubWriteVersionUpdater(auth); - repoUpdater.UpdateBuildInfoAsync( - Name, - Version, - VersionsRepoPath).Wait(); - - return true; - } - } -} -#endif diff --git a/old/build_projects/dotnet-cli-build/dotnet-cli-build.csproj b/old/build_projects/dotnet-cli-build/dotnet-cli-build.csproj deleted file mode 100644 index e8c9517cf..000000000 --- a/old/build_projects/dotnet-cli-build/dotnet-cli-build.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - Build scripts for dotnet-cli - 1.0.0 - $(CliTargetFramework) - true - bin\$(Configuration) - $(AssetTargetFallback);portable-net45+win8+wp8+wpa81 - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/old/build_projects/shared-build-targets-utils/BuildFailureException.cs b/old/build_projects/shared-build-targets-utils/BuildFailureException.cs deleted file mode 100644 index 56a9aa31e..000000000 --- a/old/build_projects/shared-build-targets-utils/BuildFailureException.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using System; - -namespace Microsoft.DotNet.Cli.Build -{ - public class BuildFailureException : Exception - { - public BuildFailureException() - { - } - - public BuildFailureException(string message) : base(message) - { - } - - public BuildFailureException(string message, Exception innerException) : base(message, innerException) - { - } - } -} diff --git a/old/build_projects/shared-build-targets-utils/Publishing/AzurePublisher.cs b/old/build_projects/shared-build-targets-utils/Publishing/AzurePublisher.cs deleted file mode 100644 index 5d77dfc76..000000000 --- a/old/build_projects/shared-build-targets-utils/Publishing/AzurePublisher.cs +++ /dev/null @@ -1,234 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -#if !SOURCE_BUILD -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.WindowsAzure.Storage; -using Microsoft.WindowsAzure.Storage.Auth; -using Microsoft.WindowsAzure.Storage.Blob; - -namespace Microsoft.DotNet.Cli.Build -{ - public class AzurePublisher - { - public enum Product - { - SharedFramework, - Host, - HostFxr, - Sdk, - } - - private const string s_dotnetBlobContainerName = "dotnet"; - - private string _connectionString { get; set; } - private string _containerName { get; set; } - private CloudBlobContainer _blobContainer { get; set; } - - public AzurePublisher(string containerName = s_dotnetBlobContainerName) - { - _connectionString = EnvVars.EnsureVariable("CONNECTION_STRING").Trim('"'); - _containerName = containerName; - _blobContainer = GetDotnetBlobContainer(_connectionString, containerName); - } - - public AzurePublisher(string accountName, string accountKey, string containerName = s_dotnetBlobContainerName) - { - _containerName = containerName; - _blobContainer = GetDotnetBlobContainer(accountName, accountKey, containerName); - } - - private CloudBlobContainer GetDotnetBlobContainer(string connectionString, string containerName) - { - CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connectionString); - - return GetDotnetBlobContainer(storageAccount, containerName); - } - - private CloudBlobContainer GetDotnetBlobContainer(string accountName, string accountKey, string containerName) - { - var storageCredentials = new StorageCredentials(accountName, accountKey); - var storageAccount = new CloudStorageAccount(storageCredentials, true); - return GetDotnetBlobContainer(storageAccount, containerName); - } - - private CloudBlobContainer GetDotnetBlobContainer(CloudStorageAccount storageAccount, string containerName) - { - CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient(); - - return blobClient.GetContainerReference(containerName); - } - - public string UploadFile(string file, Product product, string version) - { - string url = CalculateRelativePathForFile(file, product, version); - CloudBlockBlob blob = _blobContainer.GetBlockBlobReference(url); - blob.UploadFromFileAsync(file).Wait(); - SetBlobPropertiesBasedOnFileType(blob); - return url; - } - - public void PublishStringToBlob(string blob, string content) - { - CloudBlockBlob blockBlob = _blobContainer.GetBlockBlobReference(blob); - blockBlob.UploadTextAsync(content).Wait(); - - SetBlobPropertiesBasedOnFileType(blockBlob); - } - - public void CopyBlob(string sourceBlob, string targetBlob) - { - CloudBlockBlob source = _blobContainer.GetBlockBlobReference(sourceBlob); - CloudBlockBlob target = _blobContainer.GetBlockBlobReference(targetBlob); - - // Create the empty blob - using (MemoryStream ms = new MemoryStream()) - { - target.UploadFromStreamAsync(ms).Wait(); - } - - // Copy actual blob data - target.StartCopyAsync(source).Wait(); - } - - public void SetBlobPropertiesBasedOnFileType(string path) - { - CloudBlockBlob blob = _blobContainer.GetBlockBlobReference(path); - SetBlobPropertiesBasedOnFileType(blob); - } - - private void SetBlobPropertiesBasedOnFileType(CloudBlockBlob blockBlob) - { - if (Path.GetExtension(blockBlob.Uri.AbsolutePath.ToLower()) == ".svg") - { - blockBlob.Properties.ContentType = "image/svg+xml"; - blockBlob.Properties.CacheControl = "no-cache"; - blockBlob.SetPropertiesAsync().Wait(); - } - else if (Path.GetExtension(blockBlob.Uri.AbsolutePath.ToLower()) == ".version") - { - blockBlob.Properties.ContentType = "text/plain"; - blockBlob.Properties.CacheControl = "no-cache"; - blockBlob.SetPropertiesAsync().Wait(); - } - } - - public IEnumerable ListBlobs(Product product, string version) - { - string virtualDirectory = $"{product}/{version}"; - return ListBlobs(virtualDirectory); - } - - public IEnumerable ListBlobs(string virtualDirectory) - { - CloudBlobDirectory blobDir = _blobContainer.GetDirectoryReference(virtualDirectory); - BlobContinuationToken continuationToken = new BlobContinuationToken(); - - var blobFiles = blobDir.ListBlobsSegmentedAsync(continuationToken).Result; - return blobFiles.Results.Select(bf => bf.Uri.PathAndQuery.Replace($"/{_containerName}/", string.Empty)); - } - - public string AcquireLeaseOnBlob( - string blob, - TimeSpan? maxWaitDefault = null, - TimeSpan? delayDefault = null) - { - TimeSpan maxWait = maxWaitDefault ?? TimeSpan.FromSeconds(120); - TimeSpan delay = delayDefault ?? TimeSpan.FromMilliseconds(500); - - Stopwatch stopWatch = new Stopwatch(); - stopWatch.Start(); - - // This will throw an exception with HTTP code 409 when we cannot acquire the lease - // But we should block until we can get this lease, with a timeout (maxWaitSeconds) - while (stopWatch.ElapsedMilliseconds < maxWait.TotalMilliseconds) - { - try - { - CloudBlockBlob cloudBlob = _blobContainer.GetBlockBlobReference(blob); - Task task = cloudBlob.AcquireLeaseAsync(TimeSpan.FromMinutes(1), null); - task.Wait(); - return task.Result; - } - catch (Exception e) - { - Console.WriteLine($"Retrying lease acquisition on {blob}, {e.Message}"); - Thread.Sleep(delay); - } - } - - throw new Exception($"Unable to acquire lease on {blob}"); - } - - public void ReleaseLeaseOnBlob(string blob, string leaseId) - { - CloudBlockBlob cloudBlob = _blobContainer.GetBlockBlobReference(blob); - AccessCondition ac = new AccessCondition() { LeaseId = leaseId }; - cloudBlob.ReleaseLeaseAsync(ac).Wait(); - } - - public bool IsLatestSpecifiedVersion(string version) - { - Task task = _blobContainer.GetBlockBlobReference(version).ExistsAsync(); - task.Wait(); - return task.Result; - } - - public void DropLatestSpecifiedVersion(string version) - { - CloudBlockBlob blob = _blobContainer.GetBlockBlobReference(version); - using (MemoryStream ms = new MemoryStream()) - { - blob.UploadFromStreamAsync(ms).Wait(); - } - } - - public void CreateBlobIfNotExists(string path) - { - Task task = _blobContainer.GetBlockBlobReference(path).ExistsAsync(); - task.Wait(); - if (!task.Result) - { - CloudBlockBlob blob = _blobContainer.GetBlockBlobReference(path); - using (MemoryStream ms = new MemoryStream()) - { - blob.UploadFromStreamAsync(ms).Wait(); - } - } - } - - public bool TryDeleteBlob(string path) - { - try - { - DeleteBlob(path); - - return true; - } - catch (Exception e) - { - Console.WriteLine($"Deleting blob {path} failed with \r\n{e.Message}"); - - return false; - } - } - - private void DeleteBlob(string path) - { - _blobContainer.GetBlockBlobReference(path).DeleteAsync().Wait(); - } - - private static string CalculateRelativePathForFile(string file, Product product, string version) - { - return $"{product}/{version}/{Path.GetFileName(file)}"; - } - } -} -#endif \ No newline at end of file diff --git a/old/build_projects/shared-build-targets-utils/Utils/EnvVars.cs b/old/build_projects/shared-build-targets-utils/Utils/EnvVars.cs deleted file mode 100644 index 35c076f23..000000000 --- a/old/build_projects/shared-build-targets-utils/Utils/EnvVars.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using System; - -namespace Microsoft.DotNet.Cli.Build -{ - public class EnvVars - { - public static string EnsureVariable(string variableName) - { - string value = Environment.GetEnvironmentVariable(variableName); - if (string.IsNullOrEmpty(value)) - { - throw new BuildFailureException($"'{variableName}' environment variable was not found."); - } - - return value; - } - } -} diff --git a/old/build_projects/shared-build-targets-utils/Utils/FS.cs b/old/build_projects/shared-build-targets-utils/Utils/FS.cs deleted file mode 100644 index 68879fef2..000000000 --- a/old/build_projects/shared-build-targets-utils/Utils/FS.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using System.IO; -using System.Runtime.InteropServices; -using System; - -using Microsoft.DotNet.Cli.Build.Framework; - -namespace Microsoft.DotNet.Cli.Build -{ - public static class FS - { - public static void Mkdirp(string dir) - { - if (!Directory.Exists(dir)) - { - Directory.CreateDirectory(dir); - } - } - } -} diff --git a/old/build_projects/shared-build-targets-utils/Utils/PublishMutationUtilties.cs b/old/build_projects/shared-build-targets-utils/Utils/PublishMutationUtilties.cs deleted file mode 100644 index 7ea8e8e61..000000000 --- a/old/build_projects/shared-build-targets-utils/Utils/PublishMutationUtilties.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using Microsoft.DotNet.Cli.Build.Framework; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading.Tasks; - -namespace Microsoft.DotNet.Cli.Build -{ - public class PublishMutationUtilties - { - public static void ChangeEntryPointLibraryName(string depsFile, string newName) - { - JToken deps; - using (var file = File.OpenText(depsFile)) - using (JsonTextReader reader = new JsonTextReader(file)) - { - deps = JObject.ReadFrom(reader); - } - - string version = null; - foreach (JProperty target in deps["targets"]) - { - var targetLibrary = target.Value.Children().FirstOrDefault(); - if (targetLibrary == null) - { - continue; - } - version = targetLibrary.Name.Substring(targetLibrary.Name.IndexOf('/') + 1); - if (newName == null) - { - targetLibrary.Remove(); - } - else - { - targetLibrary.Replace(new JProperty(newName + '/' + version, targetLibrary.Value)); - } - } - if (version != null) - { - var library = deps["libraries"].Children().First(); - if (newName == null) - { - library.Remove(); - } - else - { - library.Replace(new JProperty(newName + '/' + version, library.Value)); - } - using (var file = File.CreateText(depsFile)) - using (var writer = new JsonTextWriter(file) { Formatting = Formatting.Indented }) - { - deps.WriteTo(writer); - } - } - } - } -} diff --git a/old/build_projects/shared-build-targets-utils/Utils/Utils.cs b/old/build_projects/shared-build-targets-utils/Utils/Utils.cs deleted file mode 100644 index 2d105c9e9..000000000 --- a/old/build_projects/shared-build-targets-utils/Utils/Utils.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using System; -using System.IO; -using System.Runtime.InteropServices; -using System.Security.Cryptography; - -using Microsoft.DotNet.Cli.Build.Framework; - -namespace Microsoft.DotNet.Cli.Build -{ - public static class Utils - { - public static string GetVersionFileContent(string commitHash, string version) - { - return $@"{commitHash}{Environment.NewLine}{version}{Environment.NewLine}"; - } - } -} diff --git a/old/build_projects/shared-build-targets-utils/shared-build-targets-utils.csproj b/old/build_projects/shared-build-targets-utils/shared-build-targets-utils.csproj deleted file mode 100644 index bdcee6fbd..000000000 --- a/old/build_projects/shared-build-targets-utils/shared-build-targets-utils.csproj +++ /dev/null @@ -1,25 +0,0 @@ - - - - Build scripts for dotnet-cli - netstandard1.6 - shared-build-targets-utils - $(AssetTargetFallback);dnxcore50;portable-net45+win8 - - - - - - - - - - - - - - - - - - diff --git a/old/build_projects/update-dependencies/Config.cs b/old/build_projects/update-dependencies/Config.cs deleted file mode 100644 index 4c8e5de0f..000000000 --- a/old/build_projects/update-dependencies/Config.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using System; -using System.IO; -using System.Linq; -using System.Xml.Linq; -using System.Collections; -using System.Collections.Generic; - -namespace Microsoft.DotNet.Scripts -{ - /// - /// Holds the configuration information for the update-dependencies script. - /// - /// - /// The following Environment Variables are required by this script: - /// - /// GITHUB_USER - The user to commit the changes as. - /// GITHUB_EMAIL - The user's email to commit the changes as. - /// GITHUB_PASSWORD - The password/personal access token of the GitHub user. - /// - /// The following Environment Variables can optionally be specified: - /// - /// DOTNET_VERSION_URL - The Url to the root of the version information (this is combined with the fragments below) (ex. "https://raw.githubusercontent.com/dotnet/versions/master/build-info") - /// ROSLYN_VERSION_FRAGMENT - The fragment to combine with DOTNET_VERSION_URL to get the current dotnet/roslyn package versions. (ex. "dotnet/roslyn/netcore1.0") - /// CORESETUP_VERSION_FRAGMENT - The fragment to combine with DOTNET_VERSION_URL to get the current dotnet/core-setup package versions. (ex. "dotnet/core-setup/master") - /// GITHUB_ORIGIN_OWNER - The owner of the GitHub fork to push the commit and create the PR from. (ex. "dotnet-bot") - /// GITHUB_UPSTREAM_OWNER - The owner of the GitHub base repo to create the PR to. (ex. "dotnet") - /// GITHUB_PROJECT - The repo name under the ORIGIN and UPSTREAM owners. (ex. "core-sdk") - /// GITHUB_UPSTREAM_BRANCH - The branch in the GitHub base repo to create the PR to. (ex. "master"); - /// GITHUB_PULL_REQUEST_NOTIFICATIONS - A semi-colon ';' separated list of GitHub users to notify on the PR. - /// - public class Config - { - public static Config Instance { get; } = new Config(); - - private Lazy _userName = new Lazy(() => GetEnvironmentVariable("GITHUB_USER")); - private Lazy _email = new Lazy(() => GetEnvironmentVariable("GITHUB_EMAIL")); - private Lazy _password = new Lazy(() => GetEnvironmentVariable("GITHUB_PASSWORD")); - - private Lazy _dotNetVersionUrl = new Lazy(() => GetEnvironmentVariable("DOTNET_VERSION_URL", "https://raw.githubusercontent.com/dotnet/versions/master/build-info")); - - private Lazy _gitHubUpstreamOwner = new Lazy(() => GetEnvironmentVariable("GITHUB_UPSTREAM_OWNER", "dotnet")); - private Lazy _gitHubProject = new Lazy(() => GetEnvironmentVariable("GITHUB_PROJECT", "core-sdk")); - private Lazy _gitHubUpstreamBranch = new Lazy(() => GetEnvironmentVariable("GITHUB_UPSTREAM_BRANCH", GetDefaultUpstreamBranch())); - private Lazy _gitHubPullRequestNotifications = new Lazy(() => - GetEnvironmentVariable("GITHUB_PULL_REQUEST_NOTIFICATIONS", "") - .Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries)); - - Lazy> _versionFragments = new Lazy>(() => - System.Environment.GetEnvironmentVariables().Cast().Where(entry => ((string)entry.Key).EndsWith("_VERSION_FRAGMENT")).ToDictionary(entry => - ((string)entry.Key).Replace("_VERSION_FRAGMENT","").ToLowerInvariant(), entry => (string)entry.Value, StringComparer.OrdinalIgnoreCase)); - private Config() - { - } - - public string UserName => _userName.Value; - public string Email => _email.Value; - public string Password => _password.Value; - public string DotNetVersionUrl => _dotNetVersionUrl.Value; - public Dictionary VersionFragments => _versionFragments.Value; - public bool HasVersionFragment(string repoName) => _versionFragments.Value.ContainsKey(repoName); - public string GitHubUpstreamOwner => _gitHubUpstreamOwner.Value; - public string GitHubProject => _gitHubProject.Value; - public string GitHubUpstreamBranch => _gitHubUpstreamBranch.Value; - public string[] GitHubPullRequestNotifications => _gitHubPullRequestNotifications.Value; - - private static string GetEnvironmentVariable(string name, string defaultValue = null) - { - string value = Environment.GetEnvironmentVariable(name); - if (value == null) - { - value = defaultValue; - } - - if (value == null) - { - throw new InvalidOperationException($"Can't find environment variable '{name}'."); - } - - return value; - } - - private static string GetDefaultUpstreamBranch() - { - return GetRepoMSBuildPropValue("BranchInfo.props", "BranchName") ?? "master"; - } - - private static string GetDefaultCoreSetupVersionFragment() - { - // by default, the current core-setup branch should match the current cli branch name - string coreSetupChannel = Instance.GitHubUpstreamBranch; - - return $"dotnet/core-setup/{coreSetupChannel}"; - } - - private static string GetRepoMSBuildPropValue(string propsFileName, string propertyName) - { - var propsFilePath = Path.Combine(Dirs.RepoRoot, "build", propsFileName); - var root = XDocument.Load(propsFilePath).Root; - var ns = root.Name.Namespace; - - var value = root - .Elements(ns + "PropertyGroup") - .Elements(ns + propertyName) - .FirstOrDefault() - ?.Value; - - if (string.IsNullOrEmpty(value)) - { - Console.WriteLine($"Could not find a property named '{propertyName}' in {propsFilePath}"); - return null; - } - - return value; - } - } -} diff --git a/old/build_projects/update-dependencies/Directory.Build.props b/old/build_projects/update-dependencies/Directory.Build.props deleted file mode 100644 index a8d332ca6..000000000 --- a/old/build_projects/update-dependencies/Directory.Build.props +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/old/build_projects/update-dependencies/Dirs.cs b/old/build_projects/update-dependencies/Dirs.cs deleted file mode 100644 index 302928f02..000000000 --- a/old/build_projects/update-dependencies/Dirs.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using System.IO; - -namespace Microsoft.DotNet.Scripts -{ - public static class Dirs - { - public static readonly string RepoRoot = Directory.GetCurrentDirectory(); - } -} diff --git a/old/build_projects/update-dependencies/Program.cs b/old/build_projects/update-dependencies/Program.cs deleted file mode 100644 index 7a05d64f7..000000000 --- a/old/build_projects/update-dependencies/Program.cs +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -using Microsoft.DotNet.VersionTools; -using Microsoft.DotNet.VersionTools.Automation; -using Microsoft.DotNet.VersionTools.Dependencies; -using Microsoft.DotNet.VersionTools.Dependencies.BuildOutput; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Text.RegularExpressions; - -namespace Microsoft.DotNet.Scripts -{ - public class Program - { - private static readonly Config s_config = Config.Instance; - - public static void Main(string[] args) - { - HandleDebugSwitch(ref args); - - bool onlyUpdate = args.Length > 0 && string.Equals("--Update", args[0], StringComparison.OrdinalIgnoreCase); - - List buildInfos = new List(s_config.VersionFragments.Select, BuildInfo>(fragment => - GetBuildInfo(fragment.Key, fragment.Value, fetchLatestReleaseFile: false))); - IEnumerable updaters = GetUpdaters().ToArray(); - var dependencyBuildInfos = buildInfos.Select(buildInfo => - new BuildDependencyInfo( - buildInfo, - upgradeStableVersions: true, - disabledPackages: Enumerable.Empty())).ToArray(); - DependencyUpdateResults updateResults = DependencyUpdateUtils.Update(updaters, dependencyBuildInfos); - - if (!onlyUpdate && updateResults.ChangesDetected()) - { - GitHubAuth gitHubAuth = new GitHubAuth(s_config.Password, s_config.UserName, s_config.Email); - GitHubProject origin = new GitHubProject(s_config.GitHubProject, s_config.UserName); - GitHubBranch upstreamBranch = new GitHubBranch( - s_config.GitHubUpstreamBranch, - new GitHubProject(s_config.GitHubProject, s_config.GitHubUpstreamOwner)); - - string suggestedMessage = updateResults.GetSuggestedCommitMessage(); - string body = string.Empty; - if (s_config.GitHubPullRequestNotifications.Any()) - { - body += PullRequestCreator.NotificationString(s_config.GitHubPullRequestNotifications); - } - - new PullRequestCreator(gitHubAuth) - .CreateOrUpdateAsync( - suggestedMessage, - suggestedMessage + $" ({upstreamBranch.Name})", - body, - upstreamBranch, - origin, - new PullRequestOptions()) - .Wait(); - } - } - - private static BuildInfo GetBuildInfo(string name, string buildInfoFragment, bool fetchLatestReleaseFile = true) - { - const string FileUrlProtocol = "file://"; - - if (s_config.DotNetVersionUrl.StartsWith(FileUrlProtocol, StringComparison.Ordinal)) - { - return BuildInfo.LocalFileGetAsync( - name, - s_config.DotNetVersionUrl.Substring(FileUrlProtocol.Length), - buildInfoFragment.Replace('/', Path.DirectorySeparatorChar), - fetchLatestReleaseFile) - .Result; - } - else - { - return BuildInfo.Get(name, $"{s_config.DotNetVersionUrl}/{buildInfoFragment}", fetchLatestReleaseFile); - } - } - - private static IEnumerable GetUpdaters() - { - string dependencyVersionsPath = Path.Combine("build", "DependencyVersions.props"); - string testDependencyVersionsPath = Path.Combine("build", "TestDependencyVersions.props"); - - if (s_config.HasVersionFragment("aspnet")) - { - yield return CreateRegexUpdater(dependencyVersionsPath, "MicrosoftAspNetCoreAppPackageVersion", "Microsoft.AspNetCore.App"); - yield return CreateRegexUpdater(dependencyVersionsPath, "DotnetEfPackageVersion", "dotnet-ef"); - yield return CreateRegexUpdater(dependencyVersionsPath, "MicrosoftAspNetCoreDeveloperCertificatesXPlatPackageVersion", "Microsoft.AspNetCore.DeveloperCertificates.XPlat"); - yield return CreateRegexUpdater(dependencyVersionsPath, "DotnetDevCertsPackageVersion", "dotnet-dev-certs"); - yield return CreateRegexUpdater(dependencyVersionsPath, "DotnetSqlCachePackageVersion", "dotnet-sql-cache"); - yield return CreateRegexUpdater(dependencyVersionsPath, "DotnetUserSecretsPackageVersion", "dotnet-user-secrets"); - yield return CreateRegexUpdater(dependencyVersionsPath, "DotnetWatchPackageVersion", "dotnet-watch"); - yield return CreateRegexUpdater(dependencyVersionsPath, "MicrosoftNETSdkRazorPackageVersion", "Microsoft.NET.Sdk.Razor"); - } - if (s_config.HasVersionFragment("coresetup")) - { - yield return CreateRegexUpdater(dependencyVersionsPath, "MicrosoftNETCoreAppPackageVersion", "Microsoft.NETCore.App"); - yield return CreateRegexUpdater(testDependencyVersionsPath, "MicrosoftDotNetPlatformAbstractionsPackageVersion", "Microsoft.DotNet.PlatformAbstractions"); - } - if (s_config.HasVersionFragment("templating")) - { - yield return CreateRegexUpdater(dependencyVersionsPath, "MicrosoftDotNetCommonItemTemplatesPackageVersion", "Microsoft.DotNet.Common.ItemTemplates"); - yield return CreateRegexUpdater(dependencyVersionsPath, "MicrosoftDotNetTestProjectTemplates20PackageVersion", "Microsoft.DotNet.Test.ProjectTemplates.2.0"); - } - } - - private static IDependencyUpdater CreateRegexUpdater(string repoRelativePath, string propertyName, string packageId) - { - return new FileRegexPackageUpdater() - { - Path = Path.Combine(Dirs.RepoRoot, repoRelativePath), - PackageId = packageId, - Regex = new Regex($@"<{propertyName}>(?.*)"), - VersionGroupName = "version" - }; - } - - private static void HandleDebugSwitch(ref string[] args) - { - if (args.Length > 0 && string.Equals("--debug", args[0], StringComparison.OrdinalIgnoreCase)) - { - args = args.Skip(1).ToArray(); - WaitForDebugger(); - } - } - - private static void WaitForDebugger() - { - Console.WriteLine("Waiting for debugger to attach. Press ENTER to continue"); - Console.WriteLine($"Process ID: {Process.GetCurrentProcess().Id}"); - Console.ReadLine(); - } - } -} diff --git a/old/build_projects/update-dependencies/update-dependencies.csproj b/old/build_projects/update-dependencies/update-dependencies.csproj deleted file mode 100644 index 0ccc4f51f..000000000 --- a/old/build_projects/update-dependencies/update-dependencies.csproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - - Updates the repos dependencies - Exe - netcoreapp2.1 - - https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json; - https://api.nuget.org/v3/index.json; - - - - - - - - diff --git a/old/build_projects/update-dependencies/update-dependencies.ps1 b/old/build_projects/update-dependencies/update-dependencies.ps1 deleted file mode 100644 index e255855a2..000000000 --- a/old/build_projects/update-dependencies/update-dependencies.ps1 +++ /dev/null @@ -1,70 +0,0 @@ -# -# Copyright (c) .NET Foundation and contributors. All rights reserved. -# Licensed under the MIT license. See LICENSE file in the project root for full license information. -# - -param( - [switch]$Help, - [switch]$Update) - -if($Help) -{ - Write-Output "Usage: .\update-dependencies.ps1" - Write-Output "" - Write-Output "Options:" - Write-Output " -Help Display this help message" - Write-Output " -Update Update dependencies (but don't open a PR)" - exit 0 -} - -$Architecture='x64' - -$RepoRoot = "$PSScriptRoot\..\.." -$ProjectPath = "$PSScriptRoot\update-dependencies.csproj" -$ProjectArgs = "" - -if ($Update) -{ - $ProjectArgs = "--Update" -} - -# Use a repo-local install directory (but not the artifacts directory because that gets cleaned a lot -if (!$env:DOTNET_INSTALL_DIR) -{ - $env:DOTNET_INSTALL_DIR="$RepoRoot\.dotnet_stage0\update-dependencies" -} - -if (!(Test-Path $env:DOTNET_INSTALL_DIR)) -{ - mkdir $env:DOTNET_INSTALL_DIR | Out-Null -} - -$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 - -# Install a stage 0 - Write-Output "Installing .NET Core CLI Stage 0" - - [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 -$dotnetInstallPath = Join-Path $env:DOTNET_INSTALL_DIR "dotnet-install.ps1" - -Write-Output "dotnet-install path: $dotnetInstallPath" -Invoke-WebRequest -Uri "https://dot.net/v1/dotnet-install.ps1" -OutFile "$dotnetInstallPath" - - -if (!$env:DOTNET_TOOL_DIR) -{ - & "$dotnetInstallPath" -version "2.1.302" -Architecture $Architecture - if($LASTEXITCODE -ne 0) { throw "Failed to install stage0" } -} -else -{ - Copy-Item -Force -Recurse $env:DOTNET_TOOL_DIR $env:DOTNET_INSTALL_DIR -} - -# Put the stage0 on the path -$env:PATH = "$env:DOTNET_INSTALL_DIR;$env:PATH" - -# Run the app -Write-Output "Invoking App $ProjectPath..." -dotnet run -p "$ProjectPath" "$ProjectArgs" -if($LASTEXITCODE -ne 0) { throw "Build failed" } diff --git a/old/dir.props b/old/dir.props deleted file mode 100644 index 875fe07ca..000000000 --- a/old/dir.props +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/old/dir.tasks b/old/dir.tasks deleted file mode 100644 index aa5f6731b..000000000 --- a/old/dir.tasks +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/old/packaging/windows/eula.rtf b/old/packaging/windows/eula.rtf deleted file mode 100644 index 7f40e11a8..000000000 --- a/old/packaging/windows/eula.rtf +++ /dev/null @@ -1,97 +0,0 @@ -{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033\deflangfe1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Tahoma;}{\f1\froman\fprq2\fcharset2 Symbol;}{\f2\froman\fprq2\fcharset0 Times New Roman;}{\f3\fswiss\fprq2\fcharset0 Calibri;}} -{\colortbl ;\red0\green0\blue0;\red0\green0\blue255;} -{\*\generator Riched20 10.0.10586}{\*\mmathPr\mnaryLim0\mdispDef1\mwrapIndent1440 }\viewkind4\uc1 -\pard\widctlpar\sb120\sa120\cf1\b\f0\fs24 MICROSOFT SOFTWARE LICENSE TERMS\fs28\par -\fs24 MICROSOFT .NET LIBRARY\fs28\par -\fs19 These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft\par - -\pard\widctlpar\fi-363\li720\sb120\sa120\b0\f1\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs19 updates,\par -\f1\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs19 supplements,\par -\f1\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs19 Internet-based services, and\par -\f1\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs19 support services\par - -\pard\widctlpar\sb120\sa120\b for this software, unless other terms accompany those items. If so, those terms apply.\par -BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE.\par -IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE PERPETUAL RIGHTS BELOW.\par - -\pard\widctlpar\fi-357\li357\sb120\sa120\kerning36\fs20 1.\b0\f2\fs14\~\~\~\~\b\f0\fs19 INSTALLATION AND USE RIGHTS.\par - -\pard\widctlpar\fi-363\li720\sb120\sa120\kerning0\fs20 a.\b0\f2\fs14\~\~\~\~\b\f0\fs19 Installation and Use.\b0\fs20\~You may install and use any number of copies of the software to design, develop and test your programs.\b\fs19\par -\fs20 b.\b0\f2\fs14\~\~\~\~\b\f0\fs19 Third Party Programs.\b0\fs20\~The software may include third party programs that Microsoft, not the third party, licenses to you under this agreement. Notices, if any, for the third party program are included for your information only.\b\fs19\par - -\pard\widctlpar\fi-357\li357\sb120\sa120\kerning36\fs20 2.\b0\f2\fs14\~\~\~\~\b\f0\fs19 DATA.\~\kerning0\b0\fs20 The software may collect information about you and your use of the software, and send that to Microsoft. Microsoft may use this information to improve our products and services.\~You can learn more about data collection and use in the help documentation and the privacy statement at\~{\cf0\f3\fs24{\field{\*\fldinst{HYPERLINK "http://go.microsoft.com/fwlink/?LinkId=528096&clcid=0x409"}}{\fldrslt{\ul\cf2\cf2\ul\f0\fs20 http://go.microsoft.com/fwlink/?LinkId=528096}}}}\f0\fs20 . Your use of the software operates as your consent to these practices.\kerning36\b\fs19\par -\fs20 3.\b0\f2\fs14\~\~\~\~\b\f0\fs20 ADDITIONAL LICENSING REQUIREMENTS AND/OR USE RIGHTS.\fs19\par - -\pard\widctlpar\fi-363\li720\sb120\sa120\kerning0\fs20 a.\b0\f2\fs14\~\~\~\~\b\f0\fs20 DISTRIBUTABLE CODE.\~\~\b0 The software is comprised of Distributable Code. \ldblquote Distributable Code\rdblquote is code that you are permitted to distribute in programs you develop if you comply with the terms below.\b\fs19\par - -\pard\widctlpar\fi-357\li1077\sb120\sa120\fs20 i.\b0\f2\fs14\~\~\~\~\~\~\b\f0\fs20 Right to Use and Distribute.\b0\fs19\par - -\pard\widctlpar\fi-357\li1434\sb120\sa120\f1\fs20\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs20 You may copy and distribute the object code form of the software.\fs19\par -\f1\fs20\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs20 Third Party Distribution. You may permit distributors of your programs to copy and distribute the Distributable Code as part of those programs.\fs19\par - -\pard\widctlpar\fi-357\li1077\sb120\sa120\b\fs20 ii.\b0\f2\fs14\~\~\~\~\b\f0\fs20 Distribution Requirements.\b0\~\b For any Distributable Code you distribute, you must\b0\fs19\par - -\pard\widctlpar\fi-357\li1434\sb120\sa120\f1\fs20\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs20 add significant primary functionality to it in your programs;\fs19\par -\f1\fs20\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs20 require distributors and external end users to agree to terms that protect it at least as much as this agreement;\fs19\par -\f1\fs20\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs20 display your valid copyright notice on your programs; and\fs19\par -\f1\fs20\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs20 indemnify, defend, and hold harmless Microsoft from any claims, including attorneys\rquote fees, related to the distribution or use of your programs.\fs19\par - -\pard\widctlpar\fi-357\li1077\sb120\sa120\b\fs20 iii.\b0\f2\fs14\~\~\~\b\f0\fs20 Distribution Restrictions.\b0\~\b You may not\b0\fs19\par - -\pard\widctlpar\fi-357\li1434\sb120\sa120\f1\fs20\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs20 alter any copyright, trademark or patent notice in the Distributable Code;\fs19\par -\f1\fs20\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs20 use Microsoft\rquote s trademarks in your programs\rquote names or in a way that suggests your programs come from or are endorsed by Microsoft;\fs19\par -\f1\fs20\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs20 include Distributable Code in malicious, deceptive or unlawful programs; or\fs19\par -\f1\fs20\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs20 modify or distribute the source code of any Distributable Code so that any part of it becomes subject to an Excluded License. An Excluded License is one that requires, as a condition of use, modification or distribution, that\fs19\par - -\pard\widctlpar\fi-358\li1792\sb120\sa120\f1\fs20\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs20 the code be disclosed or distributed in source code form; or\fs19\par -\f1\fs20\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs20 others have the right to modify it.\fs19\par - -\pard\widctlpar\fi-357\li357\sb120\sa120\kerning36\b\fs20 4.\b0\f2\fs14\~\~\~\~\b\f0\fs19 SCOPE OF LICENSE.\~\b0 The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not\b\par - -\pard\widctlpar\fi-363\li720\sb120\sa120\kerning0\b0\f1\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs19 work around any technical limitations in the software;\par -\f1\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs19 reverse engineer, decompile or disassemble the software, except and only to the extent that applicable law expressly permits, despite this limitation;\par -\f1\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs19 publish the software for others to copy;\par -\f1\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs19 rent, lease or lend the software;\par -\f1\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs19 transfer the software or this agreement to any third party; or\par -\f1\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs19 use the software for commercial software hosting services.\par - -\pard\widctlpar\fi-357\li357\sb120\sa120\kerning36\b\fs20 5.\b0\f2\fs14\~\~\~\~\b\f0\fs19 BACKUP COPY.\~\b0 You may make one backup copy of the software. You may use it only to reinstall the software.\b\par -\fs20 6.\b0\f2\fs14\~\~\~\~\b\f0\fs19 DOCUMENTATION.\~\b0 Any person that has valid access to your computer or internal network may copy and use the documentation for your internal, reference purposes.\b\par -\fs20 7.\b0\f2\fs14\~\~\~\~\b\f0\fs19 EXPORT RESTRICTIONS.\~\b0 The software is subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the software. These laws include restrictions on destinations, end users and end use. For additional information, see\~{\cf0\fs20{\field{\*\fldinst{HYPERLINK www.microsoft.com/exporting }}{\fldrslt{www.microsoft.com/exporting\ul0\cf0}}}}\f0\fs19 .\b\par -\fs20 8.\b0\f2\fs14\~\~\~\~\b\f0\fs19 SUPPORT SERVICES.\~\b0 Because this software is \ldblquote as is,\rdblquote we may not provide support services for it.\b\par -\fs20 9.\b0\f2\fs14\~\~\~\~\b\f0\fs19 ENTIRE AGREEMENT.\~\b0 This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services.\b\par -\fs20 10.\b0\f2\fs14\~\~\~\b\f0\fs19 APPLICABLE LAW.\par - -\pard\widctlpar\fi-363\li720\sb120\sa120\kerning0\fs20 a.\b0\f2\fs14\~\~\~\~\b\f0\fs19 United States.\~\b0 If you acquired the software in the United States, Washington state law governs the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort.\b\par -\fs20 b.\b0\f2\fs14\~\~\~\~\b\f0\fs19 Outside the United States. If you acquired the software in any other country, the laws of that country apply.\par - -\pard\widctlpar\fi-357\li357\sb120\sa120\kerning36\fs20 11.\b0\f2\fs14\~\~\b\f0\fs19 LEGAL EFFECT.\~\b0 This agreement describes certain legal rights. You may have other rights under the laws of your country. You may also have rights with respect to the party from whom you acquired the software. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so.\b\par -\fs20 12.\b0\f2\fs14\~\~\b\f0\fs19 DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED \ldblquote AS-IS.\rdblquote YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS. YOU MAY HAVE ADDITIONAL CONSUMER RIGHTS OR STATUTORY GUARANTEES UNDER YOUR LOCAL LAWS WHICH THIS AGREEMENT CANNOT CHANGE. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, MICROSOFT EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.\par - -\pard\widctlpar\li357\sb120\sa120\kerning0 FOR AUSTRALIA \endash YOU HAVE STATUTORY GUARANTEES UNDER THE AUSTRALIAN CONSUMER LAW AND NOTHING IN THESE TERMS IS INTENDED TO AFFECT THOSE RIGHTS.\b0\par - -\pard\widctlpar\fi-357\li357\sb120\sa120\kerning36\b\fs20 13.\b0\f2\fs14\~\~\b\f0\fs19 LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES. YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.\par - -\pard\widctlpar\li357\sb120\sa120\kerning0\b0 This limitation applies to\par - -\pard\widctlpar\fi-363\li720\sb120\sa120\f1\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs19 anything related to the software, services, content (including code) on third party Internet sites, or third party programs; and\par -\f1\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs19 claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.\par - -\pard\widctlpar\sb120\sa120 It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.\par -\lang9 Please note: As this software is distributed in Quebec, Canada, some of the clauses in this agreement are provided below in French.\lang1033\par -\lang9 Remarque : Ce logiciel \'e9tant distribu\'e9 au Qu\'e9bec, Canada, certaines des clauses dans ce contrat sont fournies ci-dessous en fran\'e7ais.\lang1033\par -\kerning36\b EXON\'c9RATION DE GARANTIE.\~\b0 Le logiciel vis\'e9 par une licence est offert \'ab tel quel \'bb. Toute utilisation de ce logiciel est \'e0 votre seule risque et p\'e9ril. Microsoft n\rquote accorde aucune autre garantie expresse. Vous pouvez b\'e9n\'e9ficier de droits additionnels en vertu du droit local sur la protection des consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties implicites de qualit\'e9 marchande, d\rquote ad\'e9quation \'e0 un usage particulier et d\rquote absence de contrefa\'e7on sont exclues.\b\par -LIMITATION DES DOMMAGES-INT\'c9R\'caTS ET EXCLUSION DE RESPONSABILIT\'c9 POUR LES DOMMAGES.\~\b0 Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages directs uniquement \'e0 hauteur de 5,00 $ US. Vous ne pouvez pr\'e9tendre \'e0 aucune indemnisation pour les autres dommages, y compris les dommages sp\'e9ciaux, indirects ou accessoires et pertes de b\'e9n\'e9fices.\b\par -\kerning0\b0\lang9 Cette limitation concerne :\lang1033\par - -\pard\widctlpar\li720\sb120\f1\lang9\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs19 tout ce qui est reli\'e9 au logiciel, aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers ; et\lang1033\par - -\pard\widctlpar\li720\sa120\f1\lang9\'b7\f2\fs14\~\~\~\~\~\~\~\~\~\f0\fs19 les r\'e9clamations au titre de violation de contrat ou de garantie, ou au titre de responsabilit\'e9 stricte, de n\'e9gligence ou d\rquote une autre faute dans la limite autoris\'e9e par la loi en vigueur.\lang1033\par - -\pard\widctlpar\sb120\sa120\lang9 Elle s\rquote applique \'e9galement, m\'eame si Microsoft connaissait ou devrait conna\'eetre l\rquote\'e9ventualit\'e9 d\rquote un tel dommage. Si votre pays n\rquote autorise pas l\rquote exclusion ou la limitation de responsabilit\'e9 pour les dommages indirects, accessoires ou de quelque nature que ce soit, il se peut que la limitation ou l\rquote exclusion ci-dessus ne s\rquote appliquera pas \'e0 votre \'e9gard.\lang1033\par -\kerning36\b EFFET JURIDIQUE.\~\b0 Le pr\'e9sent contrat d\'e9crit certains droits juridiques. Vous pourriez avoir d\rquote autres droits pr\'e9vus par les lois de votre pays. Le pr\'e9sent contrat ne modifie pas les droits que vous conf\'e8rent les lois de votre pays si celles-ci ne le permettent pas.\b\par -\kerning0\fs20\lang1036\~\fs19\lang1033\par - -\pard\widctlpar\cf0\b0\f3\fs24\par -} - \ No newline at end of file diff --git a/old/packaging/windows/msbuildextensions/generatemsi.ps1 b/old/packaging/windows/msbuildextensions/generatemsi.ps1 deleted file mode 100644 index a7444058d..000000000 --- a/old/packaging/windows/msbuildextensions/generatemsi.ps1 +++ /dev/null @@ -1,140 +0,0 @@ -# Copyright (c) .NET Foundation and contributors. All rights reserved. -# Licensed under the MIT license. See LICENSE file in the project root for full license information. - -param( - [Parameter(Mandatory=$true)][string]$inputDir, - [Parameter(Mandatory=$true)][string]$MSBuildExtensionsMSIOutput, - [Parameter(Mandatory=$true)][string]$WixRoot, - [Parameter(Mandatory=$true)][string]$ProductMoniker, - [Parameter(Mandatory=$true)][string]$DotnetMSIVersion, - [Parameter(Mandatory=$true)][string]$DotnetCLIDisplayVersion, - [Parameter(Mandatory=$true)][string]$DotnetCLINugetVersion, - [Parameter(Mandatory=$true)][string]$UpgradeCode, - [Parameter(Mandatory=$true)][string]$Architecture -) - -. "$PSScriptRoot\..\..\..\scripts\common\_common.ps1" -$RepoRoot = Convert-Path "$PSScriptRoot\..\..\.." - -$InstallFileswsx = "install-msbuild-extensions-files.wxs" -$InstallFilesWixobj = "install-msbuild-extensions-files.wixobj" - -function RunHeat -{ - $result = $true - pushd "$WixRoot" - - Write-Output Running heat.. - - .\heat.exe dir `"$inputDir`" -template fragment -sreg -gg -var var.DotnetSrc -cg InstallFiles -srd -dr MSBUILDEXTENSIONSHOME -out $InstallFileswsx | Out-Host - - if($LastExitCode -ne 0) - { - $result = $false - Write-Output "Heat failed with exit code $LastExitCode." - } - - popd - return $result -} - -function RunCandle -{ - $result = $true - pushd "$WixRoot" - - Write-Output Running candle.. - $AuthWsxRoot = Join-Path $RepoRoot "packaging\windows\msbuildextensions" - - .\candle.exe -nologo ` - -dDotnetSrc="$inputDir" ` - -dMicrosoftEula="$RepoRoot\packaging\windows\clisdk\dummyeula.rtf" ` - -dProductMoniker="$ProductMoniker" ` - -dBuildVersion="$DotnetMSIVersion" ` - -dDisplayVersion="$DotnetCLIDisplayVersion" ` - -dNugetVersion="$DotnetCLINugetVersion" ` - -dUpgradeCode="$UpgradeCode" ` - -arch "$Architecture" ` - -ext WixDependencyExtension.dll ` - "$AuthWsxRoot\msbuildextensions.wxs" ` - "$AuthWsxRoot\provider.wxs" ` - "$AuthWsxRoot\registrykeys.wxs" ` - $InstallFileswsx | Out-Host - - if($LastExitCode -ne 0) - { - $result = $false - Write-Output "Candle failed with exit code $LastExitCode." - } - - popd - return $result -} - -function RunLight -{ - $result = $true - pushd "$WixRoot" - - Write-Output Running light.. - $CabCache = Join-Path $WixRoot "cabcache" - $AuthWsxRoot = Join-Path $RepoRoot "packaging\windows\msbuildextensions" - - .\light.exe -nologo -ext WixUIExtension -ext WixDependencyExtension -ext WixUtilExtension ` - -cultures:en-us ` - msbuildextensions.wixobj ` - provider.wixobj ` - registrykeys.wixobj ` - $InstallFilesWixobj ` - -b "$inputDir" ` - -b "$AuthWsxRoot" ` - -reusecab ` - -cc "$CabCache" ` - -out $MSBuildExtensionsMSIOutput | Out-Host - - if($LastExitCode -ne 0) - { - $result = $false - Write-Output "Light failed with exit code $LastExitCode." - } - - popd - return $result -} - -if(!(Test-Path $inputDir)) -{ - throw "$inputDir not found" -} - -Write-Output "Creating MSBuild Extensions MSI at $MSBuildExtensionsMSIOutput" - -if([string]::IsNullOrEmpty($WixRoot)) -{ - Exit -1 -} - -if(-Not (RunHeat)) -{ - Exit -1 -} - -if(-Not (RunCandle)) -{ - Exit -1 -} - -if(-Not (RunLight)) -{ - Exit -1 -} - -if(!(Test-Path $MSBuildExtensionsMSIOutput)) -{ - throw "Unable to create the MSBuild Extensions msi." - Exit -1 -} - -Write-Output -ForegroundColor Green "Successfully created MSBuild Extensions MSI - $MSBuildExtensionsMSIOutput" - -exit $LastExitCode diff --git a/old/packaging/windows/msbuildextensions/msbuildextensions.wxs b/old/packaging/windows/msbuildextensions/msbuildextensions.wxs deleted file mode 100644 index be689ea3f..000000000 --- a/old/packaging/windows/msbuildextensions/msbuildextensions.wxs +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/old/packaging/windows/msbuildextensions/provider.wxs b/old/packaging/windows/msbuildextensions/provider.wxs deleted file mode 100644 index e1711ec76..000000000 --- a/old/packaging/windows/msbuildextensions/provider.wxs +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/old/packaging/windows/msbuildextensions/registrykeys.wxs b/old/packaging/windows/msbuildextensions/registrykeys.wxs deleted file mode 100644 index fde60d74a..000000000 --- a/old/packaging/windows/msbuildextensions/registrykeys.wxs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/old/packaging/windows/msbuildextensions/variables.wxi b/old/packaging/windows/msbuildextensions/variables.wxi deleted file mode 100644 index 2d13e678f..000000000 --- a/old/packaging/windows/msbuildextensions/variables.wxi +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/old/scripts/clean/clear-nuget-cache.ps1 b/old/scripts/clean/clear-nuget-cache.ps1 deleted file mode 100644 index 028a156db..000000000 --- a/old/scripts/clean/clear-nuget-cache.ps1 +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright (c) .NET Foundation and contributors. All rights reserved. -# Licensed under the MIT license. See LICENSE file in the project root for full license information. -# - -. $PSScriptRoot\..\common\_common.ps1 - -if ($env:CI_BUILD -eq "1") { - # periodically clear out the package cache on the CI server - $PackageCacheFile = "$env:NUGET_PACKAGES\packageCacheTime.txt" - - if(!(Test-Path $PackageCacheFile)) { - Get-Date | Out-File -FilePath $PackageCacheFile - } - else { - $PackageCacheTimeProperty = Get-ItemProperty -Path $PackageCacheFile -Name CreationTimeUtc - $PackageCacheTime = [datetime]($PackageCacheTimeProperty).CreationTimeUtc - - if ($PackageCacheTime -lt ([datetime]::UtcNow).AddHours(-$env:NUGET_PACKAGES_CACHE_TIME_LIMIT)) { - header "Clearing package cache" - - Remove-Item -Recurse -Force "$env:NUGET_PACKAGES" - mkdir $env:NUGET_PACKAGES | Out-Null - Get-Date | Out-File -FilePath $PackageCacheFile - } - } -} diff --git a/old/scripts/clean/clear-nuget-cache.sh b/old/scripts/clean/clear-nuget-cache.sh deleted file mode 100644 index ec915a443..000000000 --- a/old/scripts/clean/clear-nuget-cache.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) .NET Foundation and contributors. All rights reserved. -# Licensed under the MIT license. See LICENSE file in the project root for full license information. -# - -set -e - -SOURCE="${BASH_SOURCE[0]}" -while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink - DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" - SOURCE="$(readlink "$SOURCE")" - [[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located -done -DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" - -source "$DIR/../common/_common.sh" - -if [ ! -z "$CI_BUILD" ]; then - # periodically clear out the package cache on the CI server - PackageCacheFile="$NUGET_PACKAGES/packageCacheTime.txt" - if [ ! -f $PackageCacheFile ]; then - date > $PackageCacheFile - else - #$NUGET_PACKAGES_CACHE_TIME_LIMIT is in hours - CacheTimeLimitInSeconds=$(($NUGET_PACKAGES_CACHE_TIME_LIMIT * 3600)) - CacheExpireTime=$(($(date +%s) - $CacheTimeLimitInSeconds)) - - if [ $(date +%s -r $PackageCacheFile) -lt $CacheExpireTime ]; then - header "Clearing package cache" - - rm -Rf $NUGET_PACKAGES - mkdir -p $NUGET_PACKAGES - date > $PackageCacheFile - fi - fi -fi diff --git a/old/scripts/cli-build-env.bat b/old/scripts/cli-build-env.bat deleted file mode 100644 index ff643c625..000000000 --- a/old/scripts/cli-build-env.bat +++ /dev/null @@ -1,17 +0,0 @@ -@echo off -REM Copyright (c) .NET Foundation and contributors. All rights reserved. -REM Licensed under the MIT license. See LICENSE file in the project root for full license information. - -REM Get normalized version of parent path -for %%i in (%~dp0..\) DO ( - SET CLI_REPO_ROOT=%%~dpi -) - -title Core-SDK Build (%CLI_REPO_ROOT%) - -REM Add Stage 0 CLI to path -set PATH=%CLI_REPO_ROOT%.dotnet_stage0\x64;%PATH% - -set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 -set DOTNET_MULTILEVEL_LOOKUP=0 -set NUGET_PACKAGES=%CLI_REPO_ROOT%.nuget\packages \ No newline at end of file diff --git a/old/scripts/cli-build-env.sh b/old/scripts/cli-build-env.sh deleted file mode 100644 index 1534aeb66..000000000 --- a/old/scripts/cli-build-env.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) .NET Foundation and contributors. All rights reserved. -# Licensed under the MIT license. See LICENSE file in the project root for full license information. -# - -SOURCE="${BASH_SOURCE[0]}" -while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink - DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" - SOURCE="$(readlink "$SOURCE")" - [[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located -done - -REPO_ROOT="$( cd -P "$( dirname "$SOURCE" )/../" && pwd )" - -STAGE0_DIR=$REPO_ROOT/.dotnet_stage0/x64 -export PATH=$STAGE0_DIR:$PATH - - -export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 -export DOTNET_MULTILEVEL_LOOKUP=0 - -export NUGET_PACKAGES=$REPO_ROOT/.nuget/packages diff --git a/old/scripts/common/_common.ps1 b/old/scripts/common/_common.ps1 deleted file mode 100644 index b2df24187..000000000 --- a/old/scripts/common/_common.ps1 +++ /dev/null @@ -1,26 +0,0 @@ -# -# Copyright (c) .NET Foundation and contributors. All rights reserved. -# Licensed under the MIT license. See LICENSE file in the project root for full license information. -# - -. $PSScriptRoot\_utility.ps1 - -# Copy things from environment variables that were sent by the build scripts -$Rid = $env:Rid -$Tfm = $env:Tfm -$OutputDir = $env:OutputDir -$Stage1Dir = $env:Stage1Dir -$Stage1CompilationDir = $env:Stage1CompilationDir -$Stage2Dir = $env:Stage2Dir -$Stage2CompilationDir = $env:Stage2CompilationDir -$PackageDir = $env:PackageDir -$TestBinRoot = $env:TestBinRoot -$TestPackageDir = $env:TestPackageDir - -$env:Channel = "$env:RELEASE_SUFFIX" - -# Set reasonable defaults for unset variables -setEnvIfDefault "DOTNET_INSTALL_DIR" "$RepoRoot\.dotnet_stage0\win7-x64" -setEnvIfDefault "DOTNET_CLI_VERSION" "0.1.0.0" -setPathAndHomeIfDefault "$Stage2Dir" -setVarIfDefault "CONFIGURATION" "Debug" diff --git a/old/scripts/common/_common.sh b/old/scripts/common/_common.sh deleted file mode 100644 index faa29f0d4..000000000 --- a/old/scripts/common/_common.sh +++ /dev/null @@ -1,29 +0,0 @@ -# -# Copyright (c) .NET Foundation and contributors. All rights reserved. -# Licensed under the MIT license. See LICENSE file in the project root for full license information. -# - -COMMONSOURCE="${BASH_SOURCE[0]}" -while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink - COMMONDIR="$( cd -P "$( dirname "$COMMONSOURCE" )" && pwd )" - COMMONSOURCE="$(readlink "$COMMONSOURCE")" - [[ $COMMONSOURCE != /* ]] && COMMONSOURCE="$COMMONDIR/$COMMONSOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located -done -COMMONDIR="$( cd -P "$( dirname "$COMMONSOURCE" )" && pwd )" - -source "$COMMONDIR/_prettyprint.sh" - -# Other variables are set by the outer build script -export CHANNEL=$RELEASE_SUFFIX - -[ -z "$DOTNET_INSTALL_DIR" ] && export DOTNET_INSTALL_DIR=$REPOROOT/.dotnet_stage0/$RID -[ -z "$DOTNET_CLI_VERSION" ] && export DOTNET_CLI_VERSION=0.1.0.0 -[ -z "$DOTNET_ON_PATH" ] && export DOTNET_ON_PATH=$STAGE2_DIR && export PATH=$STAGE2_DIR/bin:$PATH -[ -z "$CONFIGURATION" ] && export CONFIGURATION=Debug - -#TODO this is a workaround for a nuget bug on ubuntu. Remove -export DISABLE_PARALLEL="" -[[ "$RID" =~ "ubuntu" ]] && export DISABLE_PARALLEL="" - -unset COMMONSOURCE -unset COMMONDIR diff --git a/old/scripts/common/_utility.ps1 b/old/scripts/common/_utility.ps1 deleted file mode 100644 index 037e1854f..000000000 --- a/old/scripts/common/_utility.ps1 +++ /dev/null @@ -1,76 +0,0 @@ -# -# Copyright (c) .NET Foundation and contributors. All rights reserved. -# Licensed under the MIT license. See LICENSE file in the project root for full license information. -# - -function header([string]$message) -{ - Write-Output -ForegroundColor Green "*** $message ***" -} - -function info([string]$message) -{ - Write-Output -ForegroundColor Yellow "*** $message ***" -} - -function error([string]$message) -{ - Write-Output -ForegroundColor Red "$message" -} - -function setEnvIfDefault([string]$envVarName, [string]$value) -{ - If ([Environment]::GetEnvironmentVariable($envVarName) -eq $null) - { - [Environment]::SetEnvironmentVariable($envVarName, $value) - } -} - -function setVarIfDefault([string]$varName, [string]$value) -{ - If (-not (Get-Variable -name $varName -ErrorAction SilentlyContinue)) - { - Set-Variable -name $varName -value $value -scope 1 - } -} - -function setPathAndHomeIfDefault([string]$rootPath) -{ - If ($env:DOTNET_ON_PATH -eq $null) - { - setPathAndHome $rootPath - } -} - -function setPathAndHome([string]$rootPath) -{ - $env:DOTNET_ON_PATH=$rootPath - $env:PATH="$rootPath\bin;$env:PATH" -} - -function _([string]$command) -{ - & "$command" - if (!$?) { - error "Command Failed: '& $command'" - Exit 1 - } -} - -function _([string]$command, $arguments) -{ - & "$command" @arguments - if (!$?) { - error "Command Failed: '& $command'" - Exit 1 - } -} - -function _cmd([string]$command) -{ - cmd /c "$command" - if (!$?) { - error "Command Failed: 'cmd /c $command'" - Exit 1 - } -} diff --git a/old/scripts/dockerrun-as-current-user.sh b/old/scripts/dockerrun-as-current-user.sh deleted file mode 100644 index 70344cc3c..000000000 --- a/old/scripts/dockerrun-as-current-user.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) .NET Foundation and contributors. All rights reserved. -# Licensed under the MIT license. See LICENSE file in the project root for full license information. -# - -set -e - -docker run -u="$(id -u):$(id -g)" "$@" diff --git a/old/testAsset.props b/old/testAsset.props deleted file mode 100644 index c9bc8459c..000000000 --- a/old/testAsset.props +++ /dev/null @@ -1,14 +0,0 @@ - - - $(MSBuildThisFileDirectory) - - - - - - - - $(TEST_PACKAGES) - true - - diff --git a/old/tools/CrossGen.Dependencies/CrossGen.Dependencies.csproj b/old/tools/CrossGen.Dependencies/CrossGen.Dependencies.csproj deleted file mode 100644 index 6cf680998..000000000 --- a/old/tools/CrossGen.Dependencies/CrossGen.Dependencies.csproj +++ /dev/null @@ -1,11 +0,0 @@ - - - $(CliTargetFramework) - $(SharedFrameworkRid) - - - - - - - diff --git a/old/tools/Signing.Dependencies/Signing.Dependencies.csproj b/old/tools/Signing.Dependencies/Signing.Dependencies.csproj deleted file mode 100644 index f4ae4c40e..000000000 --- a/old/tools/Signing.Dependencies/Signing.Dependencies.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - netcoreapp1.0 - - - - - - - diff --git a/old/tools/TestAssetsDependencies/TestAssetsDependencies.csproj b/old/tools/TestAssetsDependencies/TestAssetsDependencies.csproj deleted file mode 100644 index 26129c334..000000000 --- a/old/tools/TestAssetsDependencies/TestAssetsDependencies.csproj +++ /dev/null @@ -1,7 +0,0 @@ - - - - netcoreapp1.0 - - - diff --git a/old/tools/test_key.snk b/old/tools/test_key.snk deleted file mode 100644 index fe413a523c450a85162e60860a75854b1fe61fc8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 596 zcmV-a0;~N80ssI2Bme+XQ$aES1ONa500964n#5uHT!P2lC09TUPt@t$-+IJ;Jy#`2 zz)aLvbtoVT$F*HBI_d3sV+UG^Bytf8C#I*%bVS|GpD0Lz~$5a6|9N3&hznf6!`Zt!X zEIf5$(}whK8x|rDTozjy*Leo4CYD??qR7R1dJ-q%8wc1~1pImB@f?Xz=E2 zcN!2;$E9*rb^uXKSVw)?^3TLJsX@EBKSN_$K$6fY&D*S{PzqE?YAzFMbrCk^OAtOL zdrCESXb)oAIPd6B^TBH6K+n!%szlQ##n`?6G*A~Alc$;?vS69(G&XMK4a*&p7)})0 z(??nc7r)QGI*#cThmCf4l#|Xx3_eF^&Ef`=bV^PlGAn?0!V%{W)sb#gG3#iTJc{~) zQQIJX`X&>GLlrKJTptK(0IJ9A<#@db6Akg1+e0DqhVevA!tMf4R#2UV7re=f=&ztq z9>(2tzDanAc4#tx8ohXN$X=>Vq67f{f(Goruf|?JC78yKs_5)kK&k%KWXrI2({XwK zS