Aleksey Pavlov
Aleksey Pavlov

Reputation: 154

How can I get available ApplicationDeployment Version via ClickOnce?

CurrentVersion and UpdatedVersion shows same version. As I know UpdatedVersion will be changed after downloading new update. I want to check available version of application via ClickOnce before calling ApplicationDeployment.Update().

Upvotes: 0

Views: 207

Answers (1)

cerberus
cerberus

Reputation: 422

ApplicationDeployment ad = ApplicationDeployment.CurrentDeployment;
info = ad.CheckForDetailedUpdate();
if (info.UpdateAvailable)
...

here you can see the version

info.AvailableVersion

and update size

info.UpdateSizeBytes

Upvotes: 2

Related Questions