mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Restructured for single table of contents (docs/readme.md)
Removed numbering on file naming and separated into separate sub-directories for getting-started, using, and contributing.
This commit is contained in:
38
docs/using/debugging-updates.md
Normal file
38
docs/using/debugging-updates.md
Normal file
@@ -0,0 +1,38 @@
|
||||
| [docs](..) / [using](.) / debugging-updates.md
|
||||
|:---|
|
||||
|
||||
# Debugging Updates
|
||||
|
||||
The following tips will help you to debug the update process in your application.
|
||||
|
||||
## Update.exe not found?
|
||||
|
||||
Executing MyApp from Visual Studio will execute the update process and you will get the following exception from the `UpdateManager`:
|
||||
|
||||
~~~
|
||||
Update.exe not found, not a Squirrel-installed app?
|
||||
~~~
|
||||
|
||||
The `UpdateManager` is expecting to find the `Update.exe` application installed one directory up from the EXE (e.g., the `\bin` directory for default Visual Studio projects).
|
||||
|
||||
To resolve this, you can simply place a file named `Update.exe` or you can copy the `Squirrel.exe` from the `MyApp\packages\squirrel.windows.1.2.2.tools` directory and rename it Update.exe (this is the actual Update.exe packaged inside `Setup.exe`).
|
||||
|
||||
Executing MyApp from Visual Studio will now cause it to complete the update process and your `\bin` directory will resemble the `%LocalAppData\MyApp%` install directory:
|
||||
|
||||

|
||||
|
||||
## Catching Update Exceptions
|
||||
|
||||
You can catch thrown exceptions and log the results.
|
||||
|
||||
~~~cs
|
||||
Task.Run(async () =>
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var mgr = new UpdateManager("C:\\Projects\\MyApp\\Releases"))
|
||||
{
|
||||
await mgr.UpdateApp();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
Reference in New Issue
Block a user