Remove 'old' folder (#235)
old/ is convenient during migration. It is not used after it is done.
This commit is contained in:
parent
8925393f3c
commit
94e3495879
136 changed files with 0 additions and 7503 deletions
|
@ -1,69 +0,0 @@
|
|||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<!--
|
||||
Projects which don't import dir.props:
|
||||
|
||||
build\RestoreDependency.proj
|
||||
build\Signing.proj
|
||||
build\package\Installer.DEB.proj
|
||||
build\sdks\sdks.csproj
|
||||
build\templates\templates.csproj
|
||||
build\test\RunTest.proj
|
||||
build_projects\Microsoft.DotNet.Cli.Build.SelfTest\InvokeWithStage2.proj
|
||||
build_projects\update-dependencies\update-dependencies.csproj
|
||||
tools\TestAssetsDependencies\TestAssetsDependencies.csproj
|
||||
|
||||
-->
|
||||
|
||||
<PropertyGroup>
|
||||
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
|
||||
|
||||
<NuGetPackagesDir>$(NUGET_PACKAGES)</NuGetPackagesDir>
|
||||
<NuGetPackagesDir Condition=" '$(NuGetPackagesDir)' == '' ">$(RepoRoot)/.nuget/packages</NuGetPackagesDir>
|
||||
|
||||
<RelativeCLIBuildBinaries>build_projects/dotnet-cli-build/bin</RelativeCLIBuildBinaries>
|
||||
<RelativeCLIBuildDllName>dotnet-cli-build.dll</RelativeCLIBuildDllName>
|
||||
<CLIBuildDll>$(RepoRoot)/$(RelativeCLIBuildBinaries)/$(RelativeCLIBuildDllName)</CLIBuildDll>
|
||||
<BuildTasksFeedDll>$(RepoRoot)/build_projects/dotnet-cli-build/bin/Microsoft.DotNet.Build.Tasks.Feed.dll</BuildTasksFeedDll>
|
||||
|
||||
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
|
||||
<DisableImplicitPackageTargetFallback>true</DisableImplicitPackageTargetFallback>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="build/TargetFramework.props" />
|
||||
<Import Project="build/InitRepo.props" />
|
||||
<Import Condition=" '$(GeneratePropsFile)' != 'true' " Project="$(GitCommitInfoProps)" />
|
||||
<Import Condition=" '$(GeneratePropsFile)' != 'true' " Project="$(HostInfoProps)" />
|
||||
<Import Condition=" '$(GeneratePropsFile)' != 'true' " Project="$(BuildInfoProps)" />
|
||||
|
||||
<Import Project="build/BranchInfo.props" />
|
||||
|
||||
<Import Project="build/AzureInfo.props" />
|
||||
|
||||
<Import Project="build/DependencyVersions.props" />
|
||||
<Import Project="build/Version.props" />
|
||||
<Import Project="build/DerivedHostMachineInfo.props" />
|
||||
<Import Project="build/Branding.props" />
|
||||
|
||||
<Import Project="build/FileExtensions.props" />
|
||||
<Import Project="build/InputDirectories.props" />
|
||||
<Import Project="build/SetupPreviousStage.props" />
|
||||
<Import Project="build/OutputDirectories.props" />
|
||||
|
||||
<ImportGroup Condition=" '$(BuildingSigningProject)' != 'true' ">
|
||||
<!-- These imports aren't required for signing, and some of them have syntax which isn't supported in MSBuild 14,
|
||||
which is what the signing build uses -->
|
||||
<Import Project="build/BundledTemplates.props" />
|
||||
<Import Project="build/BundledDotnetTools.props" />
|
||||
|
||||
<Import Project="build/BuildDefaults.props" />
|
||||
<Import Project="build/BundledRuntimes.props" />
|
||||
<Import Project="build/BundledToolset.props" />
|
||||
<Import Project="build/CrossGen.props" />
|
||||
<Import Project="build/BackwardsCompatibilityRuntimes.props" />
|
||||
|
||||
<Import Project="build/InstallerInfo.props" />
|
||||
<Import Project="build/GenerateResxSource.targets" />
|
||||
</ImportGroup>
|
||||
|
||||
</Project>
|
|
@ -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%
|
|
@ -1,62 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="BuildTheWholeCli" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="Directory.Build.props" />
|
||||
|
||||
<ItemGroup>
|
||||
<DotnetCliBuildFrameworkInputs Include="build_projects/**/*.cs" Exclude="build_projects/**/obj/**/*.cs" />
|
||||
<DotnetCliBuildFrameworkInputs Include="build_projects/**/*.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Workaround to "Native image cannot be loaded multiple times" issue
|
||||
A target in the top level file needs to run and invoke a task
|
||||
https://github.com/Microsoft/msbuild/issues/750 -->
|
||||
<Target Name="MSBuildWorkaroundTarget">
|
||||
<Message Text="Dont remove this target" />
|
||||
</Target>
|
||||
|
||||
<Target Name="BuildDotnetCliBuildFramework"
|
||||
Inputs="@(DotnetCliBuildFrameworkInputs)"
|
||||
Outputs="$(CLIBuildDll)"
|
||||
DependsOnTargets="MSBuildWorkaroundTarget;
|
||||
RestoreDotnetCliBuildFramework">
|
||||
|
||||
<Exec Command="$(PreviousStageDotnet) publish --no-restore -o $(DotnetCliBuildDirectory)/bin --framework $(CliTargetFramework) /p:GeneratePropsFile=$(GeneratePropsFile)"
|
||||
WorkingDirectory="$(DotnetCliBuildDirectory)"/>
|
||||
</Target>
|
||||
|
||||
<ItemGroup>
|
||||
<RestoreDotnetCliBuildFrameworkOutputs Include="$(DotnetCliBuildDirectory)/obj/project.assets.json" />
|
||||
<RestoreDotnetCliBuildFrameworkOutputs Include="$(DotnetCliBuildDirectory)/obj/dotnet-cli-build.csproj.nuget.g.props" />
|
||||
<RestoreDotnetCliBuildFrameworkOutputs Include="$(DotnetCliBuildDirectory)/obj/dotnet-cli-build.csproj.nuget.g.targets" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="RestoreDotnetCliBuildFramework"
|
||||
Inputs="$(DotnetCliBuildDirectory)/dotnet-cli-build.csproj"
|
||||
Outputs="@(RestoreDotnetCliBuildFrameworkOutputs)"
|
||||
DependsOnTargets="WriteNugetConfigFile">
|
||||
|
||||
<PropertyGroup>
|
||||
<ExtraRestoreArgs>$(ExtraRestoreArgs) /p:GeneratePropsFile=$(GeneratePropsFile)</ExtraRestoreArgs>
|
||||
<ExtraRestoreArgs Condition="'$(OS)' != 'Windows_NT'">$(ExtraRestoreArgs) --disable-parallel</ExtraRestoreArgs>
|
||||
</PropertyGroup>
|
||||
|
||||
<Exec Command="$(PreviousStageDotnet) restore $(ExtraRestoreArgs)"
|
||||
WorkingDirectory="$(DotnetCliBuildDirectory)"/>
|
||||
</Target>
|
||||
|
||||
<Target Name="BuildTheWholeCli" DependsOnTargets="$(CLITargets)" />
|
||||
|
||||
<Import Project="build/NugetConfigFile.targets" />
|
||||
<Import Project="build/GitCommitInfo.targets" />
|
||||
<Import Project="build/HostInfo.targets" />
|
||||
<Import Project="build/BuildInfo.targets" />
|
||||
<Import Project="build/DownloadPackageVersions.targets" />
|
||||
<Import Project="build/Prepare.targets" />
|
||||
<Import Project="build/ComposeSdk.targets" />
|
||||
<Import Project="build/BuildAndPublishAllLinuxDistrosNativeInstallers.targets" />
|
||||
<Import Project="build/Package.targets" />
|
||||
<Import Project="build/Test.targets" />
|
||||
<Import Project="build/Publish.targets" />
|
||||
|
||||
<Import Project="build/InitRepo.targets" />
|
||||
</Project>
|
|
@ -1,49 +0,0 @@
|
|||
<Project ToolsVersion="15.0" DefaultTargets="ExtractAppHostToOutput">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.tasks))\dir.tasks" />
|
||||
|
||||
<PropertyGroup>
|
||||
<NativeExecutableExtension Condition=" $(Rid.StartsWith('win'))">.exe</NativeExecutableExtension>
|
||||
<AppHostExecutableName>AppHost$(NativeExecutableExtension)</AppHostExecutableName>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="ExtractAppHostToOutput"
|
||||
Condition="!Exists('$(AppHostTemplatePath)/$(AppHostExecutableName)')"
|
||||
DependsOnTargets="EnsureAppHostPackageRestored">
|
||||
|
||||
<Message Text="Restore $(TemplateFillInPackageName) from $(AppHostTemplatePath) to $(AppHostTemplateRestoreAdditionalParameters)."
|
||||
Importance="High" />
|
||||
|
||||
<ItemGroup>
|
||||
<AllFileOfRestoredAppHostPackage Include="$(AppHostIntermediateDirectory)\**\*.*" />
|
||||
<NativeRestoredAppHostNETCore
|
||||
Include="@(AllFileOfRestoredAppHostPackage)"
|
||||
Condition="'%(FileName)%(Extension)' == '$(AppHostExecutableName)'"/>
|
||||
</ItemGroup>
|
||||
|
||||
<Error Condition="@(NativeRestoredAppHostNETCore->Distinct()->Count()) != 1"
|
||||
Text="Failed to determine the $(_NETCoreDotNetAppHostPackageName) executable in @(AllFileOfRestoredAppHostPackage)" />
|
||||
|
||||
<Copy
|
||||
SourceFiles="@(NativeRestoredAppHostNETCore)"
|
||||
DestinationFolder="$(AppHostTemplatePath)" />
|
||||
|
||||
<Message Text="Copy from @(NativeRestoredAppHostNETCore) to $(AppHostTemplatePath)."
|
||||
Importance="High" />
|
||||
|
||||
</Target>
|
||||
|
||||
<Target Name="EnsureAppHostPackageRestored">
|
||||
<PropertyGroup>
|
||||
<AppHostTemplateRestoreAdditionalParameters>--runtime $(Rid)</AppHostTemplateRestoreAdditionalParameters>
|
||||
<AppHostTemplateRestoreAdditionalParameters>$(AppHostTemplateRestoreAdditionalParameters) /p:TargetFramework=$(CliTargetFramework)</AppHostTemplateRestoreAdditionalParameters>
|
||||
<AppHostTemplateRestoreAdditionalParameters>$(AppHostTemplateRestoreAdditionalParameters) /p:TemplateFillInPackageName=$(TemplateFillInPackageName)</AppHostTemplateRestoreAdditionalParameters>
|
||||
<AppHostTemplateRestoreAdditionalParameters>$(AppHostTemplateRestoreAdditionalParameters) /p:TemplateFillInPackageVersion=$(TemplateFillInPackageVersion)</AppHostTemplateRestoreAdditionalParameters>
|
||||
<AppHostTemplateRestoreAdditionalParameters>$(AppHostTemplateRestoreAdditionalParameters) /p:RestorePackagesPath=$(AppHostIntermediateDirectory)</AppHostTemplateRestoreAdditionalParameters>
|
||||
</PropertyGroup>
|
||||
|
||||
<DotNetRestore ToolPath="$(PreviousStageDirectory)"
|
||||
ProjectPath="$(MSBuildThisFileDirectory)/templates/templates.csproj"
|
||||
AdditionalParameters="$(AppHostTemplateRestoreAdditionalParameters)" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,48 +0,0 @@
|
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Product>Sdk</Product>
|
||||
<IsNotOrchestratedPublish>true</IsNotOrchestratedPublish>
|
||||
<IsNotOrchestratedPublish Condition="'$(PB_PublishBlobFeedUrl)' != ''">false</IsNotOrchestratedPublish>
|
||||
<BlobStoragePartialRelativePath>$(Product)</BlobStoragePartialRelativePath>
|
||||
<BlobStoragePartialRelativePath Condition="'$(IsNotOrchestratedPublish)' == 'false'">assets/$(Product)</BlobStoragePartialRelativePath>
|
||||
|
||||
<!-- Values related to the download of assets from blob storage -->
|
||||
<DefaultCoreSetupBlobRootUrl>https://dotnetcli.azureedge.net/dotnet/</DefaultCoreSetupBlobRootUrl>
|
||||
<CoreSetupBlobRootUrl>$(PB_AssetRootUrl)</CoreSetupBlobRootUrl>
|
||||
<CoreSetupBlobRootUrl Condition="'$(CoreSetupBlobRootUrl)' == ''">$(DefaultCoreSetupBlobRootUrl)</CoreSetupBlobRootUrl>
|
||||
<BackwardsCompatibilityCoreSetupBlobRootUrl>$(DefaultCoreSetupBlobRootUrl)</BackwardsCompatibilityCoreSetupBlobRootUrl>
|
||||
<CoreSetupBlobAccessToken Condition="'$(PB_AssetRootAccessTokenSuffix)' != ''">$(PB_AssetRootAccessTokenSuffix)</CoreSetupBlobAccessToken>
|
||||
<CoreSetupBlobAccessTokenParam Condition=" '$(CoreSetupBlobAccessToken)' != '' ">?$(CoreSetupBlobAccessToken)</CoreSetupBlobAccessTokenParam>
|
||||
|
||||
<DotnetExtensionsBlobRootUrl>$(PB_AssetRootUrl)</DotnetExtensionsBlobRootUrl>
|
||||
<DotnetExtensionsBlobRootUrl Condition="'$(DotnetExtensionsBlobRootUrl)' == ''">https://dotnetcli.blob.core.windows.net/dotnet/</DotnetExtensionsBlobRootUrl>
|
||||
|
||||
<!-- Values related to the upload of assets to blob storage -->
|
||||
<ArtifactCloudDropAccountName>$(ARTIFACT_STORAGE_ACCOUNT)</ArtifactCloudDropAccountName>
|
||||
<ArtifactCloudDropAccountName Condition="'$(ArtifactCloudDropAccountName)' == ''">dotnetcli</ArtifactCloudDropAccountName>
|
||||
<ArtifactContainerName>$(ARTIFACT_STORAGE_CONTAINER)</ArtifactContainerName>
|
||||
<ArtifactContainerName Condition="'$(ArtifactContainerName)' == ''">dotnet</ArtifactContainerName>
|
||||
<ArtifactCloudDropAccessToken>$(PB_PublishBlobFeedKey)</ArtifactCloudDropAccessToken>
|
||||
<ArtifactCloudDropAccessToken Condition="'$(ArtifactCloudDropAccessToken)' == ''">$(ARTIFACT_STORAGE_KEY)</ArtifactCloudDropAccessToken>
|
||||
<ArtifactCloudDropURL>$(PB_PublishBlobFeedUrl)</ArtifactCloudDropURL>
|
||||
<ArtifactCloudDropURL Condition="'$(ArtifactCloudDropURL)' == ''">https://$(ArtifactCloudDropAccountName).blob.core.windows.net/$(ArtifactContainerName)/index.json</ArtifactCloudDropURL>
|
||||
|
||||
<!-- Values related to the upload of checksums to blob storage -->
|
||||
<ChecksumCloudDropAccountName>$(CHECKSUM_STORAGE_ACCOUNT)</ChecksumCloudDropAccountName>
|
||||
<ChecksumCloudDropAccountName Condition="'$(ChecksumCloudDropAccountName)' == ''">dotnetclichecksums</ChecksumCloudDropAccountName>
|
||||
<ChecksumContainerName>$(CHECKSUM_STORAGE_CONTAINER)</ChecksumContainerName>
|
||||
<ChecksumContainerName Condition="'$(ChecksumContainerName)' == ''">dotnet</ChecksumContainerName>
|
||||
<ChecksumCloudDropAccessToken>$(PB_PublishBlobFeedKey)</ChecksumCloudDropAccessToken>
|
||||
<ChecksumCloudDropAccessToken Condition="'$(ChecksumCloudDropAccessToken)' == ''">$(CHECKSUM_STORAGE_KEY)</ChecksumCloudDropAccessToken>
|
||||
<ChecksumCloudDropURL>$(PB_PublishBlobFeedUrl)</ChecksumCloudDropURL>
|
||||
<ChecksumCloudDropURL Condition="'$(ChecksumCloudDropURL)' == ''">https://$(ChecksumCloudDropAccountName).blob.core.windows.net/$(ChecksumContainerName)/index.json</ChecksumCloudDropURL>
|
||||
|
||||
<!-- Values related to the upload of NuPkgs to the blob feed -->
|
||||
<BlobFeedContainerName>$(BLOBFEED_STORAGE_CONTAINER)</BlobFeedContainerName>
|
||||
<BlobFeedContainerName Condition="'$(BlobFeedContainerName)' == ''">dotnet-core</BlobFeedContainerName>
|
||||
<BlobFeedExpectedURL>$(PB_PublishBlobFeedUrl)</BlobFeedExpectedURL>
|
||||
<BlobFeedExpectedURL Condition="'$(BlobFeedExpectedURL)' == ''">https://dotnetfeed.blob.core.windows.net/$(BlobFeedContainerName)/index.json</BlobFeedExpectedURL>
|
||||
<BlobFeedCloudDropAccessToken>$(PB_PublishBlobFeedKey)</BlobFeedCloudDropAccessToken>
|
||||
<BlobFeedCloudDropAccessToken Condition="'$(BlobFeedCloudDropAccessToken)' == ''">$(BLOBFEED_STORAGE_KEY)</BlobFeedCloudDropAccessToken>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -1,57 +0,0 @@
|
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition=" '$(IncludeSharedFrameworksForBackwardsCompatibilityTests)' == 'true' ">
|
||||
<BackwardsCompatibility110CoreSetupChannel>release/1.1.0</BackwardsCompatibility110CoreSetupChannel>
|
||||
<BackwardsCompatibility110SharedFrameworkVersion>1.1.2</BackwardsCompatibility110SharedFrameworkVersion>
|
||||
<BackwardsCompatibility110SharedHostVersion>1.1.0</BackwardsCompatibility110SharedHostVersion>
|
||||
<BackwardsCompatibility110HostFxrVersion>1.1.0</BackwardsCompatibility110HostFxrVersion>
|
||||
|
||||
<BackwardsCompatibility110DownloadedSharedHostInstallerFileName Condition=" '$(OSName)' != 'linux' ">dotnet-host-$(HostMonikerRid).$(BackwardsCompatibility110SharedHostVersion)$(InstallerExtension)</BackwardsCompatibility110DownloadedSharedHostInstallerFileName>
|
||||
<BackwardsCompatibility110DownloadedSharedHostInstallerFile Condition=" '$(OSName)' != 'linux' ">$(PackagesDirectory)/$(BackwardsCompatibility110DownloadedSharedHostInstallerFileName)</BackwardsCompatibility110DownloadedSharedHostInstallerFile>
|
||||
|
||||
<BackwardsCompatibility110DownloadedHostFxrInstallerFileName Condition=" '$(OSName)' != 'linux' ">dotnet-hostfxr-$(HostMonikerRid).$(BackwardsCompatibility110HostFxrVersion)$(InstallerExtension)</BackwardsCompatibility110DownloadedHostFxrInstallerFileName>
|
||||
<BackwardsCompatibility110DownloadedHostFxrInstallerFile Condition=" '$(OSName)' != 'linux' ">$(PackagesDirectory)/$(BackwardsCompatibility110DownloadedHostFxrInstallerFileName)</BackwardsCompatibility110DownloadedHostFxrInstallerFile>
|
||||
|
||||
<BackwardsCompatibility110DownloadedSharedFrameworkInstallerFileName Condition=" '$(OSName)' != 'linux' ">dotnet-sharedframework-$(HostMonikerRid).$(BackwardsCompatibility110SharedFrameworkVersion)$(InstallerExtension)</BackwardsCompatibility110DownloadedSharedFrameworkInstallerFileName>
|
||||
<BackwardsCompatibility110DownloadedSharedFrameworkInstallerFile Condition=" '$(OSName)' != 'linux' ">$(PackagesDirectory)/$(BackwardsCompatibility110DownloadedSharedFrameworkInstallerFileName)</BackwardsCompatibility110DownloadedSharedFrameworkInstallerFile>
|
||||
|
||||
<BackwardsCompatibility110CombinedFrameworkHostCompressedFileName>dotnet-$(HostMonikerRid).$(BackwardsCompatibility110SharedFrameworkVersion)$(ArchiveExtension)</BackwardsCompatibility110CombinedFrameworkHostCompressedFileName>
|
||||
|
||||
<BackwardsCompatibility110CoreSetupBlobRootUrlWithChannel>$(BackwardsCompatibilityCoreSetupBlobRootUrl)$(BackwardsCompatibility110CoreSetupChannel)</BackwardsCompatibility110CoreSetupBlobRootUrlWithChannel>
|
||||
<BackwardsCompatibility110SharedFrameworkArchiveBlobRootUrl>$(BackwardsCompatibility110CoreSetupBlobRootUrlWithChannel)/Binaries/$(BackwardsCompatibility110SharedFrameworkVersion)</BackwardsCompatibility110SharedFrameworkArchiveBlobRootUrl>
|
||||
<BackwardsCompatibility110CoreSetupInstallerBlobRootUrl>$(BackwardsCompatibility110CoreSetupBlobRootUrlWithChannel)/Installers</BackwardsCompatibility110CoreSetupInstallerBlobRootUrl>
|
||||
<BackwardsCompatibility110CoreSetupDownloadDirectory>$(IntermediateDirectory)/coreSetupDownload/$(BackwardsCompatibility110SharedFrameworkVersion)</BackwardsCompatibility110CoreSetupDownloadDirectory>
|
||||
<BackwardsCompatibility110CombinedSharedHostAndFrameworkArchive>$(BackwardsCompatibility110CoreSetupDownloadDirectory)/combinedSharedHostAndFrameworkArchive$(ArchiveExtension)</BackwardsCompatibility110CombinedSharedHostAndFrameworkArchive>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(IncludeSharedFrameworksForBackwardsCompatibilityTests)' == 'true' ">
|
||||
<_DownloadAndExtractItem Include="BackwardsCompatibility110CombinedSharedHostAndFrameworkArchive"
|
||||
Condition="!Exists('$(BackwardsCompatibility110CombinedSharedHostAndFrameworkArchive)') And !$(Architecture.StartsWith('arm'))">
|
||||
<Url>$(BackwardsCompatibility110SharedFrameworkArchiveBlobRootUrl)/$(BackwardsCompatibility110CombinedFrameworkHostCompressedFileName)$(CoreSetupBlobAccessTokenParam)</Url>
|
||||
<DownloadFileName>$(BackwardsCompatibility110CombinedSharedHostAndFrameworkArchive)</DownloadFileName>
|
||||
<ExtractDestination>$(BackwardsCompatibleSharedFrameworksPublishDirectory)</ExtractDestination>
|
||||
<!-- don't overwrite the destination because there can be multiple shared fx's and they need to be combined -->
|
||||
<OverwriteDestination>False</OverwriteDestination>
|
||||
</_DownloadAndExtractItem>
|
||||
|
||||
<_DownloadAndExtractItem Include="BackwardsCompatibility110DownloadedSharedFrameworkInstallerFile"
|
||||
Condition="!Exists('$(BackwardsCompatibility110DownloadedSharedFrameworkInstallerFile)') And '$(OSName)' != 'linux' And !$(Architecture.StartsWith('arm'))">
|
||||
<Url>$(BackwardsCompatibility110CoreSetupInstallerBlobRootUrl)/$(BackwardsCompatibility110SharedFrameworkVersion)/$(BackwardsCompatibility110DownloadedSharedFrameworkInstallerFileName)$(CoreSetupBlobAccessTokenParam)</Url>
|
||||
<DownloadFileName>$(BackwardsCompatibility110DownloadedSharedFrameworkInstallerFile)</DownloadFileName>
|
||||
<ExtractDestination></ExtractDestination>
|
||||
</_DownloadAndExtractItem>
|
||||
|
||||
<_DownloadAndExtractItem Include="BackwardsCompatibility110DownloadedSharedHostInstallerFile"
|
||||
Condition="!Exists('$(BackwardsCompatibility110DownloadedSharedHostInstallerFile)') And '$(OSName)' != 'linux' And !$(Architecture.StartsWith('arm'))">
|
||||
<Url>$(BackwardsCompatibility110CoreSetupInstallerBlobRootUrl)/$(BackwardsCompatibility110SharedHostVersion)/$(BackwardsCompatibility110DownloadedSharedHostInstallerFileName)$(CoreSetupBlobAccessTokenParam)</Url>
|
||||
<DownloadFileName>$(BackwardsCompatibility110DownloadedSharedHostInstallerFile)</DownloadFileName>
|
||||
<ExtractDestintation></ExtractDestintation>
|
||||
</_DownloadAndExtractItem>
|
||||
|
||||
<_DownloadAndExtractItem Include="BackwardsCompatibility110DownloadedHostFxrInstallerFile"
|
||||
Condition="!Exists('$(BackwardsCompatibility110DownloadedHostFxrInstallerFile)') And '$(OSName)' != 'linux' And !$(Architecture.StartsWith('arm'))">
|
||||
<Url>$(BackwardsCompatibility110CoreSetupInstallerBlobRootUrl)/$(BackwardsCompatibility110HostFxrVersion)/$(BackwardsCompatibility110DownloadedHostFxrInstallerFileName)$(CoreSetupBlobAccessTokenParam)</Url>
|
||||
<DownloadFileName>$(BackwardsCompatibility110DownloadedHostFxrInstallerFile)</DownloadFileName>
|
||||
<ExtractDestintation></ExtractDestintation>
|
||||
</_DownloadAndExtractItem>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,6 +0,0 @@
|
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Channel>master</Channel>
|
||||
<BranchName>master</BranchName>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -1,38 +0,0 @@
|
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<BuildName>cli</BuildName>
|
||||
<SdkBrandName>Microsoft .NET Core SDK $(CliBrandingVersion)</SdkBrandName>
|
||||
<MSBuildExtensionsBrandName>.NET Standard Support for Visual Studio 2015</MSBuildExtensionsBrandName>
|
||||
<SharedFrameworkBrandName>Microsoft .NET Core Runtime 3.0.0 - Preview</SharedFrameworkBrandName>
|
||||
<SharedHostBrandName>Microsoft .NET Core Host 3.0.0 - Preview</SharedHostBrandName>
|
||||
<HostFxrBrandName>Microsoft .NET Core Host FX Resolver 3.0.0 - Preview</HostFxrBrandName>
|
||||
|
||||
<SharedFrameworkName>Microsoft.NETCore.App</SharedFrameworkName>
|
||||
<SharedFrameworkNugetName>$(SharedFrameworkName)</SharedFrameworkNugetName>
|
||||
|
||||
<ProductMonikerRid Condition=" '$(Rid)' == 'ubuntu.16.04-x64' OR
|
||||
'$(Rid)' == 'fedora.24-x64' OR
|
||||
'$(Rid)' == 'rhel.6-x64' OR
|
||||
'$(Rid)' == 'linux-musl-x64' OR
|
||||
'$(Rid)' == 'opensuse.42.1-x64' ">$(Rid)</ProductMonikerRid>
|
||||
<ProductMonikerRid Condition=" '$(ProductMonikerRid)' == '' ">$(OSName)-$(Architecture)</ProductMonikerRid>
|
||||
|
||||
<HostMonikerRid Condition=" '$(HostRid)' == 'ubuntu.16.04-x64' OR
|
||||
'$(HostRid)' == 'fedora.24-x64' OR
|
||||
'$(HostRid)' == 'rhel.6-x64' OR
|
||||
'$(HostRid)' == 'linux-musl-x64' OR
|
||||
'$(HostRid)' == 'opensuse.42.1-x64' ">$(HostRid)</HostMonikerRid>
|
||||
<HostMonikerRid Condition=" '$(HostMonikerRid)' == '' ">$(HostOSName)-$(Architecture)</HostMonikerRid>
|
||||
<HostMonikerRidForFileName>$(HostMonikerRid)</HostMonikerRidForFileName>
|
||||
<HostMonikerRidForFileName Condition=" '$(IsDebianBaseDistro)' == 'true' OR '$(IsRPMBasedDistro)' == 'true' ">$(Architecture)</HostMonikerRidForFileName>
|
||||
|
||||
<ArtifactNameSdk>dotnet-sdk-internal</ArtifactNameSdk>
|
||||
<ArtifactNameCombinedHostHostFxrFrameworkSdk>dotnet-sdk</ArtifactNameCombinedHostHostFxrFrameworkSdk>
|
||||
|
||||
<ArtifactNameWithVersionSdk>$(ArtifactNameSdk)-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionSdk>
|
||||
<ArtifactNameWithVersionMSBuildExtensions>dotnet-standard-support-vs2015-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionMSBuildExtensions>
|
||||
<ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>
|
||||
<DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdkWithoutHostMonikerRid>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)-</DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdkWithoutHostMonikerRid>
|
||||
<DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>$(DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdkWithoutHostMonikerRid)$(HostMonikerRidForFileName)</DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -1,30 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Layout" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildThisFileDirectory)/LinuxDistrosNativeInstaller.props" />
|
||||
|
||||
<Target Name="BuildAndPublishAllLinuxDistrosNativeInstallers" DependsOnTargets="Prepare;ComposeSdk;SetBuildingAndPublishingProps;RunAllSandBoxAndPackage;MultiPublish" />
|
||||
|
||||
|
||||
<Target Name="RunAllSandBoxAndPackage" >
|
||||
<MSBuild Projects="$(MSBuildThisFileDirectory)/SandBoxAndPackageInParallel.proj"
|
||||
Targets="RunInSandBoxAndPackage"
|
||||
Properties="RepoRoot=$(RepoRoot);
|
||||
BuildConfiguration=$(CONFIGURATION);
|
||||
InstallerOutputDirectory=$(InstallerOutputDirectory);
|
||||
" />
|
||||
</Target>
|
||||
|
||||
<Target Name="MultiPublish" DependsOnTargets="AddAllGeneratedInstaller;PublishWithoutPackage" />
|
||||
|
||||
<Target Name="AddAllGeneratedInstaller">
|
||||
<ItemGroup>
|
||||
<GeneratedInstallers Include="$(InstallerOutputDirectory)/$(DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdkWithoutHostMonikerRid)%(LinuxDistrosNeedNativeInstaller.DistroNameInInstaller).%(LinuxDistrosNeedNativeInstaller.InstallerExtension)" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="SetBuildingAndPublishingProps">
|
||||
<PropertyGroup>
|
||||
<IsBuildingAndPublishingAllLinuxDistrosNativeInstallers>true</IsBuildingAndPublishingAllLinuxDistrosNativeInstallers>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,41 +0,0 @@
|
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<CLITargets Condition=" '$(CLITargets)' == '' ">Prepare;ComposeSdk;Test;Package;Publish</CLITargets>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<SkipBuildingInstallers Condition=" '$(SkipBuildingInstallers)' == '' AND
|
||||
($(Rid.StartsWith('rhel.6'))
|
||||
OR $(Rid.StartsWith('freebsd'))
|
||||
OR $(Rid.StartsWith('linux-musl'))
|
||||
OR $(Rid.StartsWith('fedora.27'))
|
||||
OR $(Rid.StartsWith('opensuse.42.3'))
|
||||
OR $(Rid.StartsWith('ubuntu.18.04')))">true</SkipBuildingInstallers>
|
||||
<SkipBuildingInstallers Condition=" '$(SkipBuildingInstallers)' == '' ">false</SkipBuildingInstallers>
|
||||
|
||||
<UsePortableLinuxSharedFramework Condition=" '$(UsePortableLinuxSharedFramework)' == '' AND '$(OSPlatform)' == 'linux' AND '$(Rid)' != 'rhel.6-x64' AND '$(Rid)' != 'linux-musl-x64' ">true</UsePortableLinuxSharedFramework>
|
||||
<IncludeSharedFrameworksForBackwardsCompatibilityTests Condition=" $(IncludeSharedFrameworksForBackwardsCompatibilityTests) == ''
|
||||
AND '$(Rid)' != 'freebsd-x64'
|
||||
AND '$(Rid)' != 'linux-x64'
|
||||
AND '$(Rid)' != 'rhel.6-x64'
|
||||
AND '$(Rid)' != 'linux-musl-x64'
|
||||
AND '$(Rid)' != 'fedora.27-x64'
|
||||
AND '$(Rid)' != 'opensuse.42.3-x64'
|
||||
AND '$(Rid)' != 'ubuntu.18.04-x64'">true</IncludeSharedFrameworksForBackwardsCompatibilityTests>
|
||||
<HighEntropyVA>true</HighEntropyVA>
|
||||
|
||||
<!-- Only use asset target fallback that we set (not implicit one to net461). -->
|
||||
<DisableImplicitAssetTargetFallback>true</DisableImplicitAssetTargetFallback>
|
||||
|
||||
<!-- NU1701: Disable asset target fallback warning globally since it does not work transitively on NoWarn of individual packages -->
|
||||
<!-- Since we disabled the implict fallback to net461, this will only kick in when we have an explicit fallback and we don't need to be warned about it doing what we asked it to do. -->
|
||||
<!-- NU5104: Disable 'A stable release of a package should not have a prerelease dependency' warning globally -->
|
||||
<!-- The "pack" command under 'buildCrossTargeting' for 'Microsoft.DotNet.MSBuildSdkResolver' throws a "NU5104" warning/error while using a "2.1.300" stage0 SDK. For: Linux-x64, Linux-arm, and Linux-arm64 -->
|
||||
<NoWarn>NU1701;NU5104</NoWarn>
|
||||
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<MSBuildTreatWarningsAsErrors>true</MSBuildTreatWarningsAsErrors>
|
||||
|
||||
<!-- https://github.com/dotnet/core-sdk/issues/163 - consider adding WpfAndWinforms to arm -->
|
||||
<IncludeWpfAndWinForms Condition=" '$(IncludeWpfAndWinForms)' == '' AND '$(OS)' == 'Windows_NT' AND !$(Architecture.StartsWith('arm')) ">true</IncludeWpfAndWinForms>
|
||||
<IncludeWpfAndWinForms Condition=" '$(IncludeWpfAndWinForms)' == '' ">false</IncludeWpfAndWinForms>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -1,46 +0,0 @@
|
|||
<Project ToolsVersion="15.0">
|
||||
<Target Name="WriteBuildInfoProps"
|
||||
DependsOnTargets="BuildDotnetCliBuildFramework">
|
||||
|
||||
<GetCurrentRuntimeInformation>
|
||||
<Output TaskParameter="Rid" PropertyName="HostRid" />
|
||||
<Output TaskParameter="OSName" PropertyName="HostOSName" />
|
||||
<Output TaskParameter="OSPlatform" PropertyName="HostOSPlatform" />
|
||||
</GetCurrentRuntimeInformation>
|
||||
|
||||
<PropertyGroup>
|
||||
<IsLinux Condition = " '$(HostOSName)' != 'win' AND '$(HostOSName)' != 'osx' AND '$(HostOSName)' != 'freebsd'">True</IsLinux>
|
||||
<OSName Condition=" '$(OSName)' == '' AND '$(IsLinux)' != 'True' ">$(HostOSName)</OSName>
|
||||
<OSPlatform Condition=" '$(OSPlatform)' == '' AND '$(IsLinux)' != 'True' ">$(HostOSPlatform)</OSPlatform>
|
||||
<OSName Condition=" '$(OSName)' == '' AND '$(IsLinux)' == 'True' ">linux</OSName>
|
||||
<OSPlatform Condition=" '$(OSPlatform)' == '' AND '$(IsLinux)' == 'True' ">linux</OSPlatform>
|
||||
|
||||
<Architecture Condition=" '$(Architecture)' == '' ">x64</Architecture>
|
||||
<Rid Condition=" '$(Rid)' == '' ">$(OSName)-$(Architecture)</Rid>
|
||||
|
||||
<BuildInfoPropsContent>
|
||||
<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>
|
||||
</BuildInfoPropsContent>
|
||||
|
||||
<ExistingBuildInfoPropsContent Condition=" Exists('$(BuildInfoProps)') ">
|
||||
$([System.IO.File]::ReadAllText($(BuildInfoProps)))
|
||||
</ExistingBuildInfoPropsContent>
|
||||
|
||||
<ShouldOverwriteBuildInfoPropsFile>false</ShouldOverwriteBuildInfoPropsFile>
|
||||
<ShouldOverwriteBuildInfoPropsFile
|
||||
Condition=" '$(ExistingBuildInfoPropsContent.Trim())' != '$(BuildInfoPropsContent.Trim())' ">true</ShouldOverwriteBuildInfoPropsFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<WriteLinesToFile File="$(BuildInfoProps)"
|
||||
Lines="$(BuildInfoPropsContent)"
|
||||
Condition=" '$(ShouldOverwriteBuildInfoPropsFile)' == 'true' "
|
||||
Overwrite="true" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,27 +0,0 @@
|
|||
<Project ToolsVersion="15.0" DefaultTargets="ExtractDotnetToolsToOutput">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.tasks))\dir.tasks" />
|
||||
|
||||
<Target Name="ExtractDotnetToolsToOutput"
|
||||
DependsOnTargets="EnsureDotnetToolsRestored">
|
||||
|
||||
<Message Text="Restore DotnetTools $(TemplateFillInPackageName) from $(DotnetToolsNuPkgPath) to $(DotnetToolsLayoutDirectory)."
|
||||
Importance="High" />
|
||||
</Target>
|
||||
|
||||
<Target Name="EnsureDotnetToolsRestored"
|
||||
Condition="!Exists('$(DotnetToolsNuPkgPath)/$(TemplateFillInPackageName.ToLower())')">
|
||||
|
||||
<PropertyGroup>
|
||||
<DotnetToolsRestoreAdditionalParameters>--runtime any /p:RestoreProjectStyle=DotnetToolReference</DotnetToolsRestoreAdditionalParameters>
|
||||
<DotnetToolsRestoreAdditionalParameters>$(DotnetToolsRestoreAdditionalParameters) /p:TargetFramework=$(CliTargetFramework)</DotnetToolsRestoreAdditionalParameters>
|
||||
<DotnetToolsRestoreAdditionalParameters>$(DotnetToolsRestoreAdditionalParameters) /p:TemplateFillInPackageName=$(TemplateFillInPackageName)</DotnetToolsRestoreAdditionalParameters>
|
||||
<DotnetToolsRestoreAdditionalParameters>$(DotnetToolsRestoreAdditionalParameters) /p:TemplateFillInPackageVersion=$(TemplateFillInPackageVersion)</DotnetToolsRestoreAdditionalParameters>
|
||||
<DotnetToolsRestoreAdditionalParameters>$(DotnetToolsRestoreAdditionalParameters) /p:RestorePackagesPath=$(DotnetToolsLayoutDirectory)</DotnetToolsRestoreAdditionalParameters>
|
||||
</PropertyGroup>
|
||||
|
||||
<DotNetRestore ToolPath="$(PreviousStageDirectory)"
|
||||
ProjectPath="$(MSBuildThisFileDirectory)/templates/templates.csproj"
|
||||
AdditionalParameters="$(DotnetToolsRestoreAdditionalParameters)" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,139 +0,0 @@
|
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<CoreSetupRid>$(HostRid)</CoreSetupRid>
|
||||
<CoreSetupRid Condition=" ('$(HostOSName)' == 'win' or '$(HostOSName)' == 'osx') and '$(DotNetBuildFromSource)' != 'true' ">$(HostMonikerRid)</CoreSetupRid>
|
||||
|
||||
<!-- only the runtime OSX .pkgs have a `-internal` suffix -->
|
||||
<InstallerStartSuffix Condition="'$(HostOSName)' == 'osx'">-internal</InstallerStartSuffix>
|
||||
|
||||
<!-- Downloaded Installers + Archives -->
|
||||
<DownloadedRuntimeDepsInstallerFileName Condition=" '$(InstallerExtension)' != '' ">dotnet-runtime-deps-$(SharedHostVersion)-$(CoreSetupRid)$(InstallerExtension)</DownloadedRuntimeDepsInstallerFileName>
|
||||
<DownloadedRuntimeDepsInstallerFile Condition=" '$(InstallerExtension)' != '' ">$(PackagesDirectory)/$(DownloadedRuntimeDepsInstallerFileName)</DownloadedRuntimeDepsInstallerFile>
|
||||
|
||||
<!-- Use the "x64" Rid when downloading Linux shared framework 'DEB' installer files. -->
|
||||
<SharedFrameworkInstallerFileRid>$(CoreSetupRid)</SharedFrameworkInstallerFileRid>
|
||||
<SharedFrameworkInstallerFileRid Condition=" '$(IsDebianBaseDistro)' == 'true' OR '$(IsRPMBasedDistro)' == 'true' ">x64</SharedFrameworkInstallerFileRid>
|
||||
|
||||
<DownloadedSharedHostInstallerFileName Condition=" '$(InstallerExtension)' != '' ">dotnet-host$(InstallerStartSuffix)-$(SharedHostVersion)-$(SharedFrameworkInstallerFileRid)$(InstallerExtension)</DownloadedSharedHostInstallerFileName>
|
||||
<DownloadedSharedHostInstallerFile Condition=" '$(InstallerExtension)' != '' ">$(PackagesDirectory)/$(DownloadedSharedHostInstallerFileName)</DownloadedSharedHostInstallerFile>
|
||||
|
||||
<DownloadedHostFxrInstallerFileName Condition=" '$(InstallerExtension)' != '' ">dotnet-hostfxr$(InstallerStartSuffix)-$(HostFxrVersion)-$(SharedFrameworkInstallerFileRid)$(InstallerExtension)</DownloadedHostFxrInstallerFileName>
|
||||
<DownloadedHostFxrInstallerFile Condition=" '$(InstallerExtension)' != '' ">$(PackagesDirectory)/$(DownloadedHostFxrInstallerFileName)</DownloadedHostFxrInstallerFile>
|
||||
|
||||
<DownloadedSharedFrameworkInstallerFileName Condition=" '$(InstallerExtension)' != '' ">dotnet-runtime$(InstallerStartSuffix)-$(MicrosoftNETCoreAppPackageVersion)-$(SharedFrameworkInstallerFileRid)$(InstallerExtension)</DownloadedSharedFrameworkInstallerFileName>
|
||||
<DownloadedSharedFrameworkInstallerFile Condition=" '$(InstallerExtension)' != '' ">$(PackagesDirectory)/$(DownloadedSharedFrameworkInstallerFileName)</DownloadedSharedFrameworkInstallerFile>
|
||||
|
||||
<DownloadedWinFormsAndWpfSharedFrameworkInstallerFileName Condition=" '$(InstallerExtension)' != '' ">dotnet-extension-$(MicrosoftWindowsDesktopPackageVersion)-$(SharedFrameworkInstallerFileRid)$(InstallerExtension)</DownloadedWinFormsAndWpfSharedFrameworkInstallerFileName>
|
||||
<DownloadedWinFormsAndWpfSharedFrameworkInstallerFile Condition=" '$(InstallerExtension)' != '' ">$(PackagesDirectory)/$(DownloadedWinFormsAndWpfSharedFrameworkInstallerFileName)</DownloadedWinFormsAndWpfSharedFrameworkInstallerFile>
|
||||
|
||||
<!-- Use the portable "linux-x64" Rid when downloading Linux shared framework compressed file. -->
|
||||
<SharedFrameworkRid>$(CoreSetupRid)</SharedFrameworkRid>
|
||||
<SharedFrameworkRid Condition=" '$(ProductMonikerRid)' == 'linux-musl-x64' ">$(ProductMonikerRid)</SharedFrameworkRid>
|
||||
<SharedFrameworkRid Condition=" '$(UsePortableLinuxSharedFramework)' == 'true' ">linux-$(Architecture)</SharedFrameworkRid>
|
||||
<CombinedFrameworkHostCompressedFileName>dotnet-runtime-$(MicrosoftNETCoreAppPackageVersion)-$(SharedFrameworkRid)$(ArchiveExtension)</CombinedFrameworkHostCompressedFileName>
|
||||
|
||||
<AspNetCoreSharedFxInstallerRid>$(SharedFrameworkRid)</AspNetCoreSharedFxInstallerRid>
|
||||
<AspNetCoreSharedFxInstallerRid Condition="'$(SharedFrameworkRid)' == 'rhel.6-x64'">linux-x64</AspNetCoreSharedFxInstallerRid>
|
||||
<AspNetCoreSharedFxArchiveRid>$(AspNetCoreSharedFxInstallerRid)</AspNetCoreSharedFxArchiveRid>
|
||||
<AspNetCoreSharedFxInstallerRid Condition="'$(InstallerExtension)' == '.deb' OR '$(InstallerExtension)' == '.rpm'">x64</AspNetCoreSharedFxInstallerRid>
|
||||
|
||||
<DownloadedAspNetCoreSharedFxInstallerFileName Condition=" '$(InstallerExtension)' != '' AND '$(HostOSName)' != 'osx' ">aspnetcore-runtime-$(AspNetCoreVersion)-$(AspNetCoreSharedFxInstallerRid)$(InstallerExtension)</DownloadedAspNetCoreSharedFxInstallerFileName>
|
||||
<!-- Note: we use the "-internal" archives and installers that contain only the aspnetcore shared framework, and shouldn't overlap with Microsoft.NETCore.App. -->
|
||||
<DownloadedAspNetCoreSharedFxInstallerFileName Condition=" '$(InstallerExtension)' == '.msi' ">aspnetcore-runtime-internal-$(AspNetCoreVersion)-$(AspNetCoreSharedFxInstallerRid).wixlib</DownloadedAspNetCoreSharedFxInstallerFileName>
|
||||
<DownloadedAspNetCoreSharedFxInstallerFile Condition=" '$(InstallerExtension)' != '' AND '$(DownloadedAspNetCoreSharedFxInstallerFileName)' != '' ">$(PackagesDirectory)/$(DownloadedAspNetCoreSharedFxInstallerFileName)</DownloadedAspNetCoreSharedFxInstallerFile>
|
||||
|
||||
<AspNetCoreSharedFxArchiveFileName>aspnetcore-runtime-internal-$(AspNetCoreVersion)-$(AspNetCoreSharedFxArchiveRid)$(ArchiveExtension)</AspNetCoreSharedFxArchiveFileName>
|
||||
<AspNetCoreSharedFxArchiveFile>$(PackagesDirectory)/$(AspNetCoreSharedFxArchiveFileName)</AspNetCoreSharedFxArchiveFile>
|
||||
|
||||
<WinFormsAndWpfSharedFxArchiveFileName>dotnet-extension-$(MicrosoftWindowsDesktopPackageVersion)-$(Architecture)$(ArchiveExtension)</WinFormsAndWpfSharedFxArchiveFileName>
|
||||
<WinFormsAndWpfSharedFxArchiveFile>$(PackagesDirectory)/$(WinFormsAndWpfSharedFxArchiveFileName)</WinFormsAndWpfSharedFxArchiveFile>
|
||||
|
||||
<!-- Used to detect if ASP.NET Core is built against the same version of Microsoft.NETCore.App. -->
|
||||
<AspNetCoreSharedFxBaseRuntimeVersionFileName>aspnetcore_base_runtime.version</AspNetCoreSharedFxBaseRuntimeVersionFileName>
|
||||
<AspNetCoreSharedFxBaseRuntimeVersionFile Condition=" '$(AspNetCoreSharedFxBaseRuntimeVersionFileName)' != '' ">$(PackagesDirectory)/$(AspNetCoreSharedFxBaseRuntimeVersionFileName)</AspNetCoreSharedFxBaseRuntimeVersionFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<CoreSetupRootUrl>$(CoreSetupBlobRootUrl)Runtime/</CoreSetupRootUrl>
|
||||
<AspNetCoreSharedFxRootUrl>$(CoreSetupBlobRootUrl)aspnetcore/Runtime/</AspNetCoreSharedFxRootUrl>
|
||||
<WinFormsAndWpfSharedFxRootUrl>$(DotnetExtensionsBlobRootUrl)dotnet-extensions/</WinFormsAndWpfSharedFxRootUrl>
|
||||
<CoreSetupDownloadDirectory>$(IntermediateDirectory)/coreSetupDownload/$(MicrosoftNETCoreAppPackageVersion)</CoreSetupDownloadDirectory>
|
||||
<CombinedSharedHostAndFrameworkArchive>$(CoreSetupDownloadDirectory)/combinedSharedHostAndFrameworkArchive$(ArchiveExtension)</CombinedSharedHostAndFrameworkArchive>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<_DownloadAndExtractItem Include="CombinedSharedHostAndFrameworkArchive"
|
||||
Condition="!Exists('$(CombinedSharedHostAndFrameworkArchive)')">
|
||||
<Url>$(CoreSetupRootUrl)$(MicrosoftNETCoreAppPackageVersion)/$(CombinedFrameworkHostCompressedFileName)$(CoreSetupBlobAccessTokenParam)</Url>
|
||||
<DownloadFileName>$(CombinedSharedHostAndFrameworkArchive)</DownloadFileName>
|
||||
<ExtractDestination>$(SharedFrameworkPublishDirectory)</ExtractDestination>
|
||||
</_DownloadAndExtractItem>
|
||||
|
||||
<_DownloadAndExtractItem Include="DownloadedRuntimeDepsInstallerFile"
|
||||
Condition="('$(IsDebianBaseDistro)' == 'true' OR '$(IsRPMBasedDistro)' == 'true') And '$(SkipBuildingInstallers)' != 'true' And !Exists('$(DownloadedRuntimeDepsInstallerFile)') And '$(InstallerExtension)' != '' And !$(Architecture.StartsWith('arm'))">
|
||||
<Url>$(CoreSetupRootUrl)$(MicrosoftNETCoreAppPackageVersion)/$(DownloadedRuntimeDepsInstallerFileName)$(CoreSetupBlobAccessTokenParam)</Url>
|
||||
<DownloadFileName>$(DownloadedRuntimeDepsInstallerFile)</DownloadFileName>
|
||||
<ExtractDestination></ExtractDestination>
|
||||
</_DownloadAndExtractItem>
|
||||
|
||||
<_DownloadAndExtractItem Include="DownloadedSharedFrameworkInstallerFile"
|
||||
Condition="'$(SkipBuildingInstallers)' != 'true' And !Exists('$(DownloadedSharedFrameworkInstallerFile)') And '$(InstallerExtension)' != '' And !$(Architecture.StartsWith('arm'))">
|
||||
<Url>$(CoreSetupRootUrl)$(MicrosoftNETCoreAppPackageVersion)/$(DownloadedSharedFrameworkInstallerFileName)$(CoreSetupBlobAccessTokenParam)</Url>
|
||||
<DownloadFileName>$(DownloadedSharedFrameworkInstallerFile)</DownloadFileName>
|
||||
<ExtractDestination></ExtractDestination>
|
||||
</_DownloadAndExtractItem>
|
||||
|
||||
<_DownloadAndExtractItem Include="DownloadedSharedHostInstallerFile"
|
||||
Condition="'$(SkipBuildingInstallers)' != 'true' And !Exists('$(DownloadedSharedHostInstallerFile)') And '$(InstallerExtension)' != '' And !$(Architecture.StartsWith('arm'))">
|
||||
<Url>$(CoreSetupRootUrl)$(SharedHostVersion)/$(DownloadedSharedHostInstallerFileName)$(CoreSetupBlobAccessTokenParam)</Url>
|
||||
<DownloadFileName>$(DownloadedSharedHostInstallerFile)</DownloadFileName>
|
||||
<ExtractDestination></ExtractDestination>
|
||||
</_DownloadAndExtractItem>
|
||||
|
||||
<_DownloadAndExtractItem Include="DownloadedHostFxrInstallerFile"
|
||||
Condition="'$(SkipBuildingInstallers)' != 'true' And !Exists('$(DownloadedHostFxrInstallerFile)') And '$(InstallerExtension)' != '' And !$(Architecture.StartsWith('arm'))">
|
||||
<Url>$(CoreSetupRootUrl)$(HostFxrVersion)/$(DownloadedHostFxrInstallerFileName)$(CoreSetupBlobAccessTokenParam)</Url>
|
||||
<DownloadFileName>$(DownloadedHostFxrInstallerFile)</DownloadFileName>
|
||||
<ExtractDestination></ExtractDestination>
|
||||
</_DownloadAndExtractItem>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(IncludeAspNetCoreRuntime)' != 'false' ">
|
||||
<_DownloadAndExtractItem Include="AspNetCoreSharedFxArchiveFile"
|
||||
Condition="!Exists('$(AspNetCoreSharedFxArchiveFile)')">
|
||||
<Url>$(AspNetCoreSharedFxRootUrl)$(AspNetCoreVersion)/$(AspNetCoreSharedFxArchiveFileName)$(CoreSetupBlobAccessTokenParam)</Url>
|
||||
<DownloadFileName>$(AspNetCoreSharedFxArchiveFile)</DownloadFileName>
|
||||
<ExtractDestination>$(AspNetCoreSharedFxPublishDirectory)</ExtractDestination>
|
||||
</_DownloadAndExtractItem>
|
||||
|
||||
<_DownloadAndExtractItem Include="DownloadedAspNetCoreSharedFxInstallerFile"
|
||||
Condition="'$(SkipBuildingInstallers)' != 'true' AND '$(DownloadedAspNetCoreSharedFxInstallerFile)' != '' AND !Exists($(DownloadedAspNetCoreSharedFxInstallerFile)) And '$(InstallerExtension)' != '' And !$(Architecture.StartsWith('arm'))">
|
||||
<Url>$(AspNetCoreSharedFxRootUrl)$(AspNetCoreVersion)/$(DownloadedAspNetCoreSharedFxInstallerFileName)$(CoreSetupBlobAccessTokenParam)</Url>
|
||||
<DownloadFileName>$(DownloadedAspNetCoreSharedFxInstallerFile)</DownloadFileName>
|
||||
<ExtractDestination></ExtractDestination>
|
||||
</_DownloadAndExtractItem>
|
||||
|
||||
<_DownloadAndExtractItem Include="AspNetCoreSharedFxBaseRuntimeVersionFile"
|
||||
Condition="!Exists('$(AspNetCoreSharedFxBaseRuntimeVersionFile)') And !$(Architecture.StartsWith('arm'))">
|
||||
<Url>$(AspNetCoreSharedFxRootUrl)$(AspNetCoreVersion)/$(AspNetCoreSharedFxBaseRuntimeVersionFileName)$(CoreSetupBlobAccessTokenParam)</Url>
|
||||
<DownloadFileName>$(AspNetCoreSharedFxBaseRuntimeVersionFile)</DownloadFileName>
|
||||
<ExtractDestination></ExtractDestination>
|
||||
</_DownloadAndExtractItem>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(IncludeWpfAndWinForms)' != 'false' ">
|
||||
<_DownloadAndExtractItem Include="WinFormsAndWpfSharedFxArchiveFile"
|
||||
Condition="!Exists('$(WinFormsAndWpfSharedFxArchiveFile)')">
|
||||
<Url>$(WinFormsAndWpfSharedFxRootUrl)$(MicrosoftWindowsDesktopPackageVersion)/$(WinFormsAndWpfSharedFxArchiveFileName)$(CoreSetupBlobAccessTokenParam)</Url>
|
||||
<DownloadFileName>$(WinFormsAndWpfSharedFxArchiveFile)</DownloadFileName>
|
||||
<ExtractDestination>$(WinFormsAndWpfSharedFxPublishDirectory)/shared</ExtractDestination>
|
||||
</_DownloadAndExtractItem>
|
||||
|
||||
<_DownloadAndExtractItem Include="DownloadedWinFormsAndWpfSharedFrameworkInstallerFile"
|
||||
Condition="'$(SkipBuildingInstallers)' != 'true' And !Exists('$(DownloadedWinFormsAndWpfSharedFrameworkInstallerFile)') And '$(InstallerExtension)' != '' And !$(Architecture.StartsWith('arm'))">
|
||||
<Url>$(WinFormsAndWpfSharedFxRootUrl)$(MicrosoftWindowsDesktopPackageVersion)/$(DownloadedWinFormsAndWpfSharedFrameworkInstallerFileName)$(CoreSetupBlobAccessTokenParam)</Url>
|
||||
<DownloadFileName>$(DownloadedWinFormsAndWpfSharedFrameworkInstallerFile)</DownloadFileName>
|
||||
<ExtractDestination></ExtractDestination>
|
||||
</_DownloadAndExtractItem>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,36 +0,0 @@
|
|||
<Project ToolsVersion="15.0" DefaultTargets="CopyTemplateToOutput">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.tasks))\dir.tasks" />
|
||||
|
||||
<Target Name="CopyTemplateToOutput"
|
||||
DependsOnTargets="PrepareBundledTemplateProps;
|
||||
EnsureTemplateRestored;
|
||||
GetTemplateItemsToCopy"
|
||||
Inputs="@(TemplateContent)"
|
||||
Outputs="@(TemplateContent->'$(TemplateLayoutDirectory)/%(RecursiveDir)%(FileName)%(Extension)')">
|
||||
<Copy SourceFiles="@(TemplateContent)"
|
||||
DestinationFiles="@(TemplateContent->'$(TemplateLayoutDirectory)/%(RecursiveDir)%(FileName)%(Extension)')" />
|
||||
|
||||
<Message Text="Copied template $(TemplateFillInPackageName) from $(TemplateNuPkgPath) to $(TemplateLayoutDirectory)."
|
||||
Importance="High" />
|
||||
</Target>
|
||||
|
||||
<Target Name="GetTemplateItemsToCopy">
|
||||
<ItemGroup>
|
||||
<TemplateContent Include="$(TemplateNuPkgPath)/$(TemplateFillInPackageName.ToLower()).$(TemplateFillInPackageVersion.ToLower()).nupkg" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="EnsureTemplateRestored"
|
||||
Condition="!Exists('$(TemplateNuPkgPath)/$(TemplateFillInPackageName.ToLower()).nuspec')">
|
||||
<DotNetRestore ToolPath="$(PreviousStageDirectory)"
|
||||
ProjectPath="$(MSBuildThisFileDirectory)/templates/templates.csproj"
|
||||
AdditionalParameters="/p:TargetFramework=netcoreapp1.0 /p:TemplateFillInPackageName=$(TemplateFillInPackageName) /p:TemplateFillInPackageVersion=$(TemplateFillInPackageVersion)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="PrepareBundledTemplateProps">
|
||||
<PropertyGroup>
|
||||
<TemplateNuPkgPath>$(NuGetPackagesDir)/$(TemplateFillInPackageName.ToLower())/$(TemplateFillInPackageVersion.ToLower())</TemplateNuPkgPath>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,21 +0,0 @@
|
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ToolsetCompressedFileName>dotnet-toolset-internal-$(ToolsetVersion).zip</ToolsetCompressedFileName>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<ToolsetRootUrl>$(CoreSetupBlobRootUrl)Toolset/$(ToolsetVersion)/</ToolsetRootUrl>
|
||||
<ToolsetDownloadUrl>$(ToolsetRootUrl)$(ToolsetCompressedFileName)$(CoreSetupBlobAccessTokenParam)</ToolsetDownloadUrl>
|
||||
<ToolsetDownloadDirectory>$(IntermediateDirectory)/toolsetDownload/$(ToolsetVersion)/</ToolsetDownloadDirectory>
|
||||
<ToolsetArchive>$(ToolsetDownloadDirectory)$(ToolsetCompressedFileName)</ToolsetArchive>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<_DownloadAndExtractItem Include="ToolsetArchive"
|
||||
Condition="!Exists('$(ToolsetArchive)')">
|
||||
<Url>$(ToolsetDownloadUrl)</Url>
|
||||
<DownloadFileName>$(ToolsetArchive)</DownloadFileName>
|
||||
<ExtractDestination>$(ToolsetPublishDirectory)</ExtractDestination>
|
||||
</_DownloadAndExtractItem>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -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
|
|
|
@ -1,13 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(RepoRoot)/build/MSBuildExtensions.targets" />
|
||||
|
||||
<PropertyGroup>
|
||||
<PublishDir>$(SdkOutputDirectory)</PublishDir>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="ComposeSdk" DependsOnTargets="Prepare">
|
||||
<MSBuild Projects="$(SrcDirectory)/redist/redist.csproj"
|
||||
Targets="Publish" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,17 +0,0 @@
|
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<RuntimeNETCoreAppPackageName>runtime.$(SharedFrameworkRid).microsoft.netcore.app</RuntimeNETCoreAppPackageName>
|
||||
<_crossDir Condition="'$(Architecture)' == 'arm64'">/x64_arm64</_crossDir>
|
||||
<_crossDir Condition="'$(Architecture)' == 'arm' And '$(OSName)' == 'win'">/x86_arm</_crossDir>
|
||||
<_crossDir Condition="'$(Architecture)' == 'arm' And '$(OSName)' == 'linux'">/x64_arm</_crossDir>
|
||||
<CrossgenPath>$(NuGetPackagesDir)/$(RuntimeNETCoreAppPackageName)/$(MicrosoftNETCoreAppPackageVersion)/tools$(_crossDir)/crossgen$(ExeExtension)</CrossgenPath>
|
||||
<LibCLRJitRid Condition="!$(Architecture.StartsWith('arm'))">$(SharedFrameworkRid)</LibCLRJitRid>
|
||||
<LibCLRJitRid Condition="'$(Architecture)' == 'arm64'">x64_arm64</LibCLRJitRid>
|
||||
<LibCLRJitRid Condition="'$(Architecture)' == 'arm' And '$(OSName)' == 'win'">x86_arm</LibCLRJitRid>
|
||||
<LibCLRJitRid Condition="'$(Architecture)' == 'arm' And '$(OSName)' == 'linux'">x64_arm</LibCLRJitRid>
|
||||
<LibCLRJitPath>$(NuGetPackagesDir)/$(RuntimeNETCoreAppPackageName)/$(MicrosoftNETCoreAppPackageVersion)/runtimes/$(LibCLRJitRid)/native/$(DynamicLibPrefix)clrjit$(DynamicLibExtension)</LibCLRJitPath>
|
||||
<SharedFrameworkNameVersionPath>$(OutputDirectory)/shared/$(SharedFrameworkName)/$(MicrosoftNETCoreAppPackageVersion)</SharedFrameworkNameVersionPath>
|
||||
<DIASymReaderCrossgenFilter>*</DIASymReaderCrossgenFilter>
|
||||
<DIASymReaderCrossgenFilter Condition="'$(rid)' == 'win-arm'">x86</DIASymReaderCrossgenFilter>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -1,8 +0,0 @@
|
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<IsDebianBaseDistro Condition=" '$(HostOSName)' == 'ubuntu' OR '$(HostOSName)' == 'debian' ">true</IsDebianBaseDistro>
|
||||
<IsRPMBasedDistro Condition=" $(HostRid.StartsWith('rhel')) AND '$(HostRid)' != 'rhel.6-x64' ">true</IsRPMBasedDistro>
|
||||
<PublishNativeInstallers Condition=" '$(IslinuxPortable)' != 'true' AND '$(HostRid)' != 'rhel.6-x64' AND '$(HostRid)' != 'linux-musl-x64'">true</PublishNativeInstallers>
|
||||
<PublishArchives Condition=" '$(IslinuxPortable)' == 'true' OR ('$(IsDebianBaseDistro)' != 'true' AND '$(IsRPMBasedDistro)' != 'true') ">true</PublishArchives>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -1,11 +0,0 @@
|
|||
<Project ToolsVersion="15.0">
|
||||
<Target Name="DownloadPackageVersionsProps"
|
||||
DependsOnTargets="BuildDotnetCliBuildFramework">
|
||||
|
||||
<Message Importance="High" Text="Overriding repository dependency versions with $(PB_PackageVersionPropsUrl)"
|
||||
Condition=" '$(PB_PackageVersionPropsUrl)' != '' " />
|
||||
<DownloadFile Uri="$(PB_PackageVersionPropsUrl)$(CoreSetupBlobAccessTokenParam)"
|
||||
DestinationPath="$(OrchestratedPackageVersionsProps)"
|
||||
Condition=" '$(PB_PackageVersionPropsUrl)' != '' " />
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,30 +0,0 @@
|
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ArchiveExtension Condition=" '$(HostOSName)' == 'win' ">.zip</ArchiveExtension>
|
||||
<ArchiveExtension Condition=" '$(HostOSName)' != 'win' ">.tar.gz</ArchiveExtension>
|
||||
|
||||
<InstallerExtension Condition=" '$(HostOSName)' == 'win' ">.msi</InstallerExtension>
|
||||
<InstallerExtension Condition=" '$(HostOSName)' == 'osx' ">.pkg</InstallerExtension>
|
||||
<InstallerExtension Condition=" '$(IsDebianBaseDistro)' == 'true' ">.deb</InstallerExtension>
|
||||
<InstallerExtension Condition=" '$(IsRPMBasedDistro)' == true ">.rpm</InstallerExtension>
|
||||
|
||||
<BundleExtension Condition=" '$(HostOSName)' == 'win' ">.exe</BundleExtension>
|
||||
<BundleExtension Condition=" '$(HostOSName)' == 'osx' ">$(InstallerExtension)</BundleExtension>
|
||||
<BundleExtension Condition=" '$(IsDebianBaseDistro)' == 'true' ">$(InstallerExtension)</BundleExtension>
|
||||
<BundleExtension Condition=" '$(IsRPMBasedDistro)' == true ">$(InstallerExtension)</BundleExtension>
|
||||
|
||||
<DynamicLibPrefix>lib</DynamicLibPrefix>
|
||||
<DynamicLibPrefix Condition=" '$(HostOSName)' == 'win' "></DynamicLibPrefix>
|
||||
|
||||
<DynamicLibExtension>.so</DynamicLibExtension>
|
||||
<DynamicLibExtension Condition=" '$(HostOSName)' == 'win' ">.dll</DynamicLibExtension>
|
||||
<DynamicLibExtension Condition=" '$(HostOSName)' == 'osx' ">.dylib</DynamicLibExtension>
|
||||
|
||||
<ExeExtension>.exe</ExeExtension>
|
||||
<ExeExtension Condition=" '$(OS)' != 'Windows_NT' "></ExeExtension>
|
||||
|
||||
<PlatformScriptExtension Condition=" '$(OS)' == 'Windows_NT' ">.ps1</PlatformScriptExtension>
|
||||
<PlatformScriptExtension Condition=" '$(OS)' != 'Windows_NT' ">.sh</PlatformScriptExtension>
|
||||
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -1,49 +0,0 @@
|
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<UsingTask TaskName="GenerateResxSource" AssemblyFile="$(CLIBuildDll)" />
|
||||
|
||||
<Target Name="GenerateResxSource"
|
||||
BeforeTargets="CoreCompile"
|
||||
DependsOnTargets="PrepareResourceNames;
|
||||
GetEmbeddedResourcesWithSourceGeneration;
|
||||
BatchGenerateResxSource">
|
||||
<ItemGroup>
|
||||
<GeneratedResxSource Include="@(EmbeddedResourceSG->'%(SourceOutputPath)')" />
|
||||
<FileWrites Include="@(GeneratedResxSource)" />
|
||||
<Compile Include="@(GeneratedResxSource)" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="CustomizeResourceNames"
|
||||
BeforeTargets="PrepareResourceNames;GatherXlf"
|
||||
>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Condition="'%(EmbeddedResource.Namespace)' != ''">
|
||||
<ManifestResourceName>%(EmbeddedResource.Namespace).%(EmbeddedResource.Filename)</ManifestResourceName>
|
||||
</EmbeddedResource>
|
||||
<XlfSource Condition="'%(XlfSource.Namespace)' != ''">
|
||||
<ManifestResourceName>%(XlfSource.Namespace).%(XlfSource.Filename)</ManifestResourceName>
|
||||
<XlfTranslatedFileName>%(XlfSource.Namespace).%(XlfSource.Filename)</XlfTranslatedFileName>
|
||||
</XlfSource>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="BatchGenerateResxSource"
|
||||
Inputs="@(EmbeddedResourceSG)"
|
||||
Outputs="%(EmbeddedResourceSG.SourceOutputPath)"
|
||||
>
|
||||
<GenerateResxSource ResxFile="%(EmbeddedResourceSG.FullPath)"
|
||||
ResourceName="%(EmbeddedResourceSG.ManifestResourceName)"
|
||||
SourceOutputPath="%(EmbeddedResourceSG.SourceOutputPath)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="GetEmbeddedResourcesWithSourceGeneration">
|
||||
<ItemGroup>
|
||||
<EmbeddedResourceSG Include="@(EmbeddedResource)" Condition="'%(EmbeddedResource.GenerateSource)' == 'true' and '%(EmbeddedResource.XlfLanguage)' == ''" />
|
||||
<EmbeddedResourceSG>
|
||||
<SourceOutputPath>$(IntermediateOutputPath)%(EmbeddedResourceSG.ManifestResourceName).cs</SourceOutputPath>
|
||||
</EmbeddedResourceSG>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
</Project>
|
|
@ -1,50 +0,0 @@
|
|||
<Project ToolsVersion="15.0">
|
||||
<Target Name="WriteGitCommitInfoProps">
|
||||
<Exec Command="git rev-list --count HEAD"
|
||||
ConsoleToMSBuild="true"
|
||||
Condition=" '$(GitInfoCommitCount)' == '' ">
|
||||
<Output TaskParameter="ConsoleOutput" PropertyName="GitInfoCommitCount" />
|
||||
</Exec>
|
||||
|
||||
<Exec Command="git rev-parse HEAD"
|
||||
ConsoleToMSBuild="true"
|
||||
Condition=" '$(GitInfoCommitHash)' == '' ">
|
||||
<Output TaskParameter="ConsoleOutput" PropertyName="GitInfoCommitHash" />
|
||||
</Exec>
|
||||
|
||||
<ItemGroup>
|
||||
<GitInfoCommitCountLines Include="$(GitInfoCommitCount)" />
|
||||
<GitInfoCommitHashLines Include="$(GitInfoCommitHash)" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Batching in GitInfoCommitCount and GitInfoCommitHash here ensures that the property contains only the last line of the output -->
|
||||
<GitInfoCommitCount>%(GitInfoCommitCountLines.Identity)</GitInfoCommitCount>
|
||||
<GitInfoCommitCount>$(GitInfoCommitCount.PadLeft(6,'0'))</GitInfoCommitCount>
|
||||
|
||||
<GitInfoCommitHash>%(GitInfoCommitHashLines.Identity)</GitInfoCommitHash>
|
||||
|
||||
<GitCommitInfoPropsContent>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<CommitCount>$(GitInfoCommitCount)</CommitCount>
|
||||
<CommitHash>$(GitInfoCommitHash)</CommitHash>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
</GitCommitInfoPropsContent>
|
||||
|
||||
<ExistingGitCommitInfoProps Condition=" Exists('$(GitCommitInfoProps)') ">
|
||||
$([System.IO.File]::ReadAllText($(GitCommitInfoProps)))
|
||||
</ExistingGitCommitInfoProps>
|
||||
|
||||
<ShouldOverwriteGitCommitInfoPropsFile>false</ShouldOverwriteGitCommitInfoPropsFile>
|
||||
<ShouldOverwriteGitCommitInfoPropsFile
|
||||
Condition=" '$(ExistingGitCommitInfoProps.Trim())' != '$(GitCommitInfoPropsContent.Trim())' ">true</ShouldOverwriteGitCommitInfoPropsFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<WriteLinesToFile File="$(GitCommitInfoProps)"
|
||||
Lines="$(GitCommitInfoPropsContent)"
|
||||
Condition=" '$(ShouldOverwriteGitCommitInfoPropsFile)' == 'true' "
|
||||
Overwrite="true" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,26 +0,0 @@
|
|||
<Project ToolsVersion="15.0">
|
||||
<Target Name="WriteHostInfoProps"
|
||||
Condition=" !Exists('$(HostInfoProps)') "
|
||||
DependsOnTargets="BuildDotnetCliBuildFramework">
|
||||
|
||||
<GetCurrentRuntimeInformation>
|
||||
<Output TaskParameter="Rid" PropertyName="HostRid" />
|
||||
<Output TaskParameter="OSName" PropertyName="HostOSName" />
|
||||
</GetCurrentRuntimeInformation>
|
||||
|
||||
<PropertyGroup>
|
||||
<HostInfoPropsContent>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<HostRid>$(HostRid)</HostRid>
|
||||
<HostOSName>$(HostOSName)</HostOSName>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
</HostInfoPropsContent>
|
||||
</PropertyGroup>
|
||||
|
||||
<WriteLinesToFile File="$(HostInfoProps)"
|
||||
Lines="$(HostInfoPropsContent)"
|
||||
Overwrite="true" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,11 +0,0 @@
|
|||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<RelativeGeneratedPropsDir>bin/obj</RelativeGeneratedPropsDir>
|
||||
<GeneratedPropsDir>$(RepoRoot)/$(RelativeGeneratedPropsDir)</GeneratedPropsDir>
|
||||
<GitCommitInfoProps>$(GeneratedPropsDir)/GitCommitInfo.props</GitCommitInfoProps>
|
||||
<HostInfoProps>$(GeneratedPropsDir)/HostInfo.props</HostInfoProps>
|
||||
<BuildInfoProps>$(GeneratedPropsDir)/BuildInfo.props</BuildInfoProps>
|
||||
<OrchestratedPackageVersionsProps>$(GeneratedPropsDir)/OrchestratedPackageVersionsProps.props</OrchestratedPackageVersionsProps>
|
||||
<GeneratedNuGetConfig>$(RepoRoot)/NuGet.Config</GeneratedNuGetConfig>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -1,15 +0,0 @@
|
|||
<Project ToolsVersion="15.0">
|
||||
<Target Name="WriteDynamicPropsToStaticPropsFiles"
|
||||
DependsOnTargets="WriteNugetConfigFile;
|
||||
BuildDotnetCliBuildFramework;
|
||||
EnsureGeneratedPropsDirectory;
|
||||
WriteGitCommitInfoProps;
|
||||
WriteHostInfoProps;
|
||||
WriteBuildInfoProps;
|
||||
DownloadPackageVersionsProps"/>
|
||||
|
||||
<Target Name="EnsureGeneratedPropsDirectory">
|
||||
<MakeDir Condition=" !Exists('$(GeneratedPropsDir)') "
|
||||
Directories="$(GeneratedPropsDir)" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,7 +0,0 @@
|
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<DotnetCliBuildDirectory>$(RepoRoot)/build_projects/dotnet-cli-build</DotnetCliBuildDirectory>
|
||||
<SrcDirectory>$(RepoRoot)/src</SrcDirectory>
|
||||
<TestDirectory>$(RepoRoot)/test/</TestDirectory>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -1,14 +0,0 @@
|
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<InstallerOutputDirectory>$(PackagesDirectory)</InstallerOutputDirectory>
|
||||
<SdkInstallerFile>$(InstallerOutputDirectory)/$(ArtifactNameWithVersionSdk)$(InstallerExtension)</SdkInstallerFile>
|
||||
<MSBuildExtensionsInstallerFile>$(InstallerOutputDirectory)/$(ArtifactNameWithVersionMSBuildExtensions)$(InstallerExtension)</MSBuildExtensionsInstallerFile>
|
||||
<CombinedFrameworkSdkHostInstallerFile>$(InstallerOutputDirectory)/$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(BundleExtension)</CombinedFrameworkSdkHostInstallerFile>
|
||||
|
||||
<SdkDebianIntermediateDirectory>$(IntermediateDirectory)/debian/sdk</SdkDebianIntermediateDirectory>
|
||||
<LayoutDirectory Condition=" '$(OSName)' == 'ubuntu' OR '$(OSName)' == 'debian' ">$(SdkDebianIntermediateDirectory)/debianLayoutDirectory</LayoutDirectory>
|
||||
<LayoutDirectory Condition=" '$(OSName)' != 'ubuntu' AND '$(OSName)' != 'debian' ">$(IntermediateDirectory)/layouts</LayoutDirectory>
|
||||
<SdkLayoutOutputDirectory>$(LayoutDirectory)/$(ArtifactNameSdk)</SdkLayoutOutputDirectory>
|
||||
<MSBuildExtensionsOutputDirectory>$(LayoutDirectory)/MSBuildExtensions</MSBuildExtensionsOutputDirectory>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -1,14 +0,0 @@
|
|||
<Project>
|
||||
<ItemGroup>
|
||||
<LinuxDistrosNeedNativeInstaller Include="debian.8-x64">
|
||||
<DockerFolder>debian</DockerFolder>
|
||||
<InstallerExtension>deb</InstallerExtension>
|
||||
<DistroNameInInstaller>x64</DistroNameInInstaller>
|
||||
</LinuxDistrosNeedNativeInstaller>
|
||||
<LinuxDistrosNeedNativeInstaller Include="rhel.7-x64">
|
||||
<DockerFolder>rhel</DockerFolder>
|
||||
<InstallerExtension>rpm</InstallerExtension>
|
||||
<DistroNameInInstaller>x64</DistroNameInInstaller>
|
||||
</LinuxDistrosNeedNativeInstaller>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,8 +0,0 @@
|
|||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<PropertyGroup>
|
||||
<NuGetPackagesDir Condition=" '$(NuGetPackagesDir)' == '' ">$(RepoRoot)/.nuget/packages</NuGetPackagesDir>
|
||||
|
||||
<MicroBuildPropsAndTargetsPath>$(NuGetPackagesDir)/microbuild.core/$(MicroBuildCorePackageVersion)/build/</MicroBuildPropsAndTargetsPath>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -1,39 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Test" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<UsingTask TaskName="AddMetadataIsPE" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="ChangeEntryPointLibraryName" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="CheckIfAllBuildsHavePublished" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="ChMod" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="CopyBlobsToLatest" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="CreateAzureContainer" AssemblyFile="$(CLIBuildDll)"/>
|
||||
<UsingTask TaskName="Crossgen" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="DotNetBuild" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="DotNetBuildPJ" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="DotNetMSBuild" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="DotNetNew" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="DotNetPack" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="DotNetPublish" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="DotNetRestore" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="DotNetRestorePJ" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="DotNetTest" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="DownloadFile" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="GenerateChecksums" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="GenerateGuidFromName" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="GenerateMSBuildExtensionsSWR" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="GenerateMsiVersion" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="GenerateNuGetPackagesArchiveVersion" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="GetCurrentRuntimeInformation" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="GetUseBundledNETCoreAppPackageVersionAsDefaultNetCorePatchVersion" AssemblyFile="$(CLIBuildDll)"/>
|
||||
<UsingTask TaskName="MakeRelative" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="RemoveAssetFromDepsPackages" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="ReplaceFileContents" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="SetBlobPropertiesBasedOnFileType" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="SetEnvVar" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="TarGzFileCreateFromDirectory" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="TarGzFileExtractToDirectory" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="WriteVersionToVersionsRepo" AssemblyFile="$(CLIBuildDll)"/>
|
||||
<UsingTask TaskName="UploadToAzure" AssemblyFile="$(CLIBuildDll)"/>
|
||||
<UsingTask TaskName="UploadToLinuxPackageRepository" AssemblyFile="$(CLIBuildDll)"/>
|
||||
<UsingTask TaskName="ZipFileCreateFromDirectory" AssemblyFile="$(CLIBuildDll)"/>
|
||||
<UsingTask TaskName="ZipFileExtractToDirectory" AssemblyFile="$(CLIBuildDll)"/>
|
||||
</Project>
|
|
@ -1,72 +0,0 @@
|
|||
<Project ToolsVersion="15.0">
|
||||
<Target Name="WriteNugetConfigFile">
|
||||
|
||||
<ItemGroup>
|
||||
<NugetConfigPrivateFeeds Include="$(ExternalRestoreSources.Split(';'))" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<NugetConfigHeader>
|
||||
<![CDATA[
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
|
||||
<clear />
|
||||
]]>
|
||||
</NugetConfigHeader>
|
||||
|
||||
<NugetConfigCLIFeeds>
|
||||
<![CDATA[
|
||||
<add key="BlobFeed" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
|
||||
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
|
||||
<add key="aspnetcore-release" value="https://dotnet.myget.org/F/aspnetcore-release/api/v3/index.json" />
|
||||
<add key="aspnetcore-dev" value="https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json" />
|
||||
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
|
||||
<add key="dotnet-buildtools" value="https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json" />
|
||||
<add key="templating" value="https://dotnet.myget.org/F/templating/api/v3/index.json" />
|
||||
<add key="websdk" value="https://dotnet.myget.org/F/dotnet-web/api/v3/index.json" />
|
||||
<add key="roslyn" value="https://dotnet.myget.org/f/roslyn/api/v3/index.json" />
|
||||
<add key="nuget-build" value="https://dotnet.myget.org/F/nuget-build/api/v3/index.json" />
|
||||
<add key="dotnet-cli" value="https://dotnet.myget.org/F/dotnet-cli/api/v3/index.json" />
|
||||
<add key="container-tools" value="https://www.myget.org/F/container-tools-for-visual-studio/api/v3/index.json" />
|
||||
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
|
||||
<add key="linux-musl-bootstrap-feed" value="https://dotnetfeed.blob.core.windows.net/orchestrated-release-2-1/20180420-03/aspnet-inputs/index.json" />
|
||||
<add key="dotnet-msbuild" value="https://dotnet.myget.org/F/msbuild/api/v3/index.json" />
|
||||
<add key="myget-vstest" value="https://dotnet.myget.org/F/vstest/api/v3/index.json" />
|
||||
<add key="BlobFeed-2.1.3-runtime" value="https://dotnetfeed.blob.core.windows.net/orchestrated-release-2-1/20180725-02/final/index.json"/>
|
||||
]]>
|
||||
</NugetConfigCLIFeeds>
|
||||
|
||||
<NugetConfigSuffix>
|
||||
<![CDATA[
|
||||
</packageSources>
|
||||
<disabledPackageSources>
|
||||
<clear/>
|
||||
</disabledPackageSources>
|
||||
</configuration>
|
||||
]]>
|
||||
</NugetConfigSuffix>
|
||||
|
||||
</PropertyGroup>
|
||||
|
||||
<WriteLinesToFile File="$(GeneratedNuGetConfig)"
|
||||
Lines="$(NugetConfigHeader)"
|
||||
Overwrite="true" />
|
||||
|
||||
<WriteLinesToFile Condition="'$(ExternalRestoreSources)' != ''"
|
||||
File="$(GeneratedNuGetConfig)"
|
||||
Lines="<add key="PrivateBlobFeed%(NugetConfigPrivateFeeds.Identity)" value="%(NugetConfigPrivateFeeds.Identity)" />"
|
||||
Overwrite="false" />
|
||||
|
||||
<WriteLinesToFile Condition="'$(DotNetBuildOffline)' != 'true'"
|
||||
File="$(GeneratedNuGetConfig)"
|
||||
Lines="$(NugetConfigCLIFeeds)"
|
||||
Overwrite="false" />
|
||||
|
||||
<WriteLinesToFile File="$(GeneratedNuGetConfig)"
|
||||
Lines="$(NugetConfigSuffix)"
|
||||
Overwrite="false" />
|
||||
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,33 +0,0 @@
|
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<CliBuildStage Condition="'$(CliBuildStage)' == '' And '$(CliOuterBuildStage)' != ''">$([MSBuild]::Add($(CliOuterBuildStage), '1'))</CliBuildStage>
|
||||
<CliBuildStage Condition="'$(CliBuildStage)' == ''">2</CliBuildStage>
|
||||
|
||||
<!-- BaseOutputDirectory is the root output path for this stage and RID
|
||||
BaseOutputPath is the project-specific output folder that each project builds into.
|
||||
This is not confusing at all. -->
|
||||
<BaseOutputDirectory>$(RepoRoot)/bin/$(CliBuildStage)/$(Rid)</BaseOutputDirectory>
|
||||
<BaseOutputPath>$([System.IO.Path]::GetFullPath('$(BaseOutputDirectory)/bin/$(MSBuildProjectName)'))</BaseOutputPath>
|
||||
|
||||
<BaseIntermediateOutputPath>$([System.IO.Path]::GetFullPath('$(BaseOutputDirectory)/obj/$(MSBuildProjectName)'))</BaseIntermediateOutputPath>
|
||||
<OutputDirectory>$(BaseOutputDirectory)/dotnet</OutputDirectory>
|
||||
<Stage2WithBackwardsCompatibleRuntimesOutputDirectory>$(BaseOutputDirectory)/dotnetWithBackwardsCompatibleRuntimes</Stage2WithBackwardsCompatibleRuntimesOutputDirectory>
|
||||
<SdkOutputDirectory>$(OutputDirectory)/sdk/$(SdkVersion)</SdkOutputDirectory>
|
||||
<SymbolsDirectory>$(BaseOutputDirectory)/symbols</SymbolsDirectory>
|
||||
<RoslynDirectory>$(SdkOutputDirectory)/Roslyn</RoslynDirectory>
|
||||
<FSharpDirectory>$(SdkOutputDirectory)/FSharp</FSharpDirectory>
|
||||
<CompilationDirectory>$(BaseOutputDirectory)/compilation</CompilationDirectory>
|
||||
<IntermediateDirectory>$(BaseOutputDirectory)/int</IntermediateDirectory>
|
||||
<PackagesDirectory>$(BaseOutputDirectory)/packages</PackagesDirectory>
|
||||
<SharedFrameworkPublishDirectory>$(IntermediateDirectory)/sharedFrameworkPublish</SharedFrameworkPublishDirectory>
|
||||
<ToolsetPublishDirectory>$(IntermediateDirectory)/toolsetPublish</ToolsetPublishDirectory>
|
||||
<AspNetCoreSharedFxPublishDirectory>$(IntermediateDirectory)/aspnetSharedFxPublish</AspNetCoreSharedFxPublishDirectory>
|
||||
<WinFormsAndWpfSharedFxPublishDirectory>$(IntermediateDirectory)/winFormsAndWpfSharedFxPublish</WinFormsAndWpfSharedFxPublishDirectory>
|
||||
<BackwardsCompatibleSharedFrameworksPublishDirectory>$(IntermediateDirectory)/backwardsCompatibleSharedFrameworksPublish</BackwardsCompatibleSharedFrameworksPublishDirectory>
|
||||
<TestOutputDir>$(BaseOutputDirectory)/test/</TestOutputDir>
|
||||
<DotnetInOutputDirectory>$(OutputDirectory)/dotnet$(ExeExtension)</DotnetInOutputDirectory>
|
||||
<GeneratedMSBuildExtensionsDirectory>$(IntermediateDirectory)/GeneratedMSBuildExtensions</GeneratedMSBuildExtensionsDirectory>
|
||||
<MSBuildExtensionsLayoutDirectory>$(IntermediateDirectory)/MSBuildExtensionsLayout</MSBuildExtensionsLayoutDirectory>
|
||||
<NextStagePropsPath>$(BaseOutputDirectory)/PreviousStage.props</NextStagePropsPath>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -1,36 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Layout" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildThisFileDirectory)/package/Layout.targets" />
|
||||
<Import Project="$(MSBuildThisFileDirectory)/package/Symbols.targets" />
|
||||
<Import Project="$(MSBuildThisFileDirectory)/package/Archive.targets" />
|
||||
<Import Project="$(MSBuildThisFileDirectory)/package/LinuxNativeInstallerDependencyVersions.targets" />
|
||||
<Import Project="$(MSBuildThisFileDirectory)/package/Installer.DEB.proj" />
|
||||
<Import Project="$(MSBuildThisFileDirectory)/package/Installer.MSI.targets" />
|
||||
<Import Project="$(MSBuildThisFileDirectory)/package/Installer.PKG.targets" />
|
||||
<Import Project="$(MSBuildThisFileDirectory)/package/Installer.RPM.targets" />
|
||||
<Import Project="$(MSBuildThisFileDirectory)/package/CopySandBoxPackageOut.targets" />
|
||||
|
||||
<Target Name="GenerateInstallers"
|
||||
Condition=" '$(SkipBuildingInstallers)' != 'true' And !$(Architecture.StartsWith('arm')) "
|
||||
DependsOnTargets="Prepare;
|
||||
Layout;
|
||||
GeneratePkgs;
|
||||
GenerateDebs;
|
||||
GenerateMsis;
|
||||
GenerateRpms" />
|
||||
|
||||
<Target Name="Package"
|
||||
DependsOnTargets="BuildDotnetCliBuildFramework;
|
||||
Init;
|
||||
Layout;
|
||||
GenerateArchives;
|
||||
GenerateInstallers" />
|
||||
|
||||
<Target Name="GenerateInstallersAndCopyOutOfSandBox"
|
||||
DependsOnTargets="SandBoxPrepare;
|
||||
Layout;
|
||||
GenerateDebs;
|
||||
GenerateRpms;
|
||||
CopySandBoxPackageOut" />
|
||||
|
||||
</Project>
|
|
@ -1,153 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="Microsoft.DotNet.Cli.tasks" />
|
||||
<Import Project="prepare/CheckPrereqs.targets" />
|
||||
|
||||
<Target Name="Prepare"
|
||||
DependsOnTargets="Init;DownloadHostAndSharedFxArtifacts;DownloadToolsetArtifacts;RestoreSrcPackages;RestoreToolsPackages;IsolateArtifactsFromDirectoryBuildFiles;CreatePropsForNextStage" />
|
||||
|
||||
<Target Name="Init"
|
||||
DependsOnTargets="PrintBuildInfo;
|
||||
SetTelemetryProfile;
|
||||
BuildDotnetCliBuildFramework;
|
||||
CheckPrereqs;">
|
||||
</Target>
|
||||
|
||||
<Target Name="SandBoxPrepare"
|
||||
DependsOnTargets="PrintBuildInfo;
|
||||
CheckPrereqs;
|
||||
DownloadHostAndSharedFxArtifacts;
|
||||
IsolateArtifactsFromDirectoryBuildFiles;
|
||||
CreatePropsForNextStage">
|
||||
</Target>
|
||||
|
||||
<Target Name="PrintBuildInfo">
|
||||
<Message Text="Host info - Rid: $(HostRid), OSName: $(HostOSName)" Importance="High" />
|
||||
<Message Text="Build info - Rid: $(Rid), Architecture: $(Architecture), OSName: $(OSName)" Importance="High" />
|
||||
<Message Text="If you intended to use a different Rid, Architecture, or OSName run the following command to generate your build state:" Importance="High" />
|
||||
<Message Text="dotnet msbuild build.proj /p:Architecture=Architecture /p:Rid=Rid /p:OSName=OSName /p:GeneratePropsFile=true /t:WriteDynamicPropsToStaticPropsFiles" Importance="High" />
|
||||
</Target>
|
||||
|
||||
<Target Name="SetTelemetryProfile"
|
||||
DependsOnTargets="BuildDotnetCliBuildFramework" >
|
||||
<SetEnvVar Name="DOTNET_CLI_TELEMETRY_PROFILE" Value="$(DOTNET_CLI_TELEMETRY_PROFILE);https://github.com/dotnet/cli;$(CommitHash)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="DownloadHostAndSharedFxArtifacts">
|
||||
|
||||
<PropertyGroup>
|
||||
<OverwriteExtractionDestination>%(_DownloadAndExtractItem.OverwriteDestination)</OverwriteExtractionDestination>
|
||||
<OverwriteExtractionDestination Condition="'$(OverwriteExtractionDestination)' == ''">True</OverwriteExtractionDestination>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<DownloadFile Condition=" '@(_DownloadAndExtractItem)' != '' And '%(_DownloadAndExtractItem.Local)' != 'true'"
|
||||
Uri="%(_DownloadAndExtractItem.Url)"
|
||||
DestinationPath="%(_DownloadAndExtractItem.DownloadFileName)" />
|
||||
|
||||
<Copy Condition=" '@(_DownloadAndExtractItem)' != '' And '%(_DownloadAndExtractItem.Local)' == 'true'"
|
||||
SourceFiles="%(_DownloadAndExtractItem.Url)"
|
||||
DestinationFiles="%(_DownloadAndExtractItem.DownloadFileName)" />
|
||||
|
||||
|
||||
<ZipFileExtractToDirectory Condition=" '%(_DownloadAndExtractItem.ExtractDestination)' != '' AND $([System.String]::new('%(_DownloadAndExtractItem.DownloadFileName)').EndsWith('.zip')) "
|
||||
SourceArchive="%(_DownloadAndExtractItem.DownloadFileName)"
|
||||
DestinationDirectory="%(_DownloadAndExtractItem.ExtractDestination)"
|
||||
OverwriteDestination="$(OverwriteExtractionDestination)" />
|
||||
|
||||
<TarGzFileExtractToDirectory Condition=" '%(_DownloadAndExtractItem.ExtractDestination)' != '' AND $([System.String]::new('%(_DownloadAndExtractItem.DownloadFileName)').EndsWith('.tar.gz')) "
|
||||
SourceArchive="%(_DownloadAndExtractItem.DownloadFileName)"
|
||||
DestinationDirectory="%(_DownloadAndExtractItem.ExtractDestination)"
|
||||
OverwriteDestination="$(OverwriteExtractionDestination)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="DownloadToolsetArtifacts">
|
||||
</Target>
|
||||
|
||||
<Target Name="RestoreSrcPackages"
|
||||
DependsOnTargets="SetupRestoreSrcPackagesInputsOutputs;Init"
|
||||
Inputs="@(RestoreSrcPackagesInput)"
|
||||
Outputs="@(RestoreSrcPackagesInput->'%(RelativeDir)/obj/project.assets.json');@(RestoreSrcPackagesInput->'%(RelativeDir)/obj/%(Filename).csproj.nuget.g.props');@(RestoreSrcPackagesInput->'%(RelativeDir)/obj/%(Filename).csproj.nuget.g.targets')">
|
||||
|
||||
<CallTarget Targets="CleanSrcLockFiles" />
|
||||
|
||||
<DotNetRestore ToolPath="$(PreviousStageDirectory)"
|
||||
ProjectPath=""%(RestoreSrcPackagesInput.FullPath)"" />
|
||||
|
||||
</Target>
|
||||
|
||||
<Target Name="CleanSrcLockFiles" >
|
||||
<ItemGroup>
|
||||
<SrcLockFiles Include="$(RepoRoot)/src/**/project.assets.json;$(RepoRoot)/src/**/*.csproj.nuget.g.props;$(RepoRoot)/src/**/*.csproj.nuget.g.targets" />
|
||||
</ItemGroup>
|
||||
<Delete Files="@(SrcLockFiles)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="SetupRestoreSrcPackagesInputsOutputs">
|
||||
<ItemGroup>
|
||||
<RestoreSrcPackagesInput Include="$(RepoRoot)/src/**/*.csproj" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="RestoreToolsPackages"
|
||||
DependsOnTargets="SetupRestoreToolsPackagesInputsOutputs;Init"
|
||||
Inputs="@(RestoreToolsPackagesInput)"
|
||||
Outputs="@(RestoreToolsPackagesInput->'%(RelativeDir)/obj/project.assets.json');@(RestoreToolsPackagesInput->'%(RelativeDir)/obj/%(Filename).csproj.nuget.g.props');@(RestoreToolsPackagesInput->'%(RelativeDir)/obj/%(Filename).csproj.nuget.g.targets')">
|
||||
|
||||
<CallTarget Targets="CleanToolsLockFiles" />
|
||||
|
||||
<DotNetRestore ToolPath="$(PreviousStageDirectory)"
|
||||
ProjectPath=""%(RestoreToolsPackagesInput.FullPath)""
|
||||
AdditionalParameters="/p:UsePortableLinuxSharedFramework=$(UsePortableLinuxSharedFramework)" />
|
||||
|
||||
</Target>
|
||||
|
||||
<Target Name="CleanToolsLockFiles" >
|
||||
<ItemGroup>
|
||||
<ToolsLockFiles Include="$(RepoRoot)/tools/**/project.assets.json;$(RepoRoot)/tools/**/*.csproj.nuget.g.props;$(RepoRoot)/tools/**/*.csproj.nuget.g.targets" />
|
||||
</ItemGroup>
|
||||
<Delete Files="@(ToolsLockFiles)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="SetupRestoreToolsPackagesInputsOutputs">
|
||||
<ItemGroup>
|
||||
<RestoreToolsPackagesInput Include="$(RepoRoot)/tools/**/*.csproj" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="IsolateArtifactsFromDirectoryBuildFiles">
|
||||
<Copy SourceFiles="$(RepoRoot)TestAssets\Directory.Build.props"
|
||||
DestinationFolder ="$(RepoRoot)bin"
|
||||
SkipUnchangedFiles="true" />
|
||||
</Target>
|
||||
|
||||
<Target Name="CreatePropsForNextStage">
|
||||
<PropertyGroup>
|
||||
|
||||
<NextStagePropsContent>
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<PreviousStageDirectory>$(OutputDirectory)</PreviousStageDirectory>
|
||||
<PreviousStageDotnet>$(DotnetInOutputDirectory)</PreviousStageDotnet>
|
||||
<CliOuterBuildStage>$(CliBuildStage)</CliOuterBuildStage>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
</NextStagePropsContent>
|
||||
|
||||
<ExistingNextStagePropsContent Condition=" Exists('$(NextStagePropsPath)') ">
|
||||
$([System.IO.File]::ReadAllText($(NextStagePropsPath)))
|
||||
</ExistingNextStagePropsContent>
|
||||
|
||||
<ShouldOverwriteNextStagePropsFile>false</ShouldOverwriteNextStagePropsFile>
|
||||
<ShouldOverwriteNextStagePropsFile
|
||||
Condition=" '$(ExistingNextStagePropsContent.Trim())' != '$(NextStagePropsContent.Trim())' ">true</ShouldOverwriteNextStagePropsFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<WriteLinesToFile File="$(NextStagePropsPath)"
|
||||
Lines="$(NextStagePropsContent)"
|
||||
Condition=" '$(ShouldOverwriteNextStagePropsFile)' == 'true' "
|
||||
Overwrite="true" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,95 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Condition=" '$(GeneratePropsFile)' != 'true' " Project="$(NuGetPackagesDir)/microsoft.dotnet.build.tasks.feed/$(BuildTasksFeedToolVersion)/build/Microsoft.DotNet.Build.Tasks.Feed.targets" />
|
||||
<Import Project="$(MSBuildThisFileDirectory)/publish/FinishBuild.targets" />
|
||||
<Import Project="$(MSBuildThisFileDirectory)/publish/PublishContent.targets" />
|
||||
<Import Project="$(MSBuildThisFileDirectory)/publish/Badge.targets" />
|
||||
<Import Project="$(MSBuildThisFileDirectory)/publish/Checksum.targets" />
|
||||
<Import Project="$(MSBuildThisFileDirectory)/publish/RuntimeCoherence.targets" />
|
||||
|
||||
<!-- PUBLISH_TO_AZURE_BLOB env variable set by CI -->
|
||||
<Target Name="Publish"
|
||||
Condition=" '$(PUBLISH_TO_AZURE_BLOB)' == 'true' "
|
||||
DependsOnTargets="Init;
|
||||
SetBadgeProps;
|
||||
Package;
|
||||
EvaluateRuntimeCoherence;
|
||||
PublishArtifacts;
|
||||
FinishBuild" />
|
||||
|
||||
<Target Name="PublishWithoutPackage"
|
||||
Condition=" '$(PUBLISH_TO_AZURE_BLOB)' == 'true' "
|
||||
DependsOnTargets="Init;
|
||||
SetBadgeProps;
|
||||
EvaluateRuntimeCoherence;
|
||||
PublishArtifacts;
|
||||
FinishBuild" />
|
||||
|
||||
<!-- UploadToAzure target comes from Build Tools -->
|
||||
<Target Name="PublishArtifacts"
|
||||
DependsOnTargets="GenerateVersionBadge;
|
||||
GenerateCoherentBadge;
|
||||
GatherItemsForPattern;
|
||||
GenerateChecksums;
|
||||
UploadArtifactsToAzure;
|
||||
UploadChecksumsToAzure;
|
||||
PublishCliVersionBadge" />
|
||||
|
||||
<Target Name="GatherItemsForPattern">
|
||||
<ItemGroup>
|
||||
<ForPublishing Include="@(GeneratedInstallers)"
|
||||
Condition=" '$(PublishNativeInstallers)' == 'true' "/>
|
||||
<ForPublishing Include="%(GenerateArchivesInputsOutputs.Outputs)"
|
||||
Condition=" '$(PublishArchives)' == 'true' "/>
|
||||
<ForPublishing Include="$(PackagesDirectory)/runtime.*.Microsoft.DotNet.SDK.*.symbols.nupkg" />
|
||||
<ForPublishing Include="$(PackagesDirectory)/VS.Redist.Common.Net.Core.SDK.$(Architecture).*.nupkg"
|
||||
Condition=" '$(OS)' == 'Windows_NT' "/>
|
||||
<!-- Disabling this for now because we don't have the MSBuildExtensions available. -->
|
||||
<!--
|
||||
<ForPublishing Include="$(PackagesDirectory)/VS.Redist.Common.Net.Core.SDK.MSBuildExtensions.*.nupkg"
|
||||
Condition=" '$(OS)' == 'Windows_NT' And '$(Architecture)' == 'x64' "/>
|
||||
<ForPublishing Include="$(PackagesDirectory)/VS.Redist.Common.Net.Core.SDK.MSBuildExtensions.swr"
|
||||
Condition=" '$(OS)' == 'Windows_NT' And '$(Architecture)' == 'x64' "/>
|
||||
-->
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ForPublishing>
|
||||
<RelativeBlobPath>$(BlobStoragePartialRelativePath)/$(FullNugetVersion)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath>
|
||||
<ManifestArtifactData>ShipInstaller=dotnetcli</ManifestArtifactData>
|
||||
</ForPublishing>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="PublishCliVersionBadge">
|
||||
<Error Condition="'$(ArtifactCloudDropAccessToken)' == ''" Text="Missing property ArtifactCloudDropAccessToken." />
|
||||
<Error Condition="'$(ArtifactCloudDropURL)' == ''" Text="Missing property ArtifactCloudDropURL." />
|
||||
|
||||
<ItemGroup>
|
||||
<CliVersionBadgeToUpload Include="$(VersionBadge)" />
|
||||
<CliVersionBadgeToUpload Include="$(CoherentBadge)"
|
||||
Condition=" '$(Coherent)' == 'true' And !$(Architecture.StartsWith('arm')) " />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<CliVersionBadgeToUpload>
|
||||
<RelativeBlobPath>$(BlobStoragePartialRelativePath)/$(FullNugetVersion)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath>
|
||||
<ManifestArtifactData>ShipInstaller=dotnetcli</ManifestArtifactData>
|
||||
</CliVersionBadgeToUpload>
|
||||
</ItemGroup>
|
||||
|
||||
<Message Text="Publish badges to blob feed started: $(ArtifactCloudDropURL)" />
|
||||
<PushToBlobFeed ExpectedFeedUrl="$(ArtifactCloudDropURL)"
|
||||
AccountKey="$(ArtifactCloudDropAccessToken)"
|
||||
ItemsToPush="@(CliVersionBadgeToUpload)"
|
||||
ManifestBranch="$(BranchName)"
|
||||
ManifestBuildId="$(FullNugetVersion)"
|
||||
ManifestCommit="$(CommitHash)"
|
||||
ManifestName="$(BuildName)"
|
||||
ManifestBuildData="ProductVersion=$(FullNugetVersion)"
|
||||
Overwrite="false"
|
||||
PublishFlatContainer="true"
|
||||
SkipCreateManifest="$(IsNotOrchestratedPublish)" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
|
@ -1,46 +0,0 @@
|
|||
<Project ToolsVersion="15.0" DefaultTargets="EnsureDependencyRestored;CopySdkToOutput">
|
||||
<!-- workaround for https://github.com/Microsoft/msbuild/issues/885 -->
|
||||
<!-- renaming the property because the original property is a global property and therefore
|
||||
cannot be redefined at runtime. -->
|
||||
<PropertyGroup>
|
||||
<CLIBuildDllPath>$([MSBuild]::Unescape($(CLIBuildDll)))</CLIBuildDllPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<UsingTask TaskName="DotNetRestore" AssemblyFile="$(CLIBuildDllPath)" />
|
||||
|
||||
<Target Name="CopySdkToOutput"
|
||||
DependsOnTargets="PrepareBundledDependencyProps;
|
||||
EnsureDependencyRestored;
|
||||
GetSdkItemsToCopy"
|
||||
Condition="'$(SdkLayoutDirectory)' != ''"
|
||||
Inputs="@(SdkContent)"
|
||||
Outputs="@(SdkContent->'$(SdkLayoutDirectory)/%(RecursiveDir)%(FileName)%(Extension)')">
|
||||
<Copy SourceFiles="@(SdkContent)"
|
||||
DestinationFiles="@(SdkContent->'$(SdkLayoutDirectory)/%(RecursiveDir)%(FileName)%(Extension)')" />
|
||||
|
||||
<Message Text="Copied Sdk $(DependencyPackageName) from $(DependencyNuPkgPath) to $(SdkLayoutDirectory)."
|
||||
Importance="High" />
|
||||
</Target>
|
||||
|
||||
<Target Name="GetSdkItemsToCopy">
|
||||
<ItemGroup>
|
||||
<SdkContent Include="$(DependencyNuPkgPath)/**/*"
|
||||
Exclude="$(DependencyNuPkgPath)/$(DependencyPackageName).nuspec;
|
||||
$(DependencyNuPkgPath)/$(DependencyPackageName).$(DependencyPackageVersion).nupkg;
|
||||
$(DependencyNuPkgPath)/$(DependencyPackageName).$(DependencyPackageVersion).nupkg.sha512" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="EnsureDependencyRestored"
|
||||
Condition="!Exists('$(DependencyNuPkgPath)/$(DependencyPackageName.ToLower()).nuspec')">
|
||||
<DotNetRestore ToolPath="$(PreviousStageDirectory)"
|
||||
ProjectPath="$(MSBuildThisFileDirectory)/sdks/sdks.csproj"
|
||||
AdditionalParameters="/p:DependencyPackageName=$(DependencyPackageName) /p:DependencyPackageVersion=$(DependencyPackageVersion)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="PrepareBundledDependencyProps">
|
||||
<PropertyGroup>
|
||||
<DependencyNuPkgPath>$(NuGetPackagesDir)/$(DependencyPackageName.ToLower())/$(DependencyPackageVersion.ToLower())</DependencyNuPkgPath>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,79 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Layout" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(RepoRoot)/Directory.Build.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<SandBoxFolderName>bin/WorkingCopy</SandBoxFolderName>
|
||||
<RelativeSandBoxPackageOutputFolder>$(SandBoxFolderName)/RelativeSandBoxPackageOutputFolder</RelativeSandBoxPackageOutputFolder>
|
||||
<SandBoxRepoRoot>$(RepoRoot)/$(SandBoxFolderName)/$(LinuxDistrosNeedNativeInstaller)</SandBoxRepoRoot>
|
||||
<NugetCacheFolderName>.nuget</NugetCacheFolderName>
|
||||
<RelativeCompileOutputPath>bin/2</RelativeCompileOutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<MirrorOfRepoRootForTools Include="$(RepoRoot)/**/*.*" Exclude="$(RepoRoot)/$(SandBoxFolderName)/**/*.*;$(RepoRoot)/nuget/**/*.*;$(RepoRoot)/bin/**/*.*" />
|
||||
<ArtifactsToPackage Include="$(RepoRoot)/$(RelativeCompileOutputPath)/$(Rid)/**/*.*"/>
|
||||
<LocalDirectoryBuildpropsToPreventFurtherLookUpForIt Include="$(RepoRoot)/bin/Directory.Build.props"/>
|
||||
<ToolsCacheToSpeedUp Include="$(RepoRoot)/$(RelativeCLIBuildBinaries)/**/*.*"/>
|
||||
<NugetCacheToSpeedUp Include="$(RepoRoot)/$(NugetCacheFolderName)/**/*.*" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="SandBoxAndPackage" DependsOnTargets="PackageWithDocker;CopyPackageResult"/>
|
||||
|
||||
<Target Name="PrepareSandBox" >
|
||||
<Copy
|
||||
SourceFiles="@(MirrorOfRepoRootForTools)"
|
||||
DestinationFiles="@(MirrorOfRepoRootForTools -> '$(SandBoxRepoRoot)/%(RecursiveDir)%(Filename)%(Extension)')"/>
|
||||
|
||||
<Exec Command="sh -c 'cd $(SandBoxRepoRoot) && git clean -fxd'"/>
|
||||
|
||||
<Copy
|
||||
SourceFiles="@(ArtifactsToPackage)"
|
||||
DestinationFiles="@(ArtifactsToPackage -> '$(SandBoxRepoRoot)/$(RelativeCompileOutputPath)/$(Rid)/%(RecursiveDir)%(Filename)%(Extension)')"/>
|
||||
|
||||
<Copy
|
||||
SourceFiles="@(LocalDirectoryBuildpropsToPreventFurtherLookUpForIt)"
|
||||
DestinationFiles="@(LocalDirectoryBuildpropsToPreventFurtherLookUpForIt -> '$(SandBoxRepoRoot)/$(RelativeCompileOutputPath)/$(Rid)/%(RecursiveDir)%(Filename)%(Extension)')"/>
|
||||
|
||||
<Copy
|
||||
SourceFiles="@(ToolsCacheToSpeedUp)"
|
||||
DestinationFiles="@(ToolsCacheToSpeedUp -> '$(SandBoxRepoRoot)/$(RelativeCLIBuildBinaries)/%(RecursiveDir)%(Filename)%(Extension)')"/>
|
||||
|
||||
<Copy
|
||||
SourceFiles="@(NugetCacheToSpeedUp)"
|
||||
DestinationFiles="@(NugetCacheToSpeedUp -> '$(SandBoxRepoRoot)/$(NugetCacheFolderName)/%(RecursiveDir)%(Filename)%(Extension)')"/>
|
||||
|
||||
</Target>
|
||||
|
||||
<Target Name="PackageWithDocker" DependsOnTargets="PrepareSandBox">
|
||||
<PropertyGroup>
|
||||
<CommandToInvokeBuildScriptInDockerToPackageInSandBox>$(SandBoxRepoRoot)/build.sh</CommandToInvokeBuildScriptInDockerToPackageInSandBox>
|
||||
<CommandToInvokeBuildScriptInDockerToPackageInSandBox>$(CommandToInvokeBuildScriptInDockerToPackageInSandBox) --configuration $(CONFIGURATION)</CommandToInvokeBuildScriptInDockerToPackageInSandBox>
|
||||
<CommandToInvokeBuildScriptInDockerToPackageInSandBox>$(CommandToInvokeBuildScriptInDockerToPackageInSandBox) --docker $(DockerFolder)</CommandToInvokeBuildScriptInDockerToPackageInSandBox>
|
||||
<CommandToInvokeBuildScriptInDockerToPackageInSandBox>$(CommandToInvokeBuildScriptInDockerToPackageInSandBox) --skip-prereqs</CommandToInvokeBuildScriptInDockerToPackageInSandBox>
|
||||
<CommandToInvokeBuildScriptInDockerToPackageInSandBox>$(CommandToInvokeBuildScriptInDockerToPackageInSandBox) /t:GenerateInstallersAndCopyOutOfSandBox</CommandToInvokeBuildScriptInDockerToPackageInSandBox>
|
||||
<CommandToInvokeBuildScriptInDockerToPackageInSandBox>$(CommandToInvokeBuildScriptInDockerToPackageInSandBox) /p:RelativeSandBoxPackageOutputFolder=$(RelativeSandBoxPackageOutputFolder)</CommandToInvokeBuildScriptInDockerToPackageInSandBox>
|
||||
<CommandExitCodeFirstTime>0</CommandExitCodeFirstTime>
|
||||
<PipeStderrToStdoutToCatchFirstFailure>2>&1</PipeStderrToStdoutToCatchFirstFailure>
|
||||
</PropertyGroup>
|
||||
|
||||
<Exec Command="$(CommandToInvokeBuildScriptInDockerToPackageInSandBox) $(PipeStderrToStdoutToCatchFirstFailure)" ContinueOnError="WarnAndContinue">
|
||||
<Output TaskParameter="ExitCode" PropertyName="CommandExitCodeFirstTime"/>
|
||||
</Exec>
|
||||
|
||||
<PropertyGroup>
|
||||
<ShouldRetryDueToFirstTimeFailed Condition=" '$(CommandExitCodeFirstTime)' != '0' ">true</ShouldRetryDueToFirstTimeFailed>
|
||||
</PropertyGroup>
|
||||
|
||||
<Exec Condition=" '$(ShouldRetryDueToFirstTimeFailed)' == 'true' " Command="$(CommandToInvokeBuildScriptInDockerToPackageInSandBox)" />
|
||||
</Target >
|
||||
|
||||
<Target Name="CopyPackageResult">
|
||||
<ItemGroup>
|
||||
<SandboxPackageResultFiles Include="$(SandBoxRepoRoot)/$(RelativeSandBoxPackageOutputFolder)/**/*.*"/>
|
||||
</ItemGroup>
|
||||
<Copy
|
||||
SourceFiles="@(SandboxPackageResultFiles)"
|
||||
DestinationFolder="$(InstallerOutputDirectory)/%(RecursiveDir)"/>
|
||||
</Target >
|
||||
</Project>
|
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Layout" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<Import Project="$(MSBuildThisFileDirectory)/LinuxDistrosNativeInstaller.props" />
|
||||
|
||||
<Target Name="RunInSandBoxAndPackage">
|
||||
<MSBuild Projects="$(MSBuildThisFileDirectory)/SandBoxAndPackage.proj"
|
||||
Targets="SandBoxAndPackage"
|
||||
Properties="RepoRoot=$(RepoRoot);
|
||||
LinuxDistrosNeedNativeInstaller=%(LinuxDistrosNeedNativeInstaller.Identity);
|
||||
DockerFolder=%(LinuxDistrosNeedNativeInstaller.DockerFolder);
|
||||
BuildConfiguration=$(CONFIGURATION);
|
||||
InstallerOutputDirectory=$(InstallerOutputDirectory);
|
||||
BuildInParallel='true'" />
|
||||
</Target >
|
||||
</Project>
|
|
@ -1,13 +0,0 @@
|
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(PreviousStageProps)' == ''">
|
||||
<PreviousStageDirectory>$(RepoRoot)/.dotnet_stage0/$(Architecture)</PreviousStageDirectory>
|
||||
<PreviousStageDotnet>$(PreviousStageDirectory)/dotnet$(ExeExtension)</PreviousStageDotnet>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(PreviousStageProps)" Condition="'$(PreviousStageProps)' != ''" />
|
||||
|
||||
<PropertyGroup>
|
||||
<IsDesktopAvailable>False</IsDesktopAvailable>
|
||||
<IsDesktopAvailable Condition=" '$(OSName)' == 'win' ">True</IsDesktopAvailable>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -1,115 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project InitialTargets="SetSigningProperties" DefaultTargets="SignFiles" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- The signing infrastructure runs using MSBuild 14, which doesn't support some of the new syntax we're using. So set the BuildingSingingProject
|
||||
property here to avoid importing files we don't need for signing which would cause errors if imported when using MSBuild 14. -->
|
||||
<BuildingSigningProject>true</BuildingSigningProject>
|
||||
<ExternalCertificateId Condition="'$(ExternalCertificateId)' == ''">135020001</ExternalCertificateId>
|
||||
<InternalCertificateId Condition="'$(InternalCertificateId)' == ''">Microsoft402</InternalCertificateId>
|
||||
<NugetCertificateId Condition="'$(NugetCertificateId)' == ''">NuGet</NugetCertificateId>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="..\dir.props" />
|
||||
<Import Project="MicroBuild.props" />
|
||||
<Import Project="$(MicroBuildPropsAndTargetsPath)MicroBuild.Core.props" />
|
||||
|
||||
<!-- This will be overridden if we're building with MicroBuild. -->
|
||||
<Target Name="SignFiles">
|
||||
<Message Text="Fake sign target. Would sign: @(FilesToSign)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="SetSigningProperties">
|
||||
<Error Condition="'$(Rid)' == ''" Text="Missing required property 'Rid'." />
|
||||
<PropertyGroup>
|
||||
<!-- The OutDir and IntermediateOutputPath properties are required by MicroBuild. MicroBuild only
|
||||
signs files that are under these paths. -->
|
||||
<OutDir Condition="'$(OutDir)' == ''">$(BaseOutputDirectory)</OutDir>
|
||||
<IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">$(IntermediateDirectory)</IntermediateOutputPath>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="PostCompileSign" DependsOnTargets="GetPostCompileSignFiles;SignFiles" />
|
||||
|
||||
<Target Name="GetPostCompileSignFiles">
|
||||
<ItemGroup>
|
||||
<!-- External files -->
|
||||
<FilesToSign Include="$(OutputDirectory)/sdk/**/Newtonsoft.Json.dll;
|
||||
$(OutputDirectory)/shared/**/libuv.dll">
|
||||
<Authenticode>$(ExternalCertificateId)</Authenticode>
|
||||
</FilesToSign>
|
||||
<!-- Built binaries -->
|
||||
<FilesToSign Include="$(OutputDirectory)/sdk/**/csc.exe;
|
||||
$(OutputDirectory)/sdk/**/csc.dll;
|
||||
$(OutputDirectory)/sdk/**/VBCSCompiler.dll;
|
||||
$(OutputDirectory)/sdk/**/vbc.exe;
|
||||
$(OutputDirectory)/sdk/**/vbc.dll;
|
||||
$(OutputDirectory)/sdk/**/fsc.exe;
|
||||
$(OutputDirectory)/sdk/**/fsi.exe;
|
||||
$(OutputDirectory)/sdk/**/FSharp.*.dll;
|
||||
$(OutputDirectory)/sdk/**/dotnet.dll;
|
||||
$(OutputDirectory)/sdk/**/dotnet.resources.dll;
|
||||
$(OutputDirectory)/sdk/**/System.*.dll;
|
||||
$(OutputDirectory)/sdk/**/Microsoft.*.dll;
|
||||
$(OutputDirectory)/sdk/**/NuGet*.dll;
|
||||
$(OutputDirectory)/sdk/**/datacollector.dll;
|
||||
$(OutputDirectory)/sdk/**/datacollector.exe;
|
||||
$(OutputDirectory)/sdk/**/MSBuild.dll;
|
||||
$(OutputDirectory)/sdk/**/MSBuild.resources.dll;
|
||||
$(OutputDirectory)/sdk/**/testhost.dll;
|
||||
$(OutputDirectory)/sdk/**/testhost.exe;
|
||||
$(OutputDirectory)/sdk/**/testhost.x86.exe;
|
||||
$(OutputDirectory)/sdk/**/vstest.console.dll;
|
||||
$(OutputDirectory)/sdk/**/vstest.console.resources.dll">
|
||||
<Authenticode>$(InternalCertificateId)</Authenticode>
|
||||
</FilesToSign>
|
||||
<!-- Built files for the packages -->
|
||||
<FilesToSign Include="$(CompilationDirectory)/forPackaging/**/*dotnet*.dll;
|
||||
$(CompilationDirectory)/forPackaging/**/Microsoft.Extensions.DependencyModel.dll;
|
||||
$(CompilationDirectory)/forPackaging/**/Microsoft.Extensions.Testing.Abstractions.dll">
|
||||
<Authenticode>$(InternalCertificateId)</Authenticode>
|
||||
</FilesToSign>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<!-- Keeping this target around so as not to break existing build definitions. -->
|
||||
<Target Name="SignNuPkgContents" />
|
||||
|
||||
<!-- Keeping this target around so as not to break existing build definitions. -->
|
||||
<Target Name="SignSdkResolverContents" />
|
||||
|
||||
<Target Name="SignMsiAndCab" DependsOnTargets="GetSignMsiAndCabFiles;SignFiles" />
|
||||
|
||||
<Target Name="GetSignMsiAndCabFiles">
|
||||
<ItemGroup>
|
||||
<FilesToSign Include="$(PackagesDirectory)/**/*.msi">
|
||||
<Authenticode>$(InternalCertificateId)</Authenticode>
|
||||
</FilesToSign>
|
||||
<FilesToSign Include="$(PackagesDirectory)/**/*.cab">
|
||||
<Authenticode>$(InternalCertificateId)</Authenticode>
|
||||
</FilesToSign>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="SignEngine" DependsOnTargets="GetSignEngineFiles;SignFiles" />
|
||||
|
||||
<Target Name="GetSignEngineFiles">
|
||||
<ItemGroup>
|
||||
<FilesToSign Include="$(PackagesDirectory)/**/*engine.exe">
|
||||
<Authenticode>$(InternalCertificateId)</Authenticode>
|
||||
</FilesToSign>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="SignCliBundle" DependsOnTargets="GetSignCliBundleFiles;SignFiles" />
|
||||
|
||||
<Target Name="GetSignCliBundleFiles">
|
||||
<ItemGroup>
|
||||
<FilesToSign Include="$(PackagesDirectory)/**/*.exe">
|
||||
<Authenticode>$(InternalCertificateId)</Authenticode>
|
||||
</FilesToSign>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Import Project="$(MicroBuildPropsAndTargetsPath)MicroBuild.Core.targets" />
|
||||
</Project>
|
|
@ -1,9 +0,0 @@
|
|||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<CliTargetFramework>netcoreapp3.0</CliTargetFramework>
|
||||
|
||||
<!-- Workaround until the stage0 SDK supports .NET Core 3.0.
|
||||
It won't hurt anything to leave this in though. -->
|
||||
<NETCoreAppMaximumVersion>3.0</NETCoreAppMaximumVersion>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -1,138 +0,0 @@
|
|||
<Project ToolsVersion="14.0" DefaultTargets="Test">
|
||||
<Import Project="test/TestPackageProjects.targets" />
|
||||
<Import Project="test/TestProjects.targets" />
|
||||
|
||||
<PropertyGroup>
|
||||
<PathListSeparator>:</PathListSeparator>
|
||||
<PathListSeparator Condition=" '$(OS)' == 'Windows_NT' ">%3b</PathListSeparator>
|
||||
<ExecPath>$(OutputDirectory)$(PathListSeparator)$(PATH)</ExecPath>
|
||||
<ExecPath Condition=" '$(OS)' == 'Windows_NT' ">$(OutputDirectory)</ExecPath>
|
||||
<TestPackagesDir>$(TestOutputDir)/packages/</TestPackagesDir>
|
||||
<TestArtifactsDir>$(TestOutputDir)/artifacts/</TestArtifactsDir>
|
||||
<TestResultXmlDir>$(TestOutputDir)/results/</TestResultXmlDir>
|
||||
<ExternalRestoreSourcesTestsContainer>$(TestArtifactsDir)/ExternalRestoreSourcesForTestsContainer.txt</ExternalRestoreSourcesTestsContainer>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="Test"
|
||||
Condition=" '$(CLIBUILD_SKIP_TESTS)' != 'true' And !$(Architecture.StartsWith('arm')) "
|
||||
DependsOnTargets="BuildTests;">
|
||||
|
||||
<!-- Make ure the test packages directory exists so that it's not an error to have it as a package source -->
|
||||
<MakeDir Directories="$(TestPackagesDir)" />
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectsToTest Include="build/test/RunTest.proj">
|
||||
<Properties>
|
||||
CLIBuildDll=$(CLIBuildDll);
|
||||
Configuration=$(Configuration);
|
||||
TestArtifactsDir=$(TestArtifactsDir);
|
||||
TestPackagesDir=$(TestPackagesDir);
|
||||
PreviousStageProps=$(NextStagePropsPath);
|
||||
TestProject=%(TestProjects.Identity);
|
||||
TestResultXmlDir=$(TestResultXmlDir);
|
||||
ToolPath=$(OutputDirectory);
|
||||
WorkingDirectory=$([System.IO.Directory]::GetParent(%(TestProjects.Identity)))
|
||||
</Properties>
|
||||
</ProjectsToTest>
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Begin Workaround lack of a stable package version for depedencies; copy into simulated stable version folders -->
|
||||
|
||||
<PropertyGroup>
|
||||
<StableSharedFrameworkDirectory>$(OutputDirectory)/shared/Microsoft.NETCore.App/$(SharedFrameworkStableVersion)</StableSharedFrameworkDirectory>
|
||||
<StableSharedFrameworkDirectoryWithBackwardsCompatibleRuntimes>$(Stage2WithBackwardsCompatibleRuntimesOutputDirectory)/shared/Microsoft.NETCore.App/$(SharedFrameworkStableVersion)</StableSharedFrameworkDirectoryWithBackwardsCompatibleRuntimes>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Stabilize_SourceFiles_2_0 Include="$(OutputDirectory)/shared/Microsoft.NETCore.App/$(MicrosoftNETCoreAppPackageVersion)/*.*"/>
|
||||
<SimulatedStableSharedFrameworkDirectories Condition=" '$(IsSharedFrameworkPreReleaseVersion)' == 'True' "
|
||||
Include="$(StableSharedFrameworkDirectory)" />
|
||||
<SimulatedStableSharedFrameworkDirectories Condition=" '$(IsSharedFrameworkPreReleaseVersion)' == 'True' "
|
||||
Include="$(StableSharedFrameworkDirectoryWithBackwardsCompatibleRuntimes)" />
|
||||
</ItemGroup>
|
||||
|
||||
<Copy
|
||||
Condition=" '$(IsSharedFrameworkPreReleaseVersion)' == 'True' "
|
||||
SourceFiles="@(Stabilize_SourceFiles_2_0)"
|
||||
DestinationFiles="@(Stabilize_SourceFiles_2_0->'$(StableSharedFrameworkDirectory)/%(RecursiveDir)%(Filename)%(Extension)')"
|
||||
/>
|
||||
|
||||
<Copy
|
||||
Condition=" '$(IsSharedFrameworkPreReleaseVersion)' == 'True' "
|
||||
SourceFiles="@(Stabilize_SourceFiles_2_0)"
|
||||
DestinationFiles="@(Stabilize_SourceFiles_2_0->'$(StableSharedFrameworkDirectoryWithBackwardsCompatibleRuntimes)/%(RecursiveDir)%(Filename)%(Extension)')"
|
||||
/>
|
||||
|
||||
<!-- End Workaround lack of a stable package version for depedencies; copy into simulated stable versions -->
|
||||
|
||||
<Message Text="Starting test execution" Importance="High" />
|
||||
|
||||
<MSBuild
|
||||
BuildInParallel="True"
|
||||
Projects="@(ProjectsToTest)">
|
||||
</MSBuild>
|
||||
|
||||
<Exec Command="$(DotnetInOutputDirectory) exec $(RoslynDirectory)/bincore/VBCSCompiler.dll -shutdown" />
|
||||
|
||||
<Message Text="Finished test execution" Importance="High" />
|
||||
|
||||
<!-- Begin Workaround lack of a stable package version for depedencies; remove simulated stable version folder. -->
|
||||
|
||||
<RemoveDir Directories="@(SimulatedStableSharedFrameworkDirectories)" />
|
||||
|
||||
<!-- End Workaround lack of a stable package version for depedencies; remove simulated stable version folder. -->
|
||||
</Target>
|
||||
|
||||
<Target Name="PrepareTests"
|
||||
DependsOnTargets="Init;
|
||||
SetupTestProjectData">
|
||||
<MakeDir Directories="$(TestPackagesDir)" Condition="!Exists('$(TestPackagesDir)')"/>
|
||||
<MakeDir Directories="$(TestArtifactsDir)" Condition="!Exists('$(TestArtifactsDir)')"/>
|
||||
|
||||
<WriteLinesToFile Condition="'$(ExternalRestoreSources)' != ''"
|
||||
File="$(ExternalRestoreSourcesTestsContainer)"
|
||||
Lines="<add key="PrivateBlobFeed%(NugetConfigPrivateFeeds.Identity)" value="%(NugetConfigPrivateFeeds.Identity)" />"
|
||||
Overwrite="false" />
|
||||
</Target>
|
||||
|
||||
<Target Name="RestoreTests"
|
||||
DependsOnTargets="PrepareTests;
|
||||
CreateTestAssetPackageNuPkgs;">
|
||||
|
||||
<DotNetRestore ToolPath="$(OutputDirectory)"
|
||||
ProjectPath=""$(TestDirectory)/Microsoft.DotNet.Cli.Tests.sln""
|
||||
AdditionalParameters="/p:PreviousStageProps=$(NextStagePropsPath)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="BuildTests"
|
||||
DependsOnTargets="RestoreTests;">
|
||||
<DotNetBuild ToolPath="$(OutputDirectory)"
|
||||
ProjectPath=""$(TestDirectory)/Microsoft.DotNet.Cli.Tests.sln""
|
||||
AdditionalParameters="/p:PreviousStageProps=$(NextStagePropsPath)"
|
||||
MaxCpuCount="1" />
|
||||
</Target>
|
||||
|
||||
<Target Name="CreateTestAssetPackageNuPkgs"
|
||||
DependsOnTargets="SetupTestPackageProjectData;"
|
||||
Outputs="%(TestPackageProject.Identity)">
|
||||
|
||||
<DotNetRestore ToolPath="$(OutputDirectory)"
|
||||
WorkingDirectory="$([System.IO.Directory]::GetParent('%(TestPackageProject.ProjectPath)'))"
|
||||
ProjectPath="%(TestPackageProject.ProjectPath)"
|
||||
AdditionalParameters="/p:RestoreAdditionalProjectSources=$(TestOutputDir)/packages /p:PreviousStageProps=$(NextStagePropsPath)"
|
||||
/>
|
||||
|
||||
<!-- https://github.com/NuGet/Home/issues/4063 -->
|
||||
<DotNetPack Output="$(TestPackagesDir)"
|
||||
ProjectPath="%(TestPackageProject.ProjectPath)"
|
||||
ToolPath="$(OutputDirectory)"
|
||||
VersionSuffix="%(TestPackageProject.VersionSuffix)"
|
||||
ReleaseSuffix="%(TestPackageProject.ReleaseSuffix)"
|
||||
MsbuildArgs="%(TestPackageProject.MsbuildArgs) /p:SdkNuGetVersion=$(SdkNugetVersion) /p:RestoreAdditionalProjectSources=$(TestOutputDir)/packages /p:PreviousStageProps=$(NextStagePropsPath)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="EnsureStageSeparation">
|
||||
<DotNetMSBuild Arguments="/v:diag $(RepoRoot)/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage0.proj /p:OutputDirectory="$(OutputDirectory)""
|
||||
ToolPath="$(PreviousStageDirectory)" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,26 +0,0 @@
|
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<VersionMajor>3</VersionMajor>
|
||||
<VersionMinor>0</VersionMinor>
|
||||
<VersionPatch>100</VersionPatch>
|
||||
<ReleaseSuffix Condition=" '$(ReleaseSuffix)' == '' ">preview</ReleaseSuffix>
|
||||
|
||||
<MajorMinorVersion>$(VersionMajor).$(VersionMinor)</MajorMinorVersion>
|
||||
<CliVersionNoSuffix>$(VersionMajor).$(VersionMinor).$(VersionPatch)</CliVersionNoSuffix>
|
||||
<CliVersionPrefix>$(CliVersionNoSuffix)-$(ReleaseSuffix)</CliVersionPrefix>
|
||||
<CliBrandingVersion Condition=" '$(DropSuffix)' != 'true' ">$(CliVersionNoSuffix) - $(ReleaseSuffix)</CliBrandingVersion>
|
||||
<CliBrandingVersion Condition=" '$(DropSuffix)' == 'true' ">$(CliVersionNoSuffix)</CliBrandingVersion>
|
||||
<SimpleVersion Condition=" '$(DropSuffix)' != 'true' ">$(CliVersionNoSuffix).$(CommitCount)</SimpleVersion>
|
||||
<SimpleVersion Condition=" '$(SimpleVersion)' == '' ">$(CliVersionNoSuffix)</SimpleVersion>
|
||||
|
||||
<VersionSuffix Condition=" '$(DropSuffix)' != 'true' ">$(ReleaseSuffix)-$(CommitCount)</VersionSuffix>
|
||||
|
||||
<FullNugetVersion>$(CliVersionNoSuffix)-$(ReleaseSuffix)-$(CommitCount)</FullNugetVersion>
|
||||
|
||||
<NugetVersion Condition=" '$(DropSuffix)' != 'true' ">$(FullNugetVersion)</NugetVersion>
|
||||
<NugetVersion Condition=" '$(NugetVersion)' == '' ">$(CliVersionNoSuffix)</NugetVersion>
|
||||
|
||||
<SdkVersion>$(NugetVersion)</SdkVersion>
|
||||
<SdkNugetVersion>$(NugetVersion)</SdkNugetVersion>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -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
|
||||
}
|
||||
}
|
|
@ -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"
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\..\..\core-setup\dir.props" />
|
||||
</Project>
|
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<CloudTestTasksPath>$(BuildToolsTaskDesktopDir)Microsoft.DotNet.Build.CloudTestTasks.dll</CloudTestTasksPath>
|
||||
<ContainerName Condition="'$(ContainerName)' == ''">dotnet</ContainerName>
|
||||
<DownloadDirectory>$(PackagesDir)AzureTransfer</DownloadDirectory>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="syncAzure.targets" />
|
||||
|
||||
<Target Name="ValidateRequiredProperties">
|
||||
<Error Condition="'$(AzureAccount)' == ''" Text="Missing property AzureAccount." />
|
||||
<Error Condition="'$(AzureToken)' == ''" Text="Missing property AzureToken." />
|
||||
<Error Condition="'$(ContainerName)' == ''" Text="Missing required property 'ContainerName'" />
|
||||
<Error Condition="'$(BlobName)' == ''" Text="Missing required property 'BlobName'" />
|
||||
</Target>
|
||||
|
||||
<Target Name="Build" DependsOnTargets="ValidateRequiredProperties;DownloadBlobsFromAzureTargets" />
|
||||
</Project>
|
|
@ -1,31 +0,0 @@
|
|||
<Project ToolsVersion="12.0" DefaultTargets="DownloadBlobsFromAzureTargets" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<UsingTask TaskName="DownloadFromAzure" AssemblyFile="$(CloudTestTasksPath)"/>
|
||||
<UsingTask TaskName="ListAzureBlobs" AssemblyFile="$(CloudTestTasksPath)" />
|
||||
<UsingTask TaskName="ListAzureContainers" AssemblyFile="$(CloudTestTasksPath)"/>
|
||||
|
||||
<PropertyGroup>
|
||||
<DownloadDirectory Condition="'$(DownloadDirectory)' == ''">$(PackagesDir)/AzureTransfer</DownloadDirectory>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="DownloadBlobsFromAzureTargets" Condition="'$(ContainerName)' != ''">
|
||||
<ListAzureBlobs AccountName="$(AzureAccount)"
|
||||
AccountKey="$(AzureToken)"
|
||||
ContainerName="$(ContainerName)"
|
||||
FilterBlobNames="$(BlobName)">
|
||||
<Output TaskParameter="BlobNames" ItemName="_BlobList" />
|
||||
</ListAzureBlobs>
|
||||
|
||||
<ItemGroup>
|
||||
<_OSFilteredBlobNames Include="@(_BlobList)"
|
||||
Condition="'$(OSGroup)' == 'Windows_NT' AND
|
||||
('%(_BlobList.Extension)' == '.zip' OR '%(_BlobList.Extension)' == '.exe' OR '%(_BlobList.Extension)' == '.version')" />
|
||||
</ItemGroup>
|
||||
|
||||
<DownloadFromAzure AccountName="$(AzureAccount)"
|
||||
AccountKey="$(AzureToken)"
|
||||
ContainerName="$(ContainerName)"
|
||||
BlobNames="@(_OSFilteredBlobNames)"
|
||||
BlobNamePrefix="$(BlobName)"
|
||||
DownloadDirectory="$(DownloadDirectory)" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,56 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Layout" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ArchiveOutputDirectory>$(PackagesDirectory)</ArchiveOutputDirectory>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="GenerateArchives"
|
||||
DependsOnTargets="Init;
|
||||
Layout;
|
||||
SetupGenerateArchivesInputsOutputs;
|
||||
MakePackagesDir;"
|
||||
Inputs="%(GenerateArchivesInputsOutputs.Inputs)"
|
||||
Outputs="%(GenerateArchivesInputsOutputs.Outputs)">
|
||||
|
||||
<PropertyGroup>
|
||||
<GenerateArchivesDestinationArchive>$(ArchiveOutputDirectory)/%(GenerateArchivesInputsOutputs.OutFileName)$(ArchiveExtension)</GenerateArchivesDestinationArchive>
|
||||
</PropertyGroup>
|
||||
|
||||
<ZipFileCreateFromDirectory
|
||||
Condition=" '$(OSName)' == 'win' "
|
||||
SourceDirectory="%(GenerateArchivesInputsOutputs.InputDirectory)"
|
||||
DestinationArchive="$(GenerateArchivesDestinationArchive)"
|
||||
OverwriteDestination="true"
|
||||
ExcludePatterns="%(GenerateArchivesInputsOutputs.ExcludePatterns)" />
|
||||
|
||||
<TarGzFileCreateFromDirectory
|
||||
Condition=" '$(OSName)' != 'win' "
|
||||
SourceDirectory="%(GenerateArchivesInputsOutputs.InputDirectory)"
|
||||
DestinationArchive="$(GenerateArchivesDestinationArchive)"
|
||||
OverwriteDestination="true"
|
||||
ExcludePatterns="%(GenerateArchivesInputsOutputs.ExcludePatterns)" />
|
||||
|
||||
<ItemGroup>
|
||||
<Archives Include="$(GenerateArchivesDestinationArchive)" />
|
||||
</ItemGroup>
|
||||
|
||||
</Target>
|
||||
|
||||
<Target Name="SetupGenerateArchivesInputsOutputs"
|
||||
DependsOnTargets="Init">
|
||||
<ItemGroup>
|
||||
<GenerateArchivesInputsOutputs Condition=" '%(LayoutDefinition.Name)' != '' " Include="%(LayoutDefinition.Name)">
|
||||
<Inputs>%(LayoutDefinition.OutputFiles)</Inputs>
|
||||
<Outputs>$(ArchiveOutputDirectory)/%(LayoutDefinition.NameWithVersion)$(ArchiveExtension)</Outputs>
|
||||
<InputDirectory>$(LayoutDirectory)/%(LayoutDefinition.Name)</InputDirectory>
|
||||
<OutFileName>%(LayoutDefinition.NameWithVersion)</OutFileName>
|
||||
<ExcludePatterns>%(LayoutDefinition.ExcludePatterns)</ExcludePatterns>
|
||||
</GenerateArchivesInputsOutputs>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="MakePackagesDir">
|
||||
<MakeDir Directories="$(PackagesDirectory)" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
|
@ -1,9 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Target Name="CopySandBoxPackageOut">
|
||||
<Copy
|
||||
SourceFiles="@(GeneratedInstallers)"
|
||||
DestinationFolder="$(RepoRoot)/$(RelativeSandBoxPackageOutputFolder)"/>
|
||||
</Target>
|
||||
|
||||
</Project>
|
|
@ -1,68 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<CombinedHostHostFxrFrameworkSdkOutputDirectory>$(LayoutDirectory)/$(ArtifactNameCombinedHostHostFxrFrameworkSdk)</CombinedHostHostFxrFrameworkSdkOutputDirectory>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target DependsOnTargets="Init" Name="SetupLayoutInputsOutputs" >
|
||||
<!-- Set up Items with Layout Input Files -->
|
||||
<ItemGroup>
|
||||
<SdkLayoutInput Include="$(OutputDirectory)/sdk/**/*" />
|
||||
<CombinedHostHostFxrFrameworkSdkInput Include="$(OutputDirectory)/**/*" />
|
||||
|
||||
<AspNetRuntimeFilesInput Include="$(AspNetCoreSharedFxPublishDirectory)/**/*" />
|
||||
|
||||
<MSBuildExtensionsInput Include="$(MSBuildExtensionsLayoutDirectory)/msbuildExtensions/**/*" />
|
||||
<MSBuildExtensionsVerInput Include="$(MSBuildExtensionsLayoutDirectory)/msbuildExtensions-ver/**/*" />
|
||||
<CombinedMSBuildExtensionsInput Include="@(MSBuildExtensionsInput)" />
|
||||
<CombinedMSBuildExtensionsInput Include="@(MSBuildExtensionsVerInput)" />
|
||||
</ItemGroup>
|
||||
|
||||
<MakeRelative
|
||||
Path1="$(OutputDirectory)/"
|
||||
Path2="%(SdkLayoutInput.Identity)" >
|
||||
<Output TaskParameter="RelativePath" ItemName="SdkRelativeOutputFiles" />
|
||||
</MakeRelative>
|
||||
<MakeRelative
|
||||
Path1="$(OutputDirectory)/"
|
||||
Path2="%(CombinedHostHostFxrFrameworkSdkInput.Identity)" >
|
||||
<Output TaskParameter="RelativePath" ItemName="CombinedHostHostFxrFrameworkSdkRelativeOutputFiles" />
|
||||
</MakeRelative>
|
||||
|
||||
<ItemGroup>
|
||||
<CombinedMSBuildExtensionsRelativeOutputFiles Include="@(MSBuildExtensionsRelativeOutputFiles)" />
|
||||
<CombinedMSBuildExtensionsRelativeOutputFiles Include="@(MSBuildExtensionsVerRelativeOutputFiles -> '14.0/%(Identity)')" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Set up Items Defining Layouts for easy change -->
|
||||
<ItemGroup>
|
||||
<LayoutDefinition Include="Sdk">
|
||||
<InputFiles>@(SdkLayoutInput)</InputFiles>
|
||||
<OutputFiles>@(SdkRelativeOutputFiles -> '$(SdkLayoutOutputDirectory)/%(Identity)')</OutputFiles>
|
||||
<NameWithVersion>$(ArtifactNameWithVersionSdk)</NameWithVersion>
|
||||
<Name>$(ArtifactNameSdk)</Name>
|
||||
</LayoutDefinition>
|
||||
|
||||
<LayoutDefinition Include="CombinedHostHostFxrFrameworkSdk">
|
||||
<InputFiles>@(CombinedHostHostFxrFrameworkSdkInput)</InputFiles>
|
||||
<OutputFiles>@(CombinedHostHostFxrFrameworkSdkRelativeOutputFiles -> '$(CombinedHostHostFxrFrameworkSdkOutputDirectory)/%(Identity)')</OutputFiles>
|
||||
<NameWithVersion>$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)</NameWithVersion>
|
||||
<Name>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)</Name>
|
||||
<ExcludePatterns Condition=" '$(OSName)' == 'win' ">$(WindowsSatelliteAssembliesRegEx)</ExcludePatterns>
|
||||
<ExcludePatterns Condition=" '$(OSName)' != 'win' ">$(SatelliteAssemblies)</ExcludePatterns>
|
||||
</LayoutDefinition>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="Layout"
|
||||
DependsOnTargets="Init;SetupLayoutInputsOutputs"
|
||||
Inputs="@(LayoutDefinition -> '%(InputFiles)')"
|
||||
Outputs="@(LayoutDefinition -> '%(OutputFiles)')" >
|
||||
|
||||
<!-- Copy Files to layout directories based on defintiions -->
|
||||
<Copy SourceFiles="%(LayoutDefinition.InputFiles)"
|
||||
DestinationFiles="%(LayoutDefinition.OutputFiles)"
|
||||
SkipUnchangedFiles="true" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
|
@ -1,17 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildThisFileDirectory)/Symbols.targets" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
||||
<EnableDefaultItems>false</EnableDefaultItems>
|
||||
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
|
||||
<IncludeBuildOutput>false</IncludeBuildOutput>
|
||||
|
||||
<PackageId>$(SymbolsNupkgPackageId)</PackageId>
|
||||
<PackageVersion>$(SdkVersion)</PackageVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="$(SymbolsDirectory)\**\*.*" Pack="true" PackagePath="%(RecursiveDir)%(Filename)%(Extension)"/>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,29 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<SymbolsProjectFileName>$(MSBuildThisFileDirectory)/Symbols.csproj</SymbolsProjectFileName>
|
||||
<SymbolsNupkgPackageId>runtime.$(ProductMonikerRid).Microsoft.DotNet.SDK</SymbolsNupkgPackageId>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="GenerateSymbolsNugetPackages"
|
||||
DependsOnTargets="RestoreSymbolsProject;GenerateSymbolsNuget">
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateSymbolsNuget"
|
||||
DependsOnTargets="RestoreSymbolsProject">
|
||||
<DotNetPack NoBuild="True"
|
||||
IncludeSymbols="False"
|
||||
Output="$(PackagesDirectory)"
|
||||
ProjectPath=""$(SymbolsProjectFileName)""
|
||||
ToolPath="$(PreviousStageDirectory)" />
|
||||
|
||||
<Move SourceFiles="$(PackagesDirectory)\$(SymbolsNupkgPackageId).$(SdkVersion).nupkg" DestinationFiles="$(PackagesDirectory)\$(SymbolsNupkgPackageId).$(SdkVersion).symbols.nupkg" />
|
||||
</Target>
|
||||
|
||||
<Target Name="RestoreSymbolsProject"
|
||||
DependsOnTargets="Init; SetupProjectsToPack">
|
||||
<DotNetRestore ProjectPath=""$(SymbolsProjectFileName)""
|
||||
ToolPath="$(PreviousStageDirectory)" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
|
@ -1,9 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<RuntimeFrameworkVersion>$(MicrosoftNETCoreAppPackageVersion)</RuntimeFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<DotNetCliToolReference Include="dotnet-deb-tool" Version="$(DotnetDebToolVersion)" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,12 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<CentosCoreclrAndCoreFxDependencies Include="unzip" />
|
||||
<CentosCoreclrAndCoreFxDependencies Include="libunwind" />
|
||||
<CentosCoreclrAndCoreFxDependencies Include="gettext" />
|
||||
<CentosCoreclrAndCoreFxDependencies Include="libcurl-devel" />
|
||||
<CentosCoreclrAndCoreFxDependencies Include="openssl-devel" />
|
||||
<CentosCoreclrAndCoreFxDependencies Include="zlib" />
|
||||
<CentosCoreclrAndCoreFxDependencies Include="libicu-devel" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,40 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="UbuntuCoreclrAndCoreFxDependencies.props" />
|
||||
<Import Project="DebianPackageBuildDependencies.props" />
|
||||
<Import Project="CentosCoreclrAndCoreFxDependencies.props" />
|
||||
|
||||
<Target Name="CheckPrereqs"
|
||||
DependsOnTargets="CheckUbuntuAptGetDependencies;
|
||||
CheckCentOsYumDependencies;">
|
||||
|
||||
<Message Text="Using previous stage version:" />
|
||||
<Exec Command="$(PreviousStageDotnet) --version" />
|
||||
</Target>
|
||||
|
||||
<Target Name="CheckUbuntuAptGetDependencies"
|
||||
Condition=" '$(Rid)' == 'ubuntu.14.04-x64' ">
|
||||
|
||||
<Exec Command="dpkg -s %(UbuntuCoreclrAndCoreFxDependencies.Identity)" />
|
||||
|
||||
<Exec Command="dpkg -s %(DebianPackageBuildDependencies.Identity)" Condition="$(SkipBuildingInstallers) != 'true'" />
|
||||
|
||||
<OnError ExecuteTargets="ShowAptGetUsage" />
|
||||
</Target>
|
||||
|
||||
<Target Name="ShowAptGetUsage">
|
||||
<Message Text="Install the missing dependency with `sudo apt-get install {package}`." />
|
||||
</Target>
|
||||
|
||||
<Target Name="CheckCentOsYumDependencies"
|
||||
Condition=" '$(OSName)' == 'centos' ">
|
||||
|
||||
<Exec Command="yum list installed %(CentosCoreclrAndCoreFxDependencies.Identity)" />
|
||||
|
||||
<OnError ExecuteTargets="ShowYumUsage" />
|
||||
</Target>
|
||||
|
||||
<Target Name="ShowYumUsage">
|
||||
<Message Text="Install the missing dependency with `yum install {package}`." />
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<DebianPackageBuildDependencies Include="devscripts" />
|
||||
<DebianPackageBuildDependencies Include="debhelper" />
|
||||
<DebianPackageBuildDependencies Include="build-essential" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,49 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libc6" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libedit2" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libffi6" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libgcc1" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libicu52" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="liblldb-3.6" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libllvm3.6" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="liblttng-ust0" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="liblzma5" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libncurses5" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libpython2.7" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libstdc++6" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libtinfo5" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libunwind8" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="liburcu1" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libuuid1" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="zlib1g" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libasn1-8-heimdal" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libcomerr2" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libcurl3" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libgcrypt11" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libgnutls26" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libgpg-error0" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libgssapi3-heimdal" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libgssapi-krb5-2" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libhcrypto4-heimdal" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libheimbase1-heimdal" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libheimntlm0-heimdal" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libhx509-5-heimdal" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libidn11" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libk5crypto3" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libkeyutils1" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libkrb5-26-heimdal" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libkrb5-3" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libkrb5support0" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libldap-2.4-2" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libp11-kit0" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libroken18-heimdal" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="librtmp0" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libsasl2-2" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libsqlite3-0" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libssl1.0.0" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libtasn1-6" />
|
||||
<UbuntuCoreclrAndCoreFxDependencies Include="libwind0-heimdal" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,42 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<VersionSvgTemplate>$(RepoRoot)/resources/images/version_badge.svg</VersionSvgTemplate>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="GenerateVersionBadge"
|
||||
DependsOnTargets="Init">
|
||||
<Message Text="$(VersionBadge)" />
|
||||
|
||||
<ReplaceFileContents
|
||||
InputFiles="$(VersionSvgTemplate)"
|
||||
DestinationFiles="$(VersionBadge)"
|
||||
ReplacementPatterns="ver_number"
|
||||
ReplacementStrings="$(SdkVersion)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateCoherentBadge"
|
||||
DependsOnTargets="Init; EvaluateRuntimeCoherence"
|
||||
Condition=" '$(Coherent)' == 'true' And !$(Architecture.StartsWith('arm')) ">
|
||||
<Message Text="$(CoherentBadge)" />
|
||||
|
||||
<ReplaceFileContents
|
||||
InputFiles="$(VersionSvgTemplate)"
|
||||
DestinationFiles="$(CoherentBadge)"
|
||||
ReplacementPatterns="ver_number"
|
||||
ReplacementStrings="$(SdkVersion)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="SetBadgeProps">
|
||||
<PropertyGroup>
|
||||
<VersionBadgeMoniker>$(OSName)_$(Architecture)</VersionBadgeMoniker>
|
||||
<VersionBadgeMoniker Condition=" '$(Rid)' == 'rhel.6-x64' ">rhel.6_x64</VersionBadgeMoniker>
|
||||
<VersionBadgeMoniker Condition=" '$(Rid)' == 'linux-musl-x64' ">linux_musl_x64</VersionBadgeMoniker>
|
||||
<VersionBadgeMoniker Condition=" '$(IslinuxPortable)' == 'true' ">linux_$(Architecture)</VersionBadgeMoniker>
|
||||
<VersionBadgeMoniker Condition=" '$(IsBuildingAndPublishingAllLinuxDistrosNativeInstallers)' == 'true' ">all_linux_distros_native_installer</VersionBadgeMoniker>
|
||||
|
||||
<VersionBadge>$(BaseOutputDirectory)/$(VersionBadgeMoniker)_$(Configuration)_version_badge.svg</VersionBadge>
|
||||
<CoherentBadge>$(BaseOutputDirectory)/$(VersionBadgeMoniker)_$(Configuration)_coherent_badge.svg</CoherentBadge>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Target Name="GenerateChecksums"
|
||||
DependsOnTargets="Init;
|
||||
InitializeChecksumItemGroup;"
|
||||
Inputs="@(ArtifactsForGeneratingChecksums)"
|
||||
Outputs="%(ArtifactsForGeneratingChecksums.DestinationPath)">
|
||||
<GenerateChecksums Items="@(ArtifactsForGeneratingChecksums)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="InitializeChecksumItemGroup"
|
||||
DependsOnTargets="Init;
|
||||
GatherItemsForPattern">
|
||||
<ItemGroup>
|
||||
<ArtifactsForGeneratingChecksums Include="@(ForPublishing)">
|
||||
<DestinationPath>%(ForPublishing.FullPath).sha</DestinationPath>
|
||||
<RelativeBlobPath>%(ForPublishing.RelativeBlobPath).sha</RelativeBlobPath>
|
||||
<ManifestArtifactData>ShipInstaller=dotnetclichecksums</ManifestArtifactData>
|
||||
</ArtifactsForGeneratingChecksums>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,46 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Target Name="FinishBuild"
|
||||
Condition="'$(IsNotOrchestratedPublish)' == 'true'"
|
||||
DependsOnTargets="CheckIfAllBuildsHavePublished;
|
||||
FinalizeBuild" />
|
||||
|
||||
<Target Name="CheckIfAllBuildsHavePublished"
|
||||
DependsOnTargets="SetBadgeProps">
|
||||
<CheckIfAllBuildsHavePublished AccountKey="$(ArtifactCloudDropAccessToken)"
|
||||
AccountName="$(ArtifactCloudDropAccountName)"
|
||||
ContainerName="$(ArtifactContainerName)"
|
||||
NugetVersion="$(FullNugetVersion)"
|
||||
VersionBadgeMoniker="$(VersionBadgeMoniker)">
|
||||
<Output TaskParameter="HaveAllBuildsPublished" PropertyName="HaveAllBuildsPublished" />
|
||||
</CheckIfAllBuildsHavePublished>
|
||||
</Target>
|
||||
|
||||
<Target Name="FinalizeBuild" Condition=" '$(HaveAllBuildsPublished)' == 'True' ">
|
||||
<CopyBlobsToLatest AccountName="$(ArtifactCloudDropAccountName)"
|
||||
AccountKey="$(ArtifactCloudDropAccessToken)"
|
||||
ContainerName="$(ArtifactContainerName)"
|
||||
NugetVersion="$(FullNugetVersion)"
|
||||
Channel="$(Channel)"
|
||||
CommitHash="$(CommitHash)"
|
||||
Coherent="$(Coherent)" />
|
||||
|
||||
<CopyBlobsToLatest AccountName="$(ChecksumCloudDropAccountName)"
|
||||
AccountKey="$(ChecksumCloudDropAccessToken)"
|
||||
ContainerName="$(ChecksumContainerName)"
|
||||
NugetVersion="$(FullNugetVersion)"
|
||||
Channel="$(Channel)"
|
||||
CommitHash="$(CommitHash)"
|
||||
Coherent="$(Coherent)" />
|
||||
|
||||
<!-- Core-Sdk does not produce a core-sdk package that can be used to signal on
|
||||
dotnet/versions that a new core-sdk version is available. Instead,
|
||||
just publish the latest version and list a "core-sdk" package with version -->
|
||||
<WriteVersionToVersionsRepo BranchName="$(BranchName)"
|
||||
Name="core-sdk"
|
||||
Version="$(FullNugetVersion)"
|
||||
VersionsRepoPath="build-info/dotnet/core-sdk/$(BranchName)"
|
||||
GitHubPassword="$(GITHUB_PASSWORD)"
|
||||
Condition=" '$(GITHUB_PASSWORD)' != '' " />
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,61 +0,0 @@
|
|||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<PropertyGroup>
|
||||
<OverwriteOnPublish Condition="'$(OverwriteOnPublish)' == ''">false</OverwriteOnPublish>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- gathers the items to be published -->
|
||||
<Target Name="GatherItemsForPattern">
|
||||
<Error Condition="'$(PublishPattern)' == ''" Text="Please specify a value for PublishPattern using standard msbuild 'include' syntax." />
|
||||
<ItemGroup>
|
||||
<ForPublishing Include="$(PublishPattern)" />
|
||||
</ItemGroup>
|
||||
<!-- add relative blob path metadata -->
|
||||
<ItemGroup>
|
||||
<ForPublishing>
|
||||
<RelativeBlobPath>$([System.String]::Copy('%(RecursiveDir)%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath>
|
||||
<ManifestArtifactData>ShipInstaller=dotnetcli</ManifestArtifactData>
|
||||
</ForPublishing>
|
||||
</ItemGroup>
|
||||
<Error Condition="'@(ForPublishing)' == ''" Text="No items were found matching pattern '$(PublishPattern)'." />
|
||||
</Target>
|
||||
|
||||
<!-- publishes artifacts to blob storage in Azure -->
|
||||
<Target Name="UploadArtifactsToAzure" DependsOnTargets="GatherItemsForPattern">
|
||||
<Error Condition="'$(ArtifactCloudDropAccessToken)' == ''" Text="Missing property ArtifactCloudDropAccessToken." />
|
||||
<Error Condition="'$(ArtifactCloudDropURL)' == ''" Text="Missing property ArtifactCloudDropURL." />
|
||||
|
||||
<Message Text="Publish assets to blob storage started: $(ArtifactCloudDropURL)" />
|
||||
<PushToBlobFeed ExpectedFeedUrl="$(ArtifactCloudDropURL)"
|
||||
AccountKey="$(ArtifactCloudDropAccessToken)"
|
||||
ItemsToPush="@(ForPublishing)"
|
||||
ManifestBranch="$(BranchName)"
|
||||
ManifestBuildId="$(FullNugetVersion)"
|
||||
ManifestCommit="$(CommitHash)"
|
||||
ManifestName="$(BuildName)"
|
||||
ManifestBuildData="ProductVersion=$(FullNugetVersion)"
|
||||
Overwrite="$(OverwriteOnPublish)"
|
||||
PublishFlatContainer="true"
|
||||
SkipCreateManifest="$(IsNotOrchestratedPublish)" />
|
||||
</Target>
|
||||
|
||||
<!-- publishes checksums for the artifacts to blob storage in Azure -->
|
||||
<Target Name="UploadChecksumsToAzure" DependsOnTargets="GenerateChecksums">
|
||||
<Error Condition="'$(ChecksumCloudDropAccessToken)' == ''" Text="Missing property ChecksumCloudDropAccessToken." />
|
||||
<Error Condition="'$(ChecksumCloudDropURL)' == ''" Text="Missing property ChecksumCloudDropURL." />
|
||||
|
||||
<Message Text="Publish checksums to blob storage started: $(ChecksumCloudDropURL)" />
|
||||
<PushToBlobFeed ExpectedFeedUrl="$(ChecksumCloudDropURL)"
|
||||
AccountKey="$(ChecksumCloudDropAccessToken)"
|
||||
ItemsToPush="@(ArtifactsForGeneratingChecksums->'%(DestinationPath)')"
|
||||
ManifestBranch="$(BranchName)"
|
||||
ManifestBuildId="$(FullNugetVersion)"
|
||||
ManifestCommit="$(CommitHash)"
|
||||
ManifestName="$(BuildName)"
|
||||
ManifestBuildData="ProductVersion=$(FullNugetVersion)"
|
||||
Overwrite="$(OverwriteOnPublish)"
|
||||
PublishFlatContainer="true"
|
||||
SkipCreateManifest="$(IsNotOrchestratedPublish)" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Target Name="EvaluateRuntimeCoherence"
|
||||
Condition="!$(Architecture.StartsWith('arm'))"
|
||||
DependsOnTargets="ReadAspNetCoreSharedRuntimeVersionFile;
|
||||
CompareRuntimeVersions" />
|
||||
|
||||
<Target Name="ReadAspNetCoreSharedRuntimeVersionFile"
|
||||
DependsOnTargets="DownloadHostAndSharedFxArtifacts">
|
||||
<ItemGroup>
|
||||
<File Include="$(AspNetCoreSharedFxBaseRuntimeVersionFile)" />
|
||||
</ItemGroup>
|
||||
<ReadLinesFromFile File="@(File)">
|
||||
<Output
|
||||
TaskParameter="Lines"
|
||||
PropertyName="AspNetCoreSharedFxBaseRuntimeVersion"/>
|
||||
</ReadLinesFromFile>
|
||||
</Target>
|
||||
|
||||
<Target Name="CompareRuntimeVersions">
|
||||
<PropertyGroup>
|
||||
<Coherent>false</Coherent>
|
||||
<Coherent Condition=" '$(MicrosoftNETCoreAppPackageVersion)' == '$(AspNetCoreSharedFxBaseRuntimeVersion)' ">true</Coherent>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,27 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTarget="RunTest" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<!-- workaround for https://github.com/Microsoft/msbuild/issues/885 -->
|
||||
<!-- renaming the property because the original property is a global property and therefore
|
||||
cannot be redefined at runtime. -->
|
||||
<PropertyGroup>
|
||||
<CLIBuildDllPath>$([MSBuild]::Unescape($(CLIBuildDll)))</CLIBuildDllPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<UsingTask TaskName="DotNetTest" AssemblyFile="$(CLIBuildDllPath)" />
|
||||
|
||||
<Target Name="RunTest">
|
||||
<ItemGroup>
|
||||
<EnvironmentVariables Include="TEST_ARTIFACTS=$(TestArtifactsDir)" />
|
||||
<EnvironmentVariables Include="TEST_PACKAGES=$(TestPackagesDir)" />
|
||||
<EnvironmentVariables Include="PreviousStageProps=$(PreviousStageProps)" />
|
||||
</ItemGroup>
|
||||
|
||||
<DotNetTest EnvironmentVariables="@(EnvironmentVariables)"
|
||||
ToolPath="$(ToolPath)"
|
||||
Configuration="$(Configuration)"
|
||||
NoBuild="True"
|
||||
Logger="trx"
|
||||
ProjectPath="$(TestProject)" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,60 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Target Name="SetupTestAssetProjectData"
|
||||
DependsOnTargets="AssociateTestAssetInputFilesWithProject">
|
||||
</Target>
|
||||
|
||||
<Target Name="AssociateTestAssetInputFilesWithProject"
|
||||
DependsOnTargets="IdentifyTestAssetInputFilesForProject;"
|
||||
Outputs="%(TestAssetProjects.ProjectPath)">
|
||||
<PropertyGroup>
|
||||
<CurrentProject>%(TestAssetProjects.ProjectPath)</CurrentProject>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<TestAssetProjects Condition=" '%(ProjectPath)' == '$(CurrentProject)' ">
|
||||
<BuildInputs>@(TestAssetProjectInputs)</BuildInputs>
|
||||
</TestAssetProjects>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="IdentifyTestAssetInputFilesForProject"
|
||||
DependsOnTargets="SetupBuildTestAssetProjectInputs;"
|
||||
Outputs="%(TestAssetProjects.ProjectPath)">
|
||||
<ItemGroup>
|
||||
<TestAssetProjectInputs Include="%(TestAssetProjects.BuildInputIncludeFilter)"
|
||||
Exclude="%(TestAssetProjects.BuildInputExcludeFilter)">
|
||||
<ProjectPath>%(TestAssetProjects.ProjectPath)</ProjectPath>
|
||||
</TestAssetProjectInputs>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="SetupBuildTestAssetProjectInputs">
|
||||
<ItemGroup>
|
||||
<NoAutoBuildTestAssets Include="TestAssets/TestProjects/**/.noautobuild" />
|
||||
<NoAutoBuildTestAssetProjects Include="%(NoAutoBuildTestAssets.RelativeDir)project.json" />
|
||||
|
||||
<PreTestAssetProjects Include="TestAssets/TestProjects/**/project.json"/>
|
||||
|
||||
<TestAssetProjects Include="%(PreTestAssetProjects.RelativeDir)project.json"
|
||||
Exclude="@(NoAutoBuildTestAssetProjects)"/>
|
||||
|
||||
<TestAssetProjects>
|
||||
<BuildInputIncludeFilter>%(RelativeDir)**/*.*</BuildInputIncludeFilter>
|
||||
<BuildInputExcludeFilter>%(RelativeDir)bin/**/*.*;%(RelativeDir)obj/**/*.*</BuildInputExcludeFilter>
|
||||
<ProjectDir>$([System.IO.Directory]::GetParent(%(Identity)))</ProjectDir>
|
||||
<ProjectPath>%(Identity)</ProjectPath>
|
||||
</TestAssetProjects>
|
||||
|
||||
<TestAssetProjects>
|
||||
<OutputName>$([System.IO.Path]::GetFileName(%(ProjectDir)))</OutputName>
|
||||
<OutputName Condition=" '%(RelativeDir)' == 'TestAssets/TestProjects/AppWithOutputAssemblyName/' ">MyApp</OutputName>
|
||||
<OutputName Condition=" '%(RelativeDir)' == 'TestAssets/TestProjects/TestAppWithContentPackage/' ">AppWithContentPackage</OutputName>
|
||||
</TestAssetProjects>
|
||||
|
||||
<TestAssetProjects>
|
||||
<BuildOutput>%(TestAssetProjects.RelativeDir)bin/$(Configuration)/netcoreapp1.0/%(TestAssetProjects.OutputName).dll</BuildOutput>
|
||||
</TestAssetProjects>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,60 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<TestPackagesBuildDir>$(TestOutputDir)/packagesBuild/</TestPackagesBuildDir>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="SetupTestPackageProjectData"
|
||||
DependsOnTargets="SetupTestPackageProjectFrameworks">
|
||||
<ItemGroup>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="SetupTestPackageProjectFrameworks"
|
||||
DependsOnTargets="SetupTestPackageProjectBaseData">
|
||||
<ItemGroup>
|
||||
<TestPackageProject Include="@(BaseTestPackageProject)">
|
||||
</TestPackageProject>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="SetupTestPackageProjectBaseData">
|
||||
<ItemGroup>
|
||||
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-portable">
|
||||
<Name>dotnet-portable</Name>
|
||||
<ProjectName>dotnet-portable.csproj</ProjectName>
|
||||
<IsTool>True</IsTool>
|
||||
<IsApplicable>True</IsApplicable>
|
||||
<VersionPrefix>1.0.0</VersionPrefix>
|
||||
<VersionSuffix></VersionSuffix>
|
||||
<ReleaseSuffix></ReleaseSuffix>
|
||||
<Clean>True</Clean>
|
||||
</BaseTestPackageProject>
|
||||
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-prefercliruntime">
|
||||
<Name>dotnet-prefercliruntime</Name>
|
||||
<ProjectName>dotnet-prefercliruntime.csproj</ProjectName>
|
||||
<IsTool>True</IsTool>
|
||||
<IsApplicable>True</IsApplicable>
|
||||
<VersionPrefix>1.0.0</VersionPrefix>
|
||||
<VersionSuffix></VersionSuffix>
|
||||
<ReleaseSuffix></ReleaseSuffix>
|
||||
<Clean>True</Clean>
|
||||
</BaseTestPackageProject>
|
||||
|
||||
<BaseTestPackageProject>
|
||||
<ProjectDir>$(RepoRoot)%(Identity)/</ProjectDir>
|
||||
<OutputPath>$(TestPackagesBuildDir)%(Identity)/bin/$(Configuration)/</OutputPath>
|
||||
</BaseTestPackageProject>
|
||||
|
||||
<BaseTestPackageProject>
|
||||
<ProjectPath>%(ProjectDir)%(ProjectName)</ProjectPath>
|
||||
</BaseTestPackageProject>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<ItemDefinitionGroup>
|
||||
<BaseTestPackageProject>
|
||||
<NuPkgName>%(Name)</NuPkgName>
|
||||
</BaseTestPackageProject>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
|
@ -1,21 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Target Name="SetupTestProjectData"
|
||||
DependsOnTargets="SetupBuildTestProjectInputs">
|
||||
</Target>
|
||||
|
||||
<Target Name="SetupBuildTestProjectInputs">
|
||||
<ItemGroup>
|
||||
<PreTestProjectsToExclude Condition=" 'Non-test projects in test directory' != 'consider moving elsewhere' "
|
||||
Include="test/Microsoft.DotNet.Tools.Tests.Utilities/Microsoft.DotNet.Tools.Tests.Utilities.csproj;
|
||||
test/Microsoft.DotNet.TestFramework/Microsoft.DotNet.TestFramework.csproj" />
|
||||
|
||||
<TestProjectsToExclude Include="%(PreTestProjectsToExclude.Fullpath)" />
|
||||
|
||||
<PreTestProjects Include="test/*/*.csproj;" />
|
||||
|
||||
<TestProjects Include="%(PreTestProjects.Fullpath)"
|
||||
Exclude="@(TestProjectsToExclude)" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,18 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard1.5</TargetFramework>
|
||||
<WarningsAsErrors>true</WarningsAsErrors>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<AssemblyName>Microsoft.DotNet.Cli.Build.Framework</AssemblyName>
|
||||
<AssetTargetFallback>$(AssetTargetFallback);dnxcore50</AssetTargetFallback>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="NETStandard.Library" Version="1.6.0" />
|
||||
<PackageReference Include="System.Diagnostics.Process" Version="4.1.0" />
|
||||
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.1.0" />
|
||||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="2.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -1,9 +0,0 @@
|
|||
<Project DefaultTargets="RunValidation">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
<Import Project="$(RepoRoot)/build/Microsoft.DotNet.Cli.tasks" />
|
||||
|
||||
<Target Name="RunValidation">
|
||||
<DotNetMSBuild Arguments=" /v:diag $(MSBuildThisFileDirectory)/InvokeWithStage2.proj /p:ToolPath="$(OutputDirectory)""
|
||||
ToolPath="$(OutputDirectory)" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,27 +0,0 @@
|
|||
<Project DefaultTargets="RunValidation">
|
||||
|
||||
<PropertyGroup>
|
||||
<NormalizedToolPath>$([System.IO.Path]::GetDirectoryName($(ToolPath)/))</NormalizedToolPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<MSBuildExtensionsPathInToolPath>false</MSBuildExtensionsPathInToolPath>
|
||||
<MSBuildExtensionsPathInToolPath Condition="$(MSBuildExtensionsPath.StartsWith('$(NormalizedToolPath)'))">true</MSBuildExtensionsPathInToolPath>
|
||||
<MSBuildSDKsPathInToolPath>false</MSBuildSDKsPathInToolPath>
|
||||
<MSBuildSDKsPathInToolPath Condition="$(MSBuildSDKsPath.StartsWith('$(NormalizedToolPath)'))">true</MSBuildSDKsPathInToolPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="RunValidation">
|
||||
<Error Condition=" '$(ToolPath)' == '' "
|
||||
Text="ToolPath not set" />
|
||||
|
||||
<Error Condition=" '$(MSBuildExtensionsPathInToolPath)' == 'false' "
|
||||
Text="MSBuildExtensionsPath '$(MSBuildExtensionsPath)' not in ToolPath '$(NormalizedToolPath)'" />
|
||||
|
||||
<Error Condition=" '$(CscToolExeInToolPath)' == 'false' "
|
||||
Text="CscToolExe '$(CscToolExe)' not in ToolPath '$(NormalizedToolPath)'" />
|
||||
|
||||
<Error Condition=" '$(MSBuildSDKsPathInToolPath)' == 'false' "
|
||||
Text="MSBuildSDKsPath '$(MSBuildSDKsPath)' not in ToolPath '$(NormalizedToolPath)'" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// The storage api version.
|
||||
/// </summary>
|
||||
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<string> 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<string, HashSet<string>> queryKeyValues = ExtractQueryKeyValues(address);
|
||||
Dictionary<string, HashSet<string>> dictionary = GetCommaSeparatedList(queryKeyValues);
|
||||
|
||||
foreach (KeyValuePair<string, HashSet<string>> 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<string> GetHeaderValues(HttpRequestHeaders headers, string headerName)
|
||||
{
|
||||
List<string> list = new List<string>();
|
||||
IEnumerable<string> 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<HttpResponseMessage> RequestWithRetry(TaskLoggingHelper loggingHelper, HttpClient client,
|
||||
Func<HttpRequestMessage> createRequest, Func<HttpResponseMessage, bool> 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<string, HashSet<string>> ExtractQueryKeyValues(Uri address)
|
||||
{
|
||||
Dictionary<string, HashSet<string>> values = new Dictionary<string, HashSet<string>>();
|
||||
//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<string> setOfValues;
|
||||
if (values.TryGetValue(key, out setOfValues))
|
||||
{
|
||||
setOfValues.Add(value);
|
||||
}
|
||||
else
|
||||
{
|
||||
HashSet<string> newSet = new HashSet<string> { value };
|
||||
values.Add(key, newSet);
|
||||
}
|
||||
}
|
||||
|
||||
return values;
|
||||
}
|
||||
|
||||
private static Dictionary<string, HashSet<string>> GetCommaSeparatedList(
|
||||
Dictionary<string, HashSet<string>> queryKeyValues)
|
||||
{
|
||||
Dictionary<string, HashSet<string>> dictionary = new Dictionary<string, HashSet<string>>();
|
||||
|
||||
foreach (string queryKeys in queryKeyValues.Keys)
|
||||
{
|
||||
HashSet<string> setOfValues;
|
||||
queryKeyValues.TryGetValue(queryKeys, out setOfValues);
|
||||
List<string> list = new List<string>();
|
||||
list.AddRange(setOfValues);
|
||||
list.Sort();
|
||||
string commaSeparatedValues = string.Join(",", list);
|
||||
string key = queryKeys.ToLowerInvariant();
|
||||
HashSet<string> setOfValues2;
|
||||
if (dictionary.TryGetValue(key, out setOfValues2))
|
||||
{
|
||||
setOfValues2.Add(commaSeparatedValues);
|
||||
}
|
||||
else
|
||||
{
|
||||
HashSet<string> newSet = new HashSet<string> { commaSeparatedValues };
|
||||
dictionary.Add(key, newSet);
|
||||
}
|
||||
}
|
||||
|
||||
return dictionary;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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<string, bool>()
|
||||
{
|
||||
{ "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<string> 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
|
|
@ -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(@"(?<CommitHash>[\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
|
|
@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// The Azure account key used when creating the connection string.
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string AccountKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The Azure account name used when creating the connection string.
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string AccountName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string ContainerName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
public bool FailIfExists { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The read-only SAS token created when ReadOnlyTokenDaysValid is greater than zero.
|
||||
/// </summary>
|
||||
[Output]
|
||||
public string ReadOnlyToken { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The number of days for which the read-only token should be valid.
|
||||
/// </summary>
|
||||
public int ReadOnlyTokenDaysValid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The URI of the created container.
|
||||
/// </summary>
|
||||
[Output]
|
||||
public string StorageUri { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The write-only SAS token create when WriteOnlyTokenDaysValid is greater than zero.
|
||||
/// </summary>
|
||||
[Output]
|
||||
public string WriteOnlyToken { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The number of days for which the write-only token should be valid.
|
||||
/// </summary>
|
||||
public int WriteOnlyTokenDaysValid { get; set; }
|
||||
|
||||
public override bool Execute()
|
||||
{
|
||||
return ExecuteAsync().GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public async Task<bool> 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<HttpRequestMessage> 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<HttpResponseMessage, bool> 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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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; }
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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<bool> 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")
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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)
|
||||
|
||||
";
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
/// <param name="updateLatestVersion">If true, updates Latest.txt with a prerelease moniker. If there isn't one, makes the file empty.</param>
|
||||
/// <param name="updateLatestPackageList">If true, updates Latest_Packages.txt.</param>
|
||||
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<GitObject> objects = new List<GitObject>();
|
||||
|
||||
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
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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<JProperty>())
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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<string> blockIds = new List<string>();
|
||||
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<HttpRequestMessage> 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<HttpRequestMessage> 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("<?xml version=\"1.0\" encoding=\"UTF-8\"?><BlockList>");
|
||||
foreach (object item in blockIds)
|
||||
body.AppendFormat("<Latest>{0}</Latest>", item);
|
||||
|
||||
body.Append("</BlockList>");
|
||||
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());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
|
||||
/// <summary>
|
||||
/// The Azure account key used when creating the connection string.
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string AccountKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The Azure account name used when creating the connection string.
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string AccountName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string ContainerName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[Required]
|
||||
public ITaskItem[] Items { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if the destination blob should be overwritten if it already exists. The default if false.
|
||||
/// </summary>
|
||||
public bool Overwrite { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the maximum number of clients to concurrently upload blobs to azure
|
||||
/// </summary>
|
||||
public int MaxClients { get; set; } = 8;
|
||||
|
||||
public void Cancel()
|
||||
{
|
||||
TokenSource.Cancel();
|
||||
}
|
||||
|
||||
public override bool Execute()
|
||||
{
|
||||
return ExecuteAsync(CancellationToken).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public async Task<bool> 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<string> blobsPresent = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
try
|
||||
{
|
||||
using (HttpClient client = new HttpClient())
|
||||
{
|
||||
Func<HttpRequestMessage> 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<string> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue