diff --git a/.config/tsaoptions.json b/.config/tsaoptions.json
deleted file mode 100644
index deebfd648c..0000000000
--- a/.config/tsaoptions.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "instanceUrl": "https://microsoft.visualstudio.com",
- "projectName": "os",
- "areaPath": "OS\\WDX\\DXP\\APT-Application Platform and Tools\\BTAD-Base Tools and Developer experiences\\WinAppSDK Engineering System",
- "iterationPath": "OS",
- "notificationAliases": [ "WinAppSDK-Build@microsoft.com" ],
- "ignoreBranchName": true,
- "codebaseName": "WinAppSDK"
-}
diff --git a/.github/ISSUE_TEMPLATE/bug-report.yaml b/.github/ISSUE_TEMPLATE/bug-report.yaml
index 434b924670..185099f386 100644
--- a/.github/ISSUE_TEMPLATE/bug-report.yaml
+++ b/.github/ISSUE_TEMPLATE/bug-report.yaml
@@ -35,12 +35,20 @@ body:
label: NuGet package version
description: Specify the version of Windows App SDK (or Project Reunion) you're using.
options:
- - "1.1.3"
- "1.1.0-preview3"
- - "1.0.4"
+ - "1.1.0-preview2"
+ - "1.1.0-preview1"
+ - "1.0.0"
- "1.0.0-preview3"
+ - "1.0.0-preview2"
+ - "1.0.0-preview1"
- "1.0.0-experimental1"
- - "0.8.10"
+ - "0.8.5"
+ - "0.8.4"
+ - "0.8.3"
+ - "0.8.2"
+ - "0.8.1"
+ - "0.8.0"
- "0.5"
- type: dropdown
attributes:
diff --git a/NuGet.config b/NuGet.config
index fe1e56c3dc..395062e838 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -3,7 +3,7 @@
-
+
diff --git a/WindowsAppRuntime.sln b/WindowsAppRuntime.sln
index f3158a85bb..829e1d7ef0 100644
--- a/WindowsAppRuntime.sln
+++ b/WindowsAppRuntime.sln
@@ -348,7 +348,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DeploymentAgent", "dev\Depl
{B73AD907-6164-4294-88FB-F3C9C10DA1F1} = {B73AD907-6164-4294-88FB-F3C9C10DA1F1}
EndProjectSection
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Windows.Security.AccessControl.Projection", "dev\Projections\CS\Microsoft.Windows.Security.AccessControl.Projection\Microsoft.Windows.Security.AccessControl.Projection.csproj", "{E6D59245-696F-4D13-ACF6-7ECE6E653367}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AppNotificationBuilder", "dev\AppNotifications\AppNotificationBuilder\AppNotificationBuilder.vcxitems", "{E49329F3-5196-4BBA-B5C4-E11CE7EFB07A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AppNotificationBuilderTests", "test\AppNotificationBuilderTests\AppNotificationBuilderTests.vcxproj", "{131DE0C4-AA1E-4649-B5BC-7B43508FA93A}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
@@ -381,6 +383,7 @@ Global
dev\Deployment\Deployment.vcxitems*{db38fb4d-d04f-4c1d-93e0-f8ae259c5fd6}*SharedItemsImports = 9
dev\EnvironmentManager\ChangeTracker\ChangeTracker.vcxitems*{e15c3465-9d45-495d-92ce-b91ef45e8623}*SharedItemsImports = 9
dev\AppLifecycle\AppLifecycle.vcxitems*{e3a522a3-6635-4a42-bded-1af46a15f63c}*SharedItemsImports = 9
+ dev\AppNotifications\AppNotificationBuilder\AppNotificationBuilder.vcxitems*{e49329f3-5196-4bba-b5c4-e11ce7efb07a}*SharedItemsImports = 9
test\inc\inc.vcxitems*{e5659a29-fe68-417b-9bc5-613073dd54df}*SharedItemsImports = 4
test\inc\inc.vcxitems*{e977b1bd-00dc-4085-a105-e0a18e0183d7}*SharedItemsImports = 4
EndGlobalSection
@@ -1357,20 +1360,20 @@ Global
{4410D374-A90C-4ADF-8B15-AA2AAE2636BF}.Release|x64.Build.0 = Release|x64
{4410D374-A90C-4ADF-8B15-AA2AAE2636BF}.Release|x86.ActiveCfg = Release|x86
{4410D374-A90C-4ADF-8B15-AA2AAE2636BF}.Release|x86.Build.0 = Release|x86
- {E6D59245-696F-4D13-ACF6-7ECE6E653367}.Debug|Any CPU.ActiveCfg = Debug|x86
- {E6D59245-696F-4D13-ACF6-7ECE6E653367}.Debug|ARM64.ActiveCfg = Debug|arm64
- {E6D59245-696F-4D13-ACF6-7ECE6E653367}.Debug|ARM64.Build.0 = Debug|arm64
- {E6D59245-696F-4D13-ACF6-7ECE6E653367}.Debug|x64.ActiveCfg = Debug|x64
- {E6D59245-696F-4D13-ACF6-7ECE6E653367}.Debug|x64.Build.0 = Debug|x64
- {E6D59245-696F-4D13-ACF6-7ECE6E653367}.Debug|x86.ActiveCfg = Debug|x86
- {E6D59245-696F-4D13-ACF6-7ECE6E653367}.Debug|x86.Build.0 = Debug|x86
- {E6D59245-696F-4D13-ACF6-7ECE6E653367}.Release|Any CPU.ActiveCfg = Release|x86
- {E6D59245-696F-4D13-ACF6-7ECE6E653367}.Release|ARM64.ActiveCfg = Release|arm64
- {E6D59245-696F-4D13-ACF6-7ECE6E653367}.Release|ARM64.Build.0 = Release|arm64
- {E6D59245-696F-4D13-ACF6-7ECE6E653367}.Release|x64.ActiveCfg = Release|x64
- {E6D59245-696F-4D13-ACF6-7ECE6E653367}.Release|x64.Build.0 = Release|x64
- {E6D59245-696F-4D13-ACF6-7ECE6E653367}.Release|x86.ActiveCfg = Release|x86
- {E6D59245-696F-4D13-ACF6-7ECE6E653367}.Release|x86.Build.0 = Release|x86
+ {131DE0C4-AA1E-4649-B5BC-7B43508FA93A}.Debug|Any CPU.ActiveCfg = Debug|Win32
+ {131DE0C4-AA1E-4649-B5BC-7B43508FA93A}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {131DE0C4-AA1E-4649-B5BC-7B43508FA93A}.Debug|ARM64.Build.0 = Debug|ARM64
+ {131DE0C4-AA1E-4649-B5BC-7B43508FA93A}.Debug|x64.ActiveCfg = Debug|x64
+ {131DE0C4-AA1E-4649-B5BC-7B43508FA93A}.Debug|x64.Build.0 = Debug|x64
+ {131DE0C4-AA1E-4649-B5BC-7B43508FA93A}.Debug|x86.ActiveCfg = Debug|Win32
+ {131DE0C4-AA1E-4649-B5BC-7B43508FA93A}.Debug|x86.Build.0 = Debug|Win32
+ {131DE0C4-AA1E-4649-B5BC-7B43508FA93A}.Release|Any CPU.ActiveCfg = Release|Win32
+ {131DE0C4-AA1E-4649-B5BC-7B43508FA93A}.Release|ARM64.ActiveCfg = Release|ARM64
+ {131DE0C4-AA1E-4649-B5BC-7B43508FA93A}.Release|ARM64.Build.0 = Release|ARM64
+ {131DE0C4-AA1E-4649-B5BC-7B43508FA93A}.Release|x64.ActiveCfg = Release|x64
+ {131DE0C4-AA1E-4649-B5BC-7B43508FA93A}.Release|x64.Build.0 = Release|x64
+ {131DE0C4-AA1E-4649-B5BC-7B43508FA93A}.Release|x86.ActiveCfg = Release|Win32
+ {131DE0C4-AA1E-4649-B5BC-7B43508FA93A}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1485,7 +1488,8 @@ Global
{D9139E3C-8D21-4BD9-84E3-30A03A54D610} = {99C514E4-A6B3-4B09-B870-5511EF9D93AC}
{4A74BBED-3B20-44A7-B6FF-3373160DE741} = {99C514E4-A6B3-4B09-B870-5511EF9D93AC}
{4410D374-A90C-4ADF-8B15-AA2AAE2636BF} = {E378857C-D22A-4E5E-A6DA-A59C445CF22E}
- {E6D59245-696F-4D13-ACF6-7ECE6E653367} = {716C26A0-E6B0-4981-8412-D14A4D410531}
+ {E49329F3-5196-4BBA-B5C4-E11CE7EFB07A} = {1C9A0791-2BAA-420B-84B6-C0721F22A6E8}
+ {131DE0C4-AA1E-4649-B5BC-7B43508FA93A} = {8630F7AA-2969-4DC9-8700-9B468C1DC21D}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4B3D7591-CFEC-4762-9A07-ABE99938FB77}
diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-BinaryAnalysis-steps.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-BinaryAnalysis-steps.yml
deleted file mode 100644
index 26134654f2..0000000000
--- a/build/AzurePipelinesTemplates/WindowsAppSDK-BinaryAnalysis-steps.yml
+++ /dev/null
@@ -1,40 +0,0 @@
-parameters:
- # Caller optionally overrides these.
- - name: outputDirectory
- type: string
- default: $(Build.SourcesDirectory)\BuildOutput
- - name: enablePREFast
- type: boolean
- default: true
-
-steps:
- - task: NodeTool@0
- displayName: 'Use Node >=8.6.0'
- inputs:
- versionSpec: '>=8.6.0'
-
- - template: v2/Steps/PackageES/Windows.SDL.Binary.Analysis.OS.Undocked.yml@templates_onebranch
- parameters:
- variables:
- ob_outputDirectory: ${{ parameters.outputDirectory }}
- ob_sdl_binskim_scanOutputDirectoryOnly: true
- ob_sdl_binskim_break: false
- globalsdl:
- 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 ne(parameters.enablePREFast, true) }}:
- enabled: false
- ${{ if eq(parameters.enablePREFast, true) }}:
- enabled: true
- # ToDo: set the following to true once pre-existing errors are resolved.
- break: false
- # The following scans we already did during in the SourceAnalysis job, not repeating here.
- # ToDo: Consider disabling Antimalware also, but how?
- credscan:
- enabled: false
- policheck:
- enabled: false
diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-BuildDevProject-Steps.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-BuildDevProject-Steps.yml
index 6f36f1fd72..d3a1e2e4f9 100644
--- a/build/AzurePipelinesTemplates/WindowsAppSDK-BuildDevProject-Steps.yml
+++ b/build/AzurePipelinesTemplates/WindowsAppSDK-BuildDevProject-Steps.yml
@@ -1,8 +1,6 @@
parameters:
channel: 'experimental'
enableLicenseInstall: false
- runSDLBinaryAnalysis: false
- enablePREFast: true
steps:
- template: WindowsAppSDK-BuildProject-Steps.yml
@@ -13,5 +11,3 @@ steps:
publishDir: $(publishDir)
channel: ${{ parameters.channel }}
enableLicenseInstall: ${{ parameters.enableLicenseInstall }}
- runSDLBinaryAnalysis: ${{ parameters.runSDLBinaryAnalysis }}
- enablePREFast: ${{ parameters.enablePREFast }}
diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-BuildProject-Steps.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-BuildProject-Steps.yml
index fecea379d0..ac0aac3e96 100644
--- a/build/AzurePipelinesTemplates/WindowsAppSDK-BuildProject-Steps.yml
+++ b/build/AzurePipelinesTemplates/WindowsAppSDK-BuildProject-Steps.yml
@@ -9,8 +9,7 @@ parameters:
# license installation assets are only accessible in internal builds, but are only
# needed in release-signed stable builds. Only enble this functionality in the private
# pipeline builds. Otherwise, default to an inert placeholder implementation.
- runSDLBinaryAnalysis: false
- enablePREFast: true
+
steps:
- ${{ if eq(parameters.enableLicenseInstall, true) }}:
@@ -176,12 +175,6 @@ steps:
configuration: '$(buildConfiguration)'
msbuildArgs: '/restore /p:AppxSymbolPackageEnabled=false /binaryLogger:$(Build.SourcesDirectory)/${{ parameters.solutionPath }}.$(buildPlatform).$(buildConfiguration).binlog /p:WindowsAppSDKVersionBuild=$(builddate_yymm) /p:WindowsAppSDKVersionRevision=$(builddate_dd)$(buildrevision) /p:VCToolsInstallDir="$(VCToolsInstallDir)\" /p:PGOBuildMode=$(PGOBuildMode) /p:WindowsAppSDKBuildPipeline=1 /p:WindowsAppSDKCleanIntermediateFiles=${{ parameters.WindowsAppSDKCleanIntermediateFiles }}'
- - ${{ if eq(parameters.runSDLBinaryAnalysis, 'true') }}:
- - template: WindowsAppSDK-BinaryAnalysis-steps.yml
- parameters:
- outputDirectory: '${{ parameters.buildOutputDir }}'
- enablePREFast: ${{ parameters.enablePREFast }}
-
- task: powershell@2
displayName: 'Install test certificate for MSIX test packages (DevCheck)'
inputs:
diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-BuildSolution-Steps.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-BuildSolution-Steps.yml
index a0217ae0b0..e7f1eaf670 100644
--- a/build/AzurePipelinesTemplates/WindowsAppSDK-BuildSolution-Steps.yml
+++ b/build/AzurePipelinesTemplates/WindowsAppSDK-BuildSolution-Steps.yml
@@ -3,8 +3,6 @@ parameters:
displayName: ''
additionalMsBuildArgs: ''
WindowsAppSDKCleanIntermediateFiles: 'true'
- runSDLBinaryAnalysis: false
- enablePREFast: true
# Note, this template depends on these variables from parent yml:
# $(buildConfiguration), $(buildPlatform)
@@ -28,12 +26,6 @@ steps:
msbuildArgs: /binaryLogger:$(Build.SourcesDirectory)\${{ parameters.displayName }}.$(buildConfiguration).$(buildPlatform).binlog /restore ${{ parameters.additionalMsBuildArgs }} /p:WindowsAppSDKCleanIntermediateFiles=${{ parameters.WindowsAppSDKCleanIntermediateFiles }}
logProjectEvents: false
-- ${{ if eq(parameters.runSDLBinaryAnalysis, 'true') }}:
- - template: WindowsAppSDK-BinaryAnalysis-steps.yml
- parameters:
- outputDirectory: '$(Build.SourcesDirectory)\buildoutput'
- enablePREFast: ${{ parameters.enablePREFast }}
-
- task: PublishBuildArtifacts@1
displayName: 'Publish ${{ parameters.displayName }} binlog'
condition: always()
diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-SourceAnalysis-job.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-SourceAnalysis-job.yml
deleted file mode 100644
index 2090ec9447..0000000000
--- a/build/AzurePipelinesTemplates/WindowsAppSDK-SourceAnalysis-job.yml
+++ /dev/null
@@ -1,41 +0,0 @@
-# This job is expected to run in parallel with the build task.
-
-jobs:
-- job: SDLSourcesScanning
- pool:
- name: $(buildPool)
- steps:
- # Required by the Packaged ES SDL Templates.
- - checkout: self
- persistCredentials: true
-
- - task: NodeTool@0
- displayName: 'Use Node >=8.6.0'
- inputs:
- versionSpec: '>=8.6.0'
-
- - template: v2/Steps/PackageES/Windows.SDL.Sources.Analysis.OS.Undocked.yml@templates_onebranch
- parameters:
- globalsdl:
- tsa:
- # Not filing bugs for issues found by the scans just yet.
- #enabled: true
- enabled: false
- codeql:
- tsandjs:
- enabled: true
- break: true
- python:
- enabled: true
- break: true
- psscriptanalyzer:
- enable: true
- break: true
- credscan:
- enable: true
- break: true
- policheck:
- # ToDo: Once pre-existing issues have been resolved, set break to true.
- enable: true
- break: false
-
diff --git a/build/CopyFilesToStagingDir.ps1 b/build/CopyFilesToStagingDir.ps1
index 04497826df..03354faf68 100644
--- a/build/CopyFilesToStagingDir.ps1
+++ b/build/CopyFilesToStagingDir.ps1
@@ -45,10 +45,8 @@ PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\StrippedWinMD\Microsoft.Windo
PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\StrippedWinMD\Microsoft.Windows.ApplicationModel.WindowsAppRuntime.winmd $FullPublishDir\Microsoft.WindowsAppRuntime\
PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\StrippedWinMD\Microsoft.Windows.System.winmd $FullPublishDir\Microsoft.WindowsAppRuntime\
PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\StrippedWinMD\Microsoft.Windows.System.Power.winmd $FullPublishDir\Microsoft.WindowsAppRuntime\
-PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\StrippedWinMD\Microsoft.Windows.Security.AccessControl.winmd $FullPublishDir\Microsoft.WindowsAppRuntime\
PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\MsixDynamicDependency.h $FullPublishDir\Microsoft.WindowsAppRuntime\
PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\wil_msixdynamicdependency.h $FullPublishDir\Microsoft.WindowsAppRuntime\
-PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\Security.AccessControl.h $FullPublishDir\Microsoft.WindowsAppRuntime\
PublishFile $FullBuildOutput\RestartAgent\RestartAgent.exe $FullPublishDir\Microsoft.WindowsAppRuntime\
PublishFile $FullBuildOutput\DeploymentAgent\DeploymentAgent.exe $FullPublishDir\Microsoft.WindowsAppRuntime\
@@ -99,8 +97,6 @@ PublishFile $FullBuildOutput\Microsoft.Windows.System.Projection\Microsoft.Windo
PublishFile $FullBuildOutput\Microsoft.Windows.System.Projection\Microsoft.Windows.System.Projection.pdb $NugetDir\lib\net5.0-windows10.0.17763.0
PublishFile $FullBuildOutput\Microsoft.Windows.System.Power.Projection\Microsoft.Windows.System.Power.Projection.dll $NugetDir\lib\net5.0-windows10.0.17763.0
PublishFile $FullBuildOutput\Microsoft.Windows.System.Power.Projection\Microsoft.Windows.System.Power.Projection.pdb $NugetDir\lib\net5.0-windows10.0.17763.0
-PublishFile $FullBuildOutput\Microsoft.Windows.Security.AccessControl.Projection\Microsoft.Windows.Security.AccessControl.Projection.dll $NugetDir\lib\net5.0-windows10.0.17763.0
-PublishFile $FullBuildOutput\Microsoft.Windows.Security.AccessControl.Projection\Microsoft.Windows.Security.AccessControl.Projection.pdb $NugetDir\lib\net5.0-windows10.0.17763.0
#
# Dynamic Dependency build overrides
PublishFile $OverrideDir\DynamicDependency-Override.json $NugetDir\runtimes\win10-$Platform\native
@@ -113,7 +109,6 @@ PublishFile $FullBuildOutput\WindowsAppRuntime_BootstrapDLL\MddBootstrap.h $Nuge
PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\MsixDynamicDependency.h $NugetDir\include
PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\wil_msixdynamicdependency.h $NugetDir\include
PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\WindowsAppRuntimeInsights.h $NugetDir\include\
-PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\Security.AccessControl.h $NugetDir\include\
#
# Libraries (*.lib)
PublishFile $FullBuildOutput\WindowsAppRuntime_BootstrapDLL\Microsoft.WindowsAppRuntime.Bootstrap.lib $NugetDir\lib\win10-$Platform
@@ -164,7 +159,6 @@ PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\StrippedWinMD\Microsoft.Windo
PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\StrippedWinMD\Microsoft.Windows.ApplicationModel.WindowsAppRuntime.winmd $NugetDir\lib\uap10.0
PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\StrippedWinMD\Microsoft.Windows.System.winmd $NugetDir\lib\uap10.0
PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\StrippedWinMD\Microsoft.Windows.System.Power.winmd $NugetDir\lib\uap10.0
-PublishFile $FullBuildOutput\WindowsAppRuntime_DLL\StrippedWinMD\Microsoft.Windows.Security.AccessControl.winmd $NugetDir\lib\uap10.0
#
# Bootstrap Auto-Initializer Files
PublishFile $FullBuildOutput\WindowsAppRuntime_BootstrapDLL\MddBootstrapAutoInitializer.cpp $NugetDir\include
diff --git a/build/NuSpecs/WindowsAppSDK-Nuget-Native.C.props b/build/NuSpecs/WindowsAppSDK-Nuget-Native.C.props
index 5da1a529a9..2d582ec72d 100644
--- a/build/NuSpecs/WindowsAppSDK-Nuget-Native.C.props
+++ b/build/NuSpecs/WindowsAppSDK-Nuget-Native.C.props
@@ -29,7 +29,7 @@
- xcopy.exe /y "$(MSBuildThisFileDirectory)..\..\runtimes\win10-$(_WindowsAppSDKFoundationPlatform)\native\Microsoft.WindowsAppRuntime.Bootstrap.dll" "$(OutDir)"
+ xcopy /y "$(MSBuildThisFileDirectory)..\..\runtimes\win10-$(_WindowsAppSDKFoundationPlatform)\native\Microsoft.WindowsAppRuntime.Bootstrap.dll" "$(OutDir)"
diff --git a/build/NuSpecs/WindowsAppSDK-Nuget-Native.WinRt.props b/build/NuSpecs/WindowsAppSDK-Nuget-Native.WinRt.props
index 9b721a7abc..6b7b2b6837 100644
--- a/build/NuSpecs/WindowsAppSDK-Nuget-Native.WinRt.props
+++ b/build/NuSpecs/WindowsAppSDK-Nuget-Native.WinRt.props
@@ -30,11 +30,6 @@
$(MSBuildThisFileDirectory)..\..\runtimes\win10-$(_WindowsAppSDKFoundationPlatform)\native\Microsoft.WindowsAppRuntime.dll
true
-
- $(MSBuildThisFileDirectory)..\..\lib\uap10.0\Microsoft.Windows.Security.AccessControl.winmd
- $(MSBuildThisFileDirectory)..\..\runtimes\win10-$(_WindowsAppSDKFoundationPlatform)\native\Microsoft.WindowsAppRuntime.dll
- true
-
diff --git a/build/NuSpecs/WindowsAppSDK-Nuget-Native.targets b/build/NuSpecs/WindowsAppSDK-Nuget-Native.targets
index f3688938ee..9e26f9dc02 100644
--- a/build/NuSpecs/WindowsAppSDK-Nuget-Native.targets
+++ b/build/NuSpecs/WindowsAppSDK-Nuget-Native.targets
@@ -37,13 +37,6 @@
-
-
- false
- Microsoft.WindowsAppRuntime.dll
-
-
-
false
diff --git a/build/ProjectReunion-BuildFoundation.yml b/build/ProjectReunion-BuildFoundation.yml
index eb7f76b2fd..f7d70c14ed 100644
--- a/build/ProjectReunion-BuildFoundation.yml
+++ b/build/ProjectReunion-BuildFoundation.yml
@@ -2,8 +2,6 @@ name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
variables:
- template: WindowsAppSDK-Versions.yml
- template: WindowsAppSDK-CommonVariables.yml
-- name: buildPool
- value: '$(ProjectReunionBuildPool)'
parameters:
- name: "ReleaseSigning"
@@ -12,7 +10,7 @@ parameters:
- name: "IgnoreFailures"
type: boolean
default: False
- - name: "PublishPackage"
+ - name: "PublishToMaestro"
type: boolean
default: False
- name: "WindowsAppRuntimeInsightsSourceDirectory"
@@ -21,27 +19,34 @@ parameters:
- name: "GenerateSBOM"
type: boolean
default: False
- - name: "RunSDLBinaryAnalysis"
- displayName: "Run SDL's Binary Analysis (PREFast, BinSkim)"
- type: boolean
- default: False
- - name: "enablePREFast"
- type: boolean
- default: true
-
-resources:
- repositories:
- - repository: templates_onebranch
- type: git
- name: OneBranch.Pipelines/GovernedTemplates
- ref: refs/heads/main
-
jobs:
-# This relatively low-cost job is always run, in parallel w/ the Build job.
-- template: AzurePipelinesTemplates\WindowsAppSDK-SourceAnalysis-job.yml
+- job: CredScan
+ pool: $(ProjectReunionBuildPool)
+ steps:
+ # Scans the root source folder for security vulnerability
+ - task: CredScan@2
+ inputs:
+ toolMajorVersion: 'V2'
+
+ # This PostAnalysis will fail the pipeline if CredScan identifies an issue
+ - task: PostAnalysis@1
+ inputs:
+ AllTools: false
+ APIScan: false
+ BinSkim: false
+ CodesignValidation: false
+ CredScan: true
+ FortifySCA: false
+ FxCop: false
+ ModernCop: false
+ PoliCheck: false
+ RoslynAnalyzers: false
+ SDLNativeRules: false
+ Semmle: false
+ TSLint: false
+ ToolLogsNotFoundAction: 'Standard'
- job: Build
- dependsOn: []
# Skip the build job if we are reusing the output of a previous build.
# useBuildOutputFromBuildId variable is set on the Pipeline at Queue time.
condition:
@@ -71,10 +76,6 @@ jobs:
publishDir : $(Build.ArtifactStagingDirectory)
steps:
- # Required by the Packaged ES SDL Templates.
- - checkout: self
- persistCredentials: true
-
- task: NuGetAuthenticate@0
inputs:
nuGetServiceConnections: 'TelemetryInternal'
@@ -107,8 +108,6 @@ jobs:
parameters:
channel: ${{ variables.channel }}
enableLicenseInstall: true
- runSDLBinaryAnalysis: ${{ parameters.RunSDLBinaryAnalysis }}
- enablePREFast: ${{ parameters.enablePREFast }}
# component detection must happen *within* the build task
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
@@ -117,6 +116,31 @@ jobs:
parameters:
GenerateSBOM: true
+ - task: BinSkim@3
+ inputs:
+ InputType: 'Basic'
+ Function: 'analyze'
+ AnalyzeTarget: '$(Build.ArtifactStagingDirectory)\*.dll;$(Build.ArtifactStagingDirectory)\*.exe'
+ AnalyzeVerbose: true
+
+ - task: PostAnalysis@1
+ inputs:
+ AllTools: false
+ APIScan: false
+ BinSkim: true
+ BinSkimBreakOn: 'Error'
+ CodesignValidation: false
+ CredScan: false
+ FortifySCA: false
+ FxCop: false
+ ModernCop: false
+ PoliCheck: false
+ RoslynAnalyzers: false
+ SDLNativeRules: false
+ Semmle: false
+ TSLint: false
+ ToolLogsNotFoundAction: 'Standard'
+
- job: BuildAnyCPU
# For now, this job just builds Microsoft.WindowsAppRuntime.Bootstrap.Net.dll in AnyCPU
# Can be expanded to add any other binary as needed
@@ -159,9 +183,6 @@ jobs:
publishDir: $(publishDir)
channel: ${{ variables.channel }}
enableLicenseInstall: true
- runSDLBinaryAnalysis: '${{ parameters.RunSDLBinaryAnalysis }}'
- # We are building non-native code at this point, skip PREFast.
- enablePREFast: false
- task: CopyFiles@2
displayName: 'Copy AnyCpu-built binaries to Nuget for staging'
@@ -229,8 +250,30 @@ jobs:
parameters:
buildJobName: 'BuildMRTCore'
GenerateSBOM: true
- runSDLBinaryAnalysis: '${{ parameters.RunSDLBinaryAnalysis }}'
- enablePREFast: ${{ parameters.enablePREFast }}
+
+ - task: BinSkim@3
+ inputs:
+ InputType: 'Basic'
+ Function: 'analyze'
+ AnalyzeTarget: '$(Build.ArtifactStagingDirectory)\*.dll;$(Build.ArtifactStagingDirectory)\*.exe'
+ AnalyzeVerbose: true
+ - task: PostAnalysis@1
+ inputs:
+ AllTools: false
+ APIScan: false
+ BinSkim: true
+ BinSkimBreakOn: 'Error'
+ CodesignValidation: false
+ CredScan: false
+ FortifySCA: false
+ FxCop: false
+ ModernCop: false
+ PoliCheck: false
+ RoslynAnalyzers: false
+ SDLNativeRules: false
+ Semmle: false
+ TSLint: false
+ ToolLogsNotFoundAction: 'Standard'
- job: PublishMRT
dependsOn:
@@ -470,18 +513,18 @@ jobs:
itemPattern: |
**/*.nupkg
- - ${{ if or(eq(variables['Build.Reason'], 'Schedule'), eq(parameters.PublishPackage, 'true')) }}:
- # this mysterious guid fixes the "NuGetCommand@2 is ambiguous" error :-(
- - task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
- displayName: 'NuGet push to ProjectReunion.nuget.internal'
- inputs:
- command: 'push'
- packagesToPush: '$(Build.SourcesDirectory)/FullNuget/*.nupkg;!$(Build.SourcesDirectory)/FullNuget/*.symbols.nupkg'
- verbosityPush: 'Detailed'
- nuGetFeedType: 'internal'
- #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'
-
+ # this mysterious guid fixes the "NuGetCommand@2 is ambiguous" error :-(
+ - task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
+ displayName: 'NuGet push to ProjectReunion.nuget.internal'
+ inputs:
+ command: 'push'
+ packagesToPush: '$(Build.SourcesDirectory)/FullNuget/*.nupkg;!$(Build.SourcesDirectory)/FullNuget/*.symbols.nupkg'
+ verbosityPush: 'Detailed'
+ nuGetFeedType: 'internal'
+ #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'
+
+ - ${{ if or(eq(variables['Build.Reason'], 'Schedule'), eq(parameters.publishToMaestro, 'true')) }}:
- template: ..\eng\common\AzurePipelinesTemplates\Maestro-PublishBuildToMaestro-Steps.yml
parameters:
AssetNames: 'Microsoft.WindowsAppSDK.Foundation.TransportPackage'
diff --git a/build/ProjectReunion-CI.yml b/build/ProjectReunion-CI.yml
index 21292cb3d6..f6ead92f5e 100644
--- a/build/ProjectReunion-CI.yml
+++ b/build/ProjectReunion-CI.yml
@@ -73,8 +73,6 @@ jobs:
- template: AzurePipelinesTemplates\WindowsAppSDK-BuildDevProject-Steps.yml
parameters:
channel: ${{ variables.channel }}
- # This pipeline is unable to access OneBranch, so skip running BinaryAnalysis.
- runSDLBinaryAnalysis: false
- template: AzurePipelinesTemplates\WindowsAppSDK-PublishProjectOutput-Steps.yml
parameters:
@@ -132,8 +130,6 @@ jobs:
parameters:
buildJobName: 'BuildMRTCore'
GenerateSBOM: false
- # This pipeline is unable to access OneBranch, so skip running BinaryAnalysis.
- runSDLBinaryAnalysis: false
- task: PublishBuildArtifacts@1
displayName: 'Publish BuildOutput'
diff --git a/build/WindowsAppSDK-MergeMainToDevelop.yml b/build/WindowsAppSDK-MergeMainToDevelop.yml
deleted file mode 100644
index d8de149f5a..0000000000
--- a/build/WindowsAppSDK-MergeMainToDevelop.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
-jobs:
-- job: Merge
- pool: $(ProjectReunionBuildPool)
- steps:
- - checkout: self
- persistCredentials: true
-
- - task: CmdLine@2
- inputs:
- script: |
- git checkout develop
- git config user.name "reunion-maestro-bot"
- git config user.email "reunion-maestro-bot@microsoft.com"
- git pull origin main
-
- - task: CmdLine@2
- inputs:
- script: |
- git push
\ No newline at end of file
diff --git a/build/build-mrt.yml b/build/build-mrt.yml
index 5a244cbbd7..2fa252f391 100644
--- a/build/build-mrt.yml
+++ b/build/build-mrt.yml
@@ -5,9 +5,6 @@ parameters:
MRTSourcesDirectory: $(Build.SourcesDirectory)\dev\MRTCore
MRTBinariesDirectory: $(Build.SourcesDirectory)\BuildOutput
GenerateSBOM: False
- runSDLBinaryAnalysis: false
- enablePREFast: true
-
steps:
- task: BatchScript@1
displayName: Set up environment
@@ -133,12 +130,6 @@ steps:
configuration: '$(buildConfiguration)'
msbuildArguments: '/restore /binaryLogger:$(Build.SourcesDirectory)/mrtcore.$(buildPlatform).$(buildConfiguration).binlog'
-- ${{ if eq(parameters.runSDLBinaryAnalysis, 'true') }}:
- - template: AzurePipelinesTemplates\WindowsAppSDK-BinaryAnalysis-steps.yml
- parameters:
- outputDirectory: '${{ parameters.MRTBinariesDirectory }}'
- enablePREFast: ${{ parameters.enablePREFast }}
-
- task: PublishBuildArtifacts@1
displayName: 'Publish mrtcore binlog'
condition: succeededOrFailed()
diff --git a/dev/AppLifecycle/AppInstance.cpp b/dev/AppLifecycle/AppInstance.cpp
index 0015b99f88..1a669f938a 100644
--- a/dev/AppLifecycle/AppInstance.cpp
+++ b/dev/AppLifecycle/AppInstance.cpp
@@ -202,7 +202,8 @@ namespace winrt::Microsoft::Windows::AppLifecycle::implementation
std::wstring eventName = name + c_activatedEventNameSuffix;
wil::unique_event cleanupEvent;
- if (cleanupEvent.try_open(eventName.c_str()))
+ cleanupEvent.open(eventName.c_str());
+ if (cleanupEvent)
{
// If the event is missing, it means the waiter gave up. Ignore the error.
cleanupEvent.SetEvent();
diff --git a/dev/AppNotifications/AppNotificationBuilder/AppNotificationBuilder.cpp b/dev/AppNotifications/AppNotificationBuilder/AppNotificationBuilder.cpp
new file mode 100644
index 0000000000..43f5c57bfd
--- /dev/null
+++ b/dev/AppNotifications/AppNotificationBuilder/AppNotificationBuilder.cpp
@@ -0,0 +1,372 @@
+#include "pch.h"
+#include "AppNotificationBuilder.h"
+#include
+#include
+#include "Microsoft.Windows.AppNotifications.Builder.AppNotificationBuilder.g.cpp"
+#include
+
+using namespace winrt::Windows::Globalization;
+using namespace winrt::Windows::Globalization::DateTimeFormatting;
+namespace winrt::Microsoft::Windows::AppNotifications::Builder::implementation
+{
+
+
+ std::wstring AppNotificationBuilder::GetWinSoundEventString(AppNotificationSoundEvent soundEvent)
+ {
+ static std::map c_soundEventMap
+ {
+ { AppNotificationSoundEvent::Default, L"ms-winsoundevent:Notification.Default"},
+ { AppNotificationSoundEvent::IM, L"ms-winsoundevent:Notification.IM"},
+ { AppNotificationSoundEvent::Mail, L"ms-winsoundevent:Notification.Mail"},
+ { AppNotificationSoundEvent::Reminder, L"ms-winsoundevent:Notification.Reminder"},
+ { AppNotificationSoundEvent::SMS, L"ms-winsoundevent:Notification.SMS"},
+ { AppNotificationSoundEvent::Alarm, L"ms-winsoundevent:Notification.Looping.Alarm"},
+ { AppNotificationSoundEvent::Alarm2, L"ms-winsoundevent:Notification.Looping.Alarm2"},
+ { AppNotificationSoundEvent::Alarm3, L"ms-winsoundevent:Notification.Looping.Alarm3"},
+ { AppNotificationSoundEvent::Alarm4, L"ms-winsoundevent:Notification.Looping.Alarm4"},
+ { AppNotificationSoundEvent::Alarm5, L"ms-winsoundevent:Notification.Looping.Alarm5"},
+ { AppNotificationSoundEvent::Alarm6, L"ms-winsoundevent:Notification.Looping.Alarm6"},
+ { AppNotificationSoundEvent::Alarm7, L"ms-winsoundevent:Notification.Looping.Alarm7"},
+ { AppNotificationSoundEvent::Alarm8, L"ms-winsoundevent:Notification.Looping.Alarm8"},
+ { AppNotificationSoundEvent::Alarm9, L"ms-winsoundevent:Notification.Looping.Alarm9"},
+ { AppNotificationSoundEvent::Alarm10, L"ms-winsoundevent:Notification.Looping.Alarm10"},
+ { AppNotificationSoundEvent::Call, L"ms-winsoundevent:Notification.Looping.Call"},
+ { AppNotificationSoundEvent::Call2, L"ms-winsoundevent:Notification.Looping.Call2"},
+ { AppNotificationSoundEvent::Call3, L"ms-winsoundevent:Notification.Looping.Call3"},
+ { AppNotificationSoundEvent::Call4, L"ms-winsoundevent:Notification.Looping.Call4"},
+ { AppNotificationSoundEvent::Call5, L"ms-winsoundevent:Notification.Looping.Call5"},
+ { AppNotificationSoundEvent::Call6, L"ms-winsoundevent:Notification.Looping.Call6"},
+ { AppNotificationSoundEvent::Call7, L"ms-winsoundevent:Notification.Looping.Call7"},
+ { AppNotificationSoundEvent::Call8, L"ms-winsoundevent:Notification.Looping.Call8"},
+ { AppNotificationSoundEvent::Call9, L"ms-winsoundevent:Notification.Looping.Call9"},
+ { AppNotificationSoundEvent::Call10, L"ms-winsoundevent:Notification.Looping.Call10"},
+ };
+
+ return c_soundEventMap[soundEvent];
+ }
+
+ winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder AppNotificationBuilder::AddArgument(hstring const& key, hstring const& value)
+ {
+ THROW_HR_IF(E_INVALIDARG, key.empty());
+
+ m_arguments.Insert(key, value);
+ return *this;
+ }
+
+ winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder AppNotificationBuilder::SetTimeStamp(winrt::Windows::Foundation::DateTime const& value)
+ {
+ //winrt::hstring currentLanguage { ApplicationLanguages::Languages().First().Current() };
+ //// DateTimeFormatter dateTimeFormatter{ "longtime" };
+ //winrt::Windows::Foundation::DateTime::
+ //winrt::Windows::Foundation::DateTime { 2022, 1, 13, 16, 25, 30, }
+ //m_timeStamp = timeStamp;
+ return *this;
+ }
+
+ winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder AppNotificationBuilder::SetScenario(AppNotificationScenario const& value)
+ {
+ m_scenario = value;
+ return *this;
+ }
+
+ winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder AppNotificationBuilder::AddText(hstring const& text)
+ {
+ THROW_HR_IF(E_INVALIDARG, m_textLines.size() == 3u);
+
+ m_textLines.push_back(L"" + text + L"");
+
+ return *this;
+ }
+
+ winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder AppNotificationBuilder::AddText(hstring const& text, AppNotificationTextProperties const& properties)
+ {
+ THROW_HR_IF(E_INVALIDARG, m_textLines.size() == 3u);
+
+ m_textLines.push_back(properties.as().ToString() + text + L"");
+
+ if (properties.IncomingCallAlignment())
+ {
+ m_scenario = AppNotificationScenario::IncomingCall;
+ }
+ return *this;
+ }
+
+ winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder AppNotificationBuilder::SetAttributionText(hstring const& text)
+ {
+ THROW_HR_IF(E_INVALIDARG, !m_attributionText.empty());
+
+ m_attributionText = L"" + text + L"";
+
+ return *this;
+ }
+
+ winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder AppNotificationBuilder::SetAttributionText(hstring const& text, hstring const& language)
+ {
+ THROW_HR_IF(E_INVALIDARG, !m_attributionText.empty());
+ THROW_HR_IF(E_INVALIDARG, language.empty());
+
+ m_attributionText = L"" + text + L"";
+
+ return *this;
+ }
+
+ winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder AppNotificationBuilder::SetInlineImage(winrt::Windows::Foundation::Uri const& imageUri)
+ {
+ THROW_HR_IF(E_INVALIDARG, !m_inlineImage.empty());
+
+ m_inlineImage = L"";
+
+ return *this;
+ }
+
+ winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder AppNotificationBuilder::SetInlineImage(winrt::Windows::Foundation::Uri const& imageUri, AppNotificationImageCrop const& imageCrop)
+ {
+ THROW_HR_IF(E_INVALIDARG, !m_inlineImage.empty());
+
+ m_inlineImage = { L"";
+
+ return *this;
+ }
+
+ winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder AppNotificationBuilder::SetInlineImage(winrt::Windows::Foundation::Uri const& imageUri, AppNotificationImageCrop const& imageCrop, winrt::hstring const& alternateText)
+ {
+ THROW_HR_IF(E_INVALIDARG, !m_inlineImage.empty());
+
+ m_inlineImage = L"";
+
+ return *this;
+ }
+
+ winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder AppNotificationBuilder::SetAppLogoOverride(winrt::Windows::Foundation::Uri const& imageUri)
+ {
+ THROW_HR_IF(E_INVALIDARG, !m_appLogoOverride.empty());
+
+ m_appLogoOverride = L"";
+
+ return *this;
+ }
+
+ winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder AppNotificationBuilder::SetAppLogoOverride(winrt::Windows::Foundation::Uri const& imageUri, AppNotificationImageCrop const& imageCrop)
+ {
+ THROW_HR_IF(E_INVALIDARG, !m_appLogoOverride.empty());
+
+ m_appLogoOverride = L"";
+ return *this;
+ }
+
+ winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder AppNotificationBuilder::SetAppLogoOverride(winrt::Windows::Foundation::Uri const& imageUri, AppNotificationImageCrop const& imageCrop, winrt::hstring const& alternateText)
+ {
+ THROW_HR_IF(E_INVALIDARG, !m_appLogoOverride.empty());
+
+ m_appLogoOverride = L"";
+ return *this;
+ }
+
+ winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder AppNotificationBuilder::SetHeroImage(winrt::Windows::Foundation::Uri const& imageUri)
+ {
+ THROW_HR_IF(E_INVALIDARG, !m_heroImage.empty());
+
+ m_heroImage = L"";
+
+ return *this;
+ }
+
+ winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder AppNotificationBuilder::SetHeroImage(winrt::Windows::Foundation::Uri const& imageUri, winrt::hstring const& alternateText)
+ {
+ THROW_HR_IF(E_INVALIDARG, !m_heroImage.empty());
+
+ m_heroImage = L"";
+
+ return *this;
+ }
+
+ winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder AppNotificationBuilder::SetAudioUri(winrt::Windows::Foundation::Uri const& audioUri)
+ {
+ THROW_HR_IF(E_INVALIDARG, !m_audio.empty());
+
+ m_audio = L"";
+
+ return *this;
+ }
+
+ winrt::Microsoft::Windows::AppNotifications::Builder::AppNotificationBuilder AppNotificationBuilder::SetAudioUri(winrt::Windows::Foundation::Uri const& audioUri, AppNotificationDuration const& duration)
+ {
+ THROW_HR_IF(E_INVALIDARG, !m_audio.empty());
+
+ m_audio = L"
@@ -197,4 +194,4 @@
-->
-
\ No newline at end of file
+
diff --git a/dev/Projections/CS/Microsoft.Windows.Security.AccessControl.Projection/Microsoft.Windows.Security.AccessControl.Projection.csproj b/dev/Projections/CS/Microsoft.Windows.Security.AccessControl.Projection/Microsoft.Windows.Security.AccessControl.Projection.csproj
deleted file mode 100644
index c75a5e804a..0000000000
--- a/dev/Projections/CS/Microsoft.Windows.Security.AccessControl.Projection/Microsoft.Windows.Security.AccessControl.Projection.csproj
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
- net5.0-windows10.0.17763.0
- 10.0.17763.0
- x64;x86;arm64
- AnyCPU
-
-
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
-
-
- Microsoft.Windows.Security.AccessControl
- 10.0.17763.0
- 10.0.17763.$(CsWinRTDependencyWindowsSdkVersionSuffixPackageVersion)
-
-
-
-
- pdbonly
- true
-
-
-
-
-
-
-
-
- $(OutDir)..\WindowsAppRuntime_DLL\StrippedWinMD\Microsoft.Windows.Security.AccessControl.winmd
- true
-
-
-
-
diff --git a/dev/PushNotifications/PushNotificationsLongRunningTask/PushNotificationsLongRunningTask.vcxproj b/dev/PushNotifications/PushNotificationsLongRunningTask/PushNotificationsLongRunningTask.vcxproj
index 857a85a93d..854bc776f3 100644
--- a/dev/PushNotifications/PushNotificationsLongRunningTask/PushNotificationsLongRunningTask.vcxproj
+++ b/dev/PushNotifications/PushNotificationsLongRunningTask/PushNotificationsLongRunningTask.vcxproj
@@ -197,7 +197,7 @@
-
+
@@ -212,6 +212,6 @@
-
+
diff --git a/dev/PushNotifications/PushNotificationsLongRunningTask/packages.config b/dev/PushNotifications/PushNotificationsLongRunningTask/packages.config
index 7f61fc333e..dc78ae57c2 100644
--- a/dev/PushNotifications/PushNotificationsLongRunningTask/packages.config
+++ b/dev/PushNotifications/PushNotificationsLongRunningTask/packages.config
@@ -1,7 +1,7 @@
-
+
diff --git a/dev/VSIX/Extension/Cpp/Dev16/WindowsAppSDK.Cpp.Extension.Dev16.csproj b/dev/VSIX/Extension/Cpp/Dev16/WindowsAppSDK.Cpp.Extension.Dev16.csproj
index a51ae551a5..0fbd05743d 100644
--- a/dev/VSIX/Extension/Cpp/Dev16/WindowsAppSDK.Cpp.Extension.Dev16.csproj
+++ b/dev/VSIX/Extension/Cpp/Dev16/WindowsAppSDK.Cpp.Extension.Dev16.csproj
@@ -60,7 +60,6 @@
compile; build; native; contentfiles; analyzers; buildtransitive
-
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/dev/VSIX/Extension/Cs/Dev16/WindowsAppSDK.Cs.Extension.Dev16.csproj b/dev/VSIX/Extension/Cs/Dev16/WindowsAppSDK.Cs.Extension.Dev16.csproj
index e39c4c7c7a..3c550db4ee 100644
--- a/dev/VSIX/Extension/Cs/Dev16/WindowsAppSDK.Cs.Extension.Dev16.csproj
+++ b/dev/VSIX/Extension/Cs/Dev16/WindowsAppSDK.Cs.Extension.Dev16.csproj
@@ -61,7 +61,6 @@
compile; build; native; contentfiles; analyzers; buildtransitive
-
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.h b/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.h
index ea292f9cf0..dc7722ba70 100644
--- a/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.h
+++ b/dev/WindowsAppRuntime_BootstrapDLL/MddBootstrap.h
@@ -6,12 +6,6 @@
#include
-#if defined(__cplusplus)
-#define MDDBOOTSTRAP_NOEXCEPT noexcept
-#else
-#define MDDBOOTSTRAP_NOEXCEPT
-#endif // defined(__cplusplus)
-
/// Options for Bootstrap initialization
typedef enum MddBootstrapInitializeOptions
{
@@ -54,7 +48,7 @@ DEFINE_ENUM_FLAG_OPERATORS(MddBootstrapInitializeOptions)
STDAPI MddBootstrapInitialize(
UINT32 majorMinorVersion,
PCWSTR versionTag,
- PACKAGE_VERSION minVersion) MDDBOOTSTRAP_NOEXCEPT;
+ PACKAGE_VERSION minVersion) noexcept;
/// Initialize the calling process to use Windows App Runtime framework package.
///
@@ -74,13 +68,13 @@ STDAPI MddBootstrapInitialize2(
UINT32 majorMinorVersion,
PCWSTR versionTag,
PACKAGE_VERSION minVersion,
- MddBootstrapInitializeOptions options) MDDBOOTSTRAP_NOEXCEPT;
+ MddBootstrapInitializeOptions options) noexcept;
/// Undo the changes made by MddBoostrapInitialize().
///
/// @warning Packages made available via MddBootstrapInitialize2() and
/// the Dynamic Dependencies API should not be used after this call.
-STDAPI_(void) MddBootstrapShutdown() MDDBOOTSTRAP_NOEXCEPT;
+STDAPI_(void) MddBootstrapShutdown() noexcept;
// C++ friendly APIs
#if defined(__cplusplus)
diff --git a/dev/WindowsAppRuntime_DLL/WindowsAppRuntime_DLL.vcxproj b/dev/WindowsAppRuntime_DLL/WindowsAppRuntime_DLL.vcxproj
index f0b3c49e30..9db51ccac6 100644
--- a/dev/WindowsAppRuntime_DLL/WindowsAppRuntime_DLL.vcxproj
+++ b/dev/WindowsAppRuntime_DLL/WindowsAppRuntime_DLL.vcxproj
@@ -87,6 +87,7 @@
+
@@ -278,12 +279,13 @@
+
-
+
@@ -296,20 +298,21 @@
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
+
-
+
-
+
\ No newline at end of file
diff --git a/dev/WindowsAppRuntime_DLL/packages.config b/dev/WindowsAppRuntime_DLL/packages.config
index 7f61fc333e..140614e415 100644
--- a/dev/WindowsAppRuntime_DLL/packages.config
+++ b/dev/WindowsAppRuntime_DLL/packages.config
@@ -1,9 +1,10 @@
+
-
+
-
+
\ No newline at end of file
diff --git a/docs/develop-branch.md b/docs/develop-branch.md
deleted file mode 100644
index b0c682b760..0000000000
--- a/docs/develop-branch.md
+++ /dev/null
@@ -1,37 +0,0 @@
-`develop` Branch
-===
-
-Building the full Windows App SDK package involves multiple repos and build pipelines.
-Beyond the publicly-visible repos, we also have closed-source repos that produce public packages which
-are then consumed by this repo ([WindowsAppSDK](https://github.com/microsoft/WindowsAppSDK)).
-
-Some of those packages can't yet be pushed to the public feed on a CI/nightly basis though.
-Until that's resolved, we could get this repo into a state of being buildable only internally,
-by restoring the latest package from an internal feed.
-
-To allow either configuration to be built (using the public dependent package or the internal one),
-we maintain two branches (similar to the GitFlow process):
-
-* `main` branch consumes the latest public package
-* `develop` branch consumes the latest internal package.
-
-The `develop` branch code is in the repo and still open, but can only be built internally.
-The `main` branch is always buildable at HEAD.
-External contributions to the repo are made to the `main` branch,
-and are merged internally into `develop` when completed.
-
-Whenever a new public version of the dependent packages are pushed to the public feed,
-the `develop` branch can be merged into `main`.
-For example as part of (pre)releases.
-
-Merging between `develop` and `main` is normal (not squashed),
-so that both branches can show the correct history, just with a few extra merge commits.
-Once the packages can be kept immediately updated we can drop the `develop` branch
-and not lose any history.
-
-The long-lasting difference between `main` and `develop` is the `nuget.config` file;
-in `main` it references the public feed and in `develop` it references the internal feed.
-Package references might be different too if `develop` branch is consuming a package that's
-not yet on the public feed.
-
-
diff --git a/docs/images/develop-branch-example.jpg b/docs/images/develop-branch-example.jpg
deleted file mode 100644
index fde8d23fbb..0000000000
Binary files a/docs/images/develop-branch-example.jpg and /dev/null differ
diff --git a/docs/pull_request_template.md b/docs/pull_request_template.md
deleted file mode 100644
index ee47621831..0000000000
--- a/docs/pull_request_template.md
+++ /dev/null
@@ -1,7 +0,0 @@
-For status checks on the develop branch, please use TransportPackage-Foundation
-(https://microsoft.visualstudio.com/ProjectReunion/_build?definitionId=57248)
-and run the build against your PR branch with the default parameters.
-
-For status checks on the main branch, please use microsoft.ProjectReunion
-(https://dev.azure.com/ms/ProjectReunion/_build?definitionId=391&_a=summary)
-and run the build against your PR branch with the default paramters.
\ No newline at end of file
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 03fb67f700..a74d7ab2cd 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -1,9 +1,9 @@
-
+
https://dev.azure.com/microsoft/ProjectReunion/_git/ProjectReunionClosed
- 0f4add1a10caa92e635919b81a678d2f1bcf229b
+ a3b6cd2d041c342d4a5ac2ed0c90c30e9ed08f15
diff --git a/installer/dev/install.cpp b/installer/dev/install.cpp
index d713e3d4ea..c2c46a5a6c 100644
--- a/installer/dev/install.cpp
+++ b/installer/dev/install.cpp
@@ -62,11 +62,6 @@ namespace WindowsAppRuntimeInstaller
RETURN_IF_FAILED(RegisterPackage(packageProperties->fullName.get()));
return S_OK;
}
- else if (hrAddPackage == ERROR_INSTALL_PACKAGE_DOWNGRADE)
- {
- // Higher version of the package already exists so we're good! Nothing to do!
- return S_OK;
- }
else
{
const auto deploymentResult{ deploymentOperation.GetResults() };
diff --git a/specs/AppNotifications/AppNotifications-spec.md b/specs/AppNotifications/AppNotifications-spec.md
index 0537beea9b..23fb67a447 100644
--- a/specs/AppNotifications/AppNotifications-spec.md
+++ b/specs/AppNotifications/AppNotifications-spec.md
@@ -139,53 +139,6 @@ int main()
}
```
-## Registering for App Notifications using assets
-
-For Unpackaged applications, the developer can Register using a custom Display Name and Icon.
-WinAppSDK will register the application and display these assets when an App Notification is received.
-The developer should provide both the assets or not provide them at all. Icon provided by the developer
-should be a valid supported format. The API supports the formats - png, bmp, jpg, ico. The icon
-should reside on the local machine only otherwise the API throws an exception. For Packaged applications,
-this API is not applicable and will throw an exception. Below are some examples of usage:
-
-```cpp
-int main()
-{
- auto manager = winrt::AppNotificationManager::Default();
-
- std::wstring iconFilepath{ std::filesystem::current_path() / "icon.ico" };
- winrt::hstring displayName{ L"AppNotifications" };
-
- manager.Register(displayName, winrt::Windows::Foundation::Uri {iconFilepath});
-
- // other app init and then message loop here
-
- // Call Unregister() before exiting main so that subsequent invocations will launch a new process
- manager.Unregister();
- return 0;
-}
-```
-
-```cpp
-int main()
-{
- auto manager = winrt::AppNotificationManager::Default();
-
- std::wstring iconFilepath{ std::filesystem::current_path() / "icon.ico" };
-
- std::wstring displayName{};
- wil::GetModuleFileNameExW(GetCurrentProcess(), nullptr, displayName);
-
- manager.Register(displayName.c_str(), winrt::Windows::Foundation::Uri {iconFilepath});
-
- // other app init and then message loop here
-
- // Call Unregister() before exiting main so that subsequent invocations will launch a new process
- manager.Unregister();
- return 0;
-}
-```
-
## Displaying an App Notification
To display a Notification, an app needs to define a payload in xml. In the example below, the
@@ -498,9 +451,6 @@ namespace Microsoft.Windows.AppNotifications
// For Unpackaged apps, the caller process will be registered as the COM server. And assets like displayname and icon will be gleaned from Shell and registered as well.
void Register();
- // For Unpackaged apps only, the caller process will be registered as the COM server.
- void Register(String displayName, Windows.Foundation.Uri iconUri);
-
// Unregisters the COM Service so that a subsequent activation will launch a new process
void Unregister();
diff --git a/test/AppNotificationBuilderTests/APITests.cpp b/test/AppNotificationBuilderTests/APITests.cpp
new file mode 100644
index 0000000000..de09fb42f7
--- /dev/null
+++ b/test/AppNotificationBuilderTests/APITests.cpp
@@ -0,0 +1,368 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See LICENSE in the project root for license information.
+
+#include "pch.h"
+
+using namespace winrt::Microsoft::Windows::AppNotifications::Builder;
+
+namespace Test::AppNotification::Builder
+{
+ inline const winrt::Windows::Foundation::Uri c_sampleUri{ L"http://www.microsoft.com" };
+
+ class APITests
+ {
+ public:
+ BEGIN_TEST_CLASS(APITests)
+ TEST_CLASS_PROPERTY(L"ThreadingModel", L"MTA")
+ TEST_CLASS_PROPERTY(L"RunFixtureAs:Class", L"RestrictedUser")
+ END_TEST_CLASS()
+
+ TEST_CLASS_SETUP(ClassInit)
+ {
+ ::Test::Bootstrap::Setup();
+ return true;
+ }
+
+ TEST_CLASS_CLEANUP(ClassUninit)
+ {
+ ::Test::Bootstrap::Cleanup();
+ return true;
+ }
+
+ TEST_METHOD_SETUP(MethodSetup)
+ {
+
+ ::Test::Bootstrap::SetupBootstrap();
+ ::WindowsAppRuntime::VersionInfo::TestInitialize(::Test::Bootstrap::TP::WindowsAppRuntimeFramework::c_PackageFamilyName,
+ ::Test::Bootstrap::TP::WindowsAppRuntimeMain::c_PackageFamilyName);
+ return true;
+ }
+
+ TEST_METHOD_CLEANUP(MethodCleanup)
+ {
+ ::WindowsAppRuntime::VersionInfo::TestShutdown();
+ ::Test::Bootstrap::CleanupBootstrap();
+ return true;
+ }
+
+ TEST_METHOD(AppNotificationBuilderDefault)
+ {
+ auto builder{ AppNotificationBuilder() };
+ auto expected{ LR"()"};
+ VERIFY_ARE_EQUAL(builder.BuildNotification().Payload(), expected);
+ }
+
+ TEST_METHOD(AppNotificationBuilderAddOneArgument)
+ {
+ auto builder{ AppNotificationBuilder().AddArgument(L"key", L"value") };
+ auto expected{ LR"()" };
+
+ VERIFY_ARE_EQUAL(builder.BuildNotification().Payload(), expected);
+ }
+
+ TEST_METHOD(AppNotificationBuilderAddTwoArguments)
+ {
+ auto builder{ AppNotificationBuilder().AddArgument(L"key1", L"value1").AddArgument(L"key2", L"value2") };
+ auto expected{ LR"()" };
+
+ VERIFY_ARE_EQUAL(builder.BuildNotification().Payload(), expected);
+ }
+
+ TEST_METHOD(AppNotificationBuilderAddArgumentEmptyValue)
+ {
+ auto builder{ AppNotificationBuilder().AddArgument(L"key", L"") };
+ auto expected{ LR"()" };
+
+ VERIFY_ARE_EQUAL(builder.BuildNotification().Payload(), expected);
+ }
+
+ TEST_METHOD(AppNotificationBuilderAddArgumentEmptyKey)
+ {
+ VERIFY_THROWS_HR(AppNotificationBuilder().AddArgument(L"", L""), E_INVALIDARG);
+ }
+
+ TEST_METHOD(AppNotificationBuilderSetReminderScenario)
+ {
+ auto builder{ AppNotificationBuilder().SetScenario(AppNotificationScenario::Reminder) };
+ auto expected{ LR"()" };
+
+ VERIFY_ARE_EQUAL(builder.BuildNotification().Payload(), expected);
+ }
+
+ TEST_METHOD(AppNotificationBuilderSetAlarmScenario)
+ {
+ auto builder{ AppNotificationBuilder().SetScenario(AppNotificationScenario::Alarm) };
+ auto expected{ LR"()" };
+
+ VERIFY_ARE_EQUAL(builder.BuildNotification().Payload(), expected);
+ }
+
+ TEST_METHOD(AppNotificationBuilderSetIncomingCallScenario)
+ {
+ auto builder{ AppNotificationBuilder().SetScenario(AppNotificationScenario::IncomingCall) };
+ auto expected{ LR"()" };
+
+ VERIFY_ARE_EQUAL(builder.BuildNotification().Payload(), expected);
+ }
+
+ TEST_METHOD(AppNotificationBuilderSetUrgentScenario)
+ {
+ auto builder{ AppNotificationBuilder().SetScenario(AppNotificationScenario::Urgent) };
+ auto expected{ LR"()" };
+
+ VERIFY_ARE_EQUAL(builder.BuildNotification().Payload(), expected);
+ }
+
+ TEST_METHOD(AppNotificationBuilderAddText)
+ {
+ auto builder{ AppNotificationBuilder().AddText(L"content") };
+ auto expected{ LR"(content)" };
+
+ VERIFY_ARE_EQUAL(builder.BuildNotification().Payload(), expected);
+ }
+
+ TEST_METHOD(AppNotificationBuilderAddTextWithLanguage)
+ {
+ auto builder{ AppNotificationBuilder()
+ .AddText(L"content", AppNotificationTextProperties()
+ .SetLanguage(L"en-US"))
+ };
+ auto expected{ LR"(content)" };
+
+ VERIFY_ARE_EQUAL(builder.BuildNotification().Payload(), expected);
+ }
+
+ TEST_METHOD(AppNotificationBuilderAddTextWithMaxLines)
+ {
+ auto builder{ AppNotificationBuilder()
+ .AddText(L"content", AppNotificationTextProperties()
+ .SetMaxLines(2))
+ };
+ auto expected{ LR"(content)" };
+
+ VERIFY_ARE_EQUAL(builder.BuildNotification().Payload(), expected);
+ }
+
+ TEST_METHOD(AppNotificationBuilderAddTextWithCallScenarioAlign)
+ {
+ auto builder{ AppNotificationBuilder()
+ .AddText(L"content", AppNotificationTextProperties()
+ .SetIncomingCallAlignment())
+ };
+ auto expected{ LR"(content)" };
+
+ VERIFY_ARE_EQUAL(builder.BuildNotification().Payload(), expected);
+ }
+
+ TEST_METHOD(AppNotificationBuilderAddTextWithAllProperties)
+ {
+ auto builder{ AppNotificationBuilder()
+ .AddText(L"content", AppNotificationTextProperties()
+ .SetLanguage(L"en-US")
+ .SetMaxLines(2)
+ .SetIncomingCallAlignment())
+ };
+ auto expected{ LR"(content)" };
+
+ VERIFY_ARE_EQUAL(builder.BuildNotification().Payload(), expected);
+ }
+
+ TEST_METHOD(AppNotificationBuilderAddTextThrows)
+ {
+ VERIFY_THROWS_HR(AppNotificationBuilder()
+ .AddText(L"content")
+ .AddText(L"content")
+ .AddText(L"content")
+ .AddText(L"content"), E_INVALIDARG);
+ }
+
+ TEST_METHOD(AppNotificationBuilderAddAttributionText)
+ {
+ auto builder{ AppNotificationBuilder().SetAttributionText(L"content") };
+ auto expected{ LR"(content)" };
+
+ VERIFY_ARE_EQUAL(builder.BuildNotification().Payload(), expected);
+ }
+
+ TEST_METHOD(AppNotificationBuilderAddAttributionTextWithLanguage)
+ {
+ auto builder{ AppNotificationBuilder().SetAttributionText(L"content", L"en-US")};
+ auto expected{ LR"(content)" };
+
+ VERIFY_ARE_EQUAL(builder.BuildNotification().Payload(), expected);
+ }
+
+ TEST_METHOD(AppNotificationBuilderSetInlineImage)
+ {
+ auto builder{ AppNotificationBuilder().SetInlineImage(c_sampleUri) };
+ auto expected{ LR"()" };
+
+ VERIFY_ARE_EQUAL(builder.BuildNotification().Payload(), expected);
+ }
+
+ TEST_METHOD(AppNotificationBuilderSetInlineImageWithProperties)
+ {
+ auto builder{ AppNotificationBuilder().SetInlineImage(c_sampleUri, AppNotificationImageCrop::Circle, L"altText")};
+ auto expected{ LR"()" };
+
+ VERIFY_ARE_EQUAL(builder.BuildNotification().Payload(), expected);
+ }
+
+ TEST_METHOD(AppNotificationBuilderSetAppLogoOverride)
+ {
+ auto builder{ AppNotificationBuilder().SetAppLogoOverride(c_sampleUri) };
+ auto expected{ LR"()" };
+
+ VERIFY_ARE_EQUAL(builder.BuildNotification().Payload(), expected);
+ }
+
+ TEST_METHOD(AppNotificationBuilderSetAppLogoOverrideProperties)
+ {
+ auto builder{ AppNotificationBuilder().SetAppLogoOverride(c_sampleUri, AppNotificationImageCrop::Circle, L"altText") };
+ auto expected{ LR"()" };
+
+ VERIFY_ARE_EQUAL(builder.BuildNotification().Payload(), expected);
+ }
+
+ TEST_METHOD(AppNotificationBuilderSetHeroImage)
+ {
+ auto builder{ AppNotificationBuilder().SetHeroImage(c_sampleUri) };
+ auto expected{ LR"()" };
+
+ VERIFY_ARE_EQUAL(builder.BuildNotification().Payload(), expected);
+ }
+
+ TEST_METHOD(AppNotificationBuilderSetHeroImageWithAlt)
+ {
+ auto builder{ AppNotificationBuilder().SetHeroImage(c_sampleUri, L"altText") };
+ auto expected{ LR"()" };
+
+ VERIFY_ARE_EQUAL(builder.BuildNotification().Payload(), expected);
+ }
+
+ TEST_METHOD(AppNotificationBuilderAddButton)
+ {
+ auto builder{ AppNotificationBuilder()
+ .AddButton(AppNotificationButton(L"content")
+ .AddArgument(L"key", L"value"))
+ };
+ auto expected{ LR"()" };
+
+ VERIFY_ARE_EQUAL(builder.BuildNotification().Payload(), expected);
+ }
+
+ TEST_METHOD(AppNotificationBuilderAddButtonWithPlacement)
+ {
+ auto builder{ AppNotificationBuilder()
+ .AddButton(AppNotificationButton(L"content")
+ .AddArgument(L"key", L"value")
+ .SetContextMenuPlacement())
+ };
+ auto expected{ LR"()" };
+
+ VERIFY_ARE_EQUAL(builder.BuildNotification().Payload(), expected);
+ }
+
+ TEST_METHOD(AppNotificationBuilderTooManyButtons)
+ {
+ VERIFY_THROWS_HR(AppNotificationBuilder()
+ .AddButton(AppNotificationButton(L"content").AddArgument(L"key1", L"value1"))
+ .AddButton(AppNotificationButton(L"content").AddArgument(L"key2", L"value2"))
+ .AddButton(AppNotificationButton(L"content").AddArgument(L"key3", L"value3"))
+ .AddButton(AppNotificationButton(L"content").AddArgument(L"key4", L"value4"))
+ .AddButton(AppNotificationButton(L"content").AddArgument(L"key5", L"value5"))
+ .AddButton(AppNotificationButton(L"content").AddArgument(L"key6", L"value6")), E_INVALIDARG);
+ }
+
+ TEST_METHOD(AddButtonWithProtocolActivation)
+ {
+ auto builder{ AppNotificationBuilder()
+ .AddButton(AppNotificationButton(L"content")
+ .SetInvokeUri(c_sampleUri))
+ };
+ auto expected{ LR"()" };
+
+ VERIFY_ARE_EQUAL(builder.BuildNotification().Payload(), expected);
+ }
+
+ TEST_METHOD(AppNotificationBuilderAddButtonWithProperties)
+ {
+ auto builder{ AppNotificationBuilder()
+ .AddButton(AppNotificationButton(L"content")
+ .AddArgument(L"key", L"value")
+ .SetButtonStyle(AppNotificationButtonStyle::Success)
+ .SetIcon(c_sampleUri)
+ .SetInputId(L"inputId")
+ .SetToolTip(L"toolTip"))
+ };
+ auto expected{ LR"()"};
+
+ VERIFY_ARE_EQUAL(builder.BuildNotification().Payload(), expected);
+ }
+
+ TEST_METHOD(AppNotificationBuilderAddButtonWithEmptyKey)
+ {
+ VERIFY_THROWS_HR(AppNotificationBuilder()
+ .AddButton(AppNotificationButton(L"content")
+ .AddArgument(L"", L"value")), E_INVALIDARG);
+ }
+
+ TEST_METHOD(AddButtonWithArgumentAndProtocol)
+ {
+ VERIFY_THROWS_HR(AppNotificationBuilder()
+ .AddButton(AppNotificationButton(L"content")
+ .AddArgument(L"key", L"value")
+ .SetInvokeUri(c_sampleUri)), E_INVALIDARG);
+
+ VERIFY_THROWS_HR(AppNotificationBuilder()
+ .AddButton(AppNotificationButton(L"content")
+ .SetInvokeUri(c_sampleUri)
+ .AddArgument(L"key", L"value")), E_INVALIDARG);
+ }
+
+ TEST_METHOD(SetAudioWithUri)
+ {
+ auto builder{ AppNotificationBuilder()
+ .SetAudioUri(c_sampleUri) };
+ auto expected{ LR"()" };
+
+ VERIFY_ARE_EQUAL(builder.BuildNotification().Payload(), expected);
+ }
+
+ TEST_METHOD(SetAudioWithUriAndDuration)
+ {
+ auto builder{ AppNotificationBuilder()
+ .SetAudioUri(c_sampleUri, AppNotificationDuration::Long) };
+ auto expected{ LR"()" };
+
+ VERIFY_ARE_EQUAL(builder.BuildNotification().Payload(), expected);
+ }
+
+ TEST_METHOD(SetAudioWithMSWinSoundEvent)
+ {
+ auto builder{ AppNotificationBuilder()
+ .SetAudioEvent(AppNotificationSoundEvent::Reminder) };
+ auto expected{ LR"()" };
+
+ VERIFY_ARE_EQUAL(builder.BuildNotification().Payload(), expected);
+ }
+
+ TEST_METHOD(SetAudioWithMSWinSoundEventAndDuration)
+ {
+ auto builder{ AppNotificationBuilder()
+ .SetAudioEvent(AppNotificationSoundEvent::Reminder, AppNotificationDuration::Long) };
+ auto expected{ LR"()" };
+
+ VERIFY_ARE_EQUAL(builder.BuildNotification().Payload(), expected);
+ }
+
+ TEST_METHOD(MuteAudio)
+ {
+ auto builder{ AppNotificationBuilder().MuteAudio() };
+ auto expected{ LR"()" };
+
+ VERIFY_ARE_EQUAL(builder.BuildNotification().Payload(), expected);
+ }
+
+ };
+}
diff --git a/test/AppNotificationBuilderTests/AppNotificationBuilderTests.cpp b/test/AppNotificationBuilderTests/AppNotificationBuilderTests.cpp
new file mode 100644
index 0000000000..4556ca3105
--- /dev/null
+++ b/test/AppNotificationBuilderTests/AppNotificationBuilderTests.cpp
@@ -0,0 +1,2 @@
+#include "pch.h"
+#include "AppNotificationBuilderTests.h"
diff --git a/test/AppNotificationBuilderTests/AppNotificationBuilderTests.h b/test/AppNotificationBuilderTests/AppNotificationBuilderTests.h
new file mode 100644
index 0000000000..7c6c88c00d
--- /dev/null
+++ b/test/AppNotificationBuilderTests/AppNotificationBuilderTests.h
@@ -0,0 +1 @@
+#pragma once
\ No newline at end of file
diff --git a/test/AppNotificationBuilderTests/AppNotificationBuilderTests.vcxproj b/test/AppNotificationBuilderTests/AppNotificationBuilderTests.vcxproj
new file mode 100644
index 0000000000..4810cb5fac
--- /dev/null
+++ b/test/AppNotificationBuilderTests/AppNotificationBuilderTests.vcxproj
@@ -0,0 +1,156 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+ Debug
+ ARM64
+
+
+ Release
+ ARM64
+
+
+
+ 16.0
+ Win32Proj
+ {131de0c4-aa1e-4649-b5bc-7b43508fa93a}
+ AppNotificationBuilderTests
+ 10.0
+
+
+
+ DynamicLibrary
+ false
+ v142
+ Unicode
+
+
+ false
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Use
+ true
+ pch.h
+ $(RepoRoot)\test\inc;$(RepoRoot)\Dev\Common;$(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories);$(OutDir)\..\WindowsAppRuntime_DLL;$(OutDir)\..\WindowsAppRuntime_BootstrapDLL
+ $(RepoRoot);%(AdditionalIncludeDirectories)
+
+
+ Windows
+ onecore.lib;onecoreuap.lib;Microsoft.WindowsAppRuntime.lib;wex.common.lib;wex.logger.lib;te.common.lib;%(AdditionalDependencies)
+ $(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories);$(OutDir)\..\WindowsAppRuntime_DLL
+ Microsoft.WindowsAppRuntime.Bootstrap.dll;%(DelayLoadDLLs)
+ Microsoft.WindowsAppRuntime.dll;%(DelayLoadDLLs)
+
+
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+
+
+
+
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+
+
+
+
+
+
+ WIN32;%(PreprocessorDefinitions)
+
+
+
+
+ Create
+
+
+
+
+
+
+
+
+
+
+
+ $(OutDir)\..\WindowsAppRuntime_DLL\Microsoft.Windows.AppNotifications.Builder.winmd
+ true
+
+
+
+
+ $(OutDir)\..\WindowsAppRuntime_DLL\Microsoft.Windows.AppNotifications.winmd
+ true
+
+
+
+
+ {f76b776e-86f5-48c5-8fc7-d2795ecc9746}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/test/AppNotificationBuilderTests/AppNotificationBuilderTests.vcxproj.filters b/test/AppNotificationBuilderTests/AppNotificationBuilderTests.vcxproj.filters
new file mode 100644
index 0000000000..3ba3a909fe
--- /dev/null
+++ b/test/AppNotificationBuilderTests/AppNotificationBuilderTests.vcxproj.filters
@@ -0,0 +1,19 @@
+
+
+
+
+ {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
+ rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tga;tiff;tif;png;wav;mfcribbon-ms
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/test/AppNotificationBuilderTests/packages.config b/test/AppNotificationBuilderTests/packages.config
new file mode 100644
index 0000000000..beec33edf7
--- /dev/null
+++ b/test/AppNotificationBuilderTests/packages.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/test/AppNotificationBuilderTests/pch.cpp b/test/AppNotificationBuilderTests/pch.cpp
new file mode 100644
index 0000000000..9032d65434
--- /dev/null
+++ b/test/AppNotificationBuilderTests/pch.cpp
@@ -0,0 +1,5 @@
+// pch.cpp: source file corresponding to the pre-compiled header
+
+#include "pch.h"
+
+// When you are using pre-compiled headers, this source file is necessary for compilation to succeed.
diff --git a/test/AppNotificationBuilderTests/pch.h b/test/AppNotificationBuilderTests/pch.h
new file mode 100644
index 0000000000..d32add7657
--- /dev/null
+++ b/test/AppNotificationBuilderTests/pch.h
@@ -0,0 +1,57 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See LICENSE in the project root for license information.
+
+#ifndef PCH_H
+#define PCH_H
+
+#include
+
+#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+
+#include
+#include
+
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+
+#define VERIFY_THROWS_HR(expression, hr) \
+ VERIFY_THROWS_SPECIFIC(expression, \
+ winrt::hresult_error, \
+ [&](winrt::hresult_error e) -> bool \
+ { \
+ return (e.code() == hr); \
+ })
+
+namespace TP = ::Test::Packages;
+namespace TAEF = ::Test::TAEF;
+#endif //PCH_H
diff --git a/test/DynamicDependency/data/Microsoft.WindowsAppRuntime.Framework/appxmanifest.xml b/test/DynamicDependency/data/Microsoft.WindowsAppRuntime.Framework/appxmanifest.xml
index ba23f37f21..eb08df9be3 100644
--- a/test/DynamicDependency/data/Microsoft.WindowsAppRuntime.Framework/appxmanifest.xml
+++ b/test/DynamicDependency/data/Microsoft.WindowsAppRuntime.Framework/appxmanifest.xml
@@ -81,6 +81,14 @@
+
+
+ Microsoft.WindowsAppRuntime.dll
+
+
+
+
+
Microsoft.WindowsAppRuntime.dll
diff --git a/test/TestApps/ToastNotificationsTestApp/main.cpp b/test/TestApps/ToastNotificationsTestApp/main.cpp
index 5a9ee51151..938f57f834 100644
--- a/test/TestApps/ToastNotificationsTestApp/main.cpp
+++ b/test/TestApps/ToastNotificationsTestApp/main.cpp
@@ -26,7 +26,6 @@ namespace winrt
const std::wstring c_localWindowsAppSDKFolder{ LR"(\Microsoft\WindowsAppSDK\)" };
const std::wstring c_pngExtension{ LR"(.png)" };
const std::wstring c_appUserModelId{ LR"(TaefTestAppId)" };
-const std::wstring c_iconFilepath{ std::filesystem::current_path() / "icon1.ico" };
bool BackgroundActivationTest() // Activating application for background test.
{
@@ -1325,122 +1324,6 @@ bool VerifyIconPathExists_Unpackaged()
return true;
}
-bool VerifyRegisterWithNullDisplayNameFail_Unpackaged()
-{
- // Register is already called in main with an explicit appusermodelId
- winrt::AppNotificationManager::Default().UnregisterAll();
- try
- {
- winrt::AppNotificationManager::Default().Register(winrt::hstring{}, winrt::Uri{ c_iconFilepath });
- }
- catch (...)
- {
- return winrt::to_hresult() == E_INVALIDARG;
- }
-
- return false;
-}
-
-bool VerifyRegisterWithNullIconFail_Unpackaged()
-{
- // Register is already called in main with an explicit appusermodelId
- winrt::AppNotificationManager::Default().UnregisterAll();
- try
- {
- winrt::AppNotificationManager::Default().Register(L"AppNotificationApp", nullptr);
- }
- catch (...)
- {
- return winrt::to_hresult() == E_INVALIDARG;
- }
-
- return false;
-}
-
-bool VerifyRegisterWithNullDisplayNameAndNullIconFail_Unpackaged()
-{
- // Register is already called in main with an explicit appusermodelId
- winrt::AppNotificationManager::Default().UnregisterAll();
- try
- {
- winrt::AppNotificationManager::Default().Register(winrt::hstring{}, nullptr);
- }
- catch (...)
- {
- return winrt::to_hresult() == E_INVALIDARG;
- }
-
- return true;
-}
-
-bool VerifyShowToastWithCustomDisplayNameAndIcon_Unpackaged()
-{
- // Register is already called in main with an explicit appusermodelId
- winrt::AppNotificationManager::Default().UnregisterAll();
- try
- {
- winrt::AppNotificationManager::Default().Register(L"AppNotificationApp", winrt::Uri{ c_iconFilepath });
-
- winrt::check_bool(VerifyShowToast_Unpackaged());
- }
- catch (...)
- {
- return false;
- }
-
- return true;
-}
-
-bool VerifyRegisterWithDisplayNameAndInvalidIconPathFail_Unpackaged()
-{
- // Register is already called in main with an explicit appusermodelId
- winrt::AppNotificationManager::Default().UnregisterAll();
- try
- {
- winrt::AppNotificationManager::Default().Register(L"AppNotificationApp", winrt::Uri{ LR"(C:\InvalidPath\)" });
- }
- catch (...)
- {
- return winrt::to_hresult() == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND);
- }
-
- return false;
-}
-
-bool VerifyRegisterWithEmptyDisplayNameFail_Unpackaged()
-{
- // Register is already called in main with an explicit appusermodelId
- winrt::AppNotificationManager::Default().UnregisterAll();
- try
- {
- // hstring treats L"" as assigning nullptr
- winrt::AppNotificationManager::Default().Register(L"", winrt::Uri{ c_iconFilepath });
- }
- catch (...)
- {
- return winrt::to_hresult() == E_INVALIDARG;
- }
-
- return false;
-}
-
-bool VerifyRegisterWithAssetsFail()
-{
- // Register is already called in main with an explicit appusermodelId
- winrt::AppNotificationManager::Default().UnregisterAll();
- try
- {
- // API fails for Packaged Scenario
- winrt::AppNotificationManager::Default().Register(L"AppNotificationApp", winrt::Uri{ LR"(C:\InvalidPath\)" });
- }
- catch (...)
- {
- return winrt::to_hresult() == E_ILLEGAL_METHOD_CALL;
- }
-
- return false;
-}
-
std::map const& GetSwitchMapping()
{
static std::map switchMapping = {
@@ -1499,14 +1382,6 @@ std::map const& GetSwitchMapping()
{ "VerifyToastProgressDataSequence0Fail", &VerifyToastProgressDataSequence0Fail },
{ "VerifyToastUpdateZeroSequenceFail_Unpackaged", &VerifyToastUpdateZeroSequenceFail_Unpackaged },
{ "VerifyIconPathExists_Unpackaged", &VerifyIconPathExists_Unpackaged},
-
- { "VerifyRegisterWithNullDisplayNameFail_Unpackaged", &VerifyRegisterWithNullDisplayNameFail_Unpackaged},
- { "VerifyRegisterWithNullIconFail_Unpackaged", &VerifyRegisterWithNullIconFail_Unpackaged},
- { "VerifyRegisterWithNullDisplayNameAndNullIconFail_Unpackaged", &VerifyRegisterWithNullDisplayNameAndNullIconFail_Unpackaged},
- { "VerifyShowToastWithCustomDisplayNameAndIcon_Unpackaged", &VerifyShowToastWithCustomDisplayNameAndIcon_Unpackaged},
- { "VerifyRegisterWithDisplayNameAndInvalidIconPathFail_Unpackaged", &VerifyRegisterWithDisplayNameAndInvalidIconPathFail_Unpackaged},
- { "VerifyRegisterWithEmptyDisplayNameFail_Unpackaged", &VerifyRegisterWithEmptyDisplayNameFail_Unpackaged},
- { "VerifyRegisterWithAssetsFail", &VerifyRegisterWithAssetsFail},
};
return switchMapping;
diff --git a/test/ToastNotificationTests/APITests.cpp b/test/ToastNotificationTests/APITests.cpp
index 73a58a435e..14c20dd2cb 100644
--- a/test/ToastNotificationTests/APITests.cpp
+++ b/test/ToastNotificationTests/APITests.cpp
@@ -583,40 +583,5 @@ namespace Test::ToastNotifications
{
RunTestUnpackaged(L"VerifyIconPathExists_Unpackaged", testWaitTime());
}
-
- TEST_METHOD(VerifyRegisterWithNullDisplayNameFail_Unpackaged)
- {
- RunTestUnpackaged(L"VerifyRegisterWithNullDisplayNameFail_Unpackaged", testWaitTime());
- }
-
- TEST_METHOD(VerifyRegisterWithNullIconFail_Unpackaged)
- {
- RunTestUnpackaged(L"VerifyRegisterWithNullIconFail_Unpackaged", testWaitTime());
- }
-
- TEST_METHOD(VerifyRegisterWithNullDisplayNameAndNullIconFail_Unpackaged)
- {
- RunTestUnpackaged(L"VerifyRegisterWithNullDisplayNameAndNullIconFail_Unpackaged", testWaitTime());
- }
-
- TEST_METHOD(VerifyShowToastWithCustomDisplayNameAndIcon_Unpackaged)
- {
- RunTestUnpackaged(L"VerifyShowToastWithCustomDisplayNameAndIcon_Unpackaged", testWaitTime());
- }
-
- TEST_METHOD(VerifyRegisterWithDisplayNameAndInvalidIconPathFail_Unpackaged)
- {
- RunTestUnpackaged(L"VerifyRegisterWithDisplayNameAndInvalidIconPathFail_Unpackaged", testWaitTime());
- }
-
- TEST_METHOD(VerifyRegisterWithEmptyDisplayNameFail_Unpackaged)
- {
- RunTestUnpackaged(L"VerifyRegisterWithEmptyDisplayNameFail_Unpackaged", testWaitTime());
- }
-
- TEST_METHOD(VerifyRegisterWithAssetsFail)
- {
- RunTest(L"VerifyRegisterWithAssetsFail", testWaitTime());
- }
};
}