ClickOnce WPF app crashes on startup if arguments passed
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
### 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
Contributor guide
Assessment
This issue has not been assessed yet.