diff --git a/BuildAll.ps1 b/BuildAll.ps1 index 511afa1fcd..f7fdfddd78 100644 --- a/BuildAll.ps1 +++ b/BuildAll.ps1 @@ -36,6 +36,8 @@ $env:Build_SourcesDirectory = (Split-Path $MyInvocation.MyCommand.Path) $buildOverridePath = "build\override" $BasePath = "BuildOutput/FullNuget" $ComponentBasePath = "BuildOutput/ComponentNuget" +$BasePackagePath = "BuildOutput/BaseNuget" +$BaseComponentPath = "BuildOutput/BaseComponentNuget" # FUTURE(YML2PS): Update build to no longer place generated files in sources directory if ($Clean) @@ -138,7 +140,7 @@ Try { if (($AzureBuildStep -eq "all") -Or (($AzureBuildStep -eq "BuildFoundation") -Or ($AzureBuildStep -eq "BuildMRT") -Or ($AzureBuildStep -eq "PreFastSetup"))) { NugetRestore "WindowsAppRuntime" "WindowsAppRuntime.sln" - NugetRestore "Microsoft.WindowsAppRuntime.Bootstrap.Net" "dev\Bootstrap\CS\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj" + NugetRestore "Microsoft.WindowsAppRuntime.Bootstrap.Net" "base\dev\Bootstrap\CS\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj" $srcPath = Get-Childitem -Path 'dev\WindowsAppRuntime_Insights\packages' -File 'MicrosoftTelemetry.h' -Recurse @@ -241,7 +243,7 @@ Try { # Build windowsAppRuntime.sln (anyCPU) and move output to staging. #------------------ # build and restore AnyCPU - & $msBuildPath /restore "dev\Bootstrap\CS\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj" /p:Configuration=$configurationForMrtAndAnyCPU /p:Platform=AnyCPU /p:RestoreConfigFile=NuGet.config + & $msBuildPath /restore "base\dev\Bootstrap\CS\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj" /p:Configuration=$configurationForMrtAndAnyCPU /p:Platform=AnyCPU /p:RestoreConfigFile=NuGet.config if ($lastexitcode -ne 0) { write-host "ERROR: msbuild.exe Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj FAILED." @@ -292,27 +294,17 @@ Try { } $nuSpecsPath = "build\NuSpecs" - Copy-Item -Path "$nuSpecsPath\WindowsAppSDK-Nuget-Native.targets" -Destination "$BasePath\build\native\Microsoft.WindowsAppSDK.Foundation.targets" - Copy-Item -Path "$nuSpecsPath\WindowsAppSDK-Nuget-Native.props" -Destination "$BasePath\build\native\Microsoft.WindowsAppSDK.Foundation.props" - Copy-Item -Path "$nuSpecsPath\WindowsAppSDK-Nuget-Native.C.props" -Destination "$BasePath\build\native" - Copy-Item -Path "$nuSpecsPath\WindowsAppSDK-Nuget-Native.WinRt.props" -Destination "$BasePath\build\native" - Copy-Item -Path "$nuSpecsPath\WindowsAppSDK-Nuget-Native.AutoInitializer.targets" -Destination "$BasePath\build\native" - Copy-Item -Path "$nuSpecsPath\WindowsAppSDK-Nuget-Native.Bootstrap.targets" -Destination "$BasePath\build\native" - Copy-Item -Path "$nuSpecsPath\WindowsAppSDK-Nuget-Native.CompatibilitySetter.targets" -Destination "$BasePath\build\native" - Copy-Item -Path "$nuSpecsPath\WindowsAppSDK-Nuget-Native.DeploymentManager.targets" -Destination "$BasePath\build\native" - Copy-Item -Path "$nuSpecsPath\WindowsAppSDK-Nuget-Native.UndockedRegFreeWinRT.targets" -Destination "$BasePath\build\native" + Copy-Item -Path "$nuSpecsPath\native\Microsoft.WindowsAppSDK.targets" -Destination "$BasePath\build\native\Microsoft.WindowsAppSDK.Foundation.targets" + Copy-Item -Path "$nuSpecsPath\native\Microsoft.WindowsAppSDK.props" -Destination "$BasePath\build\native\Microsoft.WindowsAppSDK.Foundation.props" + Copy-Item -Path "$nuSpecsPath\native\Microsoft.WindowsAppSDK.C.props" -Destination "$BasePath\build\native" + Copy-Item -Path "$nuSpecsPath\native\Microsoft.WindowsAppSDK.WinRt.props" -Destination "$BasePath\build\native" + + # Bootstrapper and auto-initialization native targets have moved to the Base package. Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.Foundation.targets" -Destination "$BasePath\build" Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.Foundation.props" -Destination "$BasePath\build" - Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.AutoInitializer.CS.targets" -Destination "$BasePath\build" - Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.AutoInitializerCommon.targets" -Destination "$BasePath\build" - Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.Bootstrap.CS.targets" -Destination "$BasePath\build" - Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.BootstrapCommon.targets" -Destination "$BasePath\build" - Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.CompatibilitySetter.CS.targets" -Destination "$BasePath\build" - Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.DeploymentManager.CS.targets" -Destination "$BasePath\build" - Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.DeploymentManagerCommon.targets" -Destination "$BasePath\build" - Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.UndockedRegFreeWinRT.CS.targets" -Destination "$BasePath\build" - Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.UndockedRegFreeWinRTCommon.targets" -Destination "$BasePath\build" + + # Bootstrapper and auto-initialization managed targets have moved to the Base package. Copy-Item -Path "$nuSpecsPath\AppxManifest.xml" -Destination "$BasePath\AppxManifest.xml" @@ -338,12 +330,10 @@ Try { # Copy MRT metadata files. Copy-Item -Path "$MRTSourcesDirectory\packaging\native\MrtCore.C.props" -Destination "$BasePath\build\native" Copy-Item -Path "$MRTSourcesDirectory\packaging\native\MrtCore.props" -Destination "$BasePath\build\native" - Copy-Item -Path "$MRTSourcesDirectory\packaging\README.md" -Destination "$BasePath\build" Copy-Item -Path "$MRTSourcesDirectory\mrt\core\src\MRM.h" -Destination "$BasePath\include" Copy-Item -Path "$MRTSourcesDirectory\mrt\Microsoft.Windows.ApplicationModel.Resources\src\Microsoft.Windows.ApplicationModel.Resources.idl" -Destination "$BasePath\include" - # If AnyCPU generates another dll it needs to be added here. - Copy-Item -path "BuildOutput\$configurationForMrtAndAnyCPU\anycpu\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.dll" -destination "$BasePath\lib\net6.0-windows10.0.17763.0" + # Bootstrap.Net.dll has moved to the Base package. #------------------ # Move other files and prepare manifest and appxmanifest.xml @@ -503,6 +493,315 @@ Try { Copy-Item -Path $IntellisenseFile -Destination $DestinationDir } } + if ($AzureBuildStep -eq "BuildBase") + { + #------------------ + # Build the Bootstrap DLL and Bootstrap.Net for the Base package. + # No Foundation build dependency required. + #------------------ + + # Restore NuGet packages for the solution (packages.config projects) + # Clear NUGET_RESTORE_MSBUILD_ARGS to avoid multi-platform arg issues + $savedMsBuildArgs = $env:NUGET_RESTORE_MSBUILD_ARGS + $env:NUGET_RESTORE_MSBUILD_ARGS = "" + nuget restore WindowsAppRuntime.sln -configfile NuGet.config + if ($lastexitcode -ne 0) + { + write-host "ERROR: nuget.exe restore WindowsAppRuntime.sln FAILED." + exit 1 + } + $env:NUGET_RESTORE_MSBUILD_ARGS = $savedMsBuildArgs + + foreach($configurationToRun in $configuration.Split(",")) + { + foreach($platformToRun in $platform.Split(",")) + { + write-host "Building WindowsAppRuntime_BootstrapDLL for Base: $configurationToRun|$platformToRun" + & $msBuildPath /restore ` + "base\dev\WindowsAppRuntime_BootstrapDLL\WindowsAppRuntime_BootstrapDLL.vcxproj" ` + /p:Configuration=$configurationToRun ` + /p:Platform=$platformToRun ` + /p:RestoreConfigFile=NuGet.config ` + /binaryLogger:"BuildOutput/binlogs/WindowsAppRuntime_BootstrapDLL.$platformToRun.$configurationToRun.binlog" ` + $WindowsAppSDKVersionProperty ` + /p:WindowsAppSDKCleanIntermediateFiles=true ` + /p:AppxSymbolPackageEnabled=false ` + /p:WindowsAppSDKBuildPipeline=$WindowsAppSDKBuildPipeline + if ($lastexitcode -ne 0) + { + write-host "ERROR: msbuild.exe WindowsAppRuntime_BootstrapDLL FAILED." + exit 1 + } + } + } + + # Build Bootstrap.Net (AnyCPU) + & $msBuildPath /restore "base\dev\Bootstrap\CS\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj" /p:Configuration=$configurationForMrtAndAnyCPU /p:Platform=AnyCPU /p:RestoreConfigFile=NuGet.config + if ($lastexitcode -ne 0) + { + write-host "ERROR: msbuild.exe Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj FAILED." + exit 1 + } + } + if (($AzureBuildStep -eq "all") -Or ($AzureBuildStep -eq "StageBaseFiles")) + { + #------------------ + # Stage files for Base Package + #------------------ + if(-not (test-path "$BasePackagePath")) + { + new-item -path "$BasePackagePath" -itemtype "directory" + } + if(-not (test-path "$BaseComponentPath")) + { + new-item -path "$BaseComponentPath" -itemtype "directory" + } + if(-not (test-path "$BasePackagePath\build\native")) + { + new-item -path "$BasePackagePath\build\native" -itemtype "directory" -force + } + if(-not (test-path "$BaseComponentPath\build\native")) + { + new-item -path "$BaseComponentPath\build\native" -itemtype "directory" -force + } + if(-not (test-path "$BasePackagePath\include")) + { + new-item -path "$BasePackagePath\include" -itemtype "directory" -force + } + + $nuSpecsPath = "base\build\NuSpecs" + + # Stage Base native targets + Copy-Item -Path "$nuSpecsPath\native\Microsoft.WindowsAppSDK.Base.targets" -Destination "$BasePackagePath\build\native\Microsoft.WindowsAppSDK.Base.targets" + Copy-Item -Path "$nuSpecsPath\native\Microsoft.WindowsAppSDK.AutoInitializer.targets" -Destination "$BasePackagePath\build\native" + Copy-Item -Path "$nuSpecsPath\native\Microsoft.WindowsAppSDK.Bootstrap.targets" -Destination "$BasePackagePath\build\native" + Copy-Item -Path "$nuSpecsPath\native\Microsoft.WindowsAppSDK.CompatibilitySetter.targets" -Destination "$BasePackagePath\build\native" + Copy-Item -Path "$nuSpecsPath\native\Microsoft.WindowsAppSDK.DeploymentManager.targets" -Destination "$BasePackagePath\build\native" + Copy-Item -Path "$nuSpecsPath\native\Microsoft.WindowsAppSDK.UndockedRegFreeWinRT.targets" -Destination "$BasePackagePath\build\native" + + # Stage Base managed targets + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.Base.targets" -Destination "$BasePackagePath\build" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.Base.props" -Destination "$BasePackagePath\build" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.BaseCommon.targets" -Destination "$BasePackagePath\build" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.AutoInitializer.CS.targets" -Destination "$BasePackagePath\build" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.AutoInitializerCommon.targets" -Destination "$BasePackagePath\build" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.Bootstrap.CS.targets" -Destination "$BasePackagePath\build" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.BootstrapCommon.targets" -Destination "$BasePackagePath\build" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.CompatibilitySetter.CS.targets" -Destination "$BasePackagePath\build" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.DeploymentManager.CS.targets" -Destination "$BasePackagePath\build" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.DeploymentManagerCommon.targets" -Destination "$BasePackagePath\build" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.UndockedRegFreeWinRT.CS.targets" -Destination "$BasePackagePath\build" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.UndockedRegFreeWinRTCommon.targets" -Destination "$BasePackagePath\build" + + # Stage deployment-mode targets (from aggregator) + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.SelfContained.targets" -Destination "$BasePackagePath\build" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.SingleFile.targets" -Destination "$BasePackagePath\build" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.SingleProject.targets" -Destination "$BasePackagePath\build" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.Arm64Ec.targets" -Destination "$BasePackagePath\build" + + # Stage native props (delegates to parent props) + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.Base.Native.props" -Destination "$BasePackagePath\build\native\Microsoft.WindowsAppSDK.Base.props" + + # Stage auto-initializer source files from their source locations (no build needed) + Copy-Item -path "base\dev\include\WindowsAppRuntimeAutoInitializer.cpp" -destination "$BasePackagePath\include" -force + Copy-Item -path "base\dev\include\WindowsAppRuntimeAutoInitializer.cs" -destination "$BasePackagePath\include" -force + Copy-Item -path "base\dev\include\DeploymentManagerAutoInitializer.cpp" -destination "$BasePackagePath\include" -force + Copy-Item -path "base\dev\include\DeploymentManagerAutoInitializer.cs" -destination "$BasePackagePath\include" -force + Copy-Item -path "base\dev\include\UndockedRegFreeWinRT-AutoInitializer.cpp" -destination "$BasePackagePath\include" -force + Copy-Item -path "base\dev\include\UndockedRegFreeWinRT-AutoInitializer.cs" -destination "$BasePackagePath\include" -force + Copy-Item -path "base\dev\WindowsAppRuntime_BootstrapDLL\MddBootstrap.h" -destination "$BasePackagePath\include" -force + Copy-Item -path "base\dev\WindowsAppRuntime_BootstrapDLL\MddBootstrapAutoInitializer.cpp" -destination "$BasePackagePath\include" -force + Copy-Item -path "base\dev\WindowsAppRuntime_BootstrapDLL\MddBootstrapAutoInitializer.cs" -destination "$BasePackagePath\include" -force + + # Generate WindowsAppSDK-VersionInfo.h for the Base package + # Parse version from ComponentPackageVersion (e.g., "2.0.260326000-experimental") + $versionParts = $ComponentPackageVersion -split '-' + $numericParts = $versionParts[0] -split '\.' + $vi_major = [int]$numericParts[0] + $vi_minor = [int]$numericParts[1] + $vi_patch = [int]$numericParts[2] + $vi_channel = if ($versionParts.Length -gt 1) { $versionParts[1] } else { "" } + $vi_tag = $vi_channel + $vi_shorttag = if ($vi_tag.Length -gt 0) { $vi_tag.Substring(0,1) + ($vi_tag -replace '[^0-9]','') } else { "" } + $vi_formatted_tag = if ($vi_tag.Length -gt 0) { "-$vi_tag" } else { "" } + $vi_formatted_shorttag = if ($vi_shorttag.Length -gt 0) { "-$vi_shorttag" } else { "" } + $vi_majorminor = ($vi_major -shl 16) -bor $vi_minor + $vi_majorminor_hex = "{0:X8}" -f $vi_majorminor + $vi_version_uint64 = [uint64]$vi_major -shl 48 -bor [uint64]$vi_minor -shl 32 -bor [uint64]$vi_patch -shl 16 + $vi_version_uint64_hex = "{0:X16}" -f $vi_version_uint64 + $versionInfoHeader = @" +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +// +// DO NOT MODIFY. Generated by BuildAll.ps1 StageBaseFiles step. +// + +#ifndef _WINDOWSAPPSDK_VERSIONINFO_H__ +#define _WINDOWSAPPSDK_VERSIONINFO_H__ + +#define WINDOWSAPPSDK_RELEASE_MAJOR ${vi_major}u +#define WINDOWSAPPSDK_RELEASE_MINOR ${vi_minor}u +#define WINDOWSAPPSDK_RELEASE_PATCH ${vi_patch}u +#define WINDOWSAPPSDK_RELEASE_MAJORMINOR 0x${vi_majorminor_hex}u +#define WINDOWSAPPSDK_RELEASE_CHANNEL "${vi_channel}" +#define WINDOWSAPPSDK_RELEASE_CHANNEL_W L"${vi_channel}" +#define WINDOWSAPPSDK_RELEASE_VERSION_TAG "${vi_tag}" +#define WINDOWSAPPSDK_RELEASE_VERSION_TAG_W L"${vi_tag}" +#define WINDOWSAPPSDK_RELEASE_VERSION_SHORTTAG "${vi_shorttag}" +#define WINDOWSAPPSDK_RELEASE_VERSION_SHORTTAG_W L"${vi_shorttag}" +#define WINDOWSAPPSDK_RELEASE_FORMATTED_VERSION_TAG "${vi_formatted_tag}" +#define WINDOWSAPPSDK_RELEASE_FORMATTED_VERSION_TAG_W L"${vi_formatted_tag}" +#define WINDOWSAPPSDK_RELEASE_FORMATTED_VERSION_SHORTTAG "${vi_formatted_shorttag}" +#define WINDOWSAPPSDK_RELEASE_FORMATTED_VERSION_SHORTTAG_W L"${vi_formatted_shorttag}" + +#define WINDOWSAPPSDK_RUNTIME_VERSION_UINT64 0x${vi_version_uint64_hex}ui64 + +#ifdef __cplusplus +#if (__cplusplus >= 201703L) || (defined(_MSVC_LANG) && (_MSVC_LANG >= 201703L)) +namespace Microsoft::WindowsAppSDK +{ + constexpr uint16_t Release_Major{ static_cast(${vi_major}) }; + constexpr uint16_t Release_Minor{ static_cast(${vi_minor}) }; + constexpr uint32_t Release_Patch{ ${vi_patch}u }; + constexpr uint32_t Release_MajorMinor{ 0x${vi_majorminor_hex}u }; + constexpr PCWSTR Release_Channel{ L"${vi_channel}" }; + constexpr PCWSTR Release_VersionTag{ L"${vi_tag}" }; + constexpr PCWSTR Release_VersionShortTag{ L"${vi_shorttag}" }; + constexpr PCWSTR Release_FormattedVersionTag{ L"${vi_formatted_tag}" }; + constexpr PCWSTR Release_FormattedVersionShortTag{ L"${vi_formatted_shorttag}" }; + constexpr uint64_t Runtime_Version_UInt64{ 0x${vi_version_uint64_hex}ui64 }; +} +#endif // __cplusplus >= 201703L || _MSVC_LANG >= 201703L +#endif // __cplusplus + +#endif // _WINDOWSAPPSDK_VERSIONINFO_H__ +"@ + $versionInfoHeader | Out-File -Encoding UTF8 -FilePath "$BasePackagePath\include\WindowsAppSDK-VersionInfo.h" + Write-Host "Generated WindowsAppSDK-VersionInfo.h (Major=$vi_major, Minor=$vi_minor, Patch=$vi_patch, Channel=$vi_channel)" + + # Generate WindowsAppSDK-VersionInfo.cs for the Base package (used by C# auto-initializer) + $versionInfoCs = @" +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + +// +// DO NOT MODIFY. Generated by BuildAll.ps1 StageBaseFiles step. +// + +namespace Microsoft.WindowsAppSDK +{ + // Release information + internal class Release + { + internal const ushort Major = ${vi_major}; + internal const ushort Minor = ${vi_minor}; + internal const uint MajorMinor = 0x${vi_majorminor_hex}; + internal const string Channel = "${vi_channel}"; + internal const string VersionTag = "${vi_tag}"; + internal const string VersionShortTag = "${vi_shorttag}"; + internal const string FormattedVersionTag = "${vi_formatted_tag}"; + internal const string FormattedVersionShortTag = "${vi_formatted_shorttag}"; + } + + namespace Runtime + { + internal class Identity + { + internal const string Publisher = "CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"; + internal const string PublisherId = "8wekyb3d8bbwe"; + } + + internal class Version + { + internal const ushort Major = ${vi_major}; + internal const ushort Minor = ${vi_minor}; + internal const ushort Build = 0; + internal const ushort Revision = 0; + internal const ulong UInt64 = 0x${vi_version_uint64_hex}; + internal const string DotQuadString = "${vi_major}.${vi_minor}.0.0"; + } + } +} +"@ + $versionInfoCs | Out-File -Encoding UTF8 -FilePath "$BasePackagePath\include\WindowsAppSDK-VersionInfo.cs" + Write-Host "Generated WindowsAppSDK-VersionInfo.cs" + + # Stage Bootstrap binaries per-platform (from build output) + foreach($configurationToRun in $configuration.Split(",")) + { + foreach($platformToRun in $platform.Split(",")) + { + $bootstrapOutput = "BuildOutput\$configurationToRun\$platformToRun\WindowsAppRuntime_BootstrapDLL" + + if(-not (test-path "$BasePackagePath\runtimes\win-$platformToRun\native")) + { + new-item -path "$BasePackagePath\runtimes\win-$platformToRun\native" -itemtype "directory" -force + } + if(-not (test-path "$BasePackagePath\lib\win10-$platformToRun")) + { + new-item -path "$BasePackagePath\lib\win10-$platformToRun" -itemtype "directory" -force + } + Copy-Item -path "$bootstrapOutput\Microsoft.WindowsAppRuntime.Bootstrap.dll" -destination "$BasePackagePath\runtimes\win-$platformToRun\native" -force -ErrorAction SilentlyContinue + Copy-Item -path "$bootstrapOutput\Microsoft.WindowsAppRuntime.Bootstrap.pdb" -destination "$BasePackagePath\runtimes\win-$platformToRun\native" -force -ErrorAction SilentlyContinue + Copy-Item -path "$bootstrapOutput\Microsoft.WindowsAppRuntime.Bootstrap.lib" -destination "$BasePackagePath\lib\win10-$platformToRun" -force -ErrorAction SilentlyContinue + } + } + + # Stage Bootstrap.Net.dll + $anyCpuConfig = $configuration.Split(",")[0] + $bootstrapNetDir = "BuildOutput\$anyCpuConfig\AnyCPU\Microsoft.WindowsAppRuntime.Bootstrap.Net" + if(-not (test-path "$BasePackagePath\lib\net6.0-windows10.0.17763.0")) + { + new-item -path "$BasePackagePath\lib\net6.0-windows10.0.17763.0" -itemtype "directory" -force + } + Copy-Item -path "$bootstrapNetDir\Microsoft.WindowsAppRuntime.Bootstrap.Net.dll" -destination "$BasePackagePath\lib\net6.0-windows10.0.17763.0" -force -ErrorAction SilentlyContinue + + # Copy Base package files to component path + build\Scripts\RobocopyWrapper.ps1 ` + -Source (Join-Path $BasePackagePath 'build') ` + -dest (Join-Path $BaseComponentPath 'build') + + build\Scripts\RobocopyWrapper.ps1 ` + -Source (Join-Path $BasePackagePath 'include') ` + -dest (Join-Path $BaseComponentPath 'include') + + build\Scripts\RobocopyWrapper.ps1 ` + -Source (Join-Path $BasePackagePath 'build') ` + -dest (Join-Path $BaseComponentPath 'buildTransitive') + + # Copy transport package specific props / targets + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.Base.TransportPackage.targets" -Destination "$BasePackagePath\build" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.Base.TransportPackage.props" -Destination "$BasePackagePath\build" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.Base.TransportPackage.targets" -Destination "$BasePackagePath\build\native" + Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.Base.TransportPackage.props" -Destination "$BasePackagePath\build\native" + + Copy-Item -Path "LICENSE" -Destination "$BasePackagePath\license.txt" -force + Copy-Item -Path "LICENSE" -Destination "$BaseComponentPath\license.txt" -force + + # Copy runtimes and lib to component path + foreach($platformToRun in $platform.Split(",")) + { + if (test-path "$BasePackagePath\runtimes\win-$platformToRun") + { + build\Scripts\RobocopyWrapper.ps1 ` + -Source "$BasePackagePath\runtimes\win-$platformToRun" ` + -dest "$BaseComponentPath\runtimes\win-$platformToRun" + } + if (test-path "$BasePackagePath\lib\win10-$platformToRun") + { + build\Scripts\RobocopyWrapper.ps1 ` + -Source "$BasePackagePath\lib\win10-$platformToRun" ` + -dest "$BaseComponentPath\lib\win10-$platformToRun" + } + } + if (test-path "$BasePackagePath\lib\net6.0-windows10.0.17763.0") + { + build\Scripts\RobocopyWrapper.ps1 ` + -Source "$BasePackagePath\lib\net6.0-windows10.0.17763.0" ` + -dest "$BaseComponentPath\lib\net6.0-windows10.0.17763.0" + } + } if (($AzureBuildStep -eq "all") -Or ($AzureBuildStep -eq "PackNuget")) { # Remove ProjectCapability for the one in the transport package @@ -595,6 +894,42 @@ Try { exit 1 } } + if (($AzureBuildStep -eq "all") -Or ($AzureBuildStep -eq "PackBaseNuget")) + { + $nuspecPath = "BuildOutput\Microsoft.WindowsAppSDK.Base.TransportPackage.nuspec" + Copy-Item -Path ".\base\build\NuSpecs\Microsoft.WindowsAppSDK.Base.TransportPackage.nuspec" -Destination $nuspecPath + + # Add the version to the nuspec. + [xml]$publicNuspec = Get-Content -Path $nuspecPath + $publicNuspec.package.metadata.version = $PackageVersion + Set-Content -Value $publicNuspec.OuterXml $nuspecPath + + # Make the Base transport package. + nuget pack $nuspecPath -BasePath $BasePackagePath -OutputDirectory $OutputDirectory + + if ($lastexitcode -ne 0) + { + write-host "ERROR: nuget.exe pack $nuspecPath FAILED." + exit 1 + } + + $nuspecPath = "BuildOutput\Microsoft.WindowsAppSDK.Base.nuspec" + Copy-Item -Path ".\base\build\NuSpecs\Microsoft.WindowsAppSDK.Base.nuspec" -Destination $nuspecPath + + # Add the version to the nuspec. + [xml]$publicNuspec = Get-Content -Path $nuspecPath + $publicNuspec.package.metadata.version = $ComponentPackageVersion + Set-Content -Value $publicNuspec.OuterXml $nuspecPath + + # Make the Base component package. + nuget pack $nuspecPath -BasePath $BaseComponentPath -OutputDirectory $OutputDirectory + + if ($lastexitcode -ne 0) + { + write-host "ERROR: nuget.exe pack $nuspecPath FAILED." + exit 1 + } + } $files = Get-ChildItem $OutputDirectory -File -Filter "*.nupkg" foreach ($file in $files) { diff --git a/WindowsAppRuntime.sln b/WindowsAppRuntime.sln index d36b1388a6..dab2999f19 100644 --- a/WindowsAppRuntime.sln +++ b/WindowsAppRuntime.sln @@ -52,7 +52,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DynamicDependency_Test_Win3 {F76B776E-86F5-48C5-8FC7-D2795ECC9746} = {F76B776E-86F5-48C5-8FC7-D2795ECC9746} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WindowsAppRuntime_BootstrapDLL", "dev\WindowsAppRuntime_BootstrapDLL\WindowsAppRuntime_BootstrapDLL.vcxproj", "{F76B776E-86F5-48C5-8FC7-D2795ECC9746}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WindowsAppRuntime_BootstrapDLL", "base\dev\WindowsAppRuntime_BootstrapDLL\WindowsAppRuntime_BootstrapDLL.vcxproj", "{F76B776E-86F5-48C5-8FC7-D2795ECC9746}" ProjectSection(ProjectDependencies) = postProject {B73AD907-6164-4294-88FB-F3C9C10DA1F1} = {B73AD907-6164-4294-88FB-F3C9C10DA1F1} EndProjectSection @@ -233,7 +233,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Bootstrap", "Bootstrap", "{ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CS", "CS", "{536FA8DA-51E2-40A3-8A97-A90FFA75AA18}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.WindowsAppRuntime.Bootstrap.Net", "dev\Bootstrap\CS\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj", "{D6574FD6-8D13-4412-9FCB-308D44063CDA}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.WindowsAppRuntime.Bootstrap.Net", "base\dev\Bootstrap\CS\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj", "{D6574FD6-8D13-4412-9FCB-308D44063CDA}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Windows.System.Power.Projection", "dev\Projections\CS\Microsoft.Windows.System.Power\Microsoft.Windows.System.Power.Projection.csproj", "{63ACBA4F-385A-4D04-98AD-263FED501A19}" ProjectSection(ProjectDependencies) = postProject diff --git a/base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml b/base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml new file mode 100644 index 0000000000..0806fd0bcb --- /dev/null +++ b/base/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml @@ -0,0 +1,333 @@ +parameters: +- name: BuildType + type: string + default: 'stable' +- name: IsOfficial + type: boolean + default: false +- name: PushPackageToInternalFeed + displayName: "Push Release Versioned Windows App SDK Packages To InternalFeed (Only applicable in Release Builds)" + type: boolean + default: false +- name: SignOutput + displayName: "Sign packages and their contents" + type: boolean + default: false +- name: PublishToMaestro + displayName: "Publish To Maestro" + type: boolean + default: false +- name: runStaticAnalysis + type: boolean + default: true + +stages: +- stage: WindowsAppSDKBasePackage + dependsOn: '' + condition: and(succeeded(), ne(variables.EnableTestImageValidation, true)) + jobs: + - job: Build + pool: + # read more about custom job pool types at https://aka.ms/obpipelines/yaml/jobs + type: windows + variables: + - name: ob_outputDirectory + value: '$(REPOROOT)\out' + - name: ob_sdl_codeSignValidation_excludes + value: '$(CodeSignValidationExclude)' + - name: ob_artifactBaseName + value: "WindowsAppSDK_Base_Nuget" + - name: ob_sdl_apiscan_enabled + value: ${{ iif(parameters.runStaticAnalysis, true, false) }} + # Focus on scanning x64fre, as a start. + - name: ob_sdl_apiscan_softwareFolder + value: '$(REPOROOT)\BuildOutput\Release\x64' + - name: ob_sdl_apiscan_symbolsFolder + value: '$(REPOROOT)\BuildOutput\Release\x64;SRV*https://symweb.azurefd.net' + - template: AzurePipelinesTemplates/WindowsAppSDK-Global-LKGVersions.yml@WindowsAppSDKVersionConfig + - name: localCompilerOverridePackageName + value: $[coalesce(variables.compilerOverridePackageName, variables.global_CompilerOverridePackageName)] + - name: localCompilerOverridePackageVersion + value: $[coalesce(variables.compilerOverridePackageVersion, variables.global_CompilerOverridePackageVersion)] + - name: localCompilerOverrideNupkgVersion + value: $[coalesce(variables.compilerOverrideNupkgVersion, variables.global_CompilerOverrideNupkgVersion)] + - name: ob_sdl_checkCompliantCompilerWarnings + value: true # This setting has no effect unless ob_sdl_msbuildOverride below is also set to true. + - name: ob_sdl_prefast_runDuring + value: 'Guardian' # The default 'Build' setting does not match the fact that we are calling msbuild.exe directly. + - name: ob_sdl_msbuildOverride + value: true # Because we are calling MSBuild directly instead of through the MSBuild@1 or VSBuild@1 tasks. + steps: + - script: | + echo ob_sdl_apiscan_enabled : $(ob_sdl_apiscan_enabled) + echo ob_sdl_checkCompliantCompilerWarnings: $(ob_sdl_checkCompliantCompilerWarnings) + echo ob_sdl_prefast_runDuring : $(ob_sdl_prefast_runDuring) + echo ob_sdl_msbuildOverride : $(ob_sdl_msbuildOverride) + echo Agent.JobName : $(Agent.JobName) + echo AppxContentFolder : $(AppxContentFolder) + echo Build.ArtifactStagingDirectory : $(Build.ArtifactStagingDirectory) + echo Build.BuildId : $(Build.BuildId) + echo Build.Reason : $(Build.Reason) + echo Build.RequestedFor : $(Build.RequestedFor) + echo Build.SourceBranch : $(Build.SourceBranch) + echo Build.SourcesDirectory : $(Build.SourcesDirectory) + echo buildConfiguration : $(buildConfiguration) + echo buildPlatform : $(buildPlatform) + echo CodeSignValidationExclude : $(CodeSignValidationExclude) + echo compilerOverridePackageName : $(compilerOverridePackageName) + echo compilerOverridePackageVersion : $(compilerOverridePackageVersion) + echo DownloadCenterUri : $(DownloadCenterUri) + echo downloadDetail.portalName : $(downloadDetail.portalName) + echo EnforceVersionSyncPackages : $(EnforceVersionSyncPackages) + echo feature : $(feature) + echo global_CompilerOverridePackageName : $(global_CompilerOverridePackageName) + echo global_CompilerOverridePackageVersion: $(global_CompilerOverridePackageVersion) + echo imageName : $(imageName) + echo LastReleaseNugetVersion : $(LastReleaseNugetVersion) + echo LatestShortUrl : $(LatestShortUrl) + echo localCompilerOverrideNupkgVersion : $(localCompilerOverrideNupkgVersion) + echo localCompilerOverridePackageName : $(localCompilerOverridePackageName) + echo localCompilerOverridePackageVersion : $(localCompilerOverridePackageVersion) + echo MajorVersion : $(MajorVersion) + echo mySourceBranch : $(mySourceBranch) + echo ob_outputDirectory : $(ob_outputDirectory) + echo PayloadTrackingGitHubPAT : $(PayloadTrackingGitHubPAT) + echo poolName : $(poolName) + echo PreviousWindowsAppSDKVersion : $(PreviousWindowsAppSDKVersion) + echo RedirectionAppID : $(RedirectionAppID) + echo RedirectionAppIdUrl : $(RedirectionAppIdUrl) + echo RedirectionAuthority : $(RedirectionAuthority) + echo RedirectionCert : $(RedirectionCert) + echo RedirectionServiceEndpoint : $(RedirectionServiceEndpoint) + echo REPOROOT : $(REPOROOT) + echo Revision : $(Revision) + echo SamplesBranch : $(SamplesBranch) + echo SamplesRepoName : $(SamplesRepoName) + echo SelfContainedSwitch : $(SelfContainedSwitch) + echo System.AccessToken : $(System.AccessToken) + echo System.ArtifactsDirectory : $(System.ArtifactsDirectory) + echo System.DefinitionId : $(System.DefinitionId) + echo System.PullRequest.targetBranchName : $(System.PullRequest.targetBranchName) + echo System.StageName : $(System.StageName) + echo System.TeamProjectId : $(System.TeamProjectId) + echo testLocale : $(testLocale) + echo testPayloadArtifactDir : $(testPayloadArtifactDir) + echo testPayloadDir : $(testPayloadDir) + echo VCToolsInstallDir : $(VCToolsInstallDir) + echo VersionTag : $(VersionTag) + echo vPackDescription : $(vPackDescription) + echo vPackName : $(vPackName) + echo vPackSourceFolder : $(vPackSourceFolder) + echo vPackVersion : $(vPackVersion) + echo WindowsAppSDKPackageVersion : $(WindowsAppSDKPackageVersion) + echo WindowsAppSDKPackageVersionMajorMinor: $(WindowsAppSDKPackageVersionMajorMinor) + echo windowsPublicsWinmdVersion : $(windowsPublicsWinmdVersion) + echo WindowsSDKVersion : $(WindowsSDKVersion) + echo _useBuildOutputFromBuildId : $(_useBuildOutputFromBuildId) + echo _useBuildOutputFromPipeline : $(_useBuildOutputFromPipeline) + echo CallerEnablesTestImageValidation : $(CallerEnablesTestImageValidation) + echo EnableTestImageValidation : $(EnableTestImageValidation) + echo CallerEnablesBuildImageValidation : $(CallerEnablesBuildImageValidation) + echo EnableBuildImageValidation : $(EnableBuildImageValidation) + echo TestImageToValidate : $(TestImageToValidate) + displayName: 'Variables' + + - template: ../../../build/AzurePipelinesTemplates/WindowsAppSDK-SetupBuildEnvironment-Steps.yml + + - task: UseDotNet@2 + continueOnError: true + inputs: + packageType: 'sdk' + useGlobalJson: true + performMultiLevelLookup: true + + - task: NuGetAuthenticate@1 + + - task: PowerShell@2 + name: DetermineNugetPackageVersion + displayName: 'Determine Nuget Package Version' + inputs: + targetType: 'inline' + script: | + # Build the component package version using the same format as Foundation: + # {Major}.{Minor}.{YYMMDDnnn}-{buildType} + # This ensures Base version sorts higher than existing dependencies like 2.0.2-preview + $paddedRevision = ([string]$(versionCounter)).PadLeft(3, '0') + $buildType = '${{ parameters.BuildType }}' + $version = '$(MajorVersion).$(MinorVersion).$(versionMinDate)' + $paddedRevision + '-' + $buildType + + # For official builds, allow VersionTag override + if ('${{ parameters.IsOfficial }}' -eq 'true') + { + $versionTag = '$(VersionTag)' + + # Allow override from pipeline variable + $versionTagOverride = '$(VersionTagOverride)'.Trim() + if (-not [String]::IsNullOrEmpty($versionTagOverride)) { + Write-Host "VersionTagOverride provided: $versionTagOverride" + $versionTag = $versionTagOverride + } + + Write-Host "VersionTag: " $versionTag + if ($buildType -ne "stable" -and -not $versionTag.StartsWith($buildType)) + { + if (-not [String]::IsNullOrEmpty($versionTagOverride)) { + Write-Host "ERROR: VersionTagOverride '$versionTagOverride' must start with '$buildType'" + } else { + Write-Host "ERROR: Variable VersionTag '$versionTag' must start with '$buildType'" + } + Write-Host "Please update this variable and restart the build" + Write-Host "##vso[task.complete result=Failed;]DONE" + } + if ($buildType -eq "stable" -and -not [String]::IsNullOrEmpty($versionTag)) + { + Write-Host "Stable builds must have an empty VersionTag" + Write-Host "Please update this variable and restart the build" + Write-Host "##vso[task.complete result=Failed;]DONE" + } + + $formattedTag = '' + if(-not [String]::IsNullOrEmpty($versionTag)) + { + $formattedTag = '-' + $versionTag + } + Write-Host "Using Release Versioning" + $version = '$(MajorVersion).$(MinorVersion).$(versionMinDate)' + $paddedRevision + $formattedTag + } + + # Write the version to Version.Details.xml for BuildAll.ps1 to read from + [xml]$versionDetailsPath = Get-Content -Path "eng\Version.Details.xml" + $WindowsAppSDKConfigVersionDependency = $versionDetailsPath.Dependencies.ToolsetDependencies.Dependency | Where-Object { $_.Name -eq "Microsoft.WindowsAppSDK.Version" } + $WindowsAppSDKConfigVersionDependency.Version = $version + + Set-Content -Encoding utf8 -Value $versionDetailsPath.OuterXml -Path "eng\Version.Details.xml" + Write-Host 'Package Version: ' $version + Write-Host "##vso[task.setvariable variable=WindowsAppSDKPackageVersion;isOutput=true]$version" + Write-Host "##vso[task.setvariable variable=WindowsAppSDKPackageVersion;]$version" + + - task: WinUndockNativeCompiler@1 + displayName: 'Setup native compiler version override' + inputs: + microsoftDropReadPat: $(System.AccessToken) + compilerPackageName: $(localCompilerOverridePackageName) + compilerPackageVersion: $(localCompilerOverridePackageVersion) + slnDirectory: $(Build.SourcesDirectory) + + - task: PowerShell@2 + name: BuildBase + displayName: 'Build Bootstrap DLL and Bootstrap.Net' + inputs: + filePath: 'BuildAll.ps1' + arguments: -AzureBuildStep BuildBase -Platform "x86,x64,arm64" -Configuration Release + + - task: PowerShell@2 + name: StageBaseFiles + displayName: 'Stage Base Package Files' + inputs: + filePath: 'BuildAll.ps1' + arguments: -AzureBuildStep StageBaseFiles -Platform "x86,x64,arm64" -Configuration Release + + - task: PowerShell@2 + name: PackBaseNuget + displayName: 'Pack Base NuGet Packages' + inputs: + filePath: 'BuildAll.ps1' + arguments: -AzureBuildStep PackBaseNuget -Platform "x86,x64,arm64" -Configuration Release + + # Guardian's PREFast only supports auto detection of msbuild/vsbuild tasks. Hence, explicitly invoke the PREFast task as a workaround. + - ${{ if eq(parameters.runStaticAnalysis, 'true') }}: + - task: SDLNativeRules@3 + #condition: and(succeeded(), eq(variables['buildConfiguration'], 'Release'), eq(variables['buildPlatform'], 'x64')) + displayName: Run the PREfast SDL Native Rules + inputs: + # Using the auto parameter below is simpler, but because we are not using the msbuild/vsbuild task above for the build operation above, + # the PREFast task is unable to auto infer the build arguments. Hence, using a simplified explicit msbuild commandline instead. + #userProvideBuildInfo: auto + setupCommandlines: '"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsMSBuildCmd.bat"' + msBuildArchitecture: amd64 + msBuildCommandline: 'msbuild.exe /nologo /nr:false /p:configuration=Release /p:platform=x64 $(Build.SourcesDirectory)\WindowsAppRuntime.Dev.sln' + # Generally speaking, we leave it to the external repos to scan the bits in their packages. + excludedPaths: | + $(Build.SourcesDirectory)\packages + # Explicitly specify the EO-compliant rule set, as the default Sdl.Recommended.Warning.ruleset is not EO-compliant. + rulesetName: Custom + customRuleset: $(Agent.ToolsDirectory)\NativeCompilerStaticAnalysisRuleset\mandatory_to_fix.ruleset + policyName: 'WindowsUndocked' + continueOnError: true + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + + # Nuget sign the Nuget Packages + - ${{ if eq(parameters.SignOutput, 'true') }}: + - template: AzurePipelinesTemplates/WindowsAppSDK-EsrpCodeSigning-Steps.yml@WindowsAppSDKConfig + parameters: + DisplayName: ' CodeSign Nuget packages' + FolderPath: '$(REPOROOT)\BuildOutput' + Pattern: | + Microsoft.WindowsAppSDK.Base.*.nupkg + UseMinimatch: true + KeyCode: 'CP-401405' + + - task: CopyFiles@2 + inputs: + SourceFolder: '$(REPOROOT)\BuildOutput' + Contents: | + **/*.nupkg + targetFolder: $(ob_outputDirectory)\NugetPackages + + - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 + displayName: 'Component Governance Detection' + + - task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2 + displayName: 'NuGet push Microsoft.WindowsAppSDK NuGet packages to Project.Reunion.nuget.internal' + condition: or(eq(${{ parameters.PushPackageToInternalFeed }}, true), eq(variables['Build.Reason'], 'Schedule')) + inputs: + command: 'push' + packagesToPush: '$(ob_outputDirectory)/NugetPackages/Microsoft.WindowsAppSDK.Base.*.nupkg' + verbosityPush: 'Detailed' + nuGetFeedType: 'internal' + # ignore conflicts which come from rerunning with the same input packages + allowPackageConflicts: true + #Note: The project qualifier is always required when using a feed name. Also, do not use organization scoped feeds. + publishVstsFeed: 'ProjectReunion/Project.Reunion.nuget.internal' + + - task: PowerShell@2 + displayName: 'Verify Nuspec Fields' + inputs: + targetType: 'inline' + script: | + $elements = @( + "© Microsoft Corporation. All rights reserved." + "Microsoft" + "Microsoft" + ); + + $issues = ""; + foreach ($element in $elements) + { + $foundElementBase = Select-String -Path $(REPOROOT)\base\build\NuSpecs\Microsoft.WindowsAppSDK.Base.nuspec -Pattern $element; + if ([string]::IsNullOrEmpty($foundElementBase)) { $issues += $element; } + } + + if (![string]::IsNullOrEmpty($issues)) + { + Write-Host ##vso[task.logissue type=error;] The following elements are missing or wrong: $issues + Exit 1 + } + +- stage: PublishBasePackageToMaestro + dependsOn: + - WindowsAppSDKBasePackage + condition: | + and(eq(${{ parameters.PushPackageToInternalFeed }}, true), eq(${{ parameters.PublishToMaestro }}, true), ne(variables.EnableTestImageValidation, true), ne(variables.EnableBuildImageValidation, true)) + jobs: + - job: PublishNugetPackage + pool: + type: windows + isCustom: true + name: 'ProjectReunionESPool-2022' # This stage is purely for ES, hence this custom pool + steps: + - template: ${{variables['System.DefaultWorkingDirectory']}}\\AzurePipelinesTemplates/WindowsAppSDK-PublishToMaestro-Steps.yml@WindowsAppSDKConfig + parameters: + NuGetArtifactNames: + - "WindowsAppSDK_Base_Nuget" \ No newline at end of file diff --git a/base/build/NuSpecs/Microsoft.WindowsAppSDK.Arm64Ec.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Arm64Ec.targets new file mode 100644 index 0000000000..e5283a4aad --- /dev/null +++ b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Arm64Ec.targets @@ -0,0 +1,32 @@ + + + + + + + + + + + $(WV2WinRTPath)..\..\build\native\x64;%(AdditionalLibraryDirectories) + + + + + $([MSBuild]::NormalizePath($(WV2WinRTPath), "..\..\build\")) + + + + + + + + + + x64 + + + diff --git a/build/NuSpecs/Microsoft.WindowsAppSDK.AutoInitializer.CS.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.AutoInitializer.CS.targets similarity index 100% rename from build/NuSpecs/Microsoft.WindowsAppSDK.AutoInitializer.CS.targets rename to base/build/NuSpecs/Microsoft.WindowsAppSDK.AutoInitializer.CS.targets diff --git a/build/NuSpecs/Microsoft.WindowsAppSDK.AutoInitializerCommon.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.AutoInitializerCommon.targets similarity index 100% rename from build/NuSpecs/Microsoft.WindowsAppSDK.AutoInitializerCommon.targets rename to base/build/NuSpecs/Microsoft.WindowsAppSDK.AutoInitializerCommon.targets diff --git a/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.Native.props b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.Native.props new file mode 100644 index 0000000000..a15448cc78 --- /dev/null +++ b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.Native.props @@ -0,0 +1,6 @@ + + + + diff --git a/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.TransportPackage.nuspec b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.TransportPackage.nuspec new file mode 100644 index 0000000000..b63bd495fe --- /dev/null +++ b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.TransportPackage.nuspec @@ -0,0 +1,15 @@ + + + + Microsoft.WindowsAppSDK.Base.TransportPackage + 1.0 + $id$ + Microsoft + Windows App SDK - Base Transport Package + license.txt + true + https://aka.ms/windowsappsdk + © Microsoft Corporation. All rights reserved. + Microsoft Native Windows WindowsAppSDK + + diff --git a/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.TransportPackage.props b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.TransportPackage.props new file mode 100644 index 0000000000..c8637f3254 --- /dev/null +++ b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.TransportPackage.props @@ -0,0 +1,10 @@ + + + + + true + + + + + diff --git a/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.TransportPackage.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.TransportPackage.targets new file mode 100644 index 0000000000..b8036d2b44 --- /dev/null +++ b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.TransportPackage.targets @@ -0,0 +1,7 @@ + + + + + + + diff --git a/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.nuspec b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.nuspec new file mode 100644 index 0000000000..db96c2e3e3 --- /dev/null +++ b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.nuspec @@ -0,0 +1,21 @@ + + + + Microsoft.WindowsAppSDK.Base + 0.0.0.0 + Microsoft Windows App SDK Base Package + Microsoft + Microsoft + true + license.txt + https://github.com/microsoft/windowsappsdk + https://raw.githubusercontent.com/microsoft/WindowsAppSDK/main/assets/WindowsAppSDK64.png + The Windows App SDK empowers all Windows Desktop apps with modern Windows UI, APIs, and platform features, including back-compat support. This is a package that is used as a dependency by other Windows App SDK component packages and not meant to be directly referenced. + © Microsoft Corporation. All rights reserved. + Windows "Windows App SDK" WinAppSDK WinUI XAML Fluent Controls Downlevel Compatibility TreeView ColorPicker NavigationView MenuBar Resources Native DWriteCore "Interactive Experiences" ixp "Project Reunion" ProjectReunion + + + + + + diff --git a/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.props b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.props new file mode 100644 index 0000000000..ed05f93f14 --- /dev/null +++ b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.props @@ -0,0 +1,23 @@ + + + + $(PrepareForBuildDependsOn);WindowsAppSDKVerifyKitVersion + + + + + false + true + + + + + + <_ExperimentalPackages Include="@(WindowsAppSdkComponentPackages)" Condition="$([System.Text.RegularExpressions.Regex]::IsMatch('%(Identity)', 'Microsoft\.WindowsAppSDK([.\\][^\\]*)*-(?!stable)(?!preview)'))" /> + + + + + diff --git a/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.targets new file mode 100644 index 0000000000..15058876c5 --- /dev/null +++ b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Base.targets @@ -0,0 +1,112 @@ + + + + + + <_WindowsAppSDKMinTPV Condition="'$(TargetPlatformMinVersion)' != ''">$(TargetPlatformMinVersion) + <_WindowsAppSDKMinTPV Condition="'$(_WindowsAppSDKMinTPV)' == ''">$(TargetPlatformVersion) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(ResolveReferencesDependsOn);WindowsAppSDKVerifyCsWinRtVersions + + + + + <_TargetFrameworkRequired>6.0 + <_TargetFrameworkCompatible Condition="$([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '$(_TargetFrameworkRequired)'))">True + + + <_WindowsSdkPackage Include="$(WindowsSdkPackageVersion)" Condition="'$(WindowsSdkPackageVersion)' != ''"> + $(WindowsSdkPackageVersion) + 10.0.$([System.Version]::Parse("$(WindowsSdkPackageVersion.Split('-')[0])").Build).38 + + <_WindowsSdkPackage Include="@(ResolvedFrameworkReference)" Condition="'$(WindowsSdkPackageVersion)' == '' and '@(ResolvedFrameworkReference)' != '' and + ('%(Identity)' == 'Microsoft.Windows.SDK.NET.Ref' or '%(Identity)' == 'Microsoft.Windows.SDK.NET.Ref.Windows')"> + %(ResolvedFrameworkReference.TargetingPackVersion) + 10.0.$([System.Version]::Parse("%(ResolvedFrameworkReference.TargetingPackVersion)").Build).38 + + <_WindowsSdkCompatible Include="@(_WindowsSdkPackage)" Condition="'@(_WindowsSdkPackage)' != '' and $([MSBuild]::VersionGreaterThanOrEquals(%(Referenced), %(Required)))" /> + + + <_WindowsSdkPackageRequired>@(_WindowsSdkPackage->'%(Required)') + + + + + + + + + + diff --git a/base/build/NuSpecs/Microsoft.WindowsAppSDK.BaseCommon.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.BaseCommon.targets new file mode 100644 index 0000000000..7026664b0e --- /dev/null +++ b/base/build/NuSpecs/Microsoft.WindowsAppSDK.BaseCommon.targets @@ -0,0 +1,62 @@ + + + + + + true + <_WindowsAppSDKSelfContainedSetByDefault>true + + + + + <_WindowsAppSDKTPVBuild Condition="'$(_WindowsAppSDKMinTPV)' != ''">$([System.Version]::Parse('$(_WindowsAppSDKMinTPV)').Build) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/NuSpecs/Microsoft.WindowsAppSDK.Bootstrap.CS.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.Bootstrap.CS.targets similarity index 100% rename from build/NuSpecs/Microsoft.WindowsAppSDK.Bootstrap.CS.targets rename to base/build/NuSpecs/Microsoft.WindowsAppSDK.Bootstrap.CS.targets diff --git a/build/NuSpecs/Microsoft.WindowsAppSDK.BootstrapCommon.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.BootstrapCommon.targets similarity index 100% rename from build/NuSpecs/Microsoft.WindowsAppSDK.BootstrapCommon.targets rename to base/build/NuSpecs/Microsoft.WindowsAppSDK.BootstrapCommon.targets diff --git a/build/NuSpecs/Microsoft.WindowsAppSDK.CompatibilitySetter.CS.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.CompatibilitySetter.CS.targets similarity index 100% rename from build/NuSpecs/Microsoft.WindowsAppSDK.CompatibilitySetter.CS.targets rename to base/build/NuSpecs/Microsoft.WindowsAppSDK.CompatibilitySetter.CS.targets diff --git a/build/NuSpecs/Microsoft.WindowsAppSDK.DeploymentManager.CS.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.DeploymentManager.CS.targets similarity index 100% rename from build/NuSpecs/Microsoft.WindowsAppSDK.DeploymentManager.CS.targets rename to base/build/NuSpecs/Microsoft.WindowsAppSDK.DeploymentManager.CS.targets diff --git a/build/NuSpecs/Microsoft.WindowsAppSDK.DeploymentManagerCommon.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.DeploymentManagerCommon.targets similarity index 100% rename from build/NuSpecs/Microsoft.WindowsAppSDK.DeploymentManagerCommon.targets rename to base/build/NuSpecs/Microsoft.WindowsAppSDK.DeploymentManagerCommon.targets diff --git a/base/build/NuSpecs/Microsoft.WindowsAppSDK.SelfContained.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.SelfContained.targets new file mode 100644 index 0000000000..ec286de525 --- /dev/null +++ b/base/build/NuSpecs/Microsoft.WindowsAppSDK.SelfContained.targets @@ -0,0 +1,535 @@ + + + + + + false + + + false + + + false + + $(MSBuildThisFileDirectory)\..\tools\mt.exe + $(WindowsSDKBuildToolsBinVersionedArchFolder)\mt.exe + $(WindowsSdkDir)bin\$(Platform)\mt.exe + mt.exe + + + + $(GetCopyToOutputDirectoryItemsDependsOn); + AddMicrosoftWindowsAppSDKPayloadFilesFromMsix; + AddMicrosoftWindowsAppSDKPayloadFilesFromComponents + + + true + true + + + $([MSBuild]::NormalizeDirectory('$(MSBuildProjectDirectory)','$(IntermediateOutputPath)')) + $(IntermediateOutputPath) + + + + + + + + + + + + + $(ApplicationManifest) + @(Manifest) + $(SelfContainedIntermediateOutputPath)Manifests\app.manifest + + + + + + + + + Invalid + x86 + x86 + x64 + arm64 + arm64ec + + + x64 + x86 + arm64 + arm + + + + + + + $(SelfContainedIntermediateOutputPath)MsixContent + $(MicrosoftWindowsAppSDKMsixContent)\AppxManifest.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + runtimes-framework\win-$(NativePlatform)\native + 10.0.17763.0 + 10.0.18362.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +"; + var sb = new StringBuilder(); + sb.AppendLine(headerF); + + var dllFileFormat = RedirectDlls ? + @" " : + @" "; + + if (!string.IsNullOrEmpty(InAppxManifest)) + { + XmlDocument doc = new XmlDocument(); + doc.Load(InAppxManifest); + var nsmgr = new XmlNamespaceManager(doc.NameTable); + nsmgr.AddNamespace("m", "http://schemas.microsoft.com/appx/manifest/foundation/windows10"); + // Add InProcessServer elements to the generated appxmanifest + var xQuery = "./m:Package/m:Extensions/m:Extension/m:InProcessServer"; + var dllFiles = (from di in (new DirectoryInfo(MsixContentDir).EnumerateFiles("*.dll")) select di.Name).ToList(); + foreach (XmlNode winRTFactory in doc.SelectNodes(xQuery, nsmgr)) + { + var dllFileNode = winRTFactory.SelectSingleNode("./m:Path", nsmgr); + var dllFile = dllFileNode.InnerText; + var typesNames = winRTFactory.SelectNodes("./m:ActivatableClass", nsmgr).OfType(); + sb.AppendFormat(dllFileFormat, dllFile); + sb.AppendLine(); + foreach (var typeNode in typesNames) + { + var attribs = typeNode.Attributes.OfType().ToArray(); + var typeName = attribs + .OfType() + .SingleOrDefault(x => x.Name == "ActivatableClassId") + .InnerText; + var xmlEntryFormat = +@" "; + sb.AppendFormat(xmlEntryFormat, typeName); + sb.AppendLine(); + dllFiles.RemoveAll(e => e.Equals(dllFile, StringComparison.OrdinalIgnoreCase)); + } + sb.AppendLine(@" "); + } + if(RedirectDlls) + { + foreach (var dllFile in dllFiles) + { + sb.AppendFormat(dllFileFormat, dllFile); + sb.AppendLine(@""); + } + } + // Add ProxyStub elements to the generated appxmanifest + xQuery = "./m:Package/m:Extensions/m:Extension/m:ProxyStub"; + dllFiles = (from di in (new DirectoryInfo(MsixContentDir).EnumerateFiles("*.dll")) select di.Name).ToList(); + foreach (XmlNode proxystub in doc.SelectNodes(xQuery, nsmgr)) + { + var classIDAdded = false; + + var dllFileNode = proxystub.SelectSingleNode("./m:Path", nsmgr); + var dllFile = dllFileNode.InnerText; + // exclude PushNotificationsLongRunningTask, which requires the Singleton (which is unavailable for self-contained apps) + // exclude Widgets entries unless/until they have been tested and verified by the Widgets team + if (dllFile == "PushNotificationsLongRunningTask.ProxyStub.dll" || dllFile == "Microsoft.Windows.Widgets.dll") + { + continue; + } + var typesNamesForProxy = proxystub.SelectNodes("./m:Interface", nsmgr).OfType(); + sb.AppendFormat(dllFileFormat, dllFile); + sb.AppendLine(); + foreach (var typeNode in typesNamesForProxy) + { + if(!classIDAdded) + { + var classIdAttribute = proxystub.Attributes.OfType().ToArray(); + var classID = classIdAttribute + .OfType() + .SingleOrDefault(x => x.Name == "ClassId") + .InnerText; + + var xmlEntryFormat = @" "; + sb.AppendFormat(xmlEntryFormat, classID); + classIDAdded = true; + } + var attribs = typeNode.Attributes.OfType().ToArray(); + var typeID = attribs + .OfType() + .SingleOrDefault(x => x.Name == "InterfaceId") + .InnerText; + var typeNames = attribs + .OfType() + .SingleOrDefault(x => x.Name == "Name") + .InnerText; + var xmlEntryFormatForStubs = @" "; + sb.AppendFormat(xmlEntryFormatForStubs, typeNames, typeID); + sb.AppendLine(); + dllFiles.RemoveAll(e => e.Equals(dllFile, StringComparison.OrdinalIgnoreCase)); + } + sb.AppendLine(@" "); + } + if(RedirectDlls) + { + foreach (var dllFile in dllFiles) + { + sb.AppendFormat(dllFileFormat, dllFile); + sb.AppendLine(@""); + } + } + } + sb.AppendLine(@""); + var manifestContent = sb.ToString(); + File.WriteAllText(OutAppManifest, manifestContent, Encoding.UTF8); +]]> + + + + + + + + + + + + + + + + + + + +"; + var sb = new StringBuilder(); + sb.AppendLine(headerF); + + var dllFileFormat = RedirectDlls ? + @" " : + @" "; + var dllFiles = FrameworkDlls.Select(Path.GetFileName).ToList(); + + foreach (String appxFragment in AppxFragments) + { + XmlDocument doc = new XmlDocument(); + doc.Load(appxFragment); + var nsmgr = new XmlNamespaceManager(doc.NameTable); + nsmgr.AddNamespace("m", "http://schemas.microsoft.com/appx/manifest/foundation/windows10"); + var xQuery = "./m:Fragment/m:Extensions/m:Extension/m:InProcessServer"; + foreach (XmlNode winRTFactory in doc.SelectNodes(xQuery, nsmgr)) + { + var dllFileNode = winRTFactory.SelectSingleNode("./m:Path", nsmgr); + var dllFile = dllFileNode.InnerText; + var typesNames = winRTFactory.SelectNodes("./m:ActivatableClass", nsmgr).OfType(); + sb.AppendFormat(dllFileFormat, dllFile); + sb.AppendLine(); + foreach (var typeNode in typesNames) + { + var attribs = typeNode.Attributes.OfType().ToArray(); + var typeName = attribs + .OfType() + .SingleOrDefault(x => x.Name == "ActivatableClassId") + .InnerText; + var xmlEntryFormat = +@" "; + sb.AppendFormat(xmlEntryFormat, typeName); + sb.AppendLine(); + dllFiles.RemoveAll(e => e.Equals(dllFile, StringComparison.OrdinalIgnoreCase)); + } + sb.AppendLine(@" "); + } + + // Add ProxyStub elements to the generated appxmanifest + xQuery = "./m:Fragment/m:Extensions/m:Extension/m:ProxyStub"; + foreach (XmlNode proxystub in doc.SelectNodes(xQuery, nsmgr)) + { + var classIDAdded = false; + + var dllFileNode = proxystub.SelectSingleNode("./m:Path", nsmgr); + var dllFile = dllFileNode.InnerText; + // exclude PushNotificationsLongRunningTask, which requires the Singleton (which is unavailable for self-contained apps) + // exclude Widgets entries unless/until they have been tested and verified by the Widgets team + if (dllFile == "PushNotificationsLongRunningTask.ProxyStub.dll" || dllFile == "Microsoft.Windows.Widgets.dll") + { + continue; + } + var typesNamesForProxy = proxystub.SelectNodes("./m:Interface", nsmgr).OfType(); + sb.AppendFormat(dllFileFormat, dllFile); + sb.AppendLine(); + foreach (var typeNode in typesNamesForProxy) + { + if(!classIDAdded) + { + var classIdAttribute = proxystub.Attributes.OfType().ToArray(); + var classID = classIdAttribute + .OfType() + .SingleOrDefault(x => x.Name == "ClassId") + .InnerText; + + var xmlEntryFormat = @" "; + sb.AppendFormat(xmlEntryFormat, classID); + classIDAdded = true; + } + var attribs = typeNode.Attributes.OfType().ToArray(); + var typeID = attribs + .OfType() + .SingleOrDefault(x => x.Name == "InterfaceId") + .InnerText; + var typeNames = attribs + .OfType() + .SingleOrDefault(x => x.Name == "Name") + .InnerText; + var xmlEntryFormatForStubs = @" "; + sb.AppendFormat(xmlEntryFormatForStubs, typeNames, typeID); + sb.AppendLine(); + dllFiles.RemoveAll(e => e.Equals(dllFile, StringComparison.OrdinalIgnoreCase)); + } + sb.AppendLine(@" "); + } + } + + if(RedirectDlls) + { + foreach (var dllFile in dllFiles) + { + sb.AppendFormat(dllFileFormat, dllFile); + sb.AppendLine(@""); + } + } + + sb.AppendLine(@""); + var manifestContent = sb.ToString(); + File.WriteAllText(OutAppManifest, manifestContent, Encoding.UTF8); +]]> + + + + + + + + $(SelfContainedIntermediateOutputPath)Manifests\WindowsAppSDK.manifest + false + true + + + + + + + + + + + + + + + + + + + + <_TemporaryFilteredWapProjOutput Include="@(_FilteredNonWapProjProjectOutput)" /> + <_FilteredNonWapProjProjectOutput Remove="@(_TemporaryFilteredWapProjOutput)" /> + <_FilteredNonWapProjProjectOutput Include="@(_TemporaryFilteredWapProjOutput)"> + + + + + + + <_DetailedPriXml Remove="@(_DetailedPriXml)" /> + + + + + + + + <_SavedProjectReferenceWithConfiguration Include="@(ProjectReferenceWithConfiguration)"> + $(Configuration) + $(Platform) + + + + + + + + + <_AppxWinmdFilesToHarvest Remove="@(_AppxWinmdFilesToHarvest)" /> + + + + + + + + %(PreprocessorDefinitions);MICROSOFT_WINDOWSAPPSDK_SELFCONTAINED=1 + + + + + $(DefineConstants);MICROSOFT_WINDOWSAPPSDK_SELFCONTAINED + + + diff --git a/base/build/NuSpecs/Microsoft.WindowsAppSDK.SingleFile.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.SingleFile.targets new file mode 100644 index 0000000000..0ed47375ae --- /dev/null +++ b/base/build/NuSpecs/Microsoft.WindowsAppSDK.SingleFile.targets @@ -0,0 +1,57 @@ + + + + + + true + + + + + + + + + + + + + + + + + + + + diff --git a/base/build/NuSpecs/Microsoft.WindowsAppSDK.SingleProject.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.SingleProject.targets new file mode 100644 index 0000000000..17a9a6e2c1 --- /dev/null +++ b/base/build/NuSpecs/Microsoft.WindowsAppSDK.SingleProject.targets @@ -0,0 +1,31 @@ + + + + true + + + + + $(ProjectDir)Properties\launchSettings.json + .*"commandName" *: *"MsixPackage".* + + + + + + + + + + + + + diff --git a/build/NuSpecs/Microsoft.WindowsAppSDK.UndockedRegFreeWinRT.CS.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.UndockedRegFreeWinRT.CS.targets similarity index 100% rename from build/NuSpecs/Microsoft.WindowsAppSDK.UndockedRegFreeWinRT.CS.targets rename to base/build/NuSpecs/Microsoft.WindowsAppSDK.UndockedRegFreeWinRT.CS.targets diff --git a/build/NuSpecs/Microsoft.WindowsAppSDK.UndockedRegFreeWinRTCommon.targets b/base/build/NuSpecs/Microsoft.WindowsAppSDK.UndockedRegFreeWinRTCommon.targets similarity index 67% rename from build/NuSpecs/Microsoft.WindowsAppSDK.UndockedRegFreeWinRTCommon.targets rename to base/build/NuSpecs/Microsoft.WindowsAppSDK.UndockedRegFreeWinRTCommon.targets index 633e6be6e2..29ea2ee691 100644 --- a/build/NuSpecs/Microsoft.WindowsAppSDK.UndockedRegFreeWinRTCommon.targets +++ b/base/build/NuSpecs/Microsoft.WindowsAppSDK.UndockedRegFreeWinRTCommon.targets @@ -7,6 +7,11 @@ true + + + true + + true diff --git a/build/NuSpecs/WindowsAppSDK-Nuget-Native.AutoInitializer.targets b/base/build/NuSpecs/native/Microsoft.WindowsAppSDK.AutoInitializer.targets similarity index 100% rename from build/NuSpecs/WindowsAppSDK-Nuget-Native.AutoInitializer.targets rename to base/build/NuSpecs/native/Microsoft.WindowsAppSDK.AutoInitializer.targets diff --git a/base/build/NuSpecs/native/Microsoft.WindowsAppSDK.Base.targets b/base/build/NuSpecs/native/Microsoft.WindowsAppSDK.Base.targets new file mode 100644 index 0000000000..a0c5795315 --- /dev/null +++ b/base/build/NuSpecs/native/Microsoft.WindowsAppSDK.Base.targets @@ -0,0 +1,67 @@ + + + + + <_WindowsAppSDKBasePlatform Condition="'$(Platform)' == 'Win32'">x86 + <_WindowsAppSDKBasePlatform Condition="'$(Platform)' != 'Win32'">$(Platform) + + + + + + $(MSBuildThisFileDirectory)..\..\include;%(AdditionalIncludeDirectories) + + + + + + + $(MSBuildThisFileDirectory)..\..\lib\win10-$(_WindowsAppSDKBasePlatform)\Microsoft.WindowsAppRuntime.Bootstrap.lib;%(AdditionalDependencies) + + + + + + <_WindowsAppSDKMinTPV Condition="'$(WindowsTargetPlatformMinVersion)' != ''">$(WindowsTargetPlatformMinVersion) + <_WindowsAppSDKMinTPV Condition="'$(_WindowsAppSDKMinTPV)' == '' and '$(WindowsTargetPlatformVersion)' != ''">$(WindowsTargetPlatformVersion) + <_WindowsAppSDKMinTPV Condition="'$(_WindowsAppSDKMinTPV)' == ''">$(TargetPlatformVersion) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/NuSpecs/WindowsAppSDK-Nuget-Native.Bootstrap.targets b/base/build/NuSpecs/native/Microsoft.WindowsAppSDK.Bootstrap.targets similarity index 100% rename from build/NuSpecs/WindowsAppSDK-Nuget-Native.Bootstrap.targets rename to base/build/NuSpecs/native/Microsoft.WindowsAppSDK.Bootstrap.targets diff --git a/build/NuSpecs/WindowsAppSDK-Nuget-Native.CompatibilitySetter.targets b/base/build/NuSpecs/native/Microsoft.WindowsAppSDK.CompatibilitySetter.targets similarity index 100% rename from build/NuSpecs/WindowsAppSDK-Nuget-Native.CompatibilitySetter.targets rename to base/build/NuSpecs/native/Microsoft.WindowsAppSDK.CompatibilitySetter.targets diff --git a/build/NuSpecs/WindowsAppSDK-Nuget-Native.DeploymentManager.targets b/base/build/NuSpecs/native/Microsoft.WindowsAppSDK.DeploymentManager.targets similarity index 100% rename from build/NuSpecs/WindowsAppSDK-Nuget-Native.DeploymentManager.targets rename to base/build/NuSpecs/native/Microsoft.WindowsAppSDK.DeploymentManager.targets diff --git a/build/NuSpecs/WindowsAppSDK-Nuget-Native.UndockedRegFreeWinRT.targets b/base/build/NuSpecs/native/Microsoft.WindowsAppSDK.UndockedRegFreeWinRT.targets similarity index 100% rename from build/NuSpecs/WindowsAppSDK-Nuget-Native.UndockedRegFreeWinRT.targets rename to base/build/NuSpecs/native/Microsoft.WindowsAppSDK.UndockedRegFreeWinRT.targets diff --git a/base/build/Scripts/BLD-BuildBasePackage.ps1 b/base/build/Scripts/BLD-BuildBasePackage.ps1 new file mode 100644 index 0000000000..c6bb6e9178 --- /dev/null +++ b/base/build/Scripts/BLD-BuildBasePackage.ps1 @@ -0,0 +1,71 @@ +param ( + [string]$Channel = "dev" +) + +if (Checkpoint("Update WindowsAppSDK base nuspec [Version]")) { + $WindowsAppSDKNugetPackageVersion = $global:Build_Info.WindowsAppSDKPackageVersion + Write-Host "Update version to $WindowsAppSDKNugetPackageVersion..." + [xml]$publicNuspec = Get-Content -Encoding utf8 -Path (Join-Path $BuildOutput 'NuSpecs\base\Microsoft.WindowsAppSDK.Base.nuspec') + $publicNuspec.package.metadata.version = $WindowsAppSDKNugetPackageVersion + + [xml]$versionsXml = Get-Content (Join-Path $env:Build_SourcesDirectory 'eng\Versions.props') + $buildToolsMSIXPackageVersion = $versionsXml.DocumentElement.PropertyGroup.MicrosoftWindowsSDKBuildToolsMSIXPackageVersion + if (!$buildToolsMSIXPackageVersion) + { + throw "Failed to get Microsoft.Windows.SDK.BuildTools.MSIX Version from Versions.props" + } + + # Update BuildTools.MSIX version number + $dependencies = $publicNuspec.package.metadata.dependencies + $dependency = $dependencies.dependency | Where-Object { $_.id -eq "Microsoft.Windows.SDK.BuildTools.MSIX" } + $dependency.version = $buildToolsMSIXPackageVersion + Write-host $publicNuspec.OuterXml + Set-Content -Encoding utf8 -Value $publicNuspec.OuterXml (Join-Path $BuildOutput 'NuSpecs\base\Microsoft.WindowsAppSDK.Base.nuspec') +} + +if (Checkpoint("Add license to WindowsAppSDK NugetPackage")) { + $LicenseSourceFolder = (Join-Path $env:Build_SourcesDirectory 'build\NuSpecs\license\preview\') + if ($Channel -eq 'stable') + { + $LicenseSourceFolder = (Join-Path $env:Build_SourcesDirectory 'build\NuSpecs\license\release\') + } + + build\scripts\CopyContents.ps1 ` + -SourceDir $LicenseSourceFolder ` + -ContentsList @('license.txt') ` + -TargetDir $BaseNugetContentFolder + + build\scripts\CopyContents.ps1 ` + -SourceDir (Join-Path $env:Build_SourcesDirectory 'build\NuSpecs\') ` + -ContentsList @('NOTICE.txt', 'Icon.png') ` + -TargetDir $BaseNugetContentFolder +} + +if (Checkpoint("Copy nuget build files to WindowsAppSDK Base NugetPackage")) +{ + build\scripts\CopyContents.ps1 ` + -SourceDir (Join-Path $BuildOutput 'NuSpecs\base') ` + -ContentsList @('build') ` + -TargetDir $BaseNugetContentFolder + + build\scripts\CopyContents.ps1 ` + -SourceDir (Join-Path $BuildOutput 'NuSpecs\build') ` + -ContentsList @( + 'Microsoft.WindowsAppSDK.arm64ec.targets', + 'Microsoft.WindowsAppSDK.SelfContained.targets', + 'Microsoft.WindowsAppSDK.SingleFile.targets', + 'Microsoft.WindowsAppSDK.SingleProject.targets') ` + -TargetDir (Join-Path $BaseNugetContentFolder 'build') +} + +if (Checkpoint("Copy build to buildTransitive")) +{ + build\Scripts\RobocopyWrapper.ps1 ` + -Source (Join-Path $BaseNugetContentFolder 'build') ` + -dest (Join-Path $BaseNugetContentFolder 'buildTransitive') +} + +if (Checkpoint("Pack Windows App SDK WindowsAppSDK NugetPackage")) +{ + nuget pack (Join-Path $BuildOutput 'NuSpecs\base\Microsoft.WindowsAppSDK.Base.nuspec') -BasePath $BaseNugetContentFolder -OutputDirectory $PackageStore +} \ No newline at end of file diff --git a/base/build/WindowsAppSDK-BuildBase-Nightly.yml b/base/build/WindowsAppSDK-BuildBase-Nightly.yml new file mode 100644 index 0000000000..d74622cbfd --- /dev/null +++ b/base/build/WindowsAppSDK-BuildBase-Nightly.yml @@ -0,0 +1,132 @@ +##################################################################################################################################### +# OneBranch Pipelines - Official # +##################################################################################################################################### +# # +# This pipeline was created by EasyStart from a sample located at: # +# https://aka.ms/obpipelines/easystart/samples # +# # +# Windows Undocked Wiki: https://www.osgwiki.com/wiki/Windows_Undocked_Template # +# General OB Documentation: https://aka.ms/obpipelines # +# Build MSBuild project: https://dev.azure.com/onebranch/OneBranch/_wiki/wikis/OneBranch.wiki/6045/Build-MSBuild-project # +# Yaml Schema: https://aka.ms/obpipelines/yaml/schema # +# Retail Tasks: https://aka.ms/obpipelines/tasks # +# Support: https://aka.ms/onebranchsup # +# # +##################################################################################################################################### + +# https://aka.ms/obpipelines/triggers +trigger: none + +parameters: # parameters are shown up in ADO UI in a build queue time +- name: "PushPackageToInternalFeed" + displayName: "Push Windows App SDK Packages To InternalFeed" + type: boolean + default: true +- name: "SignOutput" + displayName: "Sign packages and their contents" + type: boolean + default: true +- name: runStaticAnalysis + displayName: "Run Static Analysis (e.g., PREFast, APIScan)" + type: boolean + default: true +- name: PublishToMaestro + displayName: "Publish To Maestro" + type: boolean + default: true +- name: BuildType + displayName: "Build Type" + type: string + default: 'experimental' + values: + - 'stable' + - 'experimental' + - 'preview' + +variables: +- template: ../../build/WindowsAppSDK-CommonVariables.yml +- template: AzurePipelinesTemplates/WindowsAppSDK-Versions.yml@WindowsAppSDKVersionConfig +- template: WindowsAppSDK-Aggregator-TestConfig.yml@WindowsAppSDKConfig +- group: WindowsAppSDK-Build-Variables +# Only the "WinAppSDK-Build-PR (OneBranch)" pipeline is currently prepped for 1ES hosted image validation. +# Hence, EnableTestImageValidation and EnableBuildImageValidation are hardwired to false here, such that +# the pipeline always behaves normally. +- name: EnableTestImageValidation + value: false +- name: EnableBuildImageValidation + value: false + +resources: + repositories: + - repository: templates + type: git + name: OneBranch.Pipelines/GovernedTemplates + ref: refs/heads/main + - repository: WindowsAppSDKConfig + type: git + name: ProjectReunion/WindowsAppSDKConfig + ref: refs/heads/main + - repository: WindowsAppSDKVersionConfig + type: git + name: ProjectReunion/WindowsAppSDKConfig + ref: refs/heads/main + +name: $(version) + +extends: + template: v2/Microsoft.NonOfficial.yml@templates # https://aka.ms/obpipelines/templates + parameters: + platform: + name: 'windows_undocked' # windows undocked + + featureFlags: + WindowsHostVersion: + Version: 2022 + Network: R1 + + globalSdl: # Refer the wiki for more options in this parameter: https://aka.ms/obpipelines/sdl + tsa: + enabled: $(TsaEnabled) # onebranch publish all sdl results to TSA. If TSA is disabled all SDL tools will forced into 'break' build mode. + isNativeCode: false #TODO turn back on when bug in CheckCFlags2.exe is fixed + asyncSdl: # https://aka.ms/obpipelines/asyncsdl + enabled: false + policheck: + exclusionsFile: $(Build.SourcesDirectory)\.config\PolicheckExclusions.xml + binskim: + enabled: true + break: true + # analyzeTargetGlob: -f|**\debug\**\*.dll + + # suppression: + # suppressionFile: $(Build.SourcesDirectory)\.gdn\global.gdnsuppress + + prefast: + ${{ if eq(parameters.runStaticAnalysis, 'true') }}: + enabled: true + ${{ else }}: + enabled: false + break: true + # Add "severity: 'Warning'" to be more sensitive, break on Warnings+Errors. + # Use "severity: 'Note'" to be even more sensitive, break on Notes+Warnings+Errors. + # Use "severity: 'Default'" to get back to default, i.e., break on Errors. Can't get less sensitive than that. + severity: Default + # Use "exclusionsFile: <>" to apply a local exclusion file. + apiscan: + # We will enable APIScan on a per-job basis downstream as needed. + enabled: false + # TODO: Once we've cleared away all existing errors, consider setting this to true. + break: false + + # Don't bother to disable tools that are already run by default in SourceAnalysis, because in SourceAnalysis + # those tools target Build.SourcesDirectory by default, while here in BinaryAnalysis they target + # ob_outputDirectory instead, hence, the two rounds may catch different issues. + + stages: + - template: AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml@self + parameters: + IsOfficial: false + PushPackageToInternalFeed: ${{ parameters.PushPackageToInternalFeed }} + SignOutput: ${{ parameters.SignOutput }} + PublishToMaestro: ${{ parameters.PublishToMaestro }} + BuildType : ${{ parameters.BuildType }} + runStaticAnalysis : ${{ parameters.runStaticAnalysis }} diff --git a/base/build/WindowsAppSDK-BuildBase-Official.yml b/base/build/WindowsAppSDK-BuildBase-Official.yml new file mode 100644 index 0000000000..eb1d5bf8f6 --- /dev/null +++ b/base/build/WindowsAppSDK-BuildBase-Official.yml @@ -0,0 +1,131 @@ +##################################################################################################################################### +# OneBranch Pipelines - Official # +##################################################################################################################################### +# # +# This pipeline was created by EasyStart from a sample located at: # +# https://aka.ms/obpipelines/easystart/samples # +# # +# Windows Undocked Wiki: https://www.osgwiki.com/wiki/Windows_Undocked_Template # +# General OB Documentation: https://aka.ms/obpipelines # +# Build MSBuild project: https://dev.azure.com/onebranch/OneBranch/_wiki/wikis/OneBranch.wiki/6045/Build-MSBuild-project # +# Yaml Schema: https://aka.ms/obpipelines/yaml/schema # +# Retail Tasks: https://aka.ms/obpipelines/tasks # +# Support: https://aka.ms/onebranchsup # +# # +##################################################################################################################################### + +# https://aka.ms/obpipelines/triggers +trigger: none + +parameters: # parameters are shown up in ADO UI in a build queue time +- name: "PushPackageToInternalFeed" + displayName: "Push Windows App SDK Packages To InternalFeed" + type: boolean + default: true +- name: "SignOutput" + displayName: "Sign packages and their contents" + type: boolean + default: true +- name: runStaticAnalysis + displayName: "Run Static Analysis (e.g., PREFast, APIScan)" + type: boolean + default: true +- name: PublishToMaestro + displayName: "Publish To Maestro" + type: boolean + default: true +- name: BuildType + displayName: "Build Type" + type: string + default: 'experimental' + values: + - 'stable' + - 'experimental' + - 'preview' + +variables: +- template: ../../build/WindowsAppSDK-CommonVariables.yml +- template: AzurePipelinesTemplates/WindowsAppSDK-Versions.yml@WindowsAppSDKVersionConfig +- template: WindowsAppSDK-Aggregator-TestConfig.yml@WindowsAppSDKConfig +- group: WindowsAppSDK-Build-Variables +# Only the "WinAppSDK-Build-PR (OneBranch)" pipeline is currently prepped for 1ES hosted image validation. +# Hence, EnableTestImageValidation and EnableBuildImageValidation are hardwired to false here, such that +# the pipeline always behaves normally. +- name: EnableTestImageValidation + value: false +- name: EnableBuildImageValidation + value: false + +resources: + repositories: + - repository: templates + type: git + name: OneBranch.Pipelines/GovernedTemplates + ref: refs/heads/main + - repository: WindowsAppSDKConfig + type: git + name: ProjectReunion/WindowsAppSDKConfig + ref: refs/heads/main + - repository: WindowsAppSDKVersionConfig + type: git + name: ProjectReunion/WindowsAppSDKConfig + ref: refs/heads/main + +name: $(version) + +extends: + template: v2/Microsoft.Official.yml@templates # https://aka.ms/obpipelines/templates + parameters: + platform: + name: 'windows_undocked' # windows undocked + + featureFlags: + WindowsHostVersion: + Version: 2022 + Network: R1 + + globalSdl: # Refer the wiki for more options in this parameter: https://aka.ms/obpipelines/sdl + tsa: + enabled: $(TsaEnabled) # onebranch publish all sdl results to TSA. If TSA is disabled all SDL tools will forced into 'break' build mode. + isNativeCode: false #TODO turn back on when bug in CheckCFlags2.exe is fixed + asyncSdl: # https://aka.ms/obpipelines/asyncsdl + enabled: false + # suppression: + # suppressionFile: $(Build.SourcesDirectory)\.gdn\global.gdnsuppress + policheck: + exclusionsFile: $(Build.SourcesDirectory)\.config\PolicheckExclusions.xml + binskim: + enabled: true + break: true + # The following serves as an include/exclude example (*untested*). + # analyzeTargetGlob: '+:file|**\bin\**\*.dll;-:file|**\Microsoft.WindowsAppRuntime.Insights.Resource.dll' + prefast: + ${{ if eq(parameters.runStaticAnalysis, 'true') }}: + enabled: true + ${{ else }}: + enabled: false + break: true + # Use "severity: 'Warning'" to be more sensitive, break on Warnings+Errors. + # Use "severity: 'Note'" to be even more sensitive, break on Notes+Warnings+Errors. + # Use "severity: 'Default'" to get back to default, i.e., break on Errors. Can't get less sensitive than that. + severity: Default + # Use "exclusionsFile: <>" to apply a local exclusion file. + apiscan: + # We will enable APIScan on a per-job basis downstream as needed. + enabled: false + # TODO: Once we've cleared away all existing errors, consider setting this to true. + break: false + + # Don't bother to disable tools that are already run by default in SourceAnalysis, because in SourceAnalysis + # those tools target Build.SourcesDirectory by default, while here in BinaryAnalysis they target + # ob_outputDirectory instead, hence, the two rounds may catch different issues. + + stages: + - template: AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml@self + parameters: + IsOfficial: true + PushPackageToInternalFeed: ${{ parameters.PushPackageToInternalFeed }} + SignOutput: ${{ parameters.SignOutput }} + PublishToMaestro: ${{ parameters.PublishToMaestro }} + BuildType : ${{ parameters.BuildType }} + runStaticAnalysis : ${{ parameters.runStaticAnalysis }} diff --git a/base/build/WindowsAppSDK-BuildBase-PR.yml b/base/build/WindowsAppSDK-BuildBase-PR.yml new file mode 100644 index 0000000000..75bc4f88f7 --- /dev/null +++ b/base/build/WindowsAppSDK-BuildBase-PR.yml @@ -0,0 +1,98 @@ +##################################################################################################################################### +# OneBranch Pipelines - PR # +##################################################################################################################################### +# # +# This pipeline was created by EasyStart from a sample located at: # +# https://aka.ms/obpipelines/easystart/samples # +# # +# Windows Undocked Wiki: https://www.osgwiki.com/wiki/Windows_Undocked_Template # +# General OB Documentation: https://aka.ms/obpipelines # +# Build MSBuild project: https://dev.azure.com/onebranch/OneBranch/_wiki/wikis/OneBranch.wiki/6045/Build-MSBuild-project # +# Yaml Schema: https://aka.ms/obpipelines/yaml/schema # +# Retail Tasks: https://aka.ms/obpipelines/tasks # +# Support: https://aka.ms/onebranchsup # +# # +##################################################################################################################################### + +# https://aka.ms/obpipelines/triggers +trigger: none + +parameters: # parameters are shown up in ADO UI in a build queue time +- name: BuildType + displayName: "Build Type" + type: string + default: 'experimental' + values: + - 'stable' + - 'experimental' + - 'preview' +- name: runStaticAnalysis + displayName: "Run Static Analysis (e.g., PREFast, APIScan)" + type: boolean + default: true + +variables: +- template: ../../build/WindowsAppSDK-CommonVariables.yml +- template: AzurePipelinesTemplates/WindowsAppSDK-Versions.yml@WindowsAppSDKVersionConfig +- template: WindowsAppSDK-Foundation-TestConfig.yml@WindowsAppSDKConfig + +resources: + repositories: + - repository: templates + type: git + name: OneBranch.Pipelines/GovernedTemplates + ref: refs/heads/main + - repository: WindowsAppSDKConfig + type: git + name: ProjectReunion/WindowsAppSDKConfig + ref: refs/heads/main + - repository: WindowsAppSDKVersionConfig + type: git + name: ProjectReunion/WindowsAppSDKConfig + ref: refs/heads/main + +name: $(version) + +extends: + template: v2/Microsoft.NonOfficial.yml@templates # https://aka.ms/obpipelines/templates + parameters: + featureFlags: + EnableCDPxPAT: false + WindowsHostVersion: + Version: 2022 + Network: R1 + + platform: + name: 'windows_undocked' # windows undocked + + globalSdl: # Refer the wiki for more options in this parameter: https://aka.ms/obpipelines/sdl + tsa: + enabled: $(TsaEnabled) + isNativeCode: false + suppression: + suppressionFile: $(Build.SourcesDirectory)\.gdn\OneBranch.gdnsuppress + policheck: + exclusionsFile: $(Build.SourcesDirectory)\.config\PolicheckExclusions.xml + binskim: + enabled: true + break: true + prefast: + ${{ if eq(parameters.runStaticAnalysis, 'true') }}: + enabled: true + ${{ else }}: + enabled: false + break: true + severity: Default + apiscan: + enabled: false + break: false + + stages: + - template: AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDKBase-Stages.yml@self + parameters: + IsOfficial: false + PushPackageToInternalFeed: false + SignOutput: false + PublishToMaestro: false + BuildType: ${{ parameters.BuildType }} + runStaticAnalysis: ${{ parameters.runStaticAnalysis }} diff --git a/dev/Bootstrap/CS/Microsoft.WindowsAppRuntime.Bootstrap.Net/Bootstrap.cs b/base/dev/Bootstrap/CS/Microsoft.WindowsAppRuntime.Bootstrap.Net/Bootstrap.cs similarity index 100% rename from dev/Bootstrap/CS/Microsoft.WindowsAppRuntime.Bootstrap.Net/Bootstrap.cs rename to base/dev/Bootstrap/CS/Microsoft.WindowsAppRuntime.Bootstrap.Net/Bootstrap.cs diff --git a/dev/Bootstrap/CS/Microsoft.WindowsAppRuntime.Bootstrap.Net/Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj b/base/dev/Bootstrap/CS/Microsoft.WindowsAppRuntime.Bootstrap.Net/Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj similarity index 100% rename from dev/Bootstrap/CS/Microsoft.WindowsAppRuntime.Bootstrap.Net/Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj rename to base/dev/Bootstrap/CS/Microsoft.WindowsAppRuntime.Bootstrap.Net/Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj diff --git a/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.cpp b/base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.cpp similarity index 91% rename from dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.cpp rename to base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.cpp index d9e186cdd3..427a894755 100644 --- a/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.cpp +++ b/base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.cpp @@ -14,6 +14,31 @@ #include +// Function pointer types for dynamically-loaded Microsoft.WindowsAppRuntime.dll APIs +using PFN_MddTryCreatePackageDependency = HRESULT(STDAPICALLTYPE*)( + PSID user, + _In_ PCWSTR packageFamilyName, + PACKAGE_VERSION minVersion, + MddPackageDependencyProcessorArchitectures packageDependencyProcessorArchitectures, + MddPackageDependencyLifetimeKind lifetimeKind, + PCWSTR lifetimeArtifact, + MddCreatePackageDependencyOptions options, + _Outptr_result_maybenull_ PWSTR* packageDependencyId); + +using PFN_MddAddPackageDependency = HRESULT(STDAPICALLTYPE*)( + _In_ PCWSTR packageDependencyId, + INT32 rank, + MddAddPackageDependencyOptions options, + _Out_ MDD_PACKAGEDEPENDENCY_CONTEXT* packageDependencyContext, + _Outptr_opt_result_maybenull_ PWSTR* packageFullName); + +using PFN_MddRemovePackageDependency = void(STDAPICALLTYPE*)( + _In_ MDD_PACKAGEDEPENDENCY_CONTEXT packageDependencyContext); + +using PFN_WindowsAppRuntime_VersionInfo_TestInitialize = HRESULT(STDAPICALLTYPE*)( + PCWSTR frameworkPackageFamilyName, + PCWSTR mainPackageFamilyName); + HRESULT _MddBootstrapInitialize( UINT32 majorMinorVersion, PCWSTR versionTag, @@ -86,7 +111,17 @@ static UsingWin11Support g_usingWin11Support{ UsingWin11Support::Unknown }; static IDynamicDependencyLifetimeManager* g_lifetimeManager{}; static wil::unique_event g_endTheLifetimeManagerEvent; -static wil::unique_hmodule g_windowsAppRuntimeDll; +// Raw HMODULE (not unique_hmodule) to match delay-load lifetime semantics: +// The runtime DLL must NOT be freed when Bootstrap.dll is unloaded, +// because the helper app pattern loads Bootstrap.dll into a local unique_hmodule, +// calls MddBootstrapInitialize, then frees Bootstrap.dll. The runtime DLL must +// stay loaded so its in-process package graph state persists for WinRT activation. +// Only MddBootstrapShutdown explicitly frees this handle. +static HMODULE g_windowsAppRuntimeDll{}; +static PFN_MddTryCreatePackageDependency g_pfnMddTryCreatePackageDependency{}; +static PFN_MddAddPackageDependency g_pfnMddAddPackageDependency{}; +static PFN_MddRemovePackageDependency g_pfnMddRemovePackageDependency{}; +static PFN_WindowsAppRuntime_VersionInfo_TestInitialize g_pfnVersionInfoTestInitialize{}; static wil::unique_process_heap_string g_packageDependencyId; static MDD_PACKAGEDEPENDENCY_CONTEXT g_packageDependencyContext{}; @@ -245,13 +280,28 @@ STDAPI_(void) MddBootstrapShutdown() noexcept // Last one out turn out the lights... if (g_packageDependencyContext) { - MddRemovePackageDependency(g_packageDependencyContext); + if (g_usingWin11Support == UsingWin11Support::Yes) + { + MddCore::Win11::RemovePackageDependency(g_packageDependencyContext); + } + else if (g_pfnMddRemovePackageDependency) + { + g_pfnMddRemovePackageDependency(g_packageDependencyContext); + } g_packageDependencyContext = nullptr; } g_packageDependencyId.reset(); - g_windowsAppRuntimeDll.reset(); + g_pfnMddTryCreatePackageDependency = nullptr; + g_pfnMddAddPackageDependency = nullptr; + g_pfnMddRemovePackageDependency = nullptr; + g_pfnVersionInfoTestInitialize = nullptr; + if (g_windowsAppRuntimeDll) + { + FreeLibrary(g_windowsAppRuntimeDll); + g_windowsAppRuntimeDll = nullptr; + } if (g_endTheLifetimeManagerEvent) { @@ -401,7 +451,19 @@ void FirstTimeInitialization( FAIL_FAST_HR_IF(E_UNEXPECTED, g_test_ddlmPackagePublisherId.empty()); FAIL_FAST_HR_IF(E_UNEXPECTED, g_test_mainPackageNamePrefix.empty()); - ::WindowsAppRuntime::VersionInfo::TestInitialize(frameworkPackageFamilyName.c_str()); + // Dynamically load the DLL to call VersionInfo_TestInitialize (test-only path) + auto windowsAppRuntimeDll = wil::unique_hmodule(LoadLibraryExW(L"Microsoft.WindowsAppRuntime.dll", nullptr, 0)); + if (windowsAppRuntimeDll) + { + auto pfnTestInit = reinterpret_cast( + GetProcAddress(windowsAppRuntimeDll.get(), "WindowsAppRuntime_VersionInfo_TestInitialize")); + if (pfnTestInit) + { + FAIL_FAST_IF_FAILED(pfnTestInit(frameworkPackageFamilyName.c_str(), nullptr)); + } + g_windowsAppRuntimeDll = windowsAppRuntimeDll.release(); + g_pfnVersionInfoTestInitialize = pfnTestInit; + } } // Track our initialized state @@ -437,16 +499,33 @@ void FirstTimeInitialization( THROW_WIN32_MSG(lastError, "Error in LoadLibrary: %d (0x%X) loading %ls", lastError, lastError, windowsAppRuntimeDllFilename.c_str()); } + // Resolve function pointers from the dynamically-loaded DLL + auto pfnTryCreate = reinterpret_cast( + GetProcAddress(windowsAppRuntimeDll.get(), "MddTryCreatePackageDependency")); + THROW_LAST_ERROR_IF_NULL_MSG(pfnTryCreate, "Failed to resolve MddTryCreatePackageDependency from %ls", windowsAppRuntimeDllFilename.c_str()); + + auto pfnAdd = reinterpret_cast( + GetProcAddress(windowsAppRuntimeDll.get(), "MddAddPackageDependency")); + THROW_LAST_ERROR_IF_NULL_MSG(pfnAdd, "Failed to resolve MddAddPackageDependency from %ls", windowsAppRuntimeDllFilename.c_str()); + + auto pfnRemove = reinterpret_cast( + GetProcAddress(windowsAppRuntimeDll.get(), "MddRemovePackageDependency")); + THROW_LAST_ERROR_IF_NULL_MSG(pfnRemove, "Failed to resolve MddRemovePackageDependency from %ls", windowsAppRuntimeDllFilename.c_str()); + + // VersionInfo_TestInitialize is test-only; resolve but don't fail if missing + auto pfnTestInit = reinterpret_cast( + GetProcAddress(windowsAppRuntimeDll.get(), "WindowsAppRuntime_VersionInfo_TestInitialize")); + // Add the framework package to the package graph const MddPackageDependencyProcessorArchitectures architectureFilter{}; const auto lifetimeKind{ MddPackageDependencyLifetimeKind::Process }; const MddCreatePackageDependencyOptions createOptions{}; wil::unique_process_heap_string packageDependencyId; - THROW_IF_FAILED(MddTryCreatePackageDependency(nullptr, frameworkPackageInfo->packageFamilyName, minVersion, architectureFilter, lifetimeKind, nullptr, createOptions, &packageDependencyId)); + THROW_IF_FAILED(pfnTryCreate(nullptr, frameworkPackageInfo->packageFamilyName, minVersion, architectureFilter, lifetimeKind, nullptr, createOptions, &packageDependencyId)); // const MddAddPackageDependencyOptions addOptions{}; MDD_PACKAGEDEPENDENCY_CONTEXT packageDependencyContext{}; - THROW_IF_FAILED(MddAddPackageDependency(packageDependencyId.get(), MDD_PACKAGE_DEPENDENCY_RANK_DEFAULT, addOptions, &packageDependencyContext, nullptr)); + THROW_IF_FAILED(pfnAdd(packageDependencyId.get(), MDD_PACKAGE_DEPENDENCY_RANK_DEFAULT, addOptions, &packageDependencyContext, nullptr)); // Remove our temporary path addition RemoveFrameworkFromPath(frameworkPackageInfo->path); @@ -475,7 +554,10 @@ void FirstTimeInitialization( packagVersionTagDelimiter, packageVersionTag) }; FAIL_FAST_HR_IF_MSG(E_UNEXPECTED, mainPackageFamilyName.length() > PACKAGE_FAMILY_NAME_MAX_LENGTH, "%ls", mainPackageFamilyName.c_str()); - ::WindowsAppRuntime::VersionInfo::TestInitialize(frameworkPackageFamilyName.c_str(), mainPackageFamilyName.c_str()); + if (pfnTestInit) + { + FAIL_FAST_IF_FAILED(pfnTestInit(frameworkPackageFamilyName.c_str(), mainPackageFamilyName.c_str())); + } } // Track our initialized state @@ -483,7 +565,11 @@ void FirstTimeInitialization( // g_lifetimeManager = lifetimeManager.detach(); g_endTheLifetimeManagerEvent = std::move(endTheLifetimeManagerEvent); - g_windowsAppRuntimeDll = std::move(windowsAppRuntimeDll); + g_windowsAppRuntimeDll = windowsAppRuntimeDll.release(); + g_pfnMddTryCreatePackageDependency = pfnTryCreate; + g_pfnMddAddPackageDependency = pfnAdd; + g_pfnMddRemovePackageDependency = pfnRemove; + g_pfnVersionInfoTestInitialize = pfnTestInit; g_packageDependencyId = std::move(packageDependencyId); g_packageDependencyContext = packageDependencyContext; // diff --git a/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.h b/base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.h similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.h rename to base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.h diff --git a/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapActivity.cpp b/base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapActivity.cpp similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapActivity.cpp rename to base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapActivity.cpp diff --git a/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapActivity.h b/base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapActivity.h similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapActivity.h rename to base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapActivity.h diff --git a/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapAutoInitializer.cpp b/base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapAutoInitializer.cpp similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapAutoInitializer.cpp rename to base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapAutoInitializer.cpp diff --git a/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapAutoInitializer.cs b/base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapAutoInitializer.cs similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapAutoInitializer.cs rename to base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapAutoInitializer.cs diff --git a/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapTest.h b/base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapTest.h similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapTest.h rename to base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapTest.h diff --git a/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapTracelogging.cpp b/base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapTracelogging.cpp similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapTracelogging.cpp rename to base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapTracelogging.cpp diff --git a/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapTracelogging.h b/base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapTracelogging.h similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapTracelogging.h rename to base/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrapTracelogging.h diff --git a/base/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime-Licensing.cpp b/base/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime-Licensing.cpp new file mode 100644 index 0000000000..cb2086f08f --- /dev/null +++ b/base/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime-Licensing.cpp @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation and Contributors. + +#include "pch.h" + +#include "WindowsAppRuntime-Licensing.h" + +#include + +using PFN_MsixInstallLicenses = HRESULT(STDAPICALLTYPE*)(); + +STDAPI WindowsAppRuntime_InstallLicenses() noexcept try +{ + // Dynamically load the Foundation DLL to call MsixInstallLicenses + auto windowsAppRuntimeDll = wil::unique_hmodule(LoadLibraryExW(L"Microsoft.WindowsAppRuntime.dll", nullptr, 0)); + RETURN_LAST_ERROR_IF_NULL_MSG(windowsAppRuntimeDll, "Failed to load Microsoft.WindowsAppRuntime.dll for licensing"); + + auto pfnInstall = reinterpret_cast( + GetProcAddress(windowsAppRuntimeDll.get(), "MsixInstallLicenses")); + RETURN_LAST_ERROR_IF_NULL_MSG(pfnInstall, "Failed to resolve MsixInstallLicenses"); + + RETURN_IF_FAILED(pfnInstall()); + return S_OK; +} +CATCH_RETURN(); diff --git a/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime-Licensing.h b/base/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime-Licensing.h similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime-Licensing.h rename to base/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime-Licensing.h diff --git a/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime.Bootstrap.def b/base/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime.Bootstrap.def similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime.Bootstrap.def rename to base/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime.Bootstrap.def diff --git a/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime.Bootstrap.rc b/base/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime.Bootstrap.rc similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime.Bootstrap.rc rename to base/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime.Bootstrap.rc diff --git a/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime_BootstrapDLL.vcxproj b/base/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime_BootstrapDLL.vcxproj similarity index 85% rename from dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime_BootstrapDLL.vcxproj rename to base/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime_BootstrapDLL.vcxproj index 2e468ebae2..4ad92ba684 100644 --- a/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime_BootstrapDLL.vcxproj +++ b/base/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime_BootstrapDLL.vcxproj @@ -123,17 +123,15 @@ Use - %(AdditionalIncludeDirectories);$(OutDir)\..\WindowsAppRuntime_DLL;$(OutDir)\..\IDynamicDependencyLifetimeManager;$(MSBuildThisFileDirectory)$(PlatformTarget)\$(Configuration);$(RepoRoot)\dev\common + %(AdditionalIncludeDirectories);$(OutDir)\..\IDynamicDependencyLifetimeManager;$(MSBuildThisFileDirectory)$(PlatformTarget)\$(Configuration);$(RepoRoot)\dev\common;$(RepoRoot)\dev\WindowsAppRuntime_Insights;$(RepoRoot)\dev\DynamicDependency\API;$(RepoRoot)\dev\Licensing WIN32;_DEBUG;WINDOWSAPPRUNTIMEBOOTSTRAPDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) pch.h Windows false - %(AdditionalLibraryDirectories);$(OutDir)\..\WindowsAppRuntime_DLL - onecore.lib;onecoreuap.lib;Microsoft.WindowsAppRuntime.lib;%(AdditionalDependencies) + onecore.lib;onecoreuap.lib;%(AdditionalDependencies) WindowsAppRuntime.Bootstrap.def - Microsoft.WindowsAppRuntime.dll;%(DelayLoadDLLs) None @@ -146,17 +144,15 @@ Use - %(AdditionalIncludeDirectories);$(OutDir)\..\WindowsAppRuntime_DLL;$(OutDir)\..\IDynamicDependencyLifetimeManager;$(MSBuildThisFileDirectory)$(PlatformTarget)\$(Configuration);$(RepoRoot)\dev\common + %(AdditionalIncludeDirectories);$(OutDir)\..\IDynamicDependencyLifetimeManager;$(MSBuildThisFileDirectory)$(PlatformTarget)\$(Configuration);$(RepoRoot)\dev\common;$(RepoRoot)\dev\WindowsAppRuntime_Insights;$(RepoRoot)\dev\DynamicDependency\API;$(RepoRoot)\dev\Licensing _DEBUG;WINDOWSAPPRUNTIMEBOOTSTRAPDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) pch.h Windows false - %(AdditionalLibraryDirectories);$(OutDir)\..\WindowsAppRuntime_DLL - onecore.lib;onecoreuap.lib;Microsoft.WindowsAppRuntime.lib;%(AdditionalDependencies) + onecore.lib;onecoreuap.lib;%(AdditionalDependencies) WindowsAppRuntime.Bootstrap.def - Microsoft.WindowsAppRuntime.dll;%(DelayLoadDLLs) None @@ -169,17 +165,15 @@ Use - %(AdditionalIncludeDirectories);$(OutDir)\..\WindowsAppRuntime_DLL;$(OutDir)\..\IDynamicDependencyLifetimeManager;$(MSBuildThisFileDirectory)$(PlatformTarget)\$(Configuration);$(RepoRoot)\dev\common + %(AdditionalIncludeDirectories);$(OutDir)\..\IDynamicDependencyLifetimeManager;$(MSBuildThisFileDirectory)$(PlatformTarget)\$(Configuration);$(RepoRoot)\dev\common;$(RepoRoot)\dev\WindowsAppRuntime_Insights;$(RepoRoot)\dev\DynamicDependency\API;$(RepoRoot)\dev\Licensing _DEBUG;WINDOWSAPPRUNTIMEBOOTSTRAPDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) pch.h Windows false - %(AdditionalLibraryDirectories);$(OutDir)\..\WindowsAppRuntime_DLL - onecore.lib;onecoreuap.lib;Microsoft.WindowsAppRuntime.lib;%(AdditionalDependencies) + onecore.lib;onecoreuap.lib;%(AdditionalDependencies) WindowsAppRuntime.Bootstrap.def - Microsoft.WindowsAppRuntime.dll;%(DelayLoadDLLs) None @@ -192,17 +186,15 @@ Use - %(AdditionalIncludeDirectories);$(OutDir)\..\WindowsAppRuntime_DLL;$(OutDir)\..\IDynamicDependencyLifetimeManager;$(MSBuildThisFileDirectory)$(PlatformTarget)\$(Configuration);$(RepoRoot)\dev\common + %(AdditionalIncludeDirectories);$(OutDir)\..\IDynamicDependencyLifetimeManager;$(MSBuildThisFileDirectory)$(PlatformTarget)\$(Configuration);$(RepoRoot)\dev\common;$(RepoRoot)\dev\WindowsAppRuntime_Insights;$(RepoRoot)\dev\DynamicDependency\API;$(RepoRoot)\dev\Licensing WIN32;NDEBUG;WINDOWSAPPRUNTIMEBOOTSTRAPDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) pch.h Windows false - %(AdditionalLibraryDirectories);$(OutDir)\..\WindowsAppRuntime_DLL - onecore.lib;onecoreuap.lib;Microsoft.WindowsAppRuntime.lib;%(AdditionalDependencies) + onecore.lib;onecoreuap.lib;%(AdditionalDependencies) WindowsAppRuntime.Bootstrap.def - Microsoft.WindowsAppRuntime.dll;%(DelayLoadDLLs) None @@ -215,17 +207,15 @@ Use - %(AdditionalIncludeDirectories);$(OutDir)\..\WindowsAppRuntime_DLL;$(OutDir)\..\IDynamicDependencyLifetimeManager;$(MSBuildThisFileDirectory)$(PlatformTarget)\$(Configuration);$(RepoRoot)\dev\common + %(AdditionalIncludeDirectories);$(OutDir)\..\IDynamicDependencyLifetimeManager;$(MSBuildThisFileDirectory)$(PlatformTarget)\$(Configuration);$(RepoRoot)\dev\common;$(RepoRoot)\dev\WindowsAppRuntime_Insights;$(RepoRoot)\dev\DynamicDependency\API;$(RepoRoot)\dev\Licensing NDEBUG;WINDOWSAPPRUNTIMEBOOTSTRAPDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) pch.h Windows false - %(AdditionalLibraryDirectories);$(OutDir)\..\WindowsAppRuntime_DLL - onecore.lib;onecoreuap.lib;Microsoft.WindowsAppRuntime.lib;%(AdditionalDependencies) + onecore.lib;onecoreuap.lib;%(AdditionalDependencies) WindowsAppRuntime.Bootstrap.def - Microsoft.WindowsAppRuntime.dll;%(DelayLoadDLLs) None @@ -238,17 +228,15 @@ Use - %(AdditionalIncludeDirectories);$(OutDir)\..\WindowsAppRuntime_DLL;$(OutDir)\..\IDynamicDependencyLifetimeManager;$(MSBuildThisFileDirectory)$(PlatformTarget)\$(Configuration);$(RepoRoot)\dev\common + %(AdditionalIncludeDirectories);$(OutDir)\..\IDynamicDependencyLifetimeManager;$(MSBuildThisFileDirectory)$(PlatformTarget)\$(Configuration);$(RepoRoot)\dev\common;$(RepoRoot)\dev\WindowsAppRuntime_Insights;$(RepoRoot)\dev\DynamicDependency\API;$(RepoRoot)\dev\Licensing NDEBUG;WINDOWSAPPRUNTIMEBOOTSTRAPDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) pch.h Windows false - %(AdditionalLibraryDirectories);$(OutDir)\..\WindowsAppRuntime_DLL - onecore.lib;onecoreuap.lib;Microsoft.WindowsAppRuntime.lib;%(AdditionalDependencies) + onecore.lib;onecoreuap.lib;%(AdditionalDependencies) WindowsAppRuntime.Bootstrap.def - Microsoft.WindowsAppRuntime.dll;%(DelayLoadDLLs) None @@ -324,7 +312,7 @@ - + {ccd23028-b9d3-410b-836e-20b2e7c08451} diff --git a/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime_BootstrapDLL.vcxproj.filters b/base/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime_BootstrapDLL.vcxproj.filters similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime_BootstrapDLL.vcxproj.filters rename to base/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime_BootstrapDLL.vcxproj.filters diff --git a/dev/WindowsAppRuntime_BootstrapDLL/dllmain.cpp b/base/dev/WindowsAppRuntime_BootstrapDLL/dllmain.cpp similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/dllmain.cpp rename to base/dev/WindowsAppRuntime_BootstrapDLL/dllmain.cpp diff --git a/dev/WindowsAppRuntime_BootstrapDLL/framework.h b/base/dev/WindowsAppRuntime_BootstrapDLL/framework.h similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/framework.h rename to base/dev/WindowsAppRuntime_BootstrapDLL/framework.h diff --git a/dev/WindowsAppRuntime_BootstrapDLL/packages.config b/base/dev/WindowsAppRuntime_BootstrapDLL/packages.config similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/packages.config rename to base/dev/WindowsAppRuntime_BootstrapDLL/packages.config diff --git a/dev/WindowsAppRuntime_BootstrapDLL/pch.cpp b/base/dev/WindowsAppRuntime_BootstrapDLL/pch.cpp similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/pch.cpp rename to base/dev/WindowsAppRuntime_BootstrapDLL/pch.cpp diff --git a/dev/WindowsAppRuntime_BootstrapDLL/pch.h b/base/dev/WindowsAppRuntime_BootstrapDLL/pch.h similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/pch.h rename to base/dev/WindowsAppRuntime_BootstrapDLL/pch.h diff --git a/dev/WindowsAppRuntime_BootstrapDLL/wil_msixdynamicdependency.h b/base/dev/WindowsAppRuntime_BootstrapDLL/wil_msixdynamicdependency.h similarity index 100% rename from dev/WindowsAppRuntime_BootstrapDLL/wil_msixdynamicdependency.h rename to base/dev/WindowsAppRuntime_BootstrapDLL/wil_msixdynamicdependency.h diff --git a/dev/Deployment/DeploymentManagerAutoInitializer.cpp b/base/dev/include/DeploymentManagerAutoInitializer.cpp similarity index 100% rename from dev/Deployment/DeploymentManagerAutoInitializer.cpp rename to base/dev/include/DeploymentManagerAutoInitializer.cpp diff --git a/dev/Deployment/DeploymentManagerAutoInitializer.cs b/base/dev/include/DeploymentManagerAutoInitializer.cs similarity index 100% rename from dev/Deployment/DeploymentManagerAutoInitializer.cs rename to base/dev/include/DeploymentManagerAutoInitializer.cs diff --git a/dev/UndockedRegFreeWinRT/UndockedRegFreeWinRT-AutoInitializer.cpp b/base/dev/include/UndockedRegFreeWinRT-AutoInitializer.cpp similarity index 100% rename from dev/UndockedRegFreeWinRT/UndockedRegFreeWinRT-AutoInitializer.cpp rename to base/dev/include/UndockedRegFreeWinRT-AutoInitializer.cpp diff --git a/dev/UndockedRegFreeWinRT/UndockedRegFreeWinRT-AutoInitializer.cs b/base/dev/include/UndockedRegFreeWinRT-AutoInitializer.cs similarity index 100% rename from dev/UndockedRegFreeWinRT/UndockedRegFreeWinRT-AutoInitializer.cs rename to base/dev/include/UndockedRegFreeWinRT-AutoInitializer.cs diff --git a/dev/Common/WindowsAppRuntimeAutoInitializer.cpp b/base/dev/include/WindowsAppRuntimeAutoInitializer.cpp similarity index 100% rename from dev/Common/WindowsAppRuntimeAutoInitializer.cpp rename to base/dev/include/WindowsAppRuntimeAutoInitializer.cpp diff --git a/dev/Common/WindowsAppRuntimeAutoInitializer.cs b/base/dev/include/WindowsAppRuntimeAutoInitializer.cs similarity index 100% rename from dev/Common/WindowsAppRuntimeAutoInitializer.cs rename to base/dev/include/WindowsAppRuntimeAutoInitializer.cs diff --git a/base/test/BasePackageTest/CPP/BasePackageTestCpp.vcxproj b/base/test/BasePackageTest/CPP/BasePackageTestCpp.vcxproj new file mode 100644 index 0000000000..b502045999 --- /dev/null +++ b/base/test/BasePackageTest/CPP/BasePackageTestCpp.vcxproj @@ -0,0 +1,203 @@ + + + + + Ge_SC_Unpkg + x64 + + + RS5_FD_Unpkg + x64 + + + Ge_FD_Unpkg_NoBoot + x64 + + + RS5_FD_Unpkg_NoBoot + x64 + + + H19H1_SC_Pkg + x64 + + + RS5_SC_Pkg_URF + x64 + + + RS5_SC_Pkg_NoURF + x64 + + + RS5_FD_Pkg + x64 + + + RS5_SC_Pkg_URF_Fdn + x64 + + + + + 17.0 + {A1B2C3D4-E5F6-7890-ABCD-EF1234567890} + BasePackageTestCpp + 10.0 + Application + false + v143 + Unicode + + + + + 10.0.26100.0 + true + None + + + + + 10.0.17763.0 + false + None + $(MSBuildProjectDirectory)\ + false + <_WindowsAppSDKSkipBootstrapRequiredCheck>true + <_WindowsAppSDKKeepBootstrapBinaries>true + false + false + false + + + + + 10.0.26100.0 + false + None + $(MSBuildProjectDirectory)\ + false + false + false + false + + + + + 10.0.17763.0 + false + None + $(MSBuildProjectDirectory)\ + false + false + false + false + + + + + 10.0.18362.0 + true + true + + + + + 10.0.17763.0 + true + true + + + + + 10.0.17763.0 + true + true + false + + + + + 10.0.17763.0 + false + true + $(MSBuildProjectDirectory)\ + false + <_WindowsAppSDKSkipBootstrapRequiredCheck>true + false + true + + + + + 10.0.17763.0 + true + true + true + + + + + + + + + + $(MSBuildProjectDirectory)\out\$(Configuration)\$(Platform)\ + $(MSBuildProjectDirectory)\obj\$(Configuration)\$(Platform)\ + + + + + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + stdcpp17 + + + Console + + + + + + + EXPECT_NO_DLLS;%(PreprocessorDefinitions) + + + + + + EXPECT_BOOTSTRAP;%(PreprocessorDefinitions) + + + + + + + + + + + + + + + + + diff --git a/base/test/BasePackageTest/CPP/Directory.Build.props b/base/test/BasePackageTest/CPP/Directory.Build.props new file mode 100644 index 0000000000..5f9708a97f --- /dev/null +++ b/base/test/BasePackageTest/CPP/Directory.Build.props @@ -0,0 +1,5 @@ + + + false + + diff --git a/base/test/BasePackageTest/CPP/main.cpp b/base/test/BasePackageTest/CPP/main.cpp new file mode 100644 index 0000000000..968b4d9100 --- /dev/null +++ b/base/test/BasePackageTest/CPP/main.cpp @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation and Contributors. +// Licensed under the MIT License. + +// Validates Base package binplacement behavior for different configurations. +// EXPECT_NO_DLLS: No DLLs expected alongside the exe. +// EXPECT_BOOTSTRAP: Bootstrap DLL MUST be present alongside the exe. +#include +#include +#include +#include +#include +#include + +namespace fs = std::filesystem; + +int main() +{ + wchar_t exePath[MAX_PATH]; + GetModuleFileNameW(nullptr, exePath, MAX_PATH); + fs::path exeDir = fs::path(exePath).parent_path(); + + std::wcout << L"BasePackageTestCpp output dir: " << exeDir.wstring() << std::endl; + + std::vector foundDlls; + for (const auto& entry : fs::directory_iterator(exeDir)) + { + if (entry.is_regular_file()) + { + auto ext = entry.path().extension().wstring(); + std::transform(ext.begin(), ext.end(), ext.begin(), ::towlower); + if (ext == L".dll") + { + foundDlls.push_back(entry.path().filename().wstring()); + } + } + } + + std::wcout << L"DLLs found: " << foundDlls.size() << std::endl; + for (const auto& dll : foundDlls) + { + std::wcout << L" " << dll << std::endl; + } + + int exitCode = 0; + +#ifdef EXPECT_NO_DLLS + std::wcout << L"\n[Expecting: no DLLs]" << std::endl; + if (!foundDlls.empty()) + { + std::wcerr << L"FAIL: No DLLs should be present alongside a SelfContained/Packaged exe." << std::endl; + exitCode = 1; + } + else + { + std::wcout << L"PASS: No DLLs found alongside the exe." << std::endl; + } +#elif defined(EXPECT_BOOTSTRAP) + std::wcout << L"\n[Expecting: bootstrap DLL present]" << std::endl; + bool foundBootstrap = false; + for (const auto& dll : foundDlls) + { + auto lower = dll; + std::transform(lower.begin(), lower.end(), lower.begin(), ::towlower); + if (lower == L"microsoft.windowsappruntime.bootstrap.dll") + { + foundBootstrap = true; + break; + } + } + if (!foundBootstrap) + { + std::wcerr << L"FAIL: Microsoft.WindowsAppRuntime.Bootstrap.dll not found alongside exe." << std::endl; + exitCode = 1; + } + else + { + std::wcout << L"PASS: Bootstrap DLL is present as expected." << std::endl; + } +#endif + + return exitCode; +} diff --git a/base/test/BasePackageTest/CPP/nuget.config b/base/test/BasePackageTest/CPP/nuget.config new file mode 100644 index 0000000000..b383ca72d4 --- /dev/null +++ b/base/test/BasePackageTest/CPP/nuget.config @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/base/test/BasePackageTest/CPP/packages.config b/base/test/BasePackageTest/CPP/packages.config new file mode 100644 index 0000000000..7e57e2be04 --- /dev/null +++ b/base/test/BasePackageTest/CPP/packages.config @@ -0,0 +1,4 @@ + + + + diff --git a/base/test/BasePackageTest/CS/BasePackageTest.csproj b/base/test/BasePackageTest/CS/BasePackageTest.csproj new file mode 100644 index 0000000000..9a9427cd91 --- /dev/null +++ b/base/test/BasePackageTest/CS/BasePackageTest.csproj @@ -0,0 +1,127 @@ + + + + Exe + x64 + win-x64 + AnyCPU;x64 + Ge_SC_Unpkg;RS5_FD_Unpkg;Ge_FD_Unpkg_NoBoot;RS5_FD_Unpkg_NoBoot;H19H1_SC_Pkg;RS5_SC_Pkg_URF;RS5_SC_Pkg_NoURF;RS5_FD_Pkg;RS5_SC_Pkg_URF_Fdn + + + + + net8.0-windows10.0.26100.0 + 10.0.26100.0 + true + None + EXPECT_NO_BOOTSTRAP + + + + + net8.0-windows10.0.17763.0 + 10.0.17763.0 + false + None + $(MSBuildProjectDirectory)\ + false + <_WindowsAppSDKSkipBootstrapRequiredCheck>true + <_WindowsAppSDKKeepBootstrapBinaries>true + false + false + false + EXPECT_BOOTSTRAP + + + + + net8.0-windows10.0.26100.0 + 10.0.26100.0 + false + None + $(MSBuildProjectDirectory)\ + false + false + false + false + EXPECT_NO_BOOTSTRAP + + + + + net8.0-windows10.0.17763.0 + 10.0.17763.0 + false + None + $(MSBuildProjectDirectory)\ + false + false + false + false + + + + + net8.0-windows10.0.18362.0 + 10.0.18362.0 + true + MSIX + EXPECT_NO_BOOTSTRAP + + + + + net8.0-windows10.0.17763.0 + 10.0.17763.0 + true + MSIX + + + + + net8.0-windows10.0.17763.0 + 10.0.17763.0 + true + MSIX + false + + + + + net8.0-windows10.0.17763.0 + 10.0.17763.0 + false + MSIX + $(MSBuildProjectDirectory)\ + false + <_WindowsAppSDKSkipBootstrapRequiredCheck>true + false + true + EXPECT_NO_BOOTSTRAP + + + + + net8.0-windows10.0.17763.0 + 10.0.17763.0 + true + MSIX + $(NoWarn);NU1605 + + + + + + + + + + + + diff --git a/base/test/BasePackageTest/CS/BasePackageTest.sln b/base/test/BasePackageTest/CS/BasePackageTest.sln new file mode 100644 index 0000000000..8ec2fcef48 --- /dev/null +++ b/base/test/BasePackageTest/CS/BasePackageTest.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 18 +VisualStudioVersion = 18.3.11520.95 d18.3 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BasePackageTest", "BasePackageTest.csproj", "{13B4E760-EC65-9A64-419F-C6CEC70B3E18}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {13B4E760-EC65-9A64-419F-C6CEC70B3E18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {13B4E760-EC65-9A64-419F-C6CEC70B3E18}.Debug|Any CPU.Build.0 = Debug|Any CPU + {13B4E760-EC65-9A64-419F-C6CEC70B3E18}.Debug|x64.ActiveCfg = Debug|x64 + {13B4E760-EC65-9A64-419F-C6CEC70B3E18}.Debug|x64.Build.0 = Debug|x64 + {13B4E760-EC65-9A64-419F-C6CEC70B3E18}.Release|Any CPU.ActiveCfg = Release|Any CPU + {13B4E760-EC65-9A64-419F-C6CEC70B3E18}.Release|Any CPU.Build.0 = Release|Any CPU + {13B4E760-EC65-9A64-419F-C6CEC70B3E18}.Release|x64.ActiveCfg = Release|x64 + {13B4E760-EC65-9A64-419F-C6CEC70B3E18}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {92C3F6F9-C58B-44FB-BF56-C8ED4418776F} + EndGlobalSection +EndGlobal diff --git a/base/test/BasePackageTest/CS/Directory.Build.props b/base/test/BasePackageTest/CS/Directory.Build.props new file mode 100644 index 0000000000..5f9708a97f --- /dev/null +++ b/base/test/BasePackageTest/CS/Directory.Build.props @@ -0,0 +1,5 @@ + + + false + + diff --git a/base/test/BasePackageTest/CS/Program.cs b/base/test/BasePackageTest/CS/Program.cs new file mode 100644 index 0000000000..28dbf6c481 --- /dev/null +++ b/base/test/BasePackageTest/CS/Program.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation and Contributors. +// Licensed under the MIT License. + +// Validates Base package binplacement behavior for different configurations. +// EXPECT_NO_BOOTSTRAP: Only app DLLs expected, no bootstrap. +// EXPECT_BOOTSTRAP: Bootstrap DLLs MUST be present. +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; + +var exeDir = AppContext.BaseDirectory; +Console.WriteLine($"BasePackageTest output dir: {exeDir}"); + +var allDlls = Directory.GetFiles(exeDir, "*.dll") + .Select(Path.GetFileName) + .OrderBy(x => x, StringComparer.OrdinalIgnoreCase) + .ToList()!; + +Console.WriteLine($"DLLs found: {allDlls.Count}"); +foreach (var dll in allDlls) +{ + Console.WriteLine($" {dll}"); +} + +int exitCode = 0; + +#if EXPECT_NO_BOOTSTRAP +Console.WriteLine("\n[Expecting: no bootstrap DLLs]"); +var allowedDlls = new HashSet(StringComparer.OrdinalIgnoreCase) +{ + "BasePackageTest.dll", + "Microsoft.Windows.SDK.NET.dll", + "WinRT.Runtime.dll" +}; + +var unexpected = allDlls.Where(d => !allowedDlls.Contains(d!)).ToList(); +if (unexpected.Count > 0) +{ + Console.Error.WriteLine("FAIL: Unexpected DLLs found:"); + foreach (var dll in unexpected) + Console.Error.WriteLine($" {dll}"); + exitCode = 1; +} +else +{ + Console.WriteLine("PASS: Only expected DLLs present (no bootstrap)."); +} + +#elif EXPECT_BOOTSTRAP +Console.WriteLine("\n[Expecting: bootstrap DLLs present]"); +var requiredBootstrapDlls = new[] +{ + "Microsoft.WindowsAppRuntime.Bootstrap.dll", + "Microsoft.WindowsAppRuntime.Bootstrap.Net.dll" +}; + +var missingBootstrap = requiredBootstrapDlls + .Where(r => !allDlls.Any(d => string.Equals(d, r, StringComparison.OrdinalIgnoreCase))) + .ToList(); + +if (missingBootstrap.Count > 0) +{ + Console.Error.WriteLine("FAIL: Expected bootstrap DLLs not found:"); + foreach (var dll in missingBootstrap) + Console.Error.WriteLine($" {dll}"); + exitCode = 1; +} +else +{ + Console.WriteLine("PASS: Bootstrap DLLs are present as expected."); +} +#endif + +return exitCode; diff --git a/base/test/BasePackageTest/CS/nuget.config b/base/test/BasePackageTest/CS/nuget.config new file mode 100644 index 0000000000..d88d4c7a25 --- /dev/null +++ b/base/test/BasePackageTest/CS/nuget.config @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/base/test/RunBasePackageTests.ps1 b/base/test/RunBasePackageTests.ps1 new file mode 100644 index 0000000000..b1c4ddec6c --- /dev/null +++ b/base/test/RunBasePackageTests.ps1 @@ -0,0 +1,283 @@ +# RunBasePackageTests.ps1 +# Builds all Base package test configurations and verifies results. +# Can be run from any directory — automatically finds repo root. +param( + [string]$MsBuildPath +) + +Set-StrictMode -Version 3.0 +$ErrorActionPreference = 'Continue' +$script:PassCount = 0 +$script:FailCount = 0 + +# Find repo root (walk up from script location looking for .git) +$scriptDir = $PSScriptRoot +$repoRoot = $scriptDir +while ($repoRoot -and !(Test-Path (Join-Path $repoRoot ".git"))) { + $repoRoot = Split-Path $repoRoot -Parent +} +if (!$repoRoot -or !(Test-Path (Join-Path $repoRoot ".git"))) { + Write-Host "ERROR: Could not find repo root from $scriptDir" -ForegroundColor Red + exit 1 +} +Write-Host "Repo root: $repoRoot" +Push-Location $repoRoot + +# Auto-detect MSBuild if not specified +if (!$MsBuildPath) { + $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" + if (Test-Path $vswhere) { + $vsPath = & $vswhere -latest -requires Microsoft.Component.MSBuild -property installationPath 2>$null + if ($vsPath) { + $MsBuildPath = Join-Path $vsPath "MSBuild\Current\Bin\MSBuild.exe" + } + } + if (!$MsBuildPath -or !(Test-Path $MsBuildPath)) { + Write-Host "ERROR: Could not find MSBuild. Pass -MsBuildPath explicitly." -ForegroundColor Red + Pop-Location + exit 1 + } + Write-Host "MSBuild: $MsBuildPath" +} + +function Test-BuildSuccess { + param([string]$Name, [string]$BuildCmd, [scriptblock]$Verify) + + Write-Host "`n========== $Name ==========" -ForegroundColor Cyan + Write-Host "Building..." + + $output = Invoke-Expression $BuildCmd 2>&1 | Out-String + $exitCode = $LASTEXITCODE + + if ($exitCode -ne 0) { + Write-Host "FAIL: Build failed (exit code $exitCode)" -ForegroundColor Red + Write-Host $output | Select-Object -Last 10 + $script:FailCount++ + return + } + + # Run verification + $result = & $Verify + if ($result) { + Write-Host "PASS" -ForegroundColor Green + $script:PassCount++ + } else { + $script:FailCount++ + } +} + +function Test-BuildError { + param([string]$Name, [string]$BuildCmd, [string]$ExpectedError) + + Write-Host "`n========== $Name (expect error) ==========" -ForegroundColor Cyan + Write-Host "Building (expecting failure)..." + + $output = Invoke-Expression $BuildCmd 2>&1 | Out-String + $exitCode = $LASTEXITCODE + + if ($exitCode -eq 0) { + Write-Host "FAIL: Build succeeded but should have failed" -ForegroundColor Red + $script:FailCount++ + return + } + + if ($output -match [regex]::Escape($ExpectedError)) { + Write-Host "PASS: Got expected error" -ForegroundColor Green + $script:PassCount++ + } else { + Write-Host "FAIL: Build failed but with wrong error" -ForegroundColor Red + Write-Host "Expected: $ExpectedError" -ForegroundColor Yellow + # Show error lines + $output -split "`n" | Where-Object { $_ -match "error" } | Select-Object -First 5 | ForEach-Object { Write-Host " $_" } + $script:FailCount++ + } +} + +function Test-NoDlls { + param([string]$Dir, [string[]]$AllowedDlls = @()) + + $dlls = @(Get-ChildItem "$Dir\*.dll" -ErrorAction SilentlyContinue | ForEach-Object { $_.Name }) + $unexpected = @($dlls | Where-Object { $_ -notin $AllowedDlls }) + + if ($unexpected.Count -gt 0) { + Write-Host "FAIL: Unexpected DLLs found:" -ForegroundColor Red + $unexpected | ForEach-Object { Write-Host " $_" -ForegroundColor Red } + return $false + } + Write-Host " DLLs: $($dlls.Count) (all expected)" + return $true +} + +function Test-HasBootstrapDlls { + param([string]$Dir, [switch]$Managed) + + $dlls = Get-ChildItem "$Dir\*.dll" -ErrorAction SilentlyContinue | ForEach-Object { $_.Name } + $hasNative = $dlls -contains "Microsoft.WindowsAppRuntime.Bootstrap.dll" + $hasManaged = !$Managed -or ($dlls -contains "Microsoft.WindowsAppRuntime.Bootstrap.Net.dll") + + if (!$hasNative) { + Write-Host "FAIL: Microsoft.WindowsAppRuntime.Bootstrap.dll not found" -ForegroundColor Red + return $false + } + if ($Managed -and !$hasManaged) { + Write-Host "FAIL: Microsoft.WindowsAppRuntime.Bootstrap.Net.dll not found" -ForegroundColor Red + return $false + } + Write-Host " Bootstrap DLLs present" + return $true +} + +# ============================================================ +Write-Host "Base Package Test Suite" -ForegroundColor White +Write-Host "======================" -ForegroundColor White + +$csProj = "base\test\BasePackageTest\CS\BasePackageTest.csproj" +$cppProj = "base\test\BasePackageTest\CPP\BasePackageTestCpp.vcxproj" + +# Clean previous outputs +Write-Host "`nCleaning..." +cmd /c "rd /s /q base\test\BasePackageTest\CS\bin 2>nul" +cmd /c "rd /s /q base\test\BasePackageTest\CS\obj 2>nul" +cmd /c "rd /s /q base\test\BasePackageTest\CPP\out 2>nul" +cmd /c "rd /s /q base\test\BasePackageTest\CPP\obj 2>nul" + +# Ensure C++ NuGet packages are restored +Write-Host "Restoring C++ NuGet packages..." +cmd /c "rd /s /q base\test\BasePackageTest\CPP\packages 2>nul" +cmd /c "rd /s /q Packages\microsoft.windowsappsdk.base 2>nul" +nuget restore base\test\BasePackageTest\CPP\packages.config -PackagesDirectory base\test\BasePackageTest\CPP\packages -ConfigFile base\test\BasePackageTest\CPP\nuget.config 2>&1 | Out-Null + +# ============================================================ +# C# Tests +# ============================================================ +Write-Host "`n" -NoNewline +Write-Host "===== C# Tests =====" -ForegroundColor White + +# Config 1: Ge_SC_Unpkg — no bootstrap DLLs +$csAllowed = @("BasePackageTest.dll", "Microsoft.Windows.SDK.NET.dll", "WinRT.Runtime.dll") +Test-BuildSuccess "C# 1: Ge_SC_Unpkg" ` + "dotnet build $csProj -c Ge_SC_Unpkg --no-incremental -v q 2>&1" ` + { Test-NoDlls "base\test\BasePackageTest\CS\bin\x64\Ge_SC_Unpkg\net8.0-windows10.0.26100.0\win-x64" -AllowedDlls $csAllowed } + +# Config 2: RS5_FD_Unpkg — bootstrap DLLs present +dotnet restore $csProj -p:Configuration=RS5_FD_Unpkg 2>&1 | Out-Null +Test-BuildSuccess "C# 2: RS5_FD_Unpkg" ` + "dotnet build $csProj -c RS5_FD_Unpkg --no-incremental --no-restore -v q 2>&1" ` + { Test-HasBootstrapDlls "base\test\BasePackageTest\CS\bin\x64\RS5_FD_Unpkg\net8.0-windows10.0.17763.0\win-x64" -Managed } + +# Config 3: Ge_FD_Unpkg_NoBoot — no bootstrap DLLs +dotnet restore $csProj -p:Configuration=Ge_FD_Unpkg_NoBoot 2>&1 | Out-Null +Test-BuildSuccess "C# 3: Ge_FD_Unpkg_NoBoot" ` + "dotnet build $csProj -c Ge_FD_Unpkg_NoBoot --no-incremental --no-restore -v q 2>&1" ` + { Test-NoDlls "base\test\BasePackageTest\CS\bin\x64\Ge_FD_Unpkg_NoBoot\net8.0-windows10.0.26100.0\win-x64" -AllowedDlls $csAllowed } + +# Config 4: RS5_FD_Unpkg_NoBoot — ERROR expected +dotnet restore $csProj -p:Configuration=RS5_FD_Unpkg_NoBoot 2>&1 | Out-Null +Test-BuildError "C# 4: RS5_FD_Unpkg_NoBoot" ` + "dotnet build $csProj -c RS5_FD_Unpkg_NoBoot --no-incremental --no-restore -v q 2>&1" ` + "The Windows App SDK Bootstrapper is required for framework-dependent unpackaged apps" + +# Config 5: H19H1_SC_Pkg — no bootstrap DLLs +dotnet restore $csProj -p:Configuration=H19H1_SC_Pkg 2>&1 | Out-Null +Test-BuildSuccess "C# 5: H19H1_SC_Pkg" ` + "dotnet build $csProj -c H19H1_SC_Pkg --no-incremental --no-restore -v q 2>&1" ` + { Test-NoDlls "base\test\BasePackageTest\CS\bin\x64\H19H1_SC_Pkg\net8.0-windows10.0.18362.0\win-x64" -AllowedDlls $csAllowed } + +# Config 6: RS5_SC_Pkg_URF — ERROR expected (Foundation required) +dotnet restore $csProj -p:Configuration=RS5_SC_Pkg_URF 2>&1 | Out-Null +Test-BuildError "C# 6: RS5_SC_Pkg_URF" ` + "dotnet build $csProj -c RS5_SC_Pkg_URF --no-incremental --no-restore -v q 2>&1" ` + "Undocked Reg-Free WinRT activation requires the Microsoft.WindowsAppSDK.Foundation package" + +# Config 7: RS5_SC_Pkg_NoURF — ERROR expected (URF not optional) +dotnet restore $csProj -p:Configuration=RS5_SC_Pkg_NoURF 2>&1 | Out-Null +Test-BuildError "C# 7: RS5_SC_Pkg_NoURF" ` + "dotnet build $csProj -c RS5_SC_Pkg_NoURF --no-incremental --no-restore -v q 2>&1" ` + "Undocked Reg-Free WinRT activation is required for self-contained apps targeting Windows versions prior to 10.0.18362.0" + +# Config 8: RS5_FD_Pkg — ERROR expected (DeploymentMgr requires Foundation) +dotnet restore $csProj -p:Configuration=RS5_FD_Pkg 2>&1 | Out-Null +Test-BuildError "C# 8: RS5_FD_Pkg" ` + "dotnet build $csProj -c RS5_FD_Pkg --no-incremental --no-restore -v q 2>&1" ` + "DeploymentManager initialization requires the Microsoft.WindowsAppSDK.Foundation package" + +# Config 9: RS5_SC_Pkg_URF_Fdn — Foundation referenced, URF=true, no bootstrap DLLs +# Foundation adds extra DLLs but bootstrap should still be absent (SC=true) +dotnet restore $csProj -p:Configuration=RS5_SC_Pkg_URF_Fdn 2>&1 | Out-Null +Test-BuildSuccess "C# 9: RS5_SC_Pkg_URF_Fdn" ` + "dotnet build $csProj -c RS5_SC_Pkg_URF_Fdn --no-incremental --no-restore -v q 2>&1" ` + { + $dir = "base\test\BasePackageTest\CS\bin\x64\RS5_SC_Pkg_URF_Fdn\net8.0-windows10.0.17763.0\win-x64" + $dlls = @(Get-ChildItem "$dir\*.dll" -ErrorAction SilentlyContinue | ForEach-Object { $_.Name }) + $bootstrapDlls = @($dlls | Where-Object { $_ -match "Bootstrap" }) + if ($bootstrapDlls.Count -gt 0) { + Write-Host "FAIL: Bootstrap DLLs found:" -ForegroundColor Red + $bootstrapDlls | ForEach-Object { Write-Host " $_" -ForegroundColor Red } + return $false + } + Write-Host " DLLs: $($dlls.Count) (no bootstrap, Foundation present)" + return $true + } + +# ============================================================ +# C++ Tests +# ============================================================ +Write-Host "`n" -NoNewline +Write-Host "===== C++ Tests =====" -ForegroundColor White + +$msbuild = "`"$MsBuildPath`"" + +# Config 1: Ge_SC_Unpkg — no DLLs +Test-BuildSuccess "C++ 1: Ge_SC_Unpkg" ` + "& $msbuild $cppProj /p:Configuration=Ge_SC_Unpkg /p:Platform=x64 /nr:false /v:q 2>&1" ` + { Test-NoDlls "base\test\BasePackageTest\CPP\out\Ge_SC_Unpkg\x64" } + +# Config 2: RS5_FD_Unpkg — bootstrap DLL present +Test-BuildSuccess "C++ 2: RS5_FD_Unpkg" ` + "& $msbuild $cppProj /p:Configuration=RS5_FD_Unpkg /p:Platform=x64 /nr:false /v:q 2>&1" ` + { Test-HasBootstrapDlls "base\test\BasePackageTest\CPP\out\RS5_FD_Unpkg\x64" } + +# Config 3: Ge_FD_Unpkg_NoBoot — no DLLs +Test-BuildSuccess "C++ 3: Ge_FD_Unpkg_NoBoot" ` + "& $msbuild $cppProj /p:Configuration=Ge_FD_Unpkg_NoBoot /p:Platform=x64 /nr:false /v:q 2>&1" ` + { Test-NoDlls "base\test\BasePackageTest\CPP\out\Ge_FD_Unpkg_NoBoot\x64" } + +# Config 4: RS5_FD_Unpkg_NoBoot — ERROR expected +Test-BuildError "C++ 4: RS5_FD_Unpkg_NoBoot" ` + "& $msbuild $cppProj /p:Configuration=RS5_FD_Unpkg_NoBoot /p:Platform=x64 /nr:false /v:q 2>&1" ` + "The Windows App SDK Bootstrapper is required for framework-dependent unpackaged apps" + +# Config 5: H19H1_SC_Pkg — no DLLs +Test-BuildSuccess "C++ 5: H19H1_SC_Pkg" ` + "& $msbuild $cppProj /p:Configuration=H19H1_SC_Pkg /p:Platform=x64 /nr:false /v:q 2>&1" ` + { Test-NoDlls "base\test\BasePackageTest\CPP\out\H19H1_SC_Pkg\x64" } + +# Config 6: RS5_SC_Pkg_URF — ERROR expected (Foundation required) +Test-BuildError "C++ 6: RS5_SC_Pkg_URF" ` + "& $msbuild $cppProj /p:Configuration=RS5_SC_Pkg_URF /p:Platform=x64 /nr:false /v:q 2>&1" ` + "Undocked Reg-Free WinRT activation requires the Microsoft.WindowsAppSDK.Foundation package" + +# Config 7: RS5_SC_Pkg_NoURF — ERROR expected (URF not optional) +Test-BuildError "C++ 7: RS5_SC_Pkg_NoURF" ` + "& $msbuild $cppProj /p:Configuration=RS5_SC_Pkg_NoURF /p:Platform=x64 /nr:false /v:q 2>&1" ` + "Undocked Reg-Free WinRT activation is required for self-contained apps targeting Windows versions prior to 10.0.18362.0" + +# Config 8: RS5_FD_Pkg — ERROR expected (DeploymentMgr requires Foundation) +Test-BuildError "C++ 8: RS5_FD_Pkg" ` + "& $msbuild $cppProj /p:Configuration=RS5_FD_Pkg /p:Platform=x64 /nr:false /v:q 2>&1" ` + "DeploymentManager initialization requires the Microsoft.WindowsAppSDK.Foundation package" + +# Config 9: RS5_SC_Pkg_URF_Fdn — Foundation simulated, URF=true, no DLLs +Test-BuildSuccess "C++ 9: RS5_SC_Pkg_URF_Fdn" ` + "& $msbuild $cppProj /p:Configuration=RS5_SC_Pkg_URF_Fdn /p:Platform=x64 /nr:false /v:q 2>&1" ` + { Test-NoDlls "base\test\BasePackageTest\CPP\out\RS5_SC_Pkg_URF_Fdn\x64" } + +# ============================================================ +# Summary +# ============================================================ +Write-Host "`n======================" -ForegroundColor White +Write-Host "Results: $script:PassCount passed, $script:FailCount failed" -ForegroundColor $(if ($script:FailCount -eq 0) { "Green" } else { "Red" }) +Write-Host "======================" -ForegroundColor White + +Pop-Location +exit $script:FailCount diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-BuildFoundation-AnyCPU-Steps.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-BuildFoundation-AnyCPU-Steps.yml index d9661bd2f2..1e4746447b 100644 --- a/build/AzurePipelinesTemplates/WindowsAppSDK-BuildFoundation-AnyCPU-Steps.yml +++ b/build/AzurePipelinesTemplates/WindowsAppSDK-BuildFoundation-AnyCPU-Steps.yml @@ -35,7 +35,7 @@ steps: displayName: Run PREfast SDL Native Rules inputs: setupCommandlines: '"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsMSBuildCmd.bat"' - msBuildCommandline: 'msbuild.exe /restore /nologo /nr:false $(Build.SourcesDirectory)\dev\Bootstrap\CS\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj' + msBuildCommandline: 'msbuild.exe /restore /nologo /nr:false $(Build.SourcesDirectory)\base\dev\Bootstrap\CS\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj' # Generally speaking, we leave it to the external repos to scan the bits in their packages. excludedPaths: | $(Build.SourcesDirectory)\packages diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-RunTests-Steps.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-RunTests-Steps.yml index 6d2970c148..93aa5443ee 100644 --- a/build/AzurePipelinesTemplates/WindowsAppSDK-RunTests-Steps.yml +++ b/build/AzurePipelinesTemplates/WindowsAppSDK-RunTests-Steps.yml @@ -74,10 +74,15 @@ steps: - task: powerShell@2 displayName: 'Run dotnet installer' + continueOnError: true inputs: targetType: 'inline' script: | - $(Build.SourcesDirectory)\redist\dotnet-windowsdesktop-runtime-installer.exe /quiet /install /norestart + if (Test-Path "$(Build.SourcesDirectory)\redist\dotnet-windowsdesktop-runtime-installer.exe") { + & "$(Build.SourcesDirectory)\redist\dotnet-windowsdesktop-runtime-installer.exe" /quiet /install /norestart + } else { + Write-Host "##[warning]dotnet Desktop Runtime installer not found - skipping (.NET 5 download may have failed)" + } - task: PowerShell@2 displayName: 'Install VCLibs and VCLibs Desktop' diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-SetupBuildEnvironment-Steps.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-SetupBuildEnvironment-Steps.yml index bdda080f76..8fbd5c8736 100644 --- a/build/AzurePipelinesTemplates/WindowsAppSDK-SetupBuildEnvironment-Steps.yml +++ b/build/AzurePipelinesTemplates/WindowsAppSDK-SetupBuildEnvironment-Steps.yml @@ -85,6 +85,7 @@ steps: - task: PowerShell@2 displayName: 'Download dotnet installer' + continueOnError: true condition: or(eq(variables['buildPlatform'], 'x86'), eq(variables['buildPlatform'], 'x64'), eq(variables['buildPlatform'], 'arm64')) inputs: targetType: filePath diff --git a/build/CopyFilesToStagingDir.ps1 b/build/CopyFilesToStagingDir.ps1 index 487e5a62fa..af0e304e88 100644 --- a/build/CopyFilesToStagingDir.ps1 +++ b/build/CopyFilesToStagingDir.ps1 @@ -159,7 +159,7 @@ PublishFile $OverrideDir\DynamicDependency-Override.json $NugetDir\runtimes\win1 PublishFile $OverrideDir\PushNotifications-Override.json $NugetDir\runtimes\win10-$Platform\native # # Includes (*.h) -PublishFile $FullBuildOutput\WindowsAppRuntime_BootstrapDLL\MddBootstrap.h $NugetDir\include +# MddBootstrap.h has moved to the Base package. PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\decimal.h $NugetDir\include PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\decimalcppwinrt.h $NugetDir\include PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\MsixDynamicDependency.h $NugetDir\include @@ -170,7 +170,7 @@ PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\WindowsAppRuntime.SelfContain PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\Security.AccessControl.h $NugetDir\include\ # # Libraries (*.lib) -PublishFile $FullBuildOutput\WindowsAppRuntime_BootstrapDLL\Microsoft.WindowsAppRuntime.Bootstrap.lib $NugetDir\lib\win10-$Platform +# Microsoft.WindowsAppRuntime.Bootstrap.lib has moved to the Base package. PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\Microsoft.WindowsAppRuntime.lib $NugetDir\lib\win10-$Platform # # MSIX Framework package - DLLs/EXEs @@ -205,8 +205,7 @@ PublishFile $FullBuildOutput\DynamicDependencyLifetimeManager.ProxyStub\DynamicD PublishFile $FullBuildOutput\DynamicDependencyLifetimeManager.ProxyStub\DynamicDependencyLifetimeManager.ProxyStub.pdb $NugetDir\runtimes\win10-$Platform\native # # Native (not managed, AppLocal / no MSIX) -PublishFile $FullBuildOutput\WindowsAppRuntime_BootstrapDLL\Microsoft.WindowsAppRuntime.Bootstrap.dll $NugetDir\runtimes\win-$Platform\native -PublishFile $FullBuildOutput\WindowsAppRuntime_BootstrapDLL\Microsoft.WindowsAppRuntime.Bootstrap.pdb $NugetDir\runtimes\win-$Platform\native +# Microsoft.WindowsAppRuntime.Bootstrap.dll/pdb have moved to the Base package. PublishFile $FullBuildOutput\WindowsAppRuntime_UniversalBGTaskDLL\Microsoft.Windows.ApplicationModel.Background.UniversalBGTask.dll $NugetDir\runtimes\win-$Platform\native PublishFile $FullBuildOutput\WindowsAppRuntime_UniversalBGTaskDLL\Microsoft.Windows.ApplicationModel.Background.UniversalBGTask.pdb $NugetDir\runtimes\win-$Platform\native # @@ -230,21 +229,7 @@ PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\StrippedWinMD\Microsoft.Windo PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\StrippedWinMD\Microsoft.Windows.System.winmd $NugetDir\lib\uap10.0 PublishFile $FullBuildOutput\WindowsAppRuntime_UniversalBGTaskDLL\Microsoft.Windows.ApplicationModel.Background.UniversalBGTask.winmd $NugetDir\lib\uap10.0 # -# Common Auto-Initializer Files -PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\WindowsAppRuntimeAutoInitializer.cpp $NugetDir\include -PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\WindowsAppRuntimeAutoInitializer.cs $NugetDir\include -# -# Bootstrap Auto-Initializer Files -PublishFile $FullBuildOutput\WindowsAppRuntime_BootstrapDLL\MddBootstrapAutoInitializer.cpp $NugetDir\include -PublishFile $FullBuildOutput\WindowsAppRuntime_BootstrapDLL\MddBootstrapAutoInitializer.cs $NugetDir\include -# -# DeploymentManager Auto-Initializer Files -PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\DeploymentManagerAutoInitializer.cpp $NugetDir\include -PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\DeploymentManagerAutoInitializer.cs $NugetDir\include -# -# UndockedRegFreeWinRT (URFW) Auto-Initializer Files -PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\UndockedRegFreeWinRT-AutoInitializer.cpp $NugetDir\include -PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\UndockedRegFreeWinRT-AutoInitializer.cs $NugetDir\include +# Auto-initializer files have moved to the Base package. # # Build overrides PublishFile $OverrideDir\DynamicDependency-Override.json $NugetDir\runtimes\win10-$Platform\native diff --git a/build/NuSpecs/Microsoft.WindowsAppSDK.Foundation.targets b/build/NuSpecs/Microsoft.WindowsAppSDK.Foundation.targets index 925af86b05..0548e754b4 100644 --- a/build/NuSpecs/Microsoft.WindowsAppSDK.Foundation.targets +++ b/build/NuSpecs/Microsoft.WindowsAppSDK.Foundation.targets @@ -2,22 +2,7 @@ - - + - - - - - - - - - - - - - - diff --git a/build/NuSpecs/WindowsAppSDK-Nuget-Native.C.props b/build/NuSpecs/native/Microsoft.WindowsAppSDK.C.props similarity index 65% rename from build/NuSpecs/WindowsAppSDK-Nuget-Native.C.props rename to build/NuSpecs/native/Microsoft.WindowsAppSDK.C.props index c78e03fa11..3a5404ba72 100644 --- a/build/NuSpecs/WindowsAppSDK-Nuget-Native.C.props +++ b/build/NuSpecs/native/Microsoft.WindowsAppSDK.C.props @@ -23,20 +23,6 @@ - - - - $(_FoundationLibFolder)\Microsoft.WindowsAppRuntime.Bootstrap.lib; - %(AdditionalDependencies); - - - - - - - + diff --git a/build/NuSpecs/WindowsAppSDK-Nuget-Native.WinRt.props b/build/NuSpecs/native/Microsoft.WindowsAppSDK.WinRt.props similarity index 100% rename from build/NuSpecs/WindowsAppSDK-Nuget-Native.WinRt.props rename to build/NuSpecs/native/Microsoft.WindowsAppSDK.WinRt.props diff --git a/build/NuSpecs/WindowsAppSDK-Nuget-Native.props b/build/NuSpecs/native/Microsoft.WindowsAppSDK.props similarity index 70% rename from build/NuSpecs/WindowsAppSDK-Nuget-Native.props rename to build/NuSpecs/native/Microsoft.WindowsAppSDK.props index a6d213979f..68a5d91c8a 100644 --- a/build/NuSpecs/WindowsAppSDK-Nuget-Native.props +++ b/build/NuSpecs/native/Microsoft.WindowsAppSDK.props @@ -2,6 +2,6 @@ - - + + diff --git a/build/NuSpecs/WindowsAppSDK-Nuget-Native.targets b/build/NuSpecs/native/Microsoft.WindowsAppSDK.targets similarity index 84% rename from build/NuSpecs/WindowsAppSDK-Nuget-Native.targets rename to build/NuSpecs/native/Microsoft.WindowsAppSDK.targets index b0cc42dcec..f2ff9e858e 100644 --- a/build/NuSpecs/WindowsAppSDK-Nuget-Native.targets +++ b/build/NuSpecs/native/Microsoft.WindowsAppSDK.targets @@ -159,18 +159,6 @@ - - - - - - - - - - - - - + diff --git a/build/scripts/DownloadDotNetRuntimeInstaller.ps1 b/build/scripts/DownloadDotNetRuntimeInstaller.ps1 index 53789f6562..7a1a588c0d 100644 --- a/build/scripts/DownloadDotNetRuntimeInstaller.ps1 +++ b/build/scripts/DownloadDotNetRuntimeInstaller.ps1 @@ -41,7 +41,27 @@ else if(-not(Test-Path $outputPath)) { Write-Host "Downloading $downloadurl to $outputPath" - Invoke-WebRequest $downloadurl -OutFile $outputPath -UseBasicParsing + $maxRetries = 3 + for ($retry = 1; $retry -le $maxRetries; $retry++) + { + try + { + Invoke-WebRequest $downloadurl -OutFile $outputPath -UseBasicParsing + Write-Host "Download succeeded." + break + } + catch + { + Write-Host "Download attempt $retry of $maxRetries failed: $_" + if ($retry -eq $maxRetries) + { + throw + } + $delay = $retry * 30 + Write-Host "Retrying in $delay seconds..." + Start-Sleep -Seconds $delay + } + } } else { diff --git a/dev/Common/Common.vcxitems b/dev/Common/Common.vcxitems index 6d880a9ddd..9db5300e07 100644 --- a/dev/Common/Common.vcxitems +++ b/dev/Common/Common.vcxitems @@ -1,4 +1,4 @@ - + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) @@ -34,8 +34,8 @@ - - + + diff --git a/dev/Deployment/Deployment.vcxitems b/dev/Deployment/Deployment.vcxitems index 9636a5884f..12fec791ee 100644 --- a/dev/Deployment/Deployment.vcxitems +++ b/dev/Deployment/Deployment.vcxitems @@ -1,4 +1,4 @@ - + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) @@ -36,8 +36,8 @@ - - + + diff --git a/dev/UndockedRegFreeWinRT/UndockedRegFreeWinRT.vcxitems b/dev/UndockedRegFreeWinRT/UndockedRegFreeWinRT.vcxitems index 33748203ce..9e6e508fba 100644 --- a/dev/UndockedRegFreeWinRT/UndockedRegFreeWinRT.vcxitems +++ b/dev/UndockedRegFreeWinRT/UndockedRegFreeWinRT.vcxitems @@ -1,4 +1,4 @@ - + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) @@ -24,7 +24,7 @@ - - + + diff --git a/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime-Licensing.cpp b/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime-Licensing.cpp deleted file mode 100644 index aa1af6fcb2..0000000000 --- a/dev/WindowsAppRuntime_BootstrapDLL/WindowsAppRuntime-Licensing.cpp +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) Microsoft Corporation and Contributors. - -#include "pch.h" - -#include "WindowsAppRuntime-Licensing.h" - -#include - -STDAPI WindowsAppRuntime_InstallLicenses() noexcept try -{ - RETURN_IF_FAILED(MsixInstallLicenses()); - return S_OK; -} -CATCH_RETURN(); diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index dc951af3a4..1fce5b0228 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -39,9 +39,9 @@ https://dev.azure.com/microsoft/LiftedIXP/_git/DCPP ef844e363e6f66622875fc591eccaa0d335dfce3 - - https://dev.azure.com/microsoft/ProjectReunion/_git/WindowsAppSDKAggregator - e8a2bfd2258e2a61c2b3e6d3692d5ed45eb9cde5 + + https://github.com/microsoft/WindowsAppSDK + 6eea93bb2f835c3312923411a75c1ca9bd9b2259 https://dev.azure.com/microsoft/LiftedIXP/_git/DCPP diff --git a/installer/dev/install.cpp b/installer/dev/install.cpp index e3a9b25d36..cb49fe5d80 100644 --- a/installer/dev/install.cpp +++ b/installer/dev/install.cpp @@ -353,6 +353,11 @@ namespace WindowsAppRuntimeInstaller { if (isPackageInstalledAndIsPackageStatusOK) { + if (!quiet) + { + std::wcout << std::endl; + std::wcout << L"Package already installed: " << packageProperties->fullName.get() << std::endl; + } // If currently installed Package (either same or higher version than the version from the installer) is in good state, clear the package higher version and return. installActivityContext.SetExistingPackageIfHigherVersion(L""); return; diff --git a/test/ABForward/ABForward.vcxproj b/test/ABForward/ABForward.vcxproj index a8c7dfaa4c..8c75994199 100644 --- a/test/ABForward/ABForward.vcxproj +++ b/test/ABForward/ABForward.vcxproj @@ -301,7 +301,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/AccessControlTests/AccessControlTests.vcxproj b/test/AccessControlTests/AccessControlTests.vcxproj index 36aa8bb2ba..5fe80eb021 100644 --- a/test/AccessControlTests/AccessControlTests.vcxproj +++ b/test/AccessControlTests/AccessControlTests.vcxproj @@ -215,7 +215,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/AppLifecycle/AppLifecycle.vcxproj b/test/AppLifecycle/AppLifecycle.vcxproj index 3e3cb5d208..e1f3a4f8b6 100644 --- a/test/AppLifecycle/AppLifecycle.vcxproj +++ b/test/AppLifecycle/AppLifecycle.vcxproj @@ -219,7 +219,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/AppNotificationBuilderTests/AppNotificationBuilderTests.vcxproj b/test/AppNotificationBuilderTests/AppNotificationBuilderTests.vcxproj index fe18fcbdec..bf3750c665 100644 --- a/test/AppNotificationBuilderTests/AppNotificationBuilderTests.vcxproj +++ b/test/AppNotificationBuilderTests/AppNotificationBuilderTests.vcxproj @@ -130,7 +130,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/AppNotificationTests/AppNotificationTests.vcxproj b/test/AppNotificationTests/AppNotificationTests.vcxproj index a586593b02..7b4be7d2e3 100644 --- a/test/AppNotificationTests/AppNotificationTests.vcxproj +++ b/test/AppNotificationTests/AppNotificationTests.vcxproj @@ -140,7 +140,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/ApplicationData/ApplicationDataTests.vcxproj b/test/ApplicationData/ApplicationDataTests.vcxproj index e511f44ecd..ca8909bc64 100644 --- a/test/ApplicationData/ApplicationDataTests.vcxproj +++ b/test/ApplicationData/ApplicationDataTests.vcxproj @@ -1,4 +1,4 @@ - + @@ -135,7 +135,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/BackgroundTaskTests/BackgroundTaskTests.vcxproj b/test/BackgroundTaskTests/BackgroundTaskTests.vcxproj index 297b63d539..fd97fc7b95 100644 --- a/test/BackgroundTaskTests/BackgroundTaskTests.vcxproj +++ b/test/BackgroundTaskTests/BackgroundTaskTests.vcxproj @@ -122,7 +122,7 @@ Use Level3 true - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common WIN32;_DEBUG;%(PreprocessorDefinitions) true pch.h @@ -137,7 +137,7 @@ Use Level3 true - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common _DEBUG;%(PreprocessorDefinitions) true pch.h @@ -154,7 +154,7 @@ true true true - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common WIN32;NDEBUG;%(PreprocessorDefinitions) true pch.h @@ -173,7 +173,7 @@ true true true - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common NDEBUG;%(PreprocessorDefinitions) true pch.h @@ -192,7 +192,7 @@ true true true - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common NDEBUG;%(PreprocessorDefinitions) true pch.h @@ -206,7 +206,7 @@ - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common @@ -243,7 +243,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/BadgeNotificationTest/BadgeNotificationTest.vcxproj b/test/BadgeNotificationTest/BadgeNotificationTest.vcxproj index ad5094a8d0..3fc84bcf29 100644 --- a/test/BadgeNotificationTest/BadgeNotificationTest.vcxproj +++ b/test/BadgeNotificationTest/BadgeNotificationTest.vcxproj @@ -135,7 +135,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/CameraCaptureUITests/CameraCaptureUITests.vcxproj b/test/CameraCaptureUITests/CameraCaptureUITests.vcxproj index 2b19253c4f..f048264c40 100644 --- a/test/CameraCaptureUITests/CameraCaptureUITests.vcxproj +++ b/test/CameraCaptureUITests/CameraCaptureUITests.vcxproj @@ -107,7 +107,7 @@ true Use pch.h - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL;$(MSBuildProjectDirectory)\..\..\dev\common + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL;$(MSBuildProjectDirectory)\..\..\dev\common Windows @@ -125,7 +125,7 @@ true Use pch.h - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common Windows @@ -143,7 +143,7 @@ true Use pch.h - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common Windows @@ -161,7 +161,7 @@ true Use pch.h - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common Windows @@ -179,7 +179,7 @@ true Use pch.h - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common Windows @@ -197,7 +197,7 @@ true Use pch.h - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common Windows @@ -234,7 +234,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/Common/Common.vcxproj b/test/Common/Common.vcxproj index 9b5ea7ac03..e169bb1c3e 100644 --- a/test/Common/Common.vcxproj +++ b/test/Common/Common.vcxproj @@ -122,7 +122,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/Compatibility/CompatibilityTests/CompatibilityTests.vcxproj b/test/Compatibility/CompatibilityTests/CompatibilityTests.vcxproj index 8edeb3908c..dd76a808a3 100644 --- a/test/Compatibility/CompatibilityTests/CompatibilityTests.vcxproj +++ b/test/Compatibility/CompatibilityTests/CompatibilityTests.vcxproj @@ -123,7 +123,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/Compatibility/Test_CompatibilitySetter_CPP/Test_CompatibilitySetter_CPP.vcxproj b/test/Compatibility/Test_CompatibilitySetter_CPP/Test_CompatibilitySetter_CPP.vcxproj index ffa104d5fa..27ffd44ebb 100644 --- a/test/Compatibility/Test_CompatibilitySetter_CPP/Test_CompatibilitySetter_CPP.vcxproj +++ b/test/Compatibility/Test_CompatibilitySetter_CPP/Test_CompatibilitySetter_CPP.vcxproj @@ -135,7 +135,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} @@ -145,7 +145,7 @@ - + diff --git a/test/Compatibility/Test_CompatibilitySetter_CS/Test_CompatibilitySetter_CS.csproj b/test/Compatibility/Test_CompatibilitySetter_CS/Test_CompatibilitySetter_CS.csproj index 5c31a7be02..936176f6b2 100644 --- a/test/Compatibility/Test_CompatibilitySetter_CS/Test_CompatibilitySetter_CS.csproj +++ b/test/Compatibility/Test_CompatibilitySetter_CS/Test_CompatibilitySetter_CS.csproj @@ -21,7 +21,7 @@ None, None, (RuntimeCompatibilityChange)23456, None - + diff --git a/test/Decimal/CPP/DecimalTests.vcxproj b/test/Decimal/CPP/DecimalTests.vcxproj index 984b2377f6..d14550f779 100644 --- a/test/Decimal/CPP/DecimalTests.vcxproj +++ b/test/Decimal/CPP/DecimalTests.vcxproj @@ -1,4 +1,4 @@ - + @@ -127,7 +127,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/Decimal/WinRT/DecimalTest_WinRT.vcxproj b/test/Decimal/WinRT/DecimalTest_WinRT.vcxproj index 1706444e50..c330a24d20 100644 --- a/test/Decimal/WinRT/DecimalTest_WinRT.vcxproj +++ b/test/Decimal/WinRT/DecimalTest_WinRT.vcxproj @@ -1,4 +1,4 @@ - + @@ -134,7 +134,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/Deployment/Test_DeploymentManagerAutoInitialize/CPP/Test_DeploymentManagerAutoInitialize_CPP_Default/Test_DeploymentManagerAutoInitialize_CPP_Default.vcxproj b/test/Deployment/Test_DeploymentManagerAutoInitialize/CPP/Test_DeploymentManagerAutoInitialize_CPP_Default/Test_DeploymentManagerAutoInitialize_CPP_Default.vcxproj index 4b42c2047d..19882d3227 100644 --- a/test/Deployment/Test_DeploymentManagerAutoInitialize/CPP/Test_DeploymentManagerAutoInitialize_CPP_Default/Test_DeploymentManagerAutoInitialize_CPP_Default.vcxproj +++ b/test/Deployment/Test_DeploymentManagerAutoInitialize/CPP/Test_DeploymentManagerAutoInitialize_CPP_Default/Test_DeploymentManagerAutoInitialize_CPP_Default.vcxproj @@ -117,7 +117,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/Deployment/Test_DeploymentManagerAutoInitialize/CPP/Test_DeploymentManagerAutoInitialize_CPP_Options_Default/Test_DeploymentManagerAutoInitialize_CPP_Options_Default.vcxproj b/test/Deployment/Test_DeploymentManagerAutoInitialize/CPP/Test_DeploymentManagerAutoInitialize_CPP_Options_Default/Test_DeploymentManagerAutoInitialize_CPP_Options_Default.vcxproj index e3d453339b..7c76ab3273 100644 --- a/test/Deployment/Test_DeploymentManagerAutoInitialize/CPP/Test_DeploymentManagerAutoInitialize_CPP_Options_Default/Test_DeploymentManagerAutoInitialize_CPP_Options_Default.vcxproj +++ b/test/Deployment/Test_DeploymentManagerAutoInitialize/CPP/Test_DeploymentManagerAutoInitialize_CPP_Options_Default/Test_DeploymentManagerAutoInitialize_CPP_Options_Default.vcxproj @@ -118,7 +118,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/Deployment/Test_DeploymentManagerAutoInitialize/CPP/Test_DeploymentManagerAutoInitialize_CPP_Options_Defined/Test_DeploymentManagerAutoInitialize_CPP_Options_Defined.vcxproj b/test/Deployment/Test_DeploymentManagerAutoInitialize/CPP/Test_DeploymentManagerAutoInitialize_CPP_Options_Defined/Test_DeploymentManagerAutoInitialize_CPP_Options_Defined.vcxproj index bd4cd76a70..43bdcc7baa 100644 --- a/test/Deployment/Test_DeploymentManagerAutoInitialize/CPP/Test_DeploymentManagerAutoInitialize_CPP_Options_Defined/Test_DeploymentManagerAutoInitialize_CPP_Options_Defined.vcxproj +++ b/test/Deployment/Test_DeploymentManagerAutoInitialize/CPP/Test_DeploymentManagerAutoInitialize_CPP_Options_Defined/Test_DeploymentManagerAutoInitialize_CPP_Options_Defined.vcxproj @@ -118,7 +118,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/Deployment/Test_DeploymentManagerAutoInitialize/CPP/Test_DeploymentManagerAutoInitialize_CPP_Options_None/Test_DeploymentManagerAutoInitialize_CPP_Options_None.vcxproj b/test/Deployment/Test_DeploymentManagerAutoInitialize/CPP/Test_DeploymentManagerAutoInitialize_CPP_Options_None/Test_DeploymentManagerAutoInitialize_CPP_Options_None.vcxproj index 4ead437416..9c51b14d6a 100644 --- a/test/Deployment/Test_DeploymentManagerAutoInitialize/CPP/Test_DeploymentManagerAutoInitialize_CPP_Options_None/Test_DeploymentManagerAutoInitialize_CPP_Options_None.vcxproj +++ b/test/Deployment/Test_DeploymentManagerAutoInitialize/CPP/Test_DeploymentManagerAutoInitialize_CPP_Options_None/Test_DeploymentManagerAutoInitialize_CPP_Options_None.vcxproj @@ -118,7 +118,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/Deployment/Test_DeploymentManagerAutoInitialize/CS/Test_DeploymentManagerAutoInitialize_CS_Options_Defined/Test_DeploymentManagerAutoInitialize_CS_Options_Defined.csproj b/test/Deployment/Test_DeploymentManagerAutoInitialize/CS/Test_DeploymentManagerAutoInitialize_CS_Options_Defined/Test_DeploymentManagerAutoInitialize_CS_Options_Defined.csproj index 7cd30f6bbd..f647b67ad9 100644 --- a/test/Deployment/Test_DeploymentManagerAutoInitialize/CS/Test_DeploymentManagerAutoInitialize_CS_Options_Defined/Test_DeploymentManagerAutoInitialize_CS_Options_Defined.csproj +++ b/test/Deployment/Test_DeploymentManagerAutoInitialize/CS/Test_DeploymentManagerAutoInitialize_CS_Options_Defined/Test_DeploymentManagerAutoInitialize_CS_Options_Defined.csproj @@ -45,7 +45,7 @@ - + diff --git a/test/DynamicDependency/ManualTest/HelloWorldAdvanced/CS/HelloWorldAdvancedCS/HelloWorldAdvancedCS.csproj b/test/DynamicDependency/ManualTest/HelloWorldAdvanced/CS/HelloWorldAdvancedCS/HelloWorldAdvancedCS.csproj index 1e56c39bdc..f92f435a24 100644 --- a/test/DynamicDependency/ManualTest/HelloWorldAdvanced/CS/HelloWorldAdvancedCS/HelloWorldAdvancedCS.csproj +++ b/test/DynamicDependency/ManualTest/HelloWorldAdvanced/CS/HelloWorldAdvancedCS/HelloWorldAdvancedCS.csproj @@ -25,7 +25,7 @@ - + diff --git a/test/DynamicDependency/ManualTest/HelloWorldAdvanced/CS/HelloWorldAdvancedCS_NoThrow/HelloWorldAdvancedCS_NoThrow.csproj b/test/DynamicDependency/ManualTest/HelloWorldAdvanced/CS/HelloWorldAdvancedCS_NoThrow/HelloWorldAdvancedCS_NoThrow.csproj index 1e56c39bdc..f92f435a24 100644 --- a/test/DynamicDependency/ManualTest/HelloWorldAdvanced/CS/HelloWorldAdvancedCS_NoThrow/HelloWorldAdvancedCS_NoThrow.csproj +++ b/test/DynamicDependency/ManualTest/HelloWorldAdvanced/CS/HelloWorldAdvancedCS_NoThrow/HelloWorldAdvancedCS_NoThrow.csproj @@ -25,7 +25,7 @@ - + diff --git a/test/DynamicDependency/Test_BootstrapAutoInitialize/CPP/Test_BootstrapAutoInitialize_CPP_Default/Test_BootstrapAutoInitialize_CPP_Default.vcxproj b/test/DynamicDependency/Test_BootstrapAutoInitialize/CPP/Test_BootstrapAutoInitialize_CPP_Default/Test_BootstrapAutoInitialize_CPP_Default.vcxproj index d6e38a1fc7..dda9b07b08 100644 --- a/test/DynamicDependency/Test_BootstrapAutoInitialize/CPP/Test_BootstrapAutoInitialize_CPP_Default/Test_BootstrapAutoInitialize_CPP_Default.vcxproj +++ b/test/DynamicDependency/Test_BootstrapAutoInitialize/CPP/Test_BootstrapAutoInitialize_CPP_Default/Test_BootstrapAutoInitialize_CPP_Default.vcxproj @@ -102,7 +102,7 @@ - + @@ -111,7 +111,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/DynamicDependency/Test_BootstrapAutoInitialize/CPP/Test_BootstrapAutoInitialize_CPP_Options_Default/Test_BootstrapAutoInitialize_CPP_Options_Default.vcxproj b/test/DynamicDependency/Test_BootstrapAutoInitialize/CPP/Test_BootstrapAutoInitialize_CPP_Options_Default/Test_BootstrapAutoInitialize_CPP_Options_Default.vcxproj index 00fff1528a..c0e394cc65 100644 --- a/test/DynamicDependency/Test_BootstrapAutoInitialize/CPP/Test_BootstrapAutoInitialize_CPP_Options_Default/Test_BootstrapAutoInitialize_CPP_Options_Default.vcxproj +++ b/test/DynamicDependency/Test_BootstrapAutoInitialize/CPP/Test_BootstrapAutoInitialize_CPP_Options_Default/Test_BootstrapAutoInitialize_CPP_Options_Default.vcxproj @@ -103,7 +103,7 @@ - + @@ -112,7 +112,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/DynamicDependency/Test_BootstrapAutoInitialize/CPP/Test_BootstrapAutoInitialize_CPP_Options_Defined/Test_BootstrapAutoInitialize_CPP_Options_Defined.vcxproj b/test/DynamicDependency/Test_BootstrapAutoInitialize/CPP/Test_BootstrapAutoInitialize_CPP_Options_Defined/Test_BootstrapAutoInitialize_CPP_Options_Defined.vcxproj index 5a34d17988..ea28af79c8 100644 --- a/test/DynamicDependency/Test_BootstrapAutoInitialize/CPP/Test_BootstrapAutoInitialize_CPP_Options_Defined/Test_BootstrapAutoInitialize_CPP_Options_Defined.vcxproj +++ b/test/DynamicDependency/Test_BootstrapAutoInitialize/CPP/Test_BootstrapAutoInitialize_CPP_Options_Defined/Test_BootstrapAutoInitialize_CPP_Options_Defined.vcxproj @@ -107,7 +107,7 @@ - + @@ -116,7 +116,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/DynamicDependency/Test_BootstrapAutoInitialize/CPP/Test_BootstrapAutoInitialize_CPP_Options_None/Test_BootstrapAutoInitialize_CPP_Options_None.vcxproj b/test/DynamicDependency/Test_BootstrapAutoInitialize/CPP/Test_BootstrapAutoInitialize_CPP_Options_None/Test_BootstrapAutoInitialize_CPP_Options_None.vcxproj index cef7c4d1b9..80846c62c0 100644 --- a/test/DynamicDependency/Test_BootstrapAutoInitialize/CPP/Test_BootstrapAutoInitialize_CPP_Options_None/Test_BootstrapAutoInitialize_CPP_Options_None.vcxproj +++ b/test/DynamicDependency/Test_BootstrapAutoInitialize/CPP/Test_BootstrapAutoInitialize_CPP_Options_None/Test_BootstrapAutoInitialize_CPP_Options_None.vcxproj @@ -103,7 +103,7 @@ - + @@ -112,7 +112,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/DynamicDependency/Test_BootstrapAutoInitialize/CS/Test_BootstrapAutoInitialize_CS_Default/Test_BootstrapAutoInitialize_CS_Default.csproj b/test/DynamicDependency/Test_BootstrapAutoInitialize/CS/Test_BootstrapAutoInitialize_CS_Default/Test_BootstrapAutoInitialize_CS_Default.csproj index b047757058..197f6d7272 100644 --- a/test/DynamicDependency/Test_BootstrapAutoInitialize/CS/Test_BootstrapAutoInitialize_CS_Default/Test_BootstrapAutoInitialize_CS_Default.csproj +++ b/test/DynamicDependency/Test_BootstrapAutoInitialize/CS/Test_BootstrapAutoInitialize_CS_Default/Test_BootstrapAutoInitialize_CS_Default.csproj @@ -34,12 +34,12 @@ - + - + diff --git a/test/DynamicDependency/Test_BootstrapAutoInitialize/CS/Test_BootstrapAutoInitialize_CS_Options_Default/Test_BootstrapAutoInitialize_CS_Options_Default.csproj b/test/DynamicDependency/Test_BootstrapAutoInitialize/CS/Test_BootstrapAutoInitialize_CS_Options_Default/Test_BootstrapAutoInitialize_CS_Options_Default.csproj index 13e52bf6e9..7132300bde 100644 --- a/test/DynamicDependency/Test_BootstrapAutoInitialize/CS/Test_BootstrapAutoInitialize_CS_Options_Default/Test_BootstrapAutoInitialize_CS_Options_Default.csproj +++ b/test/DynamicDependency/Test_BootstrapAutoInitialize/CS/Test_BootstrapAutoInitialize_CS_Options_Default/Test_BootstrapAutoInitialize_CS_Options_Default.csproj @@ -34,12 +34,12 @@ - + - + diff --git a/test/DynamicDependency/Test_BootstrapAutoInitialize/CS/Test_BootstrapAutoInitialize_CS_Options_Defined/Test_BootstrapAutoInitialize_CS_Options_Defined.csproj b/test/DynamicDependency/Test_BootstrapAutoInitialize/CS/Test_BootstrapAutoInitialize_CS_Options_Defined/Test_BootstrapAutoInitialize_CS_Options_Defined.csproj index 0e4a8f04b5..444876709b 100644 --- a/test/DynamicDependency/Test_BootstrapAutoInitialize/CS/Test_BootstrapAutoInitialize_CS_Options_Defined/Test_BootstrapAutoInitialize_CS_Options_Defined.csproj +++ b/test/DynamicDependency/Test_BootstrapAutoInitialize/CS/Test_BootstrapAutoInitialize_CS_Options_Defined/Test_BootstrapAutoInitialize_CS_Options_Defined.csproj @@ -34,12 +34,12 @@ - + - + diff --git a/test/DynamicDependency/Test_BootstrapAutoInitialize/CS/Test_BootstrapAutoInitialize_CS_Options_None/Test_BootstrapAutoInitialize_CS_Options_None.csproj b/test/DynamicDependency/Test_BootstrapAutoInitialize/CS/Test_BootstrapAutoInitialize_CS_Options_None/Test_BootstrapAutoInitialize_CS_Options_None.csproj index d115efc614..d8a7d21d32 100644 --- a/test/DynamicDependency/Test_BootstrapAutoInitialize/CS/Test_BootstrapAutoInitialize_CS_Options_None/Test_BootstrapAutoInitialize_CS_Options_None.csproj +++ b/test/DynamicDependency/Test_BootstrapAutoInitialize/CS/Test_BootstrapAutoInitialize_CS_Options_None/Test_BootstrapAutoInitialize_CS_Options_None.csproj @@ -34,12 +34,12 @@ - + - + diff --git a/test/DynamicDependency/Test_Win32/DynamicDependency_Test_Win32.vcxproj b/test/DynamicDependency/Test_Win32/DynamicDependency_Test_Win32.vcxproj index 9ef52159d2..bfa62ff882 100644 --- a/test/DynamicDependency/Test_Win32/DynamicDependency_Test_Win32.vcxproj +++ b/test/DynamicDependency/Test_Win32/DynamicDependency_Test_Win32.vcxproj @@ -229,7 +229,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/DynamicDependency/Test_WinRT/DynamicDependency_Test_WinRT.vcxproj b/test/DynamicDependency/Test_WinRT/DynamicDependency_Test_WinRT.vcxproj index 9007764baa..cc79c52e82 100644 --- a/test/DynamicDependency/Test_WinRT/DynamicDependency_Test_WinRT.vcxproj +++ b/test/DynamicDependency/Test_WinRT/DynamicDependency_Test_WinRT.vcxproj @@ -232,7 +232,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/EnvironmentManagerTests/EnvironmentManagerTests.vcxproj b/test/EnvironmentManagerTests/EnvironmentManagerTests.vcxproj index cafdaf0b01..3ebdc95716 100644 --- a/test/EnvironmentManagerTests/EnvironmentManagerTests.vcxproj +++ b/test/EnvironmentManagerTests/EnvironmentManagerTests.vcxproj @@ -164,7 +164,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/LRPTests/LRPTests.vcxproj b/test/LRPTests/LRPTests.vcxproj index 53b8c0e24d..6555fd02d6 100644 --- a/test/LRPTests/LRPTests.vcxproj +++ b/test/LRPTests/LRPTests.vcxproj @@ -118,7 +118,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/OAuth2ManagerTests/OAuth2ManagerTests.vcxproj b/test/OAuth2ManagerTests/OAuth2ManagerTests.vcxproj index d5bc13180a..6e5c3d6e43 100644 --- a/test/OAuth2ManagerTests/OAuth2ManagerTests.vcxproj +++ b/test/OAuth2ManagerTests/OAuth2ManagerTests.vcxproj @@ -107,7 +107,7 @@ true Use pch.h - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common;$(MSBuildProjectDirectory)\..\..\dev\Detours + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common;$(MSBuildProjectDirectory)\..\..\dev\Detours Windows @@ -125,7 +125,7 @@ true Use pch.h - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common;$(MSBuildProjectDirectory)\..\..\dev\Detours + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common;$(MSBuildProjectDirectory)\..\..\dev\Detours Windows @@ -148,7 +148,7 @@ true Use pch.h - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common;$(MSBuildProjectDirectory)\..\..\dev\Detours + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common;$(MSBuildProjectDirectory)\..\..\dev\Detours Windows @@ -167,7 +167,7 @@ true Use pch.h - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common;$(MSBuildProjectDirectory)\..\..\dev\Detours + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common;$(MSBuildProjectDirectory)\..\..\dev\Detours Windows @@ -185,7 +185,7 @@ true Use pch.h - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common;$(MSBuildProjectDirectory)\..\..\dev\Detours + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common;$(MSBuildProjectDirectory)\..\..\dev\Detours Windows @@ -203,7 +203,7 @@ true Use pch.h - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common;$(MSBuildProjectDirectory)\..\..\dev\Detours + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\;$(MSBuildProjectDirectory)\..\..\dev\common;$(MSBuildProjectDirectory)\..\..\dev\Detours Windows @@ -255,7 +255,7 @@ {d6bc25c5-1aa7-4c4a-a02c-b42dedbfea33} - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/PackageManager/API/PackageManagerTests.vcxproj b/test/PackageManager/API/PackageManagerTests.vcxproj index 7137f9d59f..5239721c34 100644 --- a/test/PackageManager/API/PackageManagerTests.vcxproj +++ b/test/PackageManager/API/PackageManagerTests.vcxproj @@ -1,4 +1,4 @@ - + @@ -159,7 +159,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/PowerNotifications/PowerNotifications.vcxproj b/test/PowerNotifications/PowerNotifications.vcxproj index 4a6083f0a4..2e8a003a4b 100644 --- a/test/PowerNotifications/PowerNotifications.vcxproj +++ b/test/PowerNotifications/PowerNotifications.vcxproj @@ -74,7 +74,7 @@ WIN32;_DEBUG;POWERNOTIFICATIONS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) Use pch.h - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\ + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\ Windows @@ -86,7 +86,7 @@ WIN32;NDEBUG;POWERNOTIFICATIONS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) Use pch.h - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\ + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\ Windows @@ -98,7 +98,7 @@ _DEBUG;POWERNOTIFICATIONS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) Use pch.h - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\ + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\ Windows @@ -110,7 +110,7 @@ NDEBUG;POWERNOTIFICATIONS_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) Use pch.h - $(ProjectDir)..\inc;$(ProjectDir)..\..\dev\WindowsAppRuntime_BootstrapDLL\ + $(ProjectDir)..\inc;$(ProjectDir)..\..\base\dev\WindowsAppRuntime_BootstrapDLL\ Windows @@ -141,7 +141,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/PushNotificationTests/PushNotificationTests.vcxproj b/test/PushNotificationTests/PushNotificationTests.vcxproj index 2745e217a4..cb3b3e5ce5 100644 --- a/test/PushNotificationTests/PushNotificationTests.vcxproj +++ b/test/PushNotificationTests/PushNotificationTests.vcxproj @@ -131,7 +131,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/StoragePickersTests/StoragePickersTests.vcxproj b/test/StoragePickersTests/StoragePickersTests.vcxproj index b161533861..84258a0ea8 100644 --- a/test/StoragePickersTests/StoragePickersTests.vcxproj +++ b/test/StoragePickersTests/StoragePickersTests.vcxproj @@ -129,7 +129,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/TestApps/AccessControlTestApp/AccessControlTestApp.vcxproj b/test/TestApps/AccessControlTestApp/AccessControlTestApp.vcxproj index 227342c347..7741c6b53e 100644 --- a/test/TestApps/AccessControlTestApp/AccessControlTestApp.vcxproj +++ b/test/TestApps/AccessControlTestApp/AccessControlTestApp.vcxproj @@ -48,7 +48,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/TestApps/ManualTestApp/ManualTestApp.vcxproj b/test/TestApps/ManualTestApp/ManualTestApp.vcxproj index 46f27e5e58..06fda99c6a 100644 --- a/test/TestApps/ManualTestApp/ManualTestApp.vcxproj +++ b/test/TestApps/ManualTestApp/ManualTestApp.vcxproj @@ -207,7 +207,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/TestApps/OAuthTestApp/OAuthTestApp.vcxproj b/test/TestApps/OAuthTestApp/OAuthTestApp.vcxproj index 70e7e69b18..e48864f308 100644 --- a/test/TestApps/OAuthTestApp/OAuthTestApp.vcxproj +++ b/test/TestApps/OAuthTestApp/OAuthTestApp.vcxproj @@ -118,7 +118,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/TestApps/PushNotificationsDemoApp/PushNotificationsDemoApp.vcxproj b/test/TestApps/PushNotificationsDemoApp/PushNotificationsDemoApp.vcxproj index c375ae9e8a..3889eede63 100644 --- a/test/TestApps/PushNotificationsDemoApp/PushNotificationsDemoApp.vcxproj +++ b/test/TestApps/PushNotificationsDemoApp/PushNotificationsDemoApp.vcxproj @@ -212,7 +212,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/TestApps/PushNotificationsTestApp/PushNotificationsTestApp.vcxproj b/test/TestApps/PushNotificationsTestApp/PushNotificationsTestApp.vcxproj index 666d1f1aef..5baefb6abe 100644 --- a/test/TestApps/PushNotificationsTestApp/PushNotificationsTestApp.vcxproj +++ b/test/TestApps/PushNotificationsTestApp/PushNotificationsTestApp.vcxproj @@ -53,7 +53,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/TestApps/ToastNotificationsDemoApp/ToastNotificationsDemoApp.vcxproj b/test/TestApps/ToastNotificationsDemoApp/ToastNotificationsDemoApp.vcxproj index 48c96d4a34..163b5617cd 100644 --- a/test/TestApps/ToastNotificationsDemoApp/ToastNotificationsDemoApp.vcxproj +++ b/test/TestApps/ToastNotificationsDemoApp/ToastNotificationsDemoApp.vcxproj @@ -218,7 +218,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/TestApps/ToastNotificationsTestApp/ToastNotificationsTestApp.vcxproj b/test/TestApps/ToastNotificationsTestApp/ToastNotificationsTestApp.vcxproj index 04e3858dbc..67ad50635b 100644 --- a/test/TestApps/ToastNotificationsTestApp/ToastNotificationsTestApp.vcxproj +++ b/test/TestApps/ToastNotificationsTestApp/ToastNotificationsTestApp.vcxproj @@ -54,7 +54,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/VersionInfo/VersionInfoTests.vcxproj b/test/VersionInfo/VersionInfoTests.vcxproj index 029e9305d3..197019db72 100644 --- a/test/VersionInfo/VersionInfoTests.vcxproj +++ b/test/VersionInfo/VersionInfoTests.vcxproj @@ -125,7 +125,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746} diff --git a/test/test.autoinitializer.CS.targets b/test/test.autoinitializer.CS.targets index 017fada5ee..9103ec6cd7 100644 --- a/test/test.autoinitializer.CS.targets +++ b/test/test.autoinitializer.CS.targets @@ -14,7 +14,7 @@ - + diff --git a/test/test.autoinitializer.Native.targets b/test/test.autoinitializer.Native.targets index fd0b286896..9b6225eb60 100644 --- a/test/test.autoinitializer.Native.targets +++ b/test/test.autoinitializer.Native.targets @@ -6,7 +6,7 @@ - + NotUsing MICROSOFT_WINDOWSAPPSDK_AUTOINITIALIZE_BOOTSTRAP;%(PreprocessorDefinitions) MICROSOFT_WINDOWSAPPSDK_AUTOINITIALIZE_DEPLOYMENTMANAGER;%(PreprocessorDefinitions) diff --git a/tools/ProjectTemplates/test.cpp.dll.taef/PurojekutoTenpuret.vcxproj b/tools/ProjectTemplates/test.cpp.dll.taef/PurojekutoTenpuret.vcxproj index 3bca99ea39..bd936be11b 100644 --- a/tools/ProjectTemplates/test.cpp.dll.taef/PurojekutoTenpuret.vcxproj +++ b/tools/ProjectTemplates/test.cpp.dll.taef/PurojekutoTenpuret.vcxproj @@ -127,7 +127,7 @@ - + {f76b776e-86f5-48c5-8fc7-d2795ecc9746}