I had to do some work on a Xamarin project I didn't create that is currently in production. I can build the app in Debug and Release on both Android and iPhone, as can anyone else who clones the repo. However, no one on my team has been able to successfully archive the app for publishing. Everyone gets the same error: Could not resolve this reference. Could not locate the assembly "Mono.Android". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
Question 1: Where exactly should Mono.Android exist on disk?
Could not locate the assembly "Mono.Android". Check to make sure the assembly exists on disk
In the projects .Droid folder in the references folder Mono.Android does exist but apparently this isn't enough. Where else should it exist if this is not the only place?
On Windows people say to look in something like C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid{VERSION NUMBER}\Mono.Android.dll but I am on Mac, so where might this be instead?
Question 2: Why exactly am I getting this error in the first place?
Whatever the problem is I don't understand why it would trigger when trying to archive only the .IOS project. As far as I know this shouldn't have anything to do with Mono.Android. I feel like I should only be getting this error when I try to archive the .Droid project.
Question 3: What solutions are there to this?
Requires minimum Android version: 6 (API level 23)
Target Android version: 9.0 (API level 28)
Everyone on the team is using VS for Mac.
I have confirmed that I have Android 9 Pie installed and with all it's packages. I have attempted to archive for publishing on both Visual Studio for Mac 2019 and 2022 but got the same result for each. I have had others on the team attempt the same.
I have attempted to re-reference Mono.Android but when I try to add a reference and I scroll down to Mono.Android the version is 0.0.0.0. Why would that be?
What am I missing and how do I get it?
If you need any additional information please ask and I'll do my best to share.