Remove optional workloads (#10780)

* Revert "Ensure copy latest runs on dotnet engine and not msbuild (#10766)"

This reverts commit d1be03eb6c.

* Revert "Publish additional files in official CI build"

This reverts commit 2e0eea8da3.

* Revert "Create WASM installers for optional workloads (#10685)"

This reverts commit 7c79ce28bc.
This commit is contained in:
Jacques Eloff 2021-05-26 21:19:10 -07:00 committed by GitHub
parent 42c9d153c5
commit 411c1a4a6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 19 additions and 414 deletions

3
.gitignore vendored
View file

@ -15,9 +15,6 @@ Library/
# local nuget cache
.nuget/
# local tools
.tools/
# NuGet v3 restore drops these even though we don't use MSBuild :(
*.nuget.targets
*.nuget.props

View file

@ -59,13 +59,13 @@ stages:
_BuildConfig: Debug
_BuildArchitecture: x86
_DOTNET_CLI_UI_LANGUAGE: ''
_AdditionalBuildParameters: '-msbuildEngine dotnet'
_AdditionalBuildParameters: ''
_TestArg: $(_WindowsTestArg)
Build_ES_Debug_x64:
_BuildConfig: Debug
_BuildArchitecture: x64
_DOTNET_CLI_UI_LANGUAGE: es
_AdditionalBuildParameters: '-msbuildEngine dotnet'
_AdditionalBuildParameters: ''
_TestArg: $(_WindowsTestArg)
# Internal-only builds
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
@ -73,39 +73,29 @@ stages:
_BuildConfig: Release
_BuildArchitecture: x86
_DOTNET_CLI_UI_LANGUAGE: ''
_AdditionalBuildParameters: '-msbuildEngine dotnet'
_AdditionalBuildParameters: ''
_TestArg: $(_WindowsTestArg)
# Always run builds
Build_Release_x64:
_BuildConfig: Release
_BuildArchitecture: x64
_DOTNET_CLI_UI_LANGUAGE: ''
_AdditionalBuildParameters: '-msbuildEngine dotnet /p:PublishInternalAsset=true'
_AdditionalBuildParameters: '/p:PublishInternalAsset=true'
_TestArg: $(_WindowsTestArg)
Build_Release_arm:
_BuildConfig: Release
_BuildArchitecture: arm
_DOTNET_CLI_UI_LANGUAGE: ''
_AdditionalBuildParameters: '-msbuildEngine dotnet'
_AdditionalBuildParameters: ''
# Never run tests on arm64
_TestArg: ''
Build_Release_arm64:
_BuildConfig: Release
_BuildArchitecture: arm64
_DOTNET_CLI_UI_LANGUAGE: ''
_AdditionalBuildParameters: '-msbuildEngine dotnet'
_AdditionalBuildParameters: ''
# Never run tests on arm64
_TestArg: ''
Build_Release_workloads:
_BuildConfig: Release
# Architecture doesn't matter as for workloads we generate multiple installer sets
_BuildArchitecture: x64
_DOTNET_CLI_UI_LANGUAGE: ''
# This is a very specific build process and MUST be built using .NET Framework MSBuild
# because of build task dependencies for Visual Studio.
_AdditionalBuildParameters: '-project src\workloads\workloads.csproj -msbuildEngine vs /p:OptionalWorkloads=true'
# Never run tests for workloads
_TestArg: ''
- template: /eng/build.yml
parameters:
@ -125,14 +115,14 @@ stages:
_BuildConfig: Release
_BuildArchitecture: x64
_DOTNET_CLI_UI_LANGUAGE: ''
_AdditionalBuildParameters: '-msbuildEngine dotnet /p:PublishInternalAsset=true'
_AdditionalBuildParameters: '/p:PublishInternalAsset=true'
# Never run tests on PGO bits
_TestArg: ''
Build_Release_x86:
_BuildConfig: Release
_BuildArchitecture: x86
_DOTNET_CLI_UI_LANGUAGE: ''
_AdditionalBuildParameters: '-msbuildEngine dotnet'
_AdditionalBuildParameters: ''
_TestArg: ''
pgoInstrument: true

View file

@ -31,8 +31,6 @@ The repository contains native code project required for the Windows installer.
- Install CMAKE 3.2.0.1 or later
- Install MSVC Build tools for x86/x64/arm64, v14.28-16.9
Optional workloads depend on .NET Framework MSBuild due to external task dependencies that do not support .NET Core. This means that Arcade defaults to using ```vs``` as the build engine. When building non-workload related projects from the CLI on Windows, you will need to explicitly set the ```msbuildEngine``` parameter to ```dotnet```. For example, to build the default installers in Windows, run ```build -msbuildEngine dotnet``` instead of just ```build```.
# Build status
|All legs|

View file

@ -3,5 +3,5 @@
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 "& \"%~dp0common\build.ps1\" -restore -build -msbuildEngine dotnet /p:Projects=\"%~dp0..\src\CopyToLatest\CopyToLatest.csproj\" %*; exit $LastExitCode;"
powershell -ExecutionPolicy Bypass -NoProfile -NoLogo -Command "& \"%~dp0common\build.ps1\" -restore -build /p:Projects=\"%~dp0..\src\CopyToLatest\CopyToLatest.csproj\" %*; exit $LastExitCode;"
if %errorlevel% neq 0 exit /b %errorlevel%

View file

@ -75,17 +75,13 @@
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)*.svg" Condition=" '$(PublishBinariesAndBadge)' == 'true' " />
<!-- Only publish this file from windows x64 so that we don't end up with duplicates -->
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)productVersion.txt"
Condition=" '$(PublishBinariesAndBadge)' == 'true' and '$(OS)' == 'Windows_NT' and '$(Architecture)' == 'x64' and '$(PgoInstrument)' != 'true' and '$(OptionalWorkloads)' != 'true'" />
Condition=" '$(PublishBinariesAndBadge)' == 'true' and '$(OS)' == 'Windows_NT' and '$(Architecture)' == 'x64' and '$(PgoInstrument)' != 'true'" />
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)sdk-productVersion.txt"
Condition=" '$(PublishBinariesAndBadge)' == 'true' and '$(OS)' == 'Windows_NT' and '$(Architecture)' == 'x64' and '$(PgoInstrument)' != 'true' and '$(OptionalWorkloads)' != 'true'" />
Condition=" '$(PublishBinariesAndBadge)' == 'true' and '$(OS)' == 'Windows_NT' and '$(Architecture)' == 'x64' and '$(PgoInstrument)' != 'true'" />
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)productCommit-*.txt" Condition=" '$(PublishBinariesAndBadge)' == 'true' " />
<SdkNonShippingAssetsToPublish Include="$(ArtifactsNonShippingPackagesDir)*.nupkg" />
<SdkNonShippingAssetsToPublish Include="$(ArtifactsNonShippingPackagesDir)*.swr" />
<SdkNonShippingAssetsToPublish Include="$(ArtifactsNonShippingPackagesDir)*.msi" />
<!-- Include MSIs and .vsman files for Visual Studio -->
<SdkNonShippingAssetsToPublish Include="$(VisualStudioSetupInsertionPath)*.msi;
$(VisualStudioSetupInsertionPath)*.vsman"
Condition="'$(OS)' == 'Windows_NT' and '$(OptionalWorkloads)' == 'true'"/>
<SdkNonShippingAssetsToPublish Condition="'$(PublishBinariesAndBadge)' != 'false'" Include="$(ArtifactsNonShippingPackagesDir)*.tar.gz" />
<SdkNonShippingAssetsToPublish Condition="'$(PublishBinariesAndBadge)' != 'false'" Include="$(ArtifactsNonShippingPackagesDir)*.zip" />
<SdkNonShippingAssetsToPublish Include="$(ArtifactsNonShippingPackagesDir)*.pkg" />
@ -129,7 +125,6 @@
<ItemsToSignPostBuildWithPaths Include="$(ArtifactsShippingPackagesDir)*.msi" />
<ItemsToSignPostBuildWithPaths Include="$(ArtifactsShippingPackagesDir)*.nupkg" />
<ItemsToSignPostBuildWithPaths Include="$(ArtifactsNonShippingPackagesDir)*.msi" />
<ItemsToSignPostBuildWithPaths Include="$(VisualStudioSetupInsertionPath)*.msi" />
<ItemsToSignPostBuildWithPaths Include="$(ArtifactsNonShippingPackagesDir)*.zip" Condition=" '$(PublishBinariesAndBadge)' == 'true' " />
<ItemsToSignPostBuildWithPaths Include="$(ArtifactsNonShippingPackagesDir)*.nupkg" />
<ItemsToSignPostBuild Remove="@(ItemsToSignPostBuild)" />

View file

@ -1 +0,0 @@
vsman/OptionalWorkloads.vsman

View file

@ -136,14 +136,14 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21269.3">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21263.5">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>0b0d5b90b5aba80c66a9e7a210e0af8093dc4f57</Sha>
<Sha>e8d0df4f35cfa23174fe7204ef958cf5d1b8e797</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.21269.3">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.21263.5">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>0b0d5b90b5aba80c66a9e7a210e0af8093dc4f57</Sha>
<Sha>e8d0df4f35cfa23174fe7204ef958cf5d1b8e797</Sha>
</Dependency>
<Dependency Name="Private.SourceBuild.ReferencePackages" Version="1.0.0-beta.20217.1">
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>

View file

@ -20,8 +20,7 @@
</PropertyGroup>
<PropertyGroup>
<!-- Dependency from https://github.com/dotnet/arcade -->
<MicrosoftDotNetBuildTasksInstallersPackageVersion>6.0.0-beta.21269.3</MicrosoftDotNetBuildTasksInstallersPackageVersion>
<MicrosoftDotNetBuildTasksWorkloadsPackageVersion>6.0.0-beta.21269.3</MicrosoftDotNetBuildTasksWorkloadsPackageVersion>
<MicrosoftDotNetBuildTasksInstallersPackageVersion>6.0.0-beta.21263.5</MicrosoftDotNetBuildTasksInstallersPackageVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Dependency from https://github.com/dotnet/winforms -->
@ -165,8 +164,5 @@
<!-- pinned dependency. This package is not being produced outside of the 2.0 branch of corefx and should not change. -->
<CLI_NETStandardLibraryNETFrameworkVersion>2.0.1-servicing-26011-01</CLI_NETStandardLibraryNETFrameworkVersion>
</PropertyGroup>
<PropertyGroup>
<SwixPackageVersion>1.1.37</SwixPackageVersion>
</PropertyGroup>
<Import Project="$(RepositoryEngineeringDir)ManualVersions.props" />
</Project>

View file

@ -4,9 +4,3 @@ $script:useInstalledDotNetCli = $false
# Add CMake to the path.
$env:PATH = "$PSScriptRoot\..\.tools\bin;$env:PATH"
if ($msbuildEngine -eq 'vs')
{
$globalJson = Get-Content -Raw global.json | ConvertFrom-Json
$env:MSBuildSdksPath = [IO.Path]::Combine($RepoRoot, ".dotnet\sdk", $globalJson.tools.dotnet, "sdks")
}

View file

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<PropertyGroup>
<TargetFramework>$(CoreSDKTargetFramework)</TargetFramework>
<TargetFramework>$(CoreSdkTargetFramework)</TargetFramework>
<NativeVersionFile>$(ArtifactsObjDir)sdk_version.h</NativeVersionFile>
</PropertyGroup>

View file

@ -1,25 +1,17 @@
{
"sdk": {
"version": "6.0.0-preview.5.21228.9",
"allowPrerelease": "true",
"rollForward": "major"
},
"tools": {
"dotnet": "6.0.100-preview.5.21228.9",
"runtimes": {
"dotnet": [
"$(VSRedistCommonNetCoreSharedFrameworkx6460PackageVersion)"
]
},
"vs": {
"version": "16.8"
}
},
"native-tools": {
"cmake": "3.16.4"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21269.3",
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21263.5",
"Microsoft.DotNet.CMake.Sdk": "6.0.0-beta.21253.2"
}
}

View file

@ -1,68 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="VSSetup.targets" />
<PropertyGroup>
<DebugSymbols>false</DebugSymbols>
<IsShippingAssembly>false</IsShippingAssembly>
<PublishWindowsPdb>false</PublishWindowsPdb>
<TargetType>build-manifest</TargetType>
<FinalizeManifest>true</FinalizeManifest>
<FinalizeSkipLayout>false</FinalizeSkipLayout>
<ProductName>DotNetOptionalWorkloads</ProductName>
<ProductFamily>vs</ProductFamily>
<ProductFamilyVersion Condition="$(ProductFamilyVersion) == ''">42.42.42</ProductFamilyVersion>
<ComputeRelativeUrls>true</ComputeRelativeUrls>
<OutputPath>$(ManifestOutputPath)</OutputPath>
</PropertyGroup>
<ItemGroup>
<MergeManifest Include="$(ManifestOutputPath)\*.json">
<RelativeUrl>/</RelativeUrl>
</MergeManifest>
<MergeManifest Include="$(ManifestOutputPath)\CHS\*.json">
<RelativeUrl>/CHS/</RelativeUrl>
</MergeManifest>
<MergeManifest Include="$(ManifestOutputPath)\CHT\*.json">
<RelativeUrl>/CHT/</RelativeUrl>
</MergeManifest>
<MergeManifest Include="$(ManifestOutputPath)\CSY\*.json">
<RelativeUrl>/CSY/</RelativeUrl>
</MergeManifest>
<MergeManifest Include="$(ManifestOutputPath)\DEU\*.json">
<RelativeUrl>/DEU/</RelativeUrl>
</MergeManifest>
<MergeManifest Include="$(ManifestOutputPath)\ENU\*.json">
<RelativeUrl>/ENU/</RelativeUrl>
</MergeManifest>
<MergeManifest Include="$(ManifestOutputPath)\ESN\*.json">
<RelativeUrl>/ESN/</RelativeUrl>
</MergeManifest>
<MergeManifest Include="$(ManifestOutputPath)\FRA\*.json">
<RelativeUrl>/FRA/</RelativeUrl>
</MergeManifest>
<MergeManifest Include="$(ManifestOutputPath)\ITA\*.json">
<RelativeUrl>/ITA/</RelativeUrl>
</MergeManifest>
<MergeManifest Include="$(ManifestOutputPath)\JPN\*.json">
<RelativeUrl>/JPN/</RelativeUrl>
</MergeManifest>
<MergeManifest Include="$(ManifestOutputPath)\KOR\*.json">
<RelativeUrl>/KOR/</RelativeUrl>
</MergeManifest>
<MergeManifest Include="$(ManifestOutputPath)\PLK\*.json">
<RelativeUrl>/PLK/</RelativeUrl>
</MergeManifest>
<MergeManifest Include="$(ManifestOutputPath)\PTB\*.json">
<RelativeUrl>/PTB/</RelativeUrl>
</MergeManifest>
<MergeManifest Include="$(ManifestOutputPath)\RUS\*.json">
<RelativeUrl>/RUS/</RelativeUrl>
</MergeManifest>
<MergeManifest Include="$(ManifestOutputPath)\TRK\*.json">
<RelativeUrl>/TRK/</RelativeUrl>
</MergeManifest>
</ItemGroup>
<Import Project="$(SwixBuildTargets)"/>
</Project>

View file

@ -1,42 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VSSetupProps>1</VSSetupProps>
</PropertyGroup>
<PropertyGroup>
<VSDropServiceUri>https://vsdrop.corp.microsoft.com/file/v1/</VSDropServiceUri>
<DropServiceUri>https://devdiv.artifacts.visualstudio.com/</DropServiceUri>
<DropExe>$(MSBuildThisDirectory)Tools\Drop.App\lib\net45\Drop.exe</DropExe>
<!-- Default drop expiration date is 10 years from now -->
<DropExpiration Condition="'$(DropExpiration)' == ''">10</DropExpiration>
<DropExpirationDate>$([System.DateTime]::Now.AddYears($(DropExpiration)).ToString("M/d/yyyy h:m:s tt"))</DropExpirationDate>
<!-- Timeout in minutes -->
<DropTimeout>10</DropTimeout>
<!-- Can be set to 'info', 'warn', 'error', 'verbose' -->
<DropTraceLevel>verbose</DropTraceLevel>
<!-- Commandline parameters for drop.exe -->
<DropParamService>-s &quot;$(DropServiceUri)&quot;</DropParamService>
<DropParamTimeout>--timeout &quot;$(DropTimeout)&quot;</DropParamTimeout>
<DropParamTraceLevel>--tracelevel &quot;$(DropTraceLevel)&quot;</DropParamTraceLevel>
<DropParamExpirationDate>-x &quot;$(DropExpirationDate)&quot;</DropParamExpirationDate>
<!-- Use AAD for authentication -->
<DropParamAuth>-a</DropParamAuth>
</PropertyGroup>
<PropertyGroup>
<ManifestTeamProject Condition="'$(ManifestTeamProject)' == ''">dotnet</ManifestTeamProject>
<ManifestRepositoryName Condition="'$(ManifestRepositoryName)' == ''">installer</ManifestRepositoryName>
<ManifestBuildBranch Condition="'$(ManifestBuildBranch)' == ''">local_build</ManifestBuildBranch>
<ManifestBuildNumber Condition="'$(ManifestBuildNumber)' == ''">$([System.DateTime]::Now.ToString("yyMMdd")).1</ManifestBuildNumber>
</PropertyGroup>
<PropertyGroup>
<ManifestPublishUrl>https://vsdrop.corp.microsoft.com/file/v1/Products/$(ManifestTeamProject)/$(ManifestRepositoryName)/$(ManifestBuildBranch)/$(ManifestBuildNumber);</ManifestPublishUrl>
</PropertyGroup>
<PropertyGroup>
<ManifestIntermediateOutputPath>$(OutputPath)\obj\$(MSBuildProject)</ManifestIntermediateOutputPath>
</PropertyGroup>
</Project>

View file

@ -1,49 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="VSSetup.props" Condition="'$(VSSetupProps)' != '1'"/>
<Target Name="PublishToVSDrop" DependsOnTargets="GetDropCmdLine">
<Exec Command="$(DropUpgradeCmd)" />
<Exec Command="$(DropCreateCmd)" />
<Exec Command="$(DropPublishCmd)" />
<Exec Command="$(DropFinalizeCmd)" />
<Exec Command="$(DropUpdateCmd)" />
<ItemGroup>
<DropManifests Include="$(VSDropSource)\*.vsman" />
</ItemGroup>
<WriteLinesToFile File="$(VSDropTxt)" Overwrite="true" Lines="@(DropManifests->'$(ManifestPublishUrl)%(Filename)%(Extension)')" />
</Target>
<Target Name="GetDropCmdLine">
<!-- Properties that will depend on each build configuration. We can only build the commandlines onces these are defined -->
<Error Text="VSDropSource property undefined" Condition="'$(VSDropSource)' == ''" />
<PropertyGroup>
<DropName>Products/$(ManifestTeamProject)/$(ManifestRepositoryName)/$(ManifestBuildBranch)/$(ManifestBuildNumber)</DropName>
<DropParamName>-n &quot;$(DropName)&quot;</DropParamName>
<DropParamSource>-d &quot;$(VSDropSource)&quot;</DropParamSource>
<DropUpgradeCmd>$(DropExe) Upgrade $(DropParamService) $(DropParamAuth) $(DropParamTimeout) $(DropParamTraceLevel)</DropUpgradeCmd>
<DropCreateCmd>$(DropExe) Create $(DropParamService) $(DropParamAuth) $(DropParamTimeout) $(DropParamTraceLevel) $(DropParamExpirationDate) $(DropParamName)</DropCreateCmd>
<DropPublishCmd>$(DropExe) Publish $(DropParamService) $(DropParamAuth) $(DropParamTimeout) $(DropParamTraceLevel) $(DropParamName) $(DropParamSource)</DropPublishCmd>
<DropFinalizeCmd>$(DropExe) Finalize $(DropParamService) $(DropParamAuth) $(DropParamTimeout) $(DropParamTraceLevel) $(DropParamName)</DropFinalizeCmd>
<DropUpdateCmd>$(DropExe) Update $(DropParamService) $(DropParamAuth) $(DropParamTimeout) $(DropParamTraceLevel) $(DropParamName) --neverExpire</DropUpdateCmd>
</PropertyGroup>
</Target>
<Target Name="VSSetupDiagnostic" DependsOnTargets="GetDropCmdLine">
<ItemGroup>
<VSSetupProperties Include="Drop cmd: $(DropUpgradeCmd)" />
<VSSetupProperties Include="Drop cmd: $(DropCreateCmd)" />
<VSSetupProperties Include="Drop cmd: $(DropPublishCmd)" />
<VSSetupProperties Include="Drop cmd: $(DropFinalizeCmd)" />
<VSSetupProperties Include="Drop cmd: $(DropUpdateCmd)" />
<VSSetupProperties Include="DropName: $(DropName)" />
</ItemGroup>
<Message Text="%(VSSetupProperties.Identity)" />
</Target>
</Project>

View file

@ -1,2 +0,0 @@
# Building
The workloads project can only be built using .NET Framework msbuild. To build locally, run ```build -project src\workloads\workloads.csproj -msbuildEngine vs```

View file

@ -1,195 +0,0 @@
<Project DefaultTargets="Restore;Build">
<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.props"/>
<PropertyGroup>
<MicrosoftDotNetBuildTasksInstallersTaskTargetFramework Condition="'$(MSBuildRuntimeType)' == 'Core'">netcoreapp3.1</MicrosoftDotNetBuildTasksInstallersTaskTargetFramework>
<MicrosoftDotNetBuildTasksInstallersTaskTargetFramework Condition="'$(DotNetBuildFromSource)' == 'true'">net5.0</MicrosoftDotNetBuildTasksInstallersTaskTargetFramework>
<MicrosoftDotNetBuildTasksInstallersTaskTargetFramework Condition="'$(MSBuildRuntimeType)' != 'Core'">net472</MicrosoftDotNetBuildTasksInstallersTaskTargetFramework>
<MicrosoftDotNetBuildTasksInstallersTaskAssembly>$(NuGetPackageRoot)microsoft.dotnet.build.tasks.installers\$(MicrosoftDotNetBuildTasksInstallersPackageVersion)\tools\$(MicrosoftDotNetBuildTasksInstallersTaskTargetFramework)\Microsoft.DotNet.Build.Tasks.Installers.dll</MicrosoftDotNetBuildTasksInstallersTaskAssembly>
</PropertyGroup>
<UsingTask AssemblyFile="$(PkgMicrosoft_DotNet_Build_Tasks_Workloads)\tools\net472\Microsoft.DotNet.Build.Tasks.Workloads.dll"
TaskName="GetWorkloadPackPackageReferences" />
<UsingTask AssemblyFile="$(PkgMicrosoft_DotNet_Build_Tasks_Workloads)\tools\net472\Microsoft.DotNet.Build.Tasks.Workloads.dll"
TaskName="GenerateVisualStudioWorkload" />
<UsingTask TaskName="CreateLightCommandPackageDrop" AssemblyFile="$(MicrosoftDotNetBuildTasksInstallersTaskAssembly)" />
<PropertyGroup>
<TargetFramework>$(CoreSdkTargetFramework)</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<IncludeBuildOutput>false</IncludeBuildOutput>
<WorkloadIntermediateOutputPath>$(ArtifactsObjDir)workloads\</WorkloadIntermediateOutputPath>
<WorkloadOutputPath>$(ArtifactsBinDir)workloads\</WorkloadOutputPath>
<PackageSource>$(WorkloadIntermediateOutputPath)packages\</PackageSource>
<!-- Project generated from the workload manfiests to download all the workload pack packages -->
<GatherPacksProject>$(WorkloadIntermediateOutputPath)src\gather\GatherPacks.csproj</GatherPacksProject>
</PropertyGroup>
<!-- Arcade -->
<PropertyGroup>
<!-- Temp directory for light command layouts -->
<LightCommandObjDir>$(ArtifactsObjDir)/LightCommandPackages</LightCommandObjDir>
<!-- Directory for the zipped up light command package -->
<LightCommandPackagesDir>$(ArtifactsNonShippingPackagesDir)</LightCommandPackagesDir>
</PropertyGroup>
<PropertyGroup>
<WixToolsetPath>$(PkgWix)\tools</WixToolsetPath>
<SwixPluginPath>$(PkgMicroBuild_Plugins_SwixBuild)</SwixPluginPath>
<SwixBuildTargets>$(SwixPluginPath)\build\MicroBuild.Plugins.SwixBuild.targets</SwixBuildTargets>
</PropertyGroup>
<ItemGroup>
<!-- Add additional workload manifest packages here -->
<ManifestPackages Include="Microsoft.NET.Workload.Mono.ToolChain.Manifest-6.0.100" Version="$(MonoWorkloadManifestVersion)" GeneratePathProperty="true" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Workloads" Version="$(MicrosoftDotNetBuildTasksWorkloadsPackageVersion)" GeneratePathProperty="true" />
<PackageReference Include="WiX" Version="$(WixPackageVersion)" GeneratePathProperty="true" />
<PackageReference Include="MicroBuild.Plugins.SwixBuild" Version="$(SwixPackageVersion)" GeneratePathProperty="true" />
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Installers" Version="$(MicrosoftDotNetBuildTasksInstallersPackageVersion)" GeneratePathProperty="True" />
<PackageReference Include="@(ManifestPackages)" />
</ItemGroup>
<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.targets" />
<Target Name="GatherWorkloadPacks">
<ItemGroup>
<ManifestFile Include="@(ManifestPackages->'$(NuGetPackageRoot)%(Identity)\%(Version)\data\WorkloadManifest.json')" />
</ItemGroup>
<GetWorkloadPackPackageReferences
PackageSource="$(PackageSource)"
ExcludedPackIds="Microsoft.NETCore.App.Runtime.AOT.win-x86.Cross.browser-wasm"
ProjectFile="$(GatherPacksProject)"
ManifestFiles = "@(ManifestFile)" />
<!-- All the workload pack packages are copied to a single source location. They will get unzipped and the tasks allow for
deleting arbitrary files from them, so we cannot use the installed copies in the NuGet cache. -->
<MSBuild Projects="$(GatherPacksProject)" Targets="restore;build" />
</Target>
<Target Name="Build" DependsOnTargets="GatherWorkloadPacks;GenerateVersions">
<ItemGroup>
<!-- Overrides for Visual Studio setup generation. If the workload definition IDs change,
these must be updated. -->
<ComponentResources Include="microsoft-net-sdk-blazorwebassembly-aot" Title=".NET WebAssembly Build Tools"
Description="Build tools for WebAssembly ahead-of-time (AoT) compilation and native linking."/>
<!-- Visual Studio components must be versioned. Build tasks will fall back to cobbling a version number from
the manifest information unless it's overridden. -->
<ComponentVersions Include="microsoft-net-sdk-blazorwebassembly-aot" Version="$(SDKBundleVersion)" />
</ItemGroup>
<!-- BAR requires having version information in blobs -->
<PropertyGroup>
<VersionedVisualStudioSetupInsertionPath>$(VisualStudioSetupInsertionPath)$(SDKBundleVersion)\</VersionedVisualStudioSetupInsertionPath>
</PropertyGroup>
<!-- Shorten package names to avoid long path issues in Visual Studio -->
<ItemGroup>
<ShortNames Include="microsoft.netcore.app.runtime;Microsoft.NETCore.App.Runtime;microsoft.net.runtime;Microsoft.NET.Runtime">
<Replacement>Microsoft</Replacement>
</ShortNames>
</ItemGroup>
<!-- Copy all the manifest packages -->
<Copy SourceFiles="@(ManifestPackages->'$(NuGetPackageRoot)%(Identity)\%(Version)\%(Identity).%(Version).nupkg')" DestinationFolder="$(PackageSource)" />
<GenerateVisualStudioWorkload IntermediateBaseOutputPath="$(WorkloadIntermediateOutputPath)"
WixToolsetPath="$(WixToolsetPath)"
GenerateMsis="true"
ComponentVersions="@(ComponentVersions)"
OutputPath="$(WorkloadOutputPath)"
PackagesPath="$(PackageSource)"
ShortNames="@(ShortNames)"
WorkloadManifests="@(ManifestFile)">
<Output TaskParameter="SwixProjects" ItemName="SwixProjects" />
<Output TaskParameter="Msis" ItemName="Msis" />
</GenerateVisualStudioWorkload>
<!-- Build all the SWIX projects. This requires full framework MSBuild-->
<MSBuild Projects="@(SwixProjects)" Properties="SwixBuildTargets=$(SwixBuildTargets);ManifestOutputPath=$(VersionedVisualStudioSetupInsertionPath)" />
<!-- Gather .wixobj files for post-build signing. We'll have to batch since we generated multiple MSIs in the previous step. -->
<MSBuild Projects="$(MSBuildProjectFile)" Properties="_WixObjDir=%(Msis.WixObj);_Msi=%(Msis.Identity)" Targets="CreateWixPack" />
<!-- Build the Visual Studio manifest project. -->
<ItemGroup>
<VisualStudioManifestProjects Include="OptionalWorkloads.vsmanproj" />
</ItemGroup>
<MSBuild Projects="@(VisualStudioManifestProjects)" Properties="SwixBuildTargets=$(SwixBuildTargets);ManifestOutputPath=$(VersionedVisualStudioSetupInsertionPath);OutputPath=$(VersionedVisualStudioSetupInsertionPath)" />
<!-- Build all the MSI payload packages for NuGet. -->
<ItemGroup>
<MsiPackageProjects Include="%(Msis.PackageProject)" />
</ItemGroup>
<MSBuild Projects="@(MsiPackageProjects)" Properties="OutputPath=$(ArtifactsShippingPackagesDir)" Targets="restore;pack" />
</Target>
<!-- Target to create a single wixpack for signing -->
<Target Name="CreateWixPack">
<ItemGroup>
<_WixObj Include="$(_WixObjDir)\**\*.wixobj" />
</ItemGroup>
<CreateLightCommandPackageDrop
LightCommandWorkingDir="$(LightCommandObjDir)"
OutputFolder="$(LightCommandPackagesDir)"
NoLogo="true"
Cultures="en-us"
InstallerFile="$(_Msi)"
WixExtensions="WixUIExtension;WixDependencyExtension;WixUtilExtension"
WixSrcFiles="@(_WixObj)">
<Output TaskParameter="OutputFile" PropertyName="_LightCommandPackageNameOutput" />
</CreateLightCommandPackageDrop>
</Target>
<!-- These are just individual targets for testing local builds. -->
<Target Name="BuildSwixProjects">
<ItemGroup>
<SwixProjects Include="$(WorkloadIntermediateOutputPath)**\*.swixproj" />
</ItemGroup>
<MSBuild Projects="@(SwixProjects)" BuildInParallel="true" Properties="SwixBuildTargets=$(SwixBuildTargets);ManifestOutputPath=$(VersionedVisualStudioSetupInsertionPath)" />
</Target>
<Target Name="BuildVisualStudioManifest">
<ItemGroup>
<VisualStudioManifestProjects Include="Microsoft.NET.vsmanproj" />
</ItemGroup>
<MSBuild Projects="@(VisualStudioManifestProjects)" BuildInParallel="true" Properties="SwixBuildTargets=$(SwixBuildTargets);ManifestOutputPath=$(VersionedVisualStudioSetupInsertionPath);OutputPath=$(VersionedVisualStudioSetupInsertionPath)" />
</Target>
<Target Name="GenerateVersions">
<Exec Command="git rev-list --count HEAD"
ConsoleToMSBuild="true"
Condition=" '$(GitCommitCount)' == '' ">
<Output TaskParameter="ConsoleOutput" PropertyName="GitCommitCount" />
</Exec>
<Error Condition=" '$(OfficialBuild)' == 'true' And '$(_PatchNumber)' == '' "
Text="_PatchNumber should not be empty in an official build. Check if there were changes in Arcade." />
<PropertyGroup>
<GitCommitCount>$(GitCommitCount.PadLeft(6,'0'))</GitCommitCount>
<!-- This number comes from arcade and combines the date based build number id and the revision (incremental number per day) -->
<CombinedBuildNumberAndRevision>$(_PatchNumber)</CombinedBuildNumberAndRevision>
<!-- Fallback to commit count when patch number is not set. This happens only during CI. -->
<CombinedBuildNumberAndRevision Condition=" '$(CombinedBuildNumberAndRevision)' == '' ">$(GitCommitCount)</CombinedBuildNumberAndRevision>
<!-- This number comes from arcade and combines the date based build number id and the revision (incremental number per day) -->
<SDKBundleVersion>$(FileVersion)</SDKBundleVersion>
<!-- Fallback to commit count when patch number is not set. This happens only during CI. -->
<SDKBundleVersion Condition=" '$(SDKBundleVersion)' == '' ">$(VersionPrefix).$(CombinedBuildNumberAndRevision)</SDKBundleVersion>
</PropertyGroup>
</Target>
</Project>