Your project has a file called Package.appsmanifest
, but it needs a file named Package.appxmanifest
to work. Without it, Windows can’t build the app package.
Publishing a .NET MAUI app fails with error message "You must include a valid app package manifest file named AppxManifest.xml in the source."
I'm trying to publish a .NET MAUI app.
The source code contains a "Package.appxmanifest" file.
When I try to publish, it fails with the following error messages:
- You must include a valid app package manifest file named AppxManifest.xml in the source.
- 0x80080203 - The specified package format is not valid: The file is not a valid app package because it is missing a required footprint file.
- Package creation failed.
What could be wrong?
I'm using Visual Studio 2022 version 17.14.6
Developer technologies | .NET | .NET MAUI
2 answers
Sort by: Most helpful
-
Patricia Horne 0 Reputation points
2025-07-03T10:00:34.7+00:00 -
Tony Dinh (WICLOUD CORPORATION) 390 Reputation points Microsoft External Staff
2025-07-08T08:21:52.5066667+00:00 Based on my testing, here are some possible causes and solutions:
- You may have attempted to run the Publish command on the entire solution. If the solution contains other projects (besides your main project), those projects may not have an executable or
appxmanifest
file by default, yet are still considered part of the publish process. If you have other projects—such as libraries referenced by your main project—make sure to Clean Solution and Rebuild All projects. After that, publish only the main project using this command:
Be sure to run this command from the directory of your main project only.dotnet publish -f net8.0-windows10.0.19041.0 -c Release -p:WindowsPackageType=MSIX
- Your main project’s
.csproj
file may be missing or may contain incorrect MSIX properties. Ensure it includes the following:<PropertyGroup> <TargetFramework>net8.0-windows10.0.19041.0</TargetFramework> <UseMaui>true</UseMaui> <WindowsPackageType>MSIX</WindowsPackageType> <EnableMsixTooling>true</EnableMsixTooling> <GenerateAppxPackageOnBuild>true</GenerateAppxPackageOnBuild> </PropertyGroup>
- Visual Studio may be missing the MSIX tooling or the required Windows SDK. Please verify these are installed.
- Check for any syntax errors or typos in your
Package.appxmanifest
file. This file is essential for generating theAppxManifest.xml
output.
Here are some useful documentation links that might help:
I hope this helps resolve the issue. If not, please provide additional information such as the output console log, your project structure, the contents of
Package.appxmanifest
, or any other relevant details so I can assist further. Thank you! - You may have attempted to run the Publish command on the entire solution. If the solution contains other projects (besides your main project), those projects may not have an executable or