I upgraded to Xamarin ANdroid 6 this morning. I can no longer build our Android project from Visual Studio. I get a bunch of errors like the following:
>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Analysis.targets(43,2): error MSB3733: Input file "obj\Android\Debug\android\AndroidManifest.xml" cannot be opened. Could not find a part of the path 'C:\Users\jason\Documents\code\criticalarc\Source\Libraries\Core\obj\Android\Debug\android\AndroidManifest.xml'.
5>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Analysis.targets(43,2): error MSB3733: Input file "obj\Android\Debug\android\AndroidManifest.xml" cannot be opened. Could not find a part of the path 'C:\Users\jason\Documents\code\criticalarc\Dependencies\Intrinsic\Source\Libraries\Core\obj\Android\Debug\android\AndroidManifest.xml'.
Visual Studio 2015
=== Xamarin Studio ===
Version 5.10 (build 871)
Installation UUID: b869ac57-6046-4852-9973-745466356a21
Microsoft .NET 4.0.30319.42000
GTK+ 2.24.23 (MS-Windows theme)
=== Xamarin.Profiler ===
=== Xamarin.Android ===
Version: 6.0.0 (Business Edition)
Android SDK: C:\Users\jason\AppData\Local\Android\android-sdk
Supported Android versions:
2.3 (API level 10)
4.0.3 (API level 15)
4.4 (API level 19)
5.0 (API level 21)
5.1 (API level 22)
6.0 (API level 23)
SDK Tools Version: 24.4
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 23.0.1
Java SDK: C:\Program Files (x86)\Java\jdk1.7.0_71
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) Client VM (build 24.71-b01, mixed mode, sharing)
=== Xamarin Android Player ===
=== Build Information ===
Release ID: 510000871
Git revision: 4e9c5abb5ffdae12ba02ac49da83f8b2011dbb88
Build date: 2015-11-12 07:16:34-05
Xamarin addins: 55007ed0e56436f385d8e26394a45be563abc7e8
Build lane: monodevelop-windows-cycle6
=== Operating System ===
Windows 10.0.10240.0 (64-bit)
I get the same error on class library projects referenced by an Android app.
Turning-off code analysis successfully works-around the issue as well as tampering with the Xamarin.Android.Analysis.targets MSBuild file to not look for the nonexistent AndroidManifest.xml file in library projects.
29>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Analysis.targets(43,2): error MSB3733: Input file "obj\Android\Debug\android\AndroidManifest.xml" cannot be opened. Could not find a part of the path 'C:\TFS\Research\DRR\Systems\TELS\Offline Asset Upload\Messaging\Forms\obj\Android\Debug\android\AndroidManifest.xml'.
Moving the bug to the Xamarin Android product, as it's an issue on the build targets there.
This way the Android team can track it.
Thanks for reporting!
JonP/Dean: Please feel free to ping us if you need anything else from our side.
@Jason / @Daniel is there any chance you could provide a project which reproduces this behavior?
Also if possible please attach full diagnostic msbuild output, as this will likely provide more insight into why this error is being thrown
Created attachment 14307 [details]
Simple solution that reproduces the issue
This solution reproduces the issue.
Thanks for posting the repro! You beat me to it. :)
It's a default Xamarin Android project with a default class library added.
It will immediately fail if you try to run code analysis but I've also added the following to the project file so code analysis is run on build.
I have replicated this issue :)
This problem is the Analysis Target is running but the SignAndroidPackage target has not been so the required files are not in place..
Investigating why the SignAndroidPackage target is not running.
I had success whith downgrading to Xamarin.VisualStudio_3.11.1589 to make my builds work again. Of course downgrading might break other stuff but until xamarin resolves this is one way to work around the issue.
The work around for now is to disable CodeAnalysis on the Android project
That should work until we can fix the test to actually run the SignAndroidPackage target
*** Bug 37669 has been marked as a duplicate of this bug. ***
Fix in monodriod/master/14640e3a
This will fix this issue on Windows. For a Mac fix we still need to wait for the mono bump which includes XmlPeek which was committed in mono/master/86522f62.
@Dean Could we put up a PR for this for inclusion in mono 4.3.2? If/when that's accepted, let's bump monodroid to point to that.
I find Comment #13 and Comment #14 somewhat confusing, because mono/master/86522f62 dates to November 26, 2015, and was merged to master on December 1, 2015 (commit mono/40d516ff), and (as per `git log origin/mono-4.3.2-branch`) mono/40d516ff is already part of mono-4.3.2-branch.
The XmlPeek commit is *not* in mono-4.2.0-branch, nor in mono-4.3.1-branch or mono-4.3.0-branch.
What *system mono* is slated for Cycle 7?
As far as I know, mono-4.3.2 is the mono that will be shipping everywhere.
You didn't correctly implement XmlPeek. It's missing registration in in the appropriate .tasks files.
 Files like mcs/tools/xbuild/data/*/Microsoft.Common.tasks
A PR has been submitted for this mono/pull/2598
Fixed in mono/master/96cd1c9e9f
Cheery picked to mono/mono-4.3.2-branch/17fda960
I am able to reproduce this issue at my end both on Mac and Windows XS, VS.
build Output Windows XS: https://gist.github.com/Abhishekk360/fc3030d076bb050e0bde
Builld Output Windows VS: https://gist.github.com/Abhishekk360/ceddbdbb4539fe9d80f6
While reproducing this issue on Mac XS getting "Error initializing task XmlPeek"
build Output Mac XS: https://gist.github.com/Abhishekk360/131fe2b65f86dcadbd2b
To Verify this issue, I have checked this issue with the latest master build and C7 mono.
The attached sample is working fine. I am successfully able to build the application on VS 2015.
Build Output: https://gist.githubusercontent.com/Abhishekk360/cec509452b2aac2706dc/raw/bf4c94d11fae90b0e1de34c987d1d4fa2223504b/build%2520output
Build Output: https://gist.github.com/Abhishekk360/ffa130438c018a38e6a9
Build Output: https://gist.github.com/Abhishekk360/c70dd71cb048c5608772.
I have checked this issue with the latest C7 build both Mac and Windows Environment
Build Output: https://gist.github.com/Abhishekk360/068cf394f6b97f8ad4c579f9b88c5c91
Screencast for XS: http://www.screencast.com/t/tDloW1XqY
Build Output for XS: https://gist.github.com/Abhishekk360/10016a871152cc0214076e450d65630e
Screencast for VS: http://www.screencast.com/t/1mppE32jH
Build Output for VS: https://gist.githubusercontent.com/Abhishekk360/59e5a682ff01ffe59306813de5cffbe6/raw/77a5a7ffab4602a0c1c70e4397d2c0bf6931d87b/build%2520output%2520vs
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 Links.
Create a new report for Bug 36183 on Developer
Community or GitHub if you have new information to add and do not yet see a matching
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
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.