Create WASM installers for optional workloads (#10685)
Co-authored-by: Rainer Sigwald <raines@microsoft.com>
This commit is contained in:
parent
962829db28
commit
7c79ce28bc
14 changed files with 403 additions and 16 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -15,6 +15,9 @@ Library/
|
||||||
# local nuget cache
|
# local nuget cache
|
||||||
.nuget/
|
.nuget/
|
||||||
|
|
||||||
|
# local tools
|
||||||
|
.tools/
|
||||||
|
|
||||||
# NuGet v3 restore drops these even though we don't use MSBuild :(
|
# NuGet v3 restore drops these even though we don't use MSBuild :(
|
||||||
*.nuget.targets
|
*.nuget.targets
|
||||||
*.nuget.props
|
*.nuget.props
|
||||||
|
|
26
.vsts-ci.yml
26
.vsts-ci.yml
|
@ -59,13 +59,13 @@ stages:
|
||||||
_BuildConfig: Debug
|
_BuildConfig: Debug
|
||||||
_BuildArchitecture: x86
|
_BuildArchitecture: x86
|
||||||
_DOTNET_CLI_UI_LANGUAGE: ''
|
_DOTNET_CLI_UI_LANGUAGE: ''
|
||||||
_AdditionalBuildParameters: ''
|
_AdditionalBuildParameters: '-msbuildEngine dotnet'
|
||||||
_TestArg: $(_WindowsTestArg)
|
_TestArg: $(_WindowsTestArg)
|
||||||
Build_ES_Debug_x64:
|
Build_ES_Debug_x64:
|
||||||
_BuildConfig: Debug
|
_BuildConfig: Debug
|
||||||
_BuildArchitecture: x64
|
_BuildArchitecture: x64
|
||||||
_DOTNET_CLI_UI_LANGUAGE: es
|
_DOTNET_CLI_UI_LANGUAGE: es
|
||||||
_AdditionalBuildParameters: ''
|
_AdditionalBuildParameters: '-msbuildEngine dotnet'
|
||||||
_TestArg: $(_WindowsTestArg)
|
_TestArg: $(_WindowsTestArg)
|
||||||
# Internal-only builds
|
# Internal-only builds
|
||||||
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||||
|
@ -73,29 +73,39 @@ stages:
|
||||||
_BuildConfig: Release
|
_BuildConfig: Release
|
||||||
_BuildArchitecture: x86
|
_BuildArchitecture: x86
|
||||||
_DOTNET_CLI_UI_LANGUAGE: ''
|
_DOTNET_CLI_UI_LANGUAGE: ''
|
||||||
_AdditionalBuildParameters: ''
|
_AdditionalBuildParameters: '-msbuildEngine dotnet'
|
||||||
_TestArg: $(_WindowsTestArg)
|
_TestArg: $(_WindowsTestArg)
|
||||||
# Always run builds
|
# Always run builds
|
||||||
Build_Release_x64:
|
Build_Release_x64:
|
||||||
_BuildConfig: Release
|
_BuildConfig: Release
|
||||||
_BuildArchitecture: x64
|
_BuildArchitecture: x64
|
||||||
_DOTNET_CLI_UI_LANGUAGE: ''
|
_DOTNET_CLI_UI_LANGUAGE: ''
|
||||||
_AdditionalBuildParameters: '/p:PublishInternalAsset=true'
|
_AdditionalBuildParameters: '-msbuildEngine dotnet /p:PublishInternalAsset=true'
|
||||||
_TestArg: $(_WindowsTestArg)
|
_TestArg: $(_WindowsTestArg)
|
||||||
Build_Release_arm:
|
Build_Release_arm:
|
||||||
_BuildConfig: Release
|
_BuildConfig: Release
|
||||||
_BuildArchitecture: arm
|
_BuildArchitecture: arm
|
||||||
_DOTNET_CLI_UI_LANGUAGE: ''
|
_DOTNET_CLI_UI_LANGUAGE: ''
|
||||||
_AdditionalBuildParameters: ''
|
_AdditionalBuildParameters: '-msbuildEngine dotnet'
|
||||||
# Never run tests on arm64
|
# Never run tests on arm64
|
||||||
_TestArg: ''
|
_TestArg: ''
|
||||||
Build_Release_arm64:
|
Build_Release_arm64:
|
||||||
_BuildConfig: Release
|
_BuildConfig: Release
|
||||||
_BuildArchitecture: arm64
|
_BuildArchitecture: arm64
|
||||||
_DOTNET_CLI_UI_LANGUAGE: ''
|
_DOTNET_CLI_UI_LANGUAGE: ''
|
||||||
_AdditionalBuildParameters: ''
|
_AdditionalBuildParameters: '-msbuildEngine dotnet'
|
||||||
# Never run tests on arm64
|
# Never run tests on arm64
|
||||||
_TestArg: ''
|
_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'
|
||||||
|
# Never run tests for workloads
|
||||||
|
_TestArg: ''
|
||||||
|
|
||||||
- template: /eng/build.yml
|
- template: /eng/build.yml
|
||||||
parameters:
|
parameters:
|
||||||
|
@ -115,14 +125,14 @@ stages:
|
||||||
_BuildConfig: Release
|
_BuildConfig: Release
|
||||||
_BuildArchitecture: x64
|
_BuildArchitecture: x64
|
||||||
_DOTNET_CLI_UI_LANGUAGE: ''
|
_DOTNET_CLI_UI_LANGUAGE: ''
|
||||||
_AdditionalBuildParameters: '/p:PublishInternalAsset=true'
|
_AdditionalBuildParameters: '-msbuildEngine dotnet /p:PublishInternalAsset=true'
|
||||||
# Never run tests on PGO bits
|
# Never run tests on PGO bits
|
||||||
_TestArg: ''
|
_TestArg: ''
|
||||||
Build_Release_x86:
|
Build_Release_x86:
|
||||||
_BuildConfig: Release
|
_BuildConfig: Release
|
||||||
_BuildArchitecture: x86
|
_BuildArchitecture: x86
|
||||||
_DOTNET_CLI_UI_LANGUAGE: ''
|
_DOTNET_CLI_UI_LANGUAGE: ''
|
||||||
_AdditionalBuildParameters: ''
|
_AdditionalBuildParameters: '-msbuildEngine dotnet'
|
||||||
_TestArg: ''
|
_TestArg: ''
|
||||||
pgoInstrument: true
|
pgoInstrument: true
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,8 @@ The repository contains native code project required for the Windows installer.
|
||||||
- Install CMAKE 3.2.0.1 or later
|
- Install CMAKE 3.2.0.1 or later
|
||||||
- Install MSVC Build tools for x86/x64/arm64, v14.28-16.9
|
- 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
|
# Build status
|
||||||
|
|
||||||
|All legs|
|
|All legs|
|
||||||
|
|
1
eng/SymbolPublishingExclusionsFile.txt
Normal file
1
eng/SymbolPublishingExclusionsFile.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
vsman/OptionalWorkloads.vsman
|
|
@ -136,14 +136,14 @@
|
||||||
</Dependency>
|
</Dependency>
|
||||||
</ProductDependencies>
|
</ProductDependencies>
|
||||||
<ToolsetDependencies>
|
<ToolsetDependencies>
|
||||||
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21263.5">
|
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21269.3">
|
||||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||||
<Sha>e8d0df4f35cfa23174fe7204ef958cf5d1b8e797</Sha>
|
<Sha>0b0d5b90b5aba80c66a9e7a210e0af8093dc4f57</Sha>
|
||||||
<SourceBuild RepoName="arcade" ManagedOnly="true" />
|
<SourceBuild RepoName="arcade" ManagedOnly="true" />
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.21263.5">
|
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.21269.3">
|
||||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||||
<Sha>e8d0df4f35cfa23174fe7204ef958cf5d1b8e797</Sha>
|
<Sha>0b0d5b90b5aba80c66a9e7a210e0af8093dc4f57</Sha>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
<Dependency Name="Private.SourceBuild.ReferencePackages" Version="1.0.0-beta.20217.1">
|
<Dependency Name="Private.SourceBuild.ReferencePackages" Version="1.0.0-beta.20217.1">
|
||||||
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
|
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
|
||||||
|
|
|
@ -20,7 +20,8 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<!-- Dependency from https://github.com/dotnet/arcade -->
|
<!-- Dependency from https://github.com/dotnet/arcade -->
|
||||||
<MicrosoftDotNetBuildTasksInstallersPackageVersion>6.0.0-beta.21263.5</MicrosoftDotNetBuildTasksInstallersPackageVersion>
|
<MicrosoftDotNetBuildTasksInstallersPackageVersion>6.0.0-beta.21269.3</MicrosoftDotNetBuildTasksInstallersPackageVersion>
|
||||||
|
<MicrosoftDotNetBuildTasksWorkloadsPackageVersion>6.0.0-beta.21269.3</MicrosoftDotNetBuildTasksWorkloadsPackageVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<!-- Dependency from https://github.com/dotnet/winforms -->
|
<!-- Dependency from https://github.com/dotnet/winforms -->
|
||||||
|
@ -164,5 +165,8 @@
|
||||||
<!-- pinned dependency. This package is not being produced outside of the 2.0 branch of corefx and should not change. -->
|
<!-- 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>
|
<CLI_NETStandardLibraryNETFrameworkVersion>2.0.1-servicing-26011-01</CLI_NETStandardLibraryNETFrameworkVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<SwixPackageVersion>1.1.37</SwixPackageVersion>
|
||||||
|
</PropertyGroup>
|
||||||
<Import Project="$(RepositoryEngineeringDir)ManualVersions.props" />
|
<Import Project="$(RepositoryEngineeringDir)ManualVersions.props" />
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -4,3 +4,9 @@ $script:useInstalledDotNetCli = $false
|
||||||
|
|
||||||
# Add CMake to the path.
|
# Add CMake to the path.
|
||||||
$env:PATH = "$PSScriptRoot\..\.tools\bin;$env: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")
|
||||||
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>$(CoreSdkTargetFramework)</TargetFramework>
|
<TargetFramework>$(CoreSDKTargetFramework)</TargetFramework>
|
||||||
<NativeVersionFile>$(ArtifactsObjDir)sdk_version.h</NativeVersionFile>
|
<NativeVersionFile>$(ArtifactsObjDir)sdk_version.h</NativeVersionFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
10
global.json
10
global.json
|
@ -1,17 +1,25 @@
|
||||||
{
|
{
|
||||||
|
"sdk": {
|
||||||
|
"version": "6.0.0-preview.5.21228.9",
|
||||||
|
"allowPrerelease": "true",
|
||||||
|
"rollForward": "major"
|
||||||
|
},
|
||||||
"tools": {
|
"tools": {
|
||||||
"dotnet": "6.0.100-preview.5.21228.9",
|
"dotnet": "6.0.100-preview.5.21228.9",
|
||||||
"runtimes": {
|
"runtimes": {
|
||||||
"dotnet": [
|
"dotnet": [
|
||||||
"$(VSRedistCommonNetCoreSharedFrameworkx6460PackageVersion)"
|
"$(VSRedistCommonNetCoreSharedFrameworkx6460PackageVersion)"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"vs": {
|
||||||
|
"version": "16.9"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"native-tools": {
|
"native-tools": {
|
||||||
"cmake": "3.16.4"
|
"cmake": "3.16.4"
|
||||||
},
|
},
|
||||||
"msbuild-sdks": {
|
"msbuild-sdks": {
|
||||||
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21263.5",
|
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21269.3",
|
||||||
"Microsoft.DotNet.CMake.Sdk": "6.0.0-beta.21253.2"
|
"Microsoft.DotNet.CMake.Sdk": "6.0.0-beta.21253.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
68
src/workloads/OptionalWorkloads.vsmanproj
Normal file
68
src/workloads/OptionalWorkloads.vsmanproj
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
<?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>
|
42
src/workloads/VSSetup.props
Normal file
42
src/workloads/VSSetup.props
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
<?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 "$(DropServiceUri)"</DropParamService>
|
||||||
|
<DropParamTimeout>--timeout "$(DropTimeout)"</DropParamTimeout>
|
||||||
|
<DropParamTraceLevel>--tracelevel "$(DropTraceLevel)"</DropParamTraceLevel>
|
||||||
|
<DropParamExpirationDate>-x "$(DropExpirationDate)"</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>
|
49
src/workloads/VSSetup.targets
Normal file
49
src/workloads/VSSetup.targets
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
<?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 "$(DropName)"</DropParamName>
|
||||||
|
<DropParamSource>-d "$(VSDropSource)"</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>
|
2
src/workloads/readme.md
Normal file
2
src/workloads/readme.md
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# Building
|
||||||
|
The workloads project can only be built using .NET Framework msbuild. To build locally, run ```build -project src\workloads\workloads.csproj -msbuildEngine vs```
|
192
src/workloads/workloads.csproj
Normal file
192
src/workloads/workloads.csproj
Normal file
|
@ -0,0 +1,192 @@
|
||||||
|
<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>
|
||||||
|
<VisualStudioManifestOutputPath>$(ArtifactsDir)VSSetup\$(Configuration)\Insertion\</VisualStudioManifestOutputPath>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<!-- 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=$(VisualStudioManifestOutputPath)" />
|
||||||
|
|
||||||
|
<!-- 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=$(VisualStudioManifestOutputPath);OutputPath=$(VisualStudioManifestOutputPath)" />
|
||||||
|
|
||||||
|
<!-- 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=$(VisualStudioManifestOutputPath)" />
|
||||||
|
</Target>
|
||||||
|
|
||||||
|
<Target Name="BuildVisualStudioManifest">
|
||||||
|
<ItemGroup>
|
||||||
|
<VisualStudioManifestProjects Include="Microsoft.NET.vsmanproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<MSBuild Projects="@(VisualStudioManifestProjects)" BuildInParallel="true" Properties="SwixBuildTargets=$(SwixBuildTargets);ManifestOutputPath=$(VisualStudioManifestOutputPath);OutputPath=$(VisualStudioManifestOutputPath)" />
|
||||||
|
</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>
|
Loading…
Reference in a new issue