Forum Xamarin.Forms

Newbie - Why am I getting this error message when building project? - Closed Deleted project

bkruegbkrueg Member ✭✭
edited February 21 in Xamarin.Forms

Severity Code Description Project File Line Suppression State
Error XARDF7023: System.IO.DirectoryNotFoundException: Could not find a part of the path 'MediaSessionCompat_OnActiveChangeListenerImplementor.class'.
at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound, WIN32_FIND_DATA& data)
at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost)
at Xamarin.Android.Tasks.RemoveDirFixed.RunTask() 0


  • LeonLuLeonLu Member, Xamarin Team Xamurai

    Does this error come from a new project or an existed project? If this issue comes from a new project, update your VS to the latest version and click the Repair selection in the VS installer. If this issue comes from an existed project, please share related code or a simple demo to reproduce this issue.

    Xamarin forums are migrating to a new home on Microsoft Q&A!
    We invite you to post new questions in the Xamarin forums’ new home on Microsoft Q&A!
    For more information, please refer to this sticky post.

  • bkruegbkrueg Member ✭✭

    I updated VS to the newest version and I did the Repair. I restarted the computer and restarted VS. When I opened the project and ran Debug I got the same message.
    Is it because I have Windows included as a project?

  • LeonLuLeonLu Member, Xamarin Team Xamurai

    You can try to remove the included project, Right-click your Android project, set it as startup project, if you have same issue. And create a new project, is this issue still existed?

  • bkruegbkrueg Member ✭✭

    If I start a new project with only Android and IOS, and set android as the startup project it works just fine.
    I also tried deleting Windows from the other project and I still get the error message.
    Is there a way to reinstall or repair the Universal WIndows Platform development workload as I am thinking that is the problem.

  • LeonLuLeonLu Member, Xamarin Team Xamurai

    If you want to repair, you can choose repair selection.

    if you want to reinstall it, please open your VS installer, click the Modify, unselect Universal WIndows Platform development, then click the Modify,

  • bkruegbkrueg Member ✭✭

    I uninstalled the Universal WIndows Platform workload, rebooted, and then reinstalled the Universal Windows Platform and I am no longer getting that error message.
    1) How do you set the Android Target Framework globally so that I don't have to change it every time I create a new project?
    2) How do I update the Nuget Solutions globally so I don't have to update in every new project?
    Thank you LeonLu for your assistance you have been very helpful.

Sign In or Register to comment.