Skip to content

Commit 019bf7c

Browse files
sachintaMSFTSantosh Chintalapati
andauthored
Ensure GetStatus doesn't crash and ensure MSIX package of the sample is created with correct publisher details. (#237)
Co-authored-by: Santosh Chintalapati <[email protected]>
1 parent a64e5c2 commit 019bf7c

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

Samples/DeploymentManager/cpp-winui/Scenario2_Initialize.xaml.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ namespace winrt::DeploymentManagerSample::implementation
3434
void Scenario2_Initialize::UpdateDeploymentResultMessages(DeploymentResult deploymentResult)
3535
{
3636
resultStatus().Text(L"Result Status: "); // TODO DeploymentStatus to string
37-
resultExtendedError().Text(L"Result ExtendedError: " + to_hstring(deploymentResult.ExtendedError()));
3837

3938
// Check the result.
4039
if (deploymentResult.Status() == DeploymentStatus::Ok)
@@ -44,6 +43,8 @@ namespace winrt::DeploymentManagerSample::implementation
4443
}
4544
else
4645
{
46+
resultExtendedError().Text(L"Result ExtendedError: " + to_hstring(deploymentResult.ExtendedError()));
47+
4748
// The WindowsAppRuntime is in a bad state which Initialize() did not fix.
4849
// Do error reporting or gather information for submitting a bug.
4950
// Gracefully exit the program or carry on without using the WindowsAppRuntime.

Samples/DeploymentManager/cs-winui/Package.appxmanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<Identity
1010
Name="b15c58b4-2998-4ce3-9bea-6ca5d3f8fdb3"
11-
Publisher="CN=Microsoft Corporation"
11+
Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"
1212
Version="1.1.0.0" />
1313

1414
<Properties>

Samples/DeploymentManager/cs-winui/Scenario1_GetStatus.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ private void GetStatus_Click(object sender, RoutedEventArgs e)
2929
// error code. The Status is usually the property of interest, as the ExtendedError is
3030
// typically used for diagnostic purposes or troubleshooting.
3131
resultStatus.Text = "Result Status: " + result.Status.ToString();
32-
resultExtendedError.Text = "Result ExtendedError: " + result.ExtendedError.ToString();
3332

3433
// Check the resulting Status.
3534
if (result.Status == DeploymentStatus.Ok)
@@ -38,6 +37,7 @@ private void GetStatus_Click(object sender, RoutedEventArgs e)
3837
}
3938
else
4039
{
40+
resultExtendedError.Text = "Result ExtendedError: " + result.ExtendedError.ToString();
4141
// A not-Ok status means it is not ready for us. The Status will indicate the
4242
// reason it is not Ok, such as some packages need to be installed.
4343
resultImplication.Text = "The Windows App Runtime is not ready for use.";

0 commit comments

Comments
 (0)