I have created the MAUI project according to the getting started guide:
It is a default project without any changes. Now, I am trying to build my project and I get the next errors:
Specified AndroidManifest file does not exist: C:\***\source\repos\MauiApp\MauiApp\AndroidManifest.xml.Assets file 'C:\***\source\repos\MauiApp\MauiApp\obj\project.assets.json' not found. Run a NuGet package restore to generate this file.I have tried to restore NuGet but it doesn't help. What did I miss? or any suggestion for fixing?
EDIT:
I have this solved, ...well, kind of. Let me explain: I have got a solution with 18 projects, three of them are MAUI projects targeting just net8.0-android. All three projects suddenly started to produce the XA1018 error:
XA1018 Specified AndroidManifest file does not exist: <MauiProjectFolder>\AndroidManifest.xml.
In addition, the projects also produce the NU1008 error:
NU1008: Projects that use central package version management should not define the version on the PackageReference items but on the PackageVersion items...
Although the central package version management is setup correctly (it already worked as stated in my previous comment).
What solved the issue for me (at least temporarily) was the following:
AndroidManifest.xml file from the Platforms/Android subfolder into the project's root folder for each affected MAUI project.AndroidManifest.xml files form the MAUI project's root folder and VS (or MSBuild, I do not know which one) does not complain anymore.This is insane!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With