DeploymentManager auto-initializer
NOT YET READY FOR REVIEW TESTING IN PROGRESS
Add an auto-initializer for DeploymentManager (very similar to the Bootstrapper's auto-initializer).
If DeploymentManager Initialize fails...
...Write to the eventlog

TODO replace
with the event from DeploymentManager
...Optionally
- DebugBreak
- DebugBreak if a debugger is attached to the process
- FailFast
- MessageBox (modeled after .NET's) asking if you'd like to install the WindowsAppRuntime and if so, ShellExecute(url) to the download page

The optional behavior is triggered by the new MddDeploymentManagerInitialize(...options) parameter or by environment variables
SET MICROSOFT_WINDOWSAPPRUNTIME_DEPLOYMENTMANAGER_INITIALIZE_DEBUGBREAK=1
SET MICROSOFT_WINDOWSAPPRUNTIME_DEPLOYMENTMANAGER_INITIALIZE_SHOWUI=1
SET MICROSOFT_WINDOWSAPPRUNTIME_DEPLOYMENTMANAGER_INITIALIZE_FAILFAST=1
Tested via manual testing (HelloWorldCS.msix and HelloWorldCS.exe) under debugger with memory fiddling and running after setting environment variables.
*.targets updated to provide build-time control.
- To disable the auto-initializer the auto-initialize set the property
WindowsAppSDKDeploymentManagerAutoInitialize=false - If the auto-initalizer is enabled you can define properties to control the options passed via
DeploymentInitializeOptionstoDeploymentManager.Initialize()- WindowsAppSDKDeploymentManagerAutoInitializeOptions_Default=true -- use the default options (OnError_ShowUI)
- WindowsAppSDKDeploymentManagerAutoInitializeOptions_None=true -- use no options (None)
- WindowsAppSDKDeploymentManagerAutoInitializeOptions_*=true -- enable the option where * is one or more of the following
- OnError_DebugBreak
- OnError_DebugBreak_IfDebuggerAttached
- OnError_FailFast
- OnError_ShowUI
- OnNoPackageIdentity_NoOp
For example, to disable the auto-initializer add to your *proj file:
<PropertyGroup>
<WindowsAppSDKDeploymentManagerAutoInitialize>false</WindowsAppSDKDeploymentManagerAutoInitialize>
</PropertyGroup>
or to enable the auto-initializer (default) but use the DebugBreak+FailFast options (instead of the default)
<PropertyGroup>
<WindowsAppSDKDeploymentManagerAutoInitializeOptions_OnError_DebugBreak>true</WindowsAppSDKDeploymentManagerAutoInitializeOptions_OnError_DebugBreak>
<WindowsAppSDKDeploymentManagerAutoInitializeOptions_OnError_ShowUI>true</WindowsAppSDKDeploymentManagerAutoInitializeOptions_OnError_ShowUI>
</PropertyGroup>
https://task.ms/40724739
/azp run
Pull request contains merge conflicts.
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
/azp run
Pull request contains merge conflicts.
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
/azp run
Azure Pipelines successfully started running 1 pipeline(s).