.netmauireleasepublish.net-8.0

I am trying to publish a MAUI app on windows platform but am encountering an error


"I'm trying to publish a .NET MAUI app on windows platform, which has been upgraded to 8.0.0-rc.2.9373, with the following command:

dotnet publish project.csproj -f net8.0-windows10.0.19041.0 -c Release /p:RuntimeIdentifierOverride=win10-x64 -p:PublishSingleFile=true -o C:\Users\admin\Documents\publish

However, I encounter the following error as a result:

MakeAppx : error : Manifest validation error: Line 25, Column 27, Reason: The file name "Project.exe" declared for the element "[local-name()='Applications']/[local-name()='Application']" doesn't exist in the package. [C:\Users\admin\Documents\Work\Project\ProjectSolution\Project\project.csproj::TargetFramework=net8.0-windows10.0.19041.0] MakeAppx : error : Package creation failed. [C:\Users\admin\Documents\Work\Project\ProjectSolution\Project\project.csproj::TargetFramework=net8.0-windows10.0.19041.0] MakeAppx : error : 0x80080204 - The specified package format is not valid: The package manifest is not valid. [C:\Users\admin\Documents\Work\Project\ProjectSolution\Project\project.csproj ::TargetFramework=net8.0-windows10.0.19041.0]

If I use the same command for building, just changing from "-c Release" to "-c Debug", everything is fine.

Can somebody help me?

I try to publish a MAUI project on windows platform, but I'm receive an error.


Solution

  • Finally I solved this with just changing publish command to

    dotnet publish -f net8.0-windows10.0.19041.0 -c Release -p:RuntimeIdentifierOverride=win10-x64