Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Description of Problem:
Can build Android project on a MAC but the same project does not build on 2 different PCs using XS. Have reinstalled XS on one machine and still issues exists, please help.
C:\dev_xam\MyTAS\app\Droid\Services\GCM.cs(17,17): Error CS0012: The type 'System.Threading.Tasks.Task' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Threading.Tasks, Version=184.108.40.206, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. (CS0012) (MyTAS.Droid)
Please note the project used to build OK on a pc about 8 weeks ago and after building ok on Mac I brought it back to PC and it no longer builds (various XS updates in the meantime)
I tried to recreate the project from scratch on PC but still have the issue
Can you attach a sample project that recreates this issue, or the project itself? Also, could you attach the full, diagnostic, build output and IDE logs (Help | Open log directory) please.
Created attachment 12935 [details]
Showing the issue as presented to me
Notice the red crosses - are they normal?
Created attachment 12936 [details]
Android Tools log
Android Tools log
Created attachment 12937 [details]
Created attachment 12938 [details]
various logs attached
Created attachment 12940 [details]
Build log with full diagnostics
One of the Xamarin Android team members looked over the log but wasn't able to tell immediately what was wrong. Are you able to repro the same failure by building from the cmdline?
can you capture that output as well and attach it?
(No, the red crosses are not normal, something is not right).
All I got was:
'msbuild' is not recognized as an internal or external command,
operable program or batch file.
Start one of the VS command prompt sessions that includes msbuild in the path, or specify the full path - (pretty sure it's something like C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe" but the exact path will depend on what version you have installed.
Could that be the issue? I don't have VS installed. Just trying to find msbuild.exe
Created attachment 13009 [details]
output from msbuild /v:diag
Not sure it will help given:
error XA9008: Building from the command-line requires aÿBusinessÿLicense.
Paul, is there any chance you could attach your project to this bug - mark it private - so that I can get one the Android team members to try an reproduce the issue. There appear to be a number of other similar bugs, including one you commented on (bug #27469) recently.
Created attachment 13026 [details]
The bad android project
Created attachment 13027 [details]
A (maybe) good version
My doing a diff with a working project I remove some stuff from the failing Android project file e.g
<Reference Include="System.Threading" />
and it now builds again :-)
I'm not 100% sure it is fixed as my Xamarin PLayer failed a while ago so does not run and deploying to device fails with the incompatible version but those are different issues.
Maybe you can add the bad lines back into a working project of yours and see if it causes it to fail again to really eliminate the project.
I'm reluctant to attach my full project as it is commercial (though if Xamarin offered a 'code review' service I'd definitely would!)
I can't recreate the issue simply by adding the reference to system.threading. You shouldn't need that in your android project.
However, I did manage to recreate all the references with the red crosses in them (including system.threading) by adding Automapper to a project.
I try would removing all those invalid references and see what happens.
On my PC XS removing and adding Automapper does not recreate the red crosses. I need to try the same on a MAC and then bring the resultant project to my PC to replicate what I did previously.
I think with the invalid references simply removed by hand it builds ok. Ta
Ok, glad you got it building.