c# – Error NETSDK1005 Assets file , Ensure that restore has run and that you have included ‘net8.0-android’ in the TargetFrameworks for your project


i was developing maui app using windows 11 then i downgrade to windows 10 .
now this error appears with me .
**”Error (active) NETSDK1005 Assets file ‘D:\Csharp\Maui\IdealDiagnosis.Maui\IdealDiagnosis\obj\project.assets.json’ doesn’t have a target for ‘net8.0-android’.
Ensure that restore has run and that you have included ‘net8.0-android’ in the TargetFrameworks for your project.
IdealDiagnosis (net8.0-android) C:\Program Files\dotnet\sdk\8.0.303\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets 266″ **

packages added in the projectfile

as in this image
image2
also i noticed there are 2 application options in the project properties file
the first one that include win 32 option mot in other maui projects

here

i tired maually to delete the lines for packages then add them again
i tried to delete bin and obj folders
i tried to reload the project
but still have the same error

is that error due to changing the windows version of my pc

i noticed that if i removed the first line for packages other than windows then run tha app , the app work fine on windows machine only

Leave a Reply

Your email address will not be published. Required fields are marked *