This appears to be the same issue as #2975
The "References" parameter is not supported by the "XamlGTask" task.
The "XamlGTask" task could not be initialized with its input parameters.
I believe it has to do with the mis-matching version of Xamarin.Forms used by projects. I am using Xamarin.Forms 4.0 and I depend on SkiaSharp.Views.Forms, which depends on 3.3.
This works on Windows, see the PR in the links.
Observe issue.
The project should compile, regardless of the dependency of SkiaSharp.
Somehow something is getting mixed up and cont compiling.
Example project: Archive.zip
this indicates you have references to multiple forms versions in your solution. We should fail more gracefully, but I have to check if that code was already present in 3.3
Finally got around this error. Visual Studio for Mac does not exclude/unload projects that were excluded/unloaded in Visual Studio 2017 on Windows. This causing an old Test project to load which referenced an older version of Xamarin Forms.
Please make this error more helpful!
This bug is driving my insane. It has been there for years and years now. Every time you open a project you have not been using for some time, you have to close and clean and close and remove obj and bin folders manually, and if you are lucky it will suddenly work (for awhile).
Today I think I used 80% of my time getting the build system to work and 20% actually coding. I do think, I need to change to JetBrains Rider and see if that is better. Else changing away from Xamarin.Forms is something I have to consider.
This is beginning to be ridiculous...
To be a little more constructive. It has something to do with iOS and Droid in the same project. If I unload the Droid project, I always get this error. If Droid is loaded and I clear "bin" and "obj" folders, I have to click on "Rebuild All" in the menu. If I click on the "Run" og just try to build the iOS project I get this error. So Rebuilding all first and then Run. That is where I get the best result and not getting this error. (But not always)
I also have this problem very regularly for production apps. My workaround has been to nuke the whole cached package folder (where ".targets" resides) and either reinstall the Xamarin.Forms package from scratch or sometimes the build will rebuild the lib and build folders where the problem occurs
The problem also occurs with us! Is very critical for us, because we build a version (hotfix) for our Productive Live App every 2 days. Something must definitely happen here, we can't reinstall Forms every week. With us this occurs with the current 4.5 - version. @samhouts Can you push the problem again or add it to the build pipeline?

@Coruscate5 @MickLesk What version(s) of Visual Studio do you use? Thanks!
Most helpful comment
This bug is driving my insane. It has been there for years and years now. Every time you open a project you have not been using for some time, you have to close and clean and close and remove obj and bin folders manually, and if you are lucky it will suddenly work (for awhile).