dotnet / wpf

WPF is a .NET Core UI framework for building Windows desktop applications.
MIT License
6.93k stars 1.15k forks source link

ClickOnce WPF app crashes on startup if arguments passed #8734

Open MrFJ opened 5 months ago

MrFJ commented 5 months ago

Description

Not sure if this is the right repo, but I'm experience issues launching an offline click once wpf app (.net7, vs2022) with arguments. Here's what I'm attempting to call (Command line or Process.Start): "C:\Users\[USERNAME]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\[COMPANY]\[APPNAME].appref-ms" testargument

But the program crashes before I even get a chance to attach to process, show any message boxes, nada, nothing. Not even anything in the event viewer. What am I doing wrong?

Reproduction Steps

Create an empty clickonce wpf app in vs2022 .net7. Publish to a fileshare. Install the app. Launch the *.appref-ms file from command prompt, including an argument: "C:\Users[USERNAME]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs[COMPANY][APPNAME].appref-ms" testargument

Expected behavior

The app should launch normally.

Actual behavior

the app crashes with not a single sign of life after checking for updates.

Regression?

No response

Known Workarounds

No response

Impact

If I knew of another way to launch an OFFLINE click once app, the impact would be low; but since I do not...

Configuration

.net 7 Windows 10 x64

Other information

Related articles, etc: https://stackoverflow.com/questions/57951184/clickonce-applicationuri-is-null-with-allow-url-parameters-to-be-passed-set-to https://developingfor.net/2010/06/23/processing-command-line-arguments-in-an-offline-clickonce-application/ https://stackoverflow.com/questions/77859562/clickonce-net7-wpf-app-why-is-activationuri-null

singhashish-wpf commented 5 months ago

This should be on the clickonce side, Please raise this issue on VS Feedback channel.

MrFJ commented 5 months ago

This should be on the clickonce side, Please raise this issue on VS Feedback channel.

Your link redirects me to https://developercommunity.visualstudio.com/home Can you direct me to where I would file a ClickOnce bug report?

pchaurasia14 commented 5 months ago

@MrFJ - You can raise the issue here - https://developercommunity.visualstudio.com/dotnet