visual-studiosetup-projectuno-platformmsix

Unable to Create MSIX on Uno Platform Project


I want to create an MSIX installer for a new Single Project Uno Platform app with Visual Studio 2022 on Windows 11. I'm using Microsoft's guidance for using an Application Packaging Project.

Guidance: https://learn.microsoft.com/en-us/windows/msix/desktop/vs-package-overview

However, the Wap project doesn't generate an MSIX installer.

I used the Blank app Preset and named the project MinimalUnoSample, with the following options:

  1. Framework: .NET 8.0
  2. Platforms: Windows, Desktop.
  3. Presentation: None
  4. Markup: XAML
  5. Theme: Fluent
  6. Extensions: Blank, Console
  7. Features: None
  8. Authentication: None
  9. Application: Defaults
  10. Testing: None
  11. CI Pipeline: None

Steps to reproduce:

  1. After creating, build the solution and run to verify that it works (shows window with "Hello Uno Platform".
  2. Add a packaging project named MinimalUnoSampleWap, per the Guidance, listed above. Here are the settings I chose: a. Version defaults - Target Version is Windows 11, version 22H2 and Minimum Version is Windows 10, version 1809.
  3. Add a project reference from the Wap project to the MinimalUnoSample project.
  4. The default configuration for the project is Debug AnyCPU, which causes MSB3779 errors. So, I changed the configuration on both projects to Debug x86. BTW, I've tried x64 with the same results too. Then I tried a Release build for both x86 and x64 with the same results.
  5. There is also a Packages warning that I've been able to resolve by upgrading to the latest version with NuGet.
  6. Building the Wap project results in the error: "Specified EntryPointExe '' was not found in the project outputs." Not finding a good resolution to this, I continued with the package process in the Guidance. Resolving this might help, but I've so far been able to find the cause.
  7. Right-click the Wap project, select Publish -> Create App Packages...
  8. Choose Sideloading/Enable automatic updates - Next.
  9. Create a self-signed certificate and Trust it - Next.
  10. Uncheck Neutral, check and set all other architecture mappings to Release. Whether changing the Generate app bundle to each Always or Never doesn't change the result. Also, note that the Output location is set to "C:\Projects\temp\MininmalUnoSampleWap\AppPackages", which reflects the location where I created MinimalUnoSampleWap - Next.
  11. Set installer location to a file location. I used "C:\Projects\temp". Then click Create. This resulted in an error wall (lots of errors in the Error List), so I rebuilt the solution.

I looked where the MSIX should be at the Output location (from #10), inside of every Debug and Release folder in the \bin, and it was not generated. I looked at C:\Projects\temp (from #11) too.

"The Specified EntryPointExe '' was not found in the project outputs." error still shows in the Error List.

The following answers don't work because I can't change <TargetFrameworks> to <TargetFramework> (singular) because it's a multi-platform Uno app.

The following answer didn't resolve the issue because I verified that I'm using .NET 8 and that the target framework is installed:

The answer (via comment) to the following question didn't resolve the Issue because I'm updated to the latest version of Visual Studio 2022, Version 17.9.7.


Solution

  • The solution was to use MSBuild as detailed in the new Uno Project Documentation:

    msbuild /r /p:TargetFramework=net8.0-windows10.0.19041 /p:Configuration=Release /p:Platform=x64 /p:GenerateAppxPackageOnBuild=true /p:AppxBundle=Never /p:UapAppxPackageBuildMode=Sideloading /p:AppxPackageDir="C:/temp/output/" /p:AppxPackageSigningEnabled=true