Skip to content

Commit 220ca50

Browse files
authored
Small fix on reset locations (#5865)
1 parent eb62b55 commit 220ca50

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

dev/Deployment/DeploymentActivityContext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Microsoft Corporation and Contributors.
1+
// Copyright (c) Microsoft Corporation and Contributors.
22
// Licensed under the MIT License.
33

44
#include <pch.h>

dev/Deployment/DeploymentManager.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,7 @@ namespace winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::implem
527527

528528
HRESULT DeploymentManager::InstallLicenses(const std::wstring& frameworkPackageFullName)
529529
{
530+
::WindowsAppRuntime::Deployment::Activity::Context::Get().Reset();
530531
::WindowsAppRuntime::Deployment::Activity::Context::Get().SetInstallStage(::WindowsAppRuntime::Deployment::Activity::DeploymentStage::GetLicensePath);
531532

532533
// Build path for licenses
@@ -554,7 +555,6 @@ namespace winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::implem
554555
auto licenseFilename{ licensePath };
555556
licenseFilename /= findFileData.cFileName;
556557

557-
::WindowsAppRuntime::Deployment::Activity::Context::Get().Reset();
558558
::WindowsAppRuntime::Deployment::Activity::Context::Get().SetCurrentResourceId(licenseFilename);
559559

560560
RETURN_IF_FAILED_MSG(licenseInstaller.InstallLicenseFile(licenseFilename.c_str()),
@@ -574,15 +574,16 @@ namespace winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::implem
574574
HRESULT DeploymentManager::DeployPackages(const std::wstring& frameworkPackageFullName, const bool forceDeployment)
575575
{
576576
auto initializeActivity{ ::WindowsAppRuntime::Deployment::Activity::Context::Get() };
577+
initializeActivity.Reset();
577578

578579
initializeActivity.SetInstallStage(::WindowsAppRuntime::Deployment::Activity::DeploymentStage::GetPackagePath);
579580
const auto frameworkPath{ std::filesystem::path(GetPackagePath(frameworkPackageFullName)) };
580581

581-
initializeActivity.SetInstallStage(::WindowsAppRuntime::Deployment::Activity::DeploymentStage::AddPackage);
582582
for (auto package : c_targetPackages)
583583
{
584584
auto isSingleton{ CompareStringOrdinal(package.identifier.c_str(), -1, WINDOWSAPPRUNTIME_PACKAGE_SUBTYPENAME_SINGLETON, -1, TRUE) == CSTR_EQUAL };
585585
initializeActivity.Reset();
586+
initializeActivity.SetInstallStage(::WindowsAppRuntime::Deployment::Activity::DeploymentStage::AddPackage);
586587
initializeActivity.SetCurrentResourceId(package.identifier);
587588

588589
std::filesystem::path packagePath{};

0 commit comments

Comments
 (0)