cmdwinget

How to update my Windows application package in wingetcreate


I have a little problem while I want to update my package. I'll explain this: I published my package. After that, I waited for 2-3 hours for my packages be in the microsoft/winget-pkgs in GitHub. My branch merged successfully, It works on any Windows devices but, I created a new version of my application: v3.6.2. The version that I released it was v3.5.7. So now, I can't publish that version because this error is showing when I execute this cmd command: wingetcreate update <packageIdentifier> -u https://github.com/YourUsername/yourrepository/releases/download/3.6.2/yourapp.exe --version 3.6.2 -t ghp_YourGithubPersonalAccessTokenWith_public_repo_setting.

If you want an image, i'll show you the image (My Windows is French btw): Here the image. But as you can see, the red is the error and I tried everything, I searched on Google and didn't find anything that fixed my problem, I tried the examples showed above when you only execute this command: wingetcreate.exe update but still the same error message that you can see on the image.

So I decided to take the third example but same, without success. Is there a way that could update my WinGet package? Thanks!

I don't know if this could help but I can give you some info: it's inno, the achitecture is Neutral.

IMPORTANT NOTE: FIX HERE The last answer works but if you type the command winget search <YourApp>, it will keep the previous version and if you install, it would install the previous one... How to fix that because it is litteraly NOT updating but doing nothing.


Solution

  • Okay, I found the way: You take the code that the previous answer contains, and add -s:

    wingetcreate update -s <packageIdentifier> -u "https://github.com/YourUsername/yourrepository/releases/download/3.6.2/yourapp.exe|x64" --version 3.6.2 -t <githubToken>
    

    It will publish the application on GitHub for verification, in the command prompt you put (replace the sentence in the quotes with your current manifest file):

    winget validate --manifest "PathToYourManifestShowedInGreenAfterPublishing"
    

    When the validation on GitHub is done, it's done and normally it should work.

    NOTE: Verification on GitHub can take 2 to 3 hours or even 4 hours. Be patient! (I hope)