Click Once Application: Parsing Command Line Arguments
How to pass arguments to Click Once application to load project file when user double click on registered file to launch the application deployed by Click Once?
As we know, command line arguments for WinForm application is accessible from
Environment.GetCommandLineArgs()
However, this does not works with Click Once application.
For Click Once application, the command line arguments is available at:
string [] args = AppDomain.CurrentDomain.SetupInformation.ActivationArguments?.ActivationData;
Unlike command line arguments from Environment class where the first argument is the application file path, the first argument in ActivationData array is the argument.
As we know, command line arguments for WinForm application is accessible from
Environment.GetCommandLineArgs()
However, this does not works with Click Once application.
For Click Once application, the command line arguments is available at:
string [] args = AppDomain.CurrentDomain.SetupInformation.ActivationArguments?.ActivationData;
Unlike command line arguments from Environment class where the first argument is the application file path, the first argument in ActivationData array is the argument.