Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single-Project MSIX does not create .appinstaller or index.html files for auto-updates #1821

Closed
mjfusa opened this issue Nov 17, 2021 · 14 comments
Assignees
Labels
area-DeveloperTools Issues related to authoring (source and IDL), debugging, HotReload, LiveVisualTree, VS integration feature

Comments

@mjfusa
Copy link

mjfusa commented Nov 17, 2021

Vote for adding support for .appinstaller here!

Describe the bug

When building MSIX packages with a single project MSIX for automatic updates, the .appinstaller and index.html files are not created

Steps to reproduce the bug

  1. Install the Windows App SDK 1.0 C# VSIX for Visual Studio 2022. (https://docs.microsoft.com/en-us/windows/apps/windows-app-sdk/stable-channel#version-10)
  2. Create a new project: (Blank App, Packaged WinUI 3 in Desktop)
  3. Close and reload solution (Known issue Publish option missing from single-project apps upon first creation #1664)
  4. Select "Package and Publish" > "Create App Packages"
  5. Check 'Sideloading and 'Enable Automatic Updates' > Next
  6. Select 'Create' a new certificate > Next
  7. Accept all defaults > Next
  8. Specify network share path: \TEMP\share (doesn't have to exist)
  9. Click 'Create'
  10. Click link to open AppPackages folder

Expected behavior

App packages get created in the AppPackages folder as expected, however the expected .appinstaller and index.html files are not created. This prevents the app from receiving automatic updates.

Screenshots

No response

NuGet package version

1.0.0

Packaging type

Packaged (MSIX)

Windows version

Windows 11 (22000)

IDE

Visual Studio 2022

Additional context

No response

@riverar
Copy link
Contributor

riverar commented Nov 18, 2021

@mjfusa Can you try building in Release? I have a faint memory of this (or something packaging project related) that just silently does nothing when building in Debug configurations. Not saying this isn't a bug, just curious.

@mjfusa
Copy link
Author

mjfusa commented Nov 18, 2021

Thanks for the suggestion @riverar - unfortunately I get the same result (no appinstaller or index.html files) in Release.

@MartinRothschink
Copy link

After changing my existing two project with separate packaging project into a single project I made the same observation. The index.html and app installers are missing.

@andrewleader andrewleader added area-DeveloperTools Issues related to authoring (source and IDL), debugging, HotReload, LiveVisualTree, VS integration bug Something isn't working feature and removed bug Something isn't working labels Nov 18, 2021
@andrewleader
Copy link
Contributor

This is a known gap, single-project MSIX unfortunately doesn't support creating the appinstaller file. You can use the classic Windows Packaging Project (two projects) for now.

How important is appinstaller support in single-project MSIX for you? You can add your vote here: https://portal.productboard.com/winappsdk/1-windows-app-sdk/c/55-support-generating-appinstaller-file-in-single-project-msix

@MartinRothschink
Copy link

Thanks, voted.

@BenJKuhn BenJKuhn added feature and removed feature labels Feb 8, 2022
@KWodarczyk
Copy link

if this is not supported why there is an option to provide the path to the installer folder ? That is confusing and makes people think it's actually supported. I

@germanfortiz
Copy link

germanfortiz commented Apr 15, 2022

I can't see this problem solved in 1.0.2. What's more, only the last platform selected is generated (x86, x64 or arm64), and the msixbundle is not created either.

image

image

These are the settings selected:

image

@evelynwu-msft
Copy link
Contributor

Single-project MSIX Packaging won't support creation of .msixbundle packages until WinAppSdk 1.2 at the earliest. Until that support is added, the VS wizard is effectively just setting some MSBuild properties that get ignored if you tell it to produce a bundle.

Regarding the missing .appinstaller even after upgrading to 1.0.2, can you verify that you checked this box at the beginning of the wizard?
image

@germanfortiz
Copy link

Hi!
Thanks for the quick response!

Starting the Create App Packages wizard:

image

The image at the end of the process:

image

And the final folders:

image

As a note: when creating the package, I see VS genererate x86 target, but when VS begins compiling x64 target, it inmediatly deletes the _x86 target.

Thanks!

@evelynwu-msft
Copy link
Contributor

That is bizarre... I'm using what should be identical settings, but I'm seeing the expected behavior (both architectures present in $(AppPackageDir), and a .appinstaller for each):
image

@germanfortiz
Copy link

I think I found the problem in my settings: in the Create App Packaged wizard, the option Generate App Bundle must be set in Never. This way the wizard create the .appinstallers and the index.html.

image

image

Thanks for the support!

@headerjson
Copy link

Is there a supported MSBuild option to generate this index.html for single-project MSIX?

I'm setting up an Azure DevOps CI/CD pipeline and am able to generate the .msix and .appinstaller for the single-project MSIX using the following MSBuild options:

/p:AppxPackageDir=D:\AppxPackages\ 
/p:GenerateAppxPackageOnBuild=true 
/p:AppxBundle=Never 
/p:UapAppxPackageBuildMode=SideLoadOnly
/p:GenerateAppInstallerFile=true
/p:AppInstallerUri=https:\\foo.net
/p:HoursBetweenUpdateChecks=24

The index.html file is still missing.

@riverar
Copy link
Contributor

riverar commented Oct 21, 2022

@headerjson Double-check that's being built in a Release configuration. If I remember correctly, nothing happens (silently) if in Debug. (Or this behavior changed and you can ignore me.)

@fabiocannas
Copy link

fabiocannas commented Jan 27, 2023

/p:AppxPackageDir=D:\AppxPackages\
/p:GenerateAppxPackageOnBuild=true
/p:AppxBundle=Never
/p:UapAppxPackageBuildMode=SideLoadOnly
/p:GenerateAppInstallerFile=true
/p:AppInstallerUri=https:\foo.net
/p:HoursBetweenUpdateChecks=24
@headerjson you saved my life :) thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-DeveloperTools Issues related to authoring (source and IDL), debugging, HotReload, LiveVisualTree, VS integration feature
Projects
None yet
Development

No branches or pull requests