I migrated an MAUI Net 8 project from the Xamarin project. when building the application with MAUI Android, it failed with the following exceptions,
Microsoft.PackageDependencyResolution.targets(266, 5): [NETSDK1004] Assets file ‘/Users/mark050/Documents/VA-DEV/SKM-Test/SKM_MOBILE/obj/project.assets.json’ not found. Run a NuGet package restore to generate this file.
I noticed it also built the iOS platform code.
How to resolve this issue
1
This indicates that the required NuGet packages are missing or need to be restored.
- Run dotnet restore to fix missing packages.
- Make sure you’re building for Android, not iOS.
- Clean the project and rebuild it to remove old errors.
PSM is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.