1

My WPF app is Windows only.

I cleared my */Releases folder and build my project:

dotnet publish --self-contained -r win-x64 -o .\publish

Then I created a release:

vpk pack --packId MyApp --packVersion 1.1.18 --packDir .\publish --icon .\Assets\app_icon.ico

I installed this 1.1.18 version using the .exe file. Then I changed the project version to 1.1.19, rebuild it, and published again:

dotnet publish --self-contained -r win-x64 -o .\publish

After that, I created a new release:

vpk pack --packId MyApp --packVersion 1.1.19 --packDir .\publish --icon .\Assets\app_icon.ico

My application searches for updates in the temp folder like this:

private async Task UpdateLocalAsync()
{
    var tempFolder = Path.Combine(Path.GetTempPath(), "MyCompanyName", "Releases");
    var updateManager = new UpdateManager(tempFolder);
    var newVersion = await updateManager.CheckForUpdatesAsync();
    if (newVersion == null)
    {
        MessageBox.Show("VersionUpToDate");
        return;
    }

    MessageBox.Show("UpdatingToVersion");
    updateManager.ApplyUpdatesAndRestart(newVersion);
}

I tried copying fresh versions of the following files to the temp folder:

  • releases.win

  • full (1.1.19)

  • delta (1.1.19)

I got the message "UpdatingToVersion". The application closed, but in the update view, it showed that it was updating to the old version 1.1.18 (expected 1.1.19). After the update was finished and the application restarted, the version was still old 1.1.18 (expected 1.1.19).
How can I fix autoupdate of my app?
Also, if this problem is related to files which I downloaded to use for update, I need to say that I don't want to force every user to download all project versions for every single application update except actual files, for saving traffic.

1 Answer 1

1

I found that I missed to add the line await updateManager.DownloadUpdatesAsync(newVersion);
to my code.

I thought it was some kind of file upload from a cloud source. But it looks like its uploading resources from a folder to a folder on the users PC (some kind of temporary folder that will be used after your app is stopped).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.