'Open the same app after downloading an a update
i'm doing a application update, and i've already code the part thats download and extracts content.
now, i need to close current app, and open the same, but with the new .exe Can anyone help me?
Solution 1:[1]
use this prop and inject it in Ctor private readonly IHostApplicationLifetime _hostApplicationLifetime;
//ToDo: inject it
private readonly IHostApplicationLifetime _hostApplicationLifetime;
//use this to restart application
_hostApplicationLifetime.StopApplication();
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Abolfazl Moslemian |