Share via

Please prioritize your ClickOnce (.application) applications on Windows 11

Nath Moore 0 Reputation points
2026-04-24T12:33:17.85+00:00

I’m working with a particular application on a Windows 11 machine in our office, where two applications are talking through shared ports, and that kills the workflow if they don’t work with good performance. But the second file, created in Microsoft Visual Studio 2022 as a .file (ClickOnce-style), refuses to honor the first flag and just runs as Normal, which is part of the teardown pipeline.

Opening it with the .application doesn't seem to find the original application, even though Task Manager shows it as an .exe. Is there a good way to deploy these critical applications directly to ClickOnce, or some way to force the first action after deployment?

Windows for business | Windows Server | Devices and deployment | Configure application groups
0 comments No comments

1 answer

Sort by: Most helpful
  1. VPHAN 34,230 Reputation points Independent Advisor
    2026-04-24T13:17:26.99+00:00

    Hi Nath Moore,

    ClickOnce applications operate through a specialized deployment manifest rather than a direct executable launch, which means standard command-line flags are inherently stripped during the initialization sequence. Even though Task Manager displays a standard executable running, the actual binary is buried deep within the dynamically generated local application data directory, specifically located at %LocalAppData%\Apps\2.0, making direct argument passing impossible through traditional execution methods.

    To resolve this, you must modify the deployment behavior within Visual Studio 2022. Navigate to your project properties, access the Publish section, open the Options menu, and explicitly enable the setting to allow URL parameters to be passed to the application. This modifies the deployment manifest to safely pipeline external arguments through the ClickOnce launcher without breaking the deployment integrity or security model.

    Once the manifest is configured to allow external parameters, your source code must be adapted to intercept them from the activation context rather than standard executable arguments. Traditional string array arguments retrieved on startup will remain empty, so your application must invoke the current application domain setup information to retrieve the activation data directly. Implementing this parameter interception within your initialization code will ensure the flags are processed successfully, allowing your dual-application workflow to bind to the shared ports and maintain peak performance.

    Hope this answer brought you some useful information. If it did, please hit “accept answer”. Should you have any questions, feel free to leave a comment.

    VP

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.