Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dev/Deployment/DeploymentManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ namespace winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::implem

HRESULT DeploymentManager::DeployPackages(const std::wstring& frameworkPackageFullName, const bool forceDeployment)
{
auto& initializeActivity{ ::WindowsAppRuntime::Deployment::Activity::Context::Get() };
auto initializeActivity{ ::WindowsAppRuntime::Deployment::Activity::Context::Get() };
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a value copy instead of a reference may cause the Reset() call to operate on a local copy rather than the actual activity context. This could result in the activity context not being properly reset, leading to incorrect deployment state tracking. Consider using auto& to ensure modifications affect the actual context object.

Suggested change
auto initializeActivity{ ::WindowsAppRuntime::Deployment::Activity::Context::Get() };
auto& initializeActivity{ ::WindowsAppRuntime::Deployment::Activity::Context::Get() };

Copilot uses AI. Check for mistakes.
initializeActivity.Reset();

initializeActivity.SetInstallStage(::WindowsAppRuntime::Deployment::Activity::DeploymentStage::GetPackagePath);
Expand Down