This repository has been archived by the owner on Jul 5, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
applicationName really is a required field, because UpdateManger will…
… throw if it is null
- Loading branch information
8f8530f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi caesay,
Why this parameter is now mandatory? There is still some code, which check if it is null:
this.applicationName = applicationName ?? UpdateManager.getApplicationName();
8f8530f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getApplicationName()
throws if theapplicationName
parameter is null and your app is not installed. This is confusing for new users trying to adopt Squirrel. I have sat with two people and watched them try to implement it in an app and both of them got hung up on this issue, where they left this field as null and tried to run their app in Visual Studio only for it to crash immediately.It is important you can create a new UpdateManager, even in a non-installed app - because checking the
IsInstalledApp
property or theCurrentlyInstalledVersion()
method is the only way to know if you are installed or not, and leavingapplicationName
null causes the exception.Therefore, I believe it should be a required field, unless you know you are already installed - and in that case, feel free to pass
null
explicitly.