Bug 39910 - State Error CS0117 'Resource.Attribute' does not contain a definition for 'actionBarSize'
Summary: State Error CS0117 'Resource.Attribute' does not contain a definition for 'ac...
Status: VERIFIED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 7.0 (C8)
Hardware: PC Windows
: High normal
Target Milestone: 7.1 (C9)
Assignee: dean.ellis
URL:
Depends on:
Blocks:
 
Reported: 2016-03-25 13:47 UTC by sazkar
Modified: 2016-12-01 11:29 UTC (History)
36 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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.

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.

Related Links:
Status:
VERIFIED FIXED

Description sazkar 2016-03-25 13:47:27 UTC
I get the two following Errors with the new release version of xamarin.Form 
State Error	CS0117 'Resource.Attribute' does not contain a definition for 'actionBarSize'
Error "aapt.exe" exited with code -1073741819. Xamarin.Droid	C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets	1214

the Error Occurs in Resource.designer.cs file 

public static void UpdateIdValues()
		{
		global::Xamarin.Forms.Platform.Android.Resource.Attribute.actionBarSize =   global::Xamarin.Droid.Resource.Attribute.actionBarSize;
		}

is there any solution for this ?
Comment 1 Neno 2016-04-01 14:38:52 UTC
+1, I have the same issue.
Comment 2 Vincent van Wijk 2016-04-13 07:58:08 UTC
+1 also have exact the same issue
Comment 3 FreakinYahoo 2016-04-15 19:52:37 UTC
Same here.  Is there a workaround in the meantime?
Comment 4 kyluke.m 2016-04-16 05:56:11 UTC
Same problem here.

Running:

Xamarin Studio Community
Version 5.10.3 (build 51)
Comment 5 Michael Ribbons 2016-04-21 03:38:05 UTC
Different error here, same solution:

http://stackoverflow.com/a/36759115/3739540

For me this was caused by killing VS during the initial build of my first Xamarin project after a reinstall.

It looked as though the process had hung, but apparently it was downloading from google at a slow rate.

Quit Visual studio

Delete / rename c:\Users\username\AppData\Local\Xamarin

Open the solution again

Compile, wait until it finishes completely.

On Windows, use Resource Monitor to determine if a download is in progress.

MSBuild will be downloading from something.1e100.net.

It would be nice to have something in Output tab showing the fact that we are downloading...
Comment 6 siddhant1991 2016-04-27 17:30:08 UTC
Same issue after updating Android SDK Tools to 25.1.3 via SDK Manager & Xamarin.Forms to 2.2.0.31 via NuGet.
Michael Ribbons' solution didn't work for me. Resource Monitor did not show any downloads in progress. I didn't even find any image by the name MSBuild.
Comment 7 sazkar 2016-04-27 17:47:52 UTC
I'm still having this issue I tried  everything this bug has never been solved
Comment 8 sazkar 2016-04-27 17:51:37 UTC
Can anyone help from Xamarin side ? At least tell us if there is no solution for it.
Comment 9 cheuqar 2016-04-29 07:06:11 UTC
I am facing the same problem, after updating Xamarin Studio community to 5.10.3 (build 51) and Xamarin.Forms to 2.2.0.31, it show the error "mynamespace.Droid.Resource.Attribute" does not contain a definition for "actionBarSize"

I didn't change anything after upgrade, it really annoying me, hope Xamarin can reply asap.
Comment 10 siddhant1991 2016-05-02 11:45:51 UTC
I tried the solution provided by Michael Ribbons again, and it worked this time.
I am now being able to build and deploy Android applications.
Comment 11 mehdy 2016-05-03 16:25:28 UTC
Same issue in Xamarin Studio after updating Xamarin.Forms to 2.2.0.31
Comment 12 mehdy 2016-05-09 02:54:22 UTC
a week after a build breaking issue on stable channel and it's not even assigned!
Comment 13 cheuqar 2016-05-09 04:10:19 UTC
Michael Ribbons's solution does not work for me, I hope something done by the Xamarin team
Comment 14 David Strickland 2016-05-11 13:41:49 UTC
One additional step to Michael Ribbons solution.
After deleting the Xamarin Folder in App data. Open your solution and right click selecting Clean all. Then compile.

Last time I looked into this the Download process was VERY inefficient. It actually downloads the same multiple GB file 4+ times (if I remember correctly) So if you don't live in Land of Unlimited Bandwidth home of the arrogant and actually have a metered connection you may find compiling after an update to be a long and expensive process.
Comment 15 Reader Man 2016-05-15 23:01:39 UTC
The following is a workaround till we have a fix from XF team:

https://readerman1.wordpress.com/2016/05/11/xamarin-build-action-embeddedresource-is-not-supported-by-one-or-more-of-the-projects-targets

and please, it will be great if the error description is linked to a better informative link.
Comment 16 Reader Man 2016-05-15 23:03:54 UTC
This same bug, gives me 157 errors of the same style, in the .Droid project:

Error	CS0117	'Resource.Dimension' does not contain a definition for 'dialog_fixed_width_major'
Error	CS0117	'Resource.Attribute' does not contain a definition for 'mediaRouteSettingsDrawable'
Error	CS0117	'Resource.Dimension' does not contain a definition for 'design_tab_min_width'
Error	CS0117	'Resource.Dimension' does not contain a definition for 'dialog_fixed_height_major'
Comment 17 Shawn 2016-05-15 23:23:13 UTC
Same issue -- although I will sometimes see errors upwards of 450
Comment 18 rfreschi 2016-05-16 17:15:41 UTC
Same issue - seeing 151 CS0117 bad resource errors with 2 different 3rd party packages in 2 separate solutions.

Began after updating Android SDK to latest and Xamarin Forms to 2.2.0.31.

(All from the home of the arrogant)
Comment 19 Reader Man 2016-05-16 18:15:54 UTC
I just made a new Solution, upgraded to XF 2.2, then added Syncfusion xamarin tools, to the projects, and compiled, and it worked, with no errors.

but after some time, of adding and removing classes, .xaml files, namespaces and folders, then the resources problem came.
Comment 20 razon 2016-05-18 14:25:45 UTC
Any updates so far? This issue occured to today after updating to Xamarin.Forms 2.2. Michael Ribbons workaround didn't work for me.
Comment 21 mehdy 2016-05-18 15:10:56 UTC
two groups of users are getting this error:

1.caching issue: can be fixed with cleaning xamarin cache, cleaning up the solution and rebuilding. this is a xamarin issue not cleaning up the cache after reference upgrade.

2.third-party component issues, happens when you are using a component referencing old version of xamarin.forms android. like XLabs, Syncfusion ,..
This can only fixed by new release of component. for XLabs, XLabs.Forms Version 2.2.0-pre02 fixed it for me.
Comment 22 razon 2016-05-19 11:24:41 UTC
Thanks. Removing/ replacing third-party components worked.
Comment 23 Shawn 2016-05-29 10:57:05 UTC
Note sure if this helps however from what I can tell this issue seems to occur when there are multiple assemblies included in a Xamarin Forms project that were originally compiled against different Android support libraries.  This is most likely going to be a MAJOR issue considering the number of opensource libraries out there.
Comment 24 Lug Velez Schmitz 2016-05-30 04:36:56 UTC
The solutions for me was what Michael Ribbons said.

The compilation bar really needs to say that is downloading some stuff
Comment 25 faceoffers28 2016-06-01 16:10:45 UTC
This just started happening in my Xamarin.Forms 2.2.031 Android project. After my upgrade to XF 2.0..., everything was working just fine except the XLabs Camera (see this https://forums.xamarin.com/discussion/66403/xamarin-forms-android-app-crashing-due-to-xlabs-camera-code-after-upgrade-to-xamarin-forms-2-2-0-31#latest). I just added ZXing.Net.Mobile for Forms 2.0.1.47 and now I have 151 errors. I'm running 2.0.5782 of XLabs Core, IoC and Platform.

This is the first of 151 errors.
 Error CS0117:  FaceOffers.Droid.Resource.Attribute' does not contain a definition for mediaRouteSettingsDrawable' (CS0117) (FaceOffers.Droid)

All of the errors are contained in the FaceOffers.Droid.Resource area. 

XLabs is working to compile their packages to work with the latest Android support library, but I was asked to report my experience here, so the Xamarin folks would know.
Comment 26 Reinhard Sual 2016-06-01 22:10:11 UTC
No solution yet?

Still waiting for the same issue to be resolved...
Comment 27 dan@lexiconsystemsinc.com 2016-06-08 15:23:19 UTC
This is a serious blocking issue. I did a full Android SDK update and Xamarin update on the Stable channel. Clean and Build.
Comment 28 Sean Hoffman 2016-06-08 16:16:36 UTC
I am having the same issue as @facecoffers28.

I added the ZXing.Net.Mobile for Forms to my project and now I get 151 errors of the type Error CS0117:  FaceOffers.Droid.Resource.Attribute' does not contain a definition for mediaRouteSettingsDrawable' (CS0117) (FaceOffers.Droid)

SO far all of the work arounds have not done anything for me.
Comment 29 Giorgos Papadakis 2016-06-09 10:15:34 UTC
Same errors here, guys i beat you all i have 153 errors in my Resource.Designer.cs after adding ZXing.Net.Mobile

Severity	Code	Description	Project	File	Line	Suppression State
Error	CS0117	'Resource.Attribute' does not contain a definition for 'mediaRouteSettingsDrawable'	ThesisSFA.Droid	M:\ThesisSFA\ThesisSFA.Droid\Resources\Resource.Designer.cs	257	Active

Tried everything nothing works
Comment 30 E.Z. Hart [MSFT] 2016-06-10 20:31:23 UTC
Using the latest stable version of Xamarin.Forms (2.2.0.45), I've been able to reproduce the problem with ZXing.Net.Mobile.Forms version 2.0.4.46; with this combination, a large number of Resource.Attribute errors are generated. If I update the ZXing.Net.Mobile.Forms package to 2.1.0-beta1, the errors are resolved.

Using the latest stable version of Xamarin.Forms and the latest stable version of the XLabs packages (2.0.5782) I was able to reproduce this issue. Updating to the latest prerelease version of the XLabs packages (2.2.0-pre2) resolved the build errors (though I did have to clean the solution and manually delete the Resource.Designer.cs file before rebuilding). 

Is anyone still experiencing this issue with the package combinations mentioned above?
Comment 31 Jay Pedro 2016-06-13 21:41:18 UTC
Same issue here but I am not using XLabs. I am using the SignaturePad.Xamarin.Forms.PCL by Nathan Danner. Seems to be not compiled against the newest version of Android.
Comment 32 Mike 2016-06-22 00:01:32 UTC
Same for me.
Comment 33 Michael Ribbons 2016-06-23 07:25:41 UTC
I have just encountered this problem again.

This time I had tried to install Android Studio. I wanted to use the same adb as Visual Studio in Android Studio

(This is an option on the initial install screen, but I had to use mklink to get around the fact that VS installs Android sdk at Program Files (x86) - Android Studio doesn't like non alphanumeric characters.

Luckily I kept a backup of this folder first, and reverting it did help
c:\Program Files (x86)\Android\android-sdk

Others might need to reinstall Xamarin.

In addition to reverting this file I also had to clear the contents of 
MyProject\MyProject.Droid\Resources\Resource.Designer.cs 

This file isn't visible in VS, but you can get to it if there are errors to click on.

http://stackoverflow.com/questions/37984725/xamarin-android-resource-designer-errors-after-installing-android-studio/37984726#37984726 for props :)
Comment 34 Fredy Wenger 2016-06-23 10:53:24 UTC
Installed VS2015 Update 3 RC and created a new .forms project (based on shared). Installed the nuget-updates and now also have this problem:
Error	CS0117	'Resource.Attribute' does not contain a definition for 'actionBarSize'
Unbeleavable, that there is now answer from Xamarin since 2016-03-25 for such a blocking point!
Therefore, I have posted a thread in the forms forum.

https://forums.xamarin.com/discussion/69653/blocking-bug-resource-attribute-does-not-contain-a-definition-for-actionbarsize/p1?new=1
Comment 35 Fredy Wenger 2016-06-27 15:13:34 UTC
To the JDK 7, I had installed the version:
•Java SE Development Kit Update 55

After I have downloaded and installed
Java SE Development Kit Update 79

from: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

and rebooted my machine, this problem (an various further problems) has gone.
Comment 36 Shawn 2016-07-09 17:15:58 UTC
As of Xamarin Forms 2.3.0.107 - this problem still exists.

Note: I have tried building against multiple Android version from 4.0.4 up to 6.0 and all result int the same issue.
Comment 37 Mike 2016-07-09 17:52:29 UTC
I was able to resolve my issue by pulling the latest source from xlabs and building and manually referencing the dlls from my project, instead of using Nuget to add them.

-Mike
Comment 38 Shawn 2016-07-09 20:17:12 UTC
This issue has nothing to do with XLabs.  I have multiple projects that do not use XLabs that still have the issue.  As far as I can tell this is due to a NuGet packaging issue on Xamarin.Forms that has a HARD dependency on the Android Support Libraries v23.3.0 - if I FORCE an upgrade to v23.4.0 (by ignoring dependency validation), then everything compiles correctly.
Comment 39 john murray 2016-08-25 10:44:16 UTC
I would confirm this has nothing to do with xlabs or any other third party. I get the issue creating a brand new solution with hello world  - some 2400 errors saying resource not available. Tried all suggested workarounds including the weird ones (set timezone to West) JDK upgrades etc all to no avail. Simply cannot compile and run Android in XF
Comment 40 E.Z. Hart [MSFT] 2016-08-25 20:10:33 UTC
(In reply to john murray from comment #39)
> I would confirm this has nothing to do with xlabs or any other third party.
> I get the issue creating a brand new solution with hello world  - some 2400
> errors saying resource not available. Tried all suggested workarounds
> including the weird ones (set timezone to West) JDK upgrades etc all to no
> avail. Simply cannot compile and run Android in XF

John, 

Could you upload the hello world solution where you're seeing these errors as an attachment to this bug report? That might give us a clue as to what's going on.
Comment 41 john murray 2016-08-26 08:40:33 UTC
Hi
it seems to me to be a machine specific issue
1) any new project on this machine (machine A) displays the Resouce not found error
2) I have uninstalled VS2015 and Xamarin and reinstalled
3) NO third party libraries are involved 
4) I have installed latest Java   (I do suspect this ) 
tstarting a brand new 'Welcome to Xamarin" blank pcl app one immediately gets 1457 errors all like this 
Severity	Code	Description	Project	File	Line	Suppression State
Error	CS0117	'Resource' does not contain a definition for 'Animation'	nGar10c2.Droid	c:\users\john\documents\visual studio 2015\Projects\nGar10c2\nGar10c2\nGar10c2.Droid\Resources\Resource.Designer.cs	29	Active


Severity	Code	Description	Project	File	Line	Suppression State
Error	CS0117	'Resource.Attribute' does not contain a definition for 'actionBarDivider'	nGar10c2.Droid	c:\users\john\documents\visual studio 2015\Projects\nGar10c2\nGar10c2\nGar10c2.Droid\Resources\Resource.Designer.cs	43	Active

Severity	Code	Description	Project	File	Line	Suppression State
Error	CS0117	'Resource.Attribute' does not contain a definition for 'actionDropDownStyle'	nGar10c2.Droid	c:\users\john\documents\visual studio 2015\Projects\nGar10c2\nGar10c2\nGar10c2.Droid\Resources\Resource.Designer.cs	55	Active

------------------------------

If one tries to view the project properties of the Android project the following error occurs when trying to load the build tab

An error occurred trying to load the page.
Unable to cast COM object of type 'System.__ComObject' to interface type 'IAssemblyCache'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{E707DCDE-D1CD-11D2-BAB9-00C04F8ECEAE}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).


nevertheless one can transport the solution to another virtually same PC with VS and Xam installed and after an error saying "package androidfd.support.v7.widget.RecyclerView.ItemAnimator does not exist" one can get it to compile after updating nuget packages and can run it on the Android emulator

  (interestingly Xamrin Studio is NOT installed on the second machine) 

zip file attached  please note these errors occur with ANY new project created on this configuration and please note that a clean reinstall has been carried out twice.
Comment 42 andrii.kozhyn 2016-09-08 14:11:05 UTC
Errors started to occur after installing `Xamarin.Android.Support.Design` package. Before that solution works without any issues. Rolling back changes made by nuget during package install also resolves an issue.
Comment 43 Jonathan Pryor 2016-09-08 16:34:07 UTC
Would it be possible for anyone to provide a minimal repro case for this?
Comment 44 jandavid.staerk 2016-09-12 12:22:59 UTC
Facing the same problem.. I think it is caused by updating Xamarin.Android.Support.Design. Here is the CS0117 error appeared at my solution: 

- Opend NuGet: Project.Droid
- --> Updates, select all packages
- --> Let it update
- --> Trying to build 
--> Failed

119 Errors in total, most of them look similar to this one:
C:\Users\theUser\Documents\Visual Studio 2015\Projects\MyProject\MyProjectH\MyProject.Droid\Resources\Resource.Designer.cs(1446,118,1446,137): error CS0117: 'Resource.Styleable' does not contain a definition for 'Theme_windowNoTitle'

*Sad face*
Comment 45 Shawn 2016-09-23 20:20:25 UTC
So is it safe to assume that this is NEVER going to be fixed and that we just need to give up on developing on the Android platform? :)
Comment 46 Jay Kannan 2016-09-26 10:07:55 UTC
@Shawn 

"This issue has nothing to do with XLabs.  I have multiple projects that do not use XLabs that still have the issue.  As far as I can tell this is due to a NuGet packaging issue on Xamarin.Forms that has a HARD dependency on the Android Support Libraries v23.3.0 - if I FORCE an upgrade to v23.4.0 (by ignoring dependency validation), then everything compiles correctly."

How did you do this?
Comment 47 dean.ellis 2016-09-26 12:23:29 UTC
It will be fixed :) We just need to get a solid repo so we can debug whats happening. or someone to post a full diagnostic out of the problem build.

To me it looks like the resources are not being downloaded correctly for Xamarin.Android.Support.Design. Or there is an incompatibility with the packages already being used. Probably Xamarin.Forms referencing code that no longer exists in the newer android support packages.
Comment 48 Jay Kannan 2016-09-26 12:42:29 UTC
It's fairly easy to reproduce, just create a Xamarin forms project and add Xlabs to the Android packages, initialize and draw a control
Comment 49 Shawn 2016-09-26 12:47:40 UTC
Its even easier :) Take an app that was created with an older version of Xamarin Forms and upgrade it - 99% of the time it will break with the same errors.
Comment 50 dan@lexiconsystemsinc.com 2016-09-26 14:16:37 UTC
Shawn's comment describes it perfectly. I would add that an older version of XLabs is also in the mix in our case.  Can't upgrade XLabs without breaking the build and can't upgrade X.Forms either.  I can't provide the client repo due to NDA. The workaround was to leave everything alone - which is obviously a short-term fix.
Comment 51 dan@lexiconsystemsinc.com 2016-09-26 14:26:25 UTC
Our configuration:

   Xamarin.Forms 2.0.0.6484
   Xamarin.Maps  2.0.0.6484
   XLabs 2.0.5782
   Xamarin.Android.Support.v4 23.0.1.3
   Xamarin.Android.Support.v7 23.0.1.3

Attempts fail to upgrade to Xamarin.Forms 2.3
Comment 52 David Strickland 2016-09-27 07:12:59 UTC
Well using XLabs nuget package is likely not a good idea in any project. Grab the code you need out of the xlabs github and use that. The size and number of references in the XLabs Stack is going to be problematic.

Beyond that:

I get this error about once or twice a week. A reference or an updated package or even just a bad compile. It seems to basically be a catch all for any error in the reference stack on Android. So yes I'd expect it'll get fixed... about 3 complete system rewrites from now when we no longer rely on the android SDK.

In the meantime the steps I currently take to fix this: 

1: Clean solution and rebuild.
2: Restart VS, goto 1
3: Reboot, Goto 1
4: Manually Delete all Bin and Obj Folders and Packages folder Goto 1
5: Remove 1 Nuget Package, Comment out any code that uses them Goto 1
6: When the error disappears readd the nuget package causing the issue and downgrade it to a previous version.
7: If the error never disappears or if I get the error in an empty solution then.  Delete Android SDK Folder. Reinstall all Android Packages from the Android Package manager.

I guess that is basically my diagnostic stack for any of the various ambiguous errors I've been getting attempting Xamarin development over the last year.
Comment 53 David Strickland 2016-09-27 07:16:40 UTC
One additional Note: NEVER cancel a Xamarin build that seems to be locked up. You'll most likely end up blowing up you environment 9 times out of 10 its "locked up" cause its pulling down a new Android SDK. If you cancel the SDK will be half installed and result in this error.
Comment 54 dean.ellis 2016-09-27 08:09:15 UTC
This looks mostly like a miss match in dependencies. 

For example Xamarin.Forms version 1 depends on resources in Android.Support version 4.
Android.Support version 5 comes out and google have removed one of the resources that was in version 4 (they do that allot). 
So if you now upgrade Android.Support 4 to v5 it not longer compiles because the resources Ids that Xamarin.Forms v1 no longer exist. i.e the compiled code doesn't contain the static field that it once did. 

We might be able to do something with the code that generates the Resource.Designer.cs file to check that both sides of 

global::Xamarin.Forms.Platform.Android.Resource.Attribute.actionBarSize =   global::Xamarin.Droid.Resource.Attribute.actionBarSize;

exist before emitting the code. That might help with the compile issue but it would probably introduce other errors at run time when the app tries to access 'actionBarSize' and the value is totally wrong and you get a different/non existent resource.

The other thing to try is when you want to upgrade Xamarin.Forms, just upgrade that one package not all the packages. 
 
If you get into this kind of problem the only work around I can think of would probably be to remove all the packages and then add just the latest Xamarin.Forms back, it should then get the exact dependencies it needs.
Comment 55 Michael Ribbons 2016-09-28 01:24:27 UTC
dean.ellis@xamarin.com:

I had this issue with a fresh Xamarin project, before I had attempted to update any projects.

If you look back to my earlier comment (https://bugzilla.xamarin.com/show_bug.cgi?id=39910#c5), you can see that the issue was caused by terminating VS before it had time to download the Xamarin components on the intial build, restarting VS, then attempting to build again.

At one stage I did have the actionBar error and this solved it too.

I think the fact that the error message was different may be caused by the fact that the download to c:\Users\username\AppData\Local\Xamarin was terminated/failed at a different point.

How about setting up a build task to verify that the download is complete? Include some hashes in the nuget packages or something. There might have to be hashes for the android SDK projects if davidstrickland0@hotmail.com is right

Maybe there are multiple causes for the same bug as others have stated. It might be beneficial to start solving potential causes in order to rule them out.

Given my situation this wouldn't help as the licensing model for Xamarin prevents me from updating until I need to, because I don't want to pay if I don't have to. Others may be in the same boat.
Comment 56 dean.ellis 2016-09-28 08:38:25 UTC
The issue with broken downloading of google packages will be fixed in the next major release. We implemented a system where it will detect a partial download and resume it if it can [1], we will also be updating the messages. In addition we implemented ICancelableTask on that Task which should stop the VS UI locking up if you try to cancel the build during the download. 

We included Hashes in the downloads to check the zips are valid [2]. However that will only apply to newer versions of the Android.Support style Nugets.

That said there are still issues with Nuget package versioning, mostly because things like Xamarin.Forms require specific versions of the support libraries. And it doesn't help when resources are removed from newer google packages.

[1] https://github.com/xamarin/xamarin-android/blob/master/src/Xamarin.Android.Build.Tasks/Tasks/GetAdditionalResourcesFromAssemblies.cs#L226
[2] https://github.com/xamarin/xamarin-android/blob/master/src/Xamarin.Android.Build.Tasks/Tasks/GetAdditionalResourcesFromAssemblies.cs#L118
Comment 58 John Miller [MSFT] 2016-10-05 19:26:33 UTC
The attached sample does reproduce the issue. However, if you update the ZXing.Net.* packages to the latest versions, the issue goes away.
Comment 59 dean.ellis 2016-10-06 14:20:42 UTC
Hey

I've been working on a tweak to the code that Generates the Resource.Designer.cs file. What I'm planning is that we check that the target field exists before emitting the line to update it in the Designer. We will also emit a warning about checking nuget package versions. But the app will compile and run so it should not block people when they hit this issue.

Its possible that runtime issues might occur if certain resource id's a) do not exist or b) have the wrong id..

For those of you interested in looking at the proposed changes the PR is available for viewing here https://github.com/xamarin/xamarin-android/pull/252
Comment 60 dean.ellis 2016-10-13 15:24:19 UTC
Fixed in xamarin-android/master/752a25f3
Comment 61 Saurabh 2016-11-10 12:00:28 UTC
I can also reproduce this Issue with test case mentioned in comment#57 using builds (XS 6.1.1.15 + XVS 4.2.0.719). This is the build output for the same: https://gist.github.com/Prashant360/fbfe60d72e9fb0b272f1b25a687150a8

I have checked it with latest master build (6.3.0.20 + XVS 99.1.0.23), project getting build and deployed successfully. 
Build Output: https://gist.github.com/Prashant360/64c6c2aee6b5756ce876793a84100af5 

Also working fine with latest Cycle 9 builds (XS 6.2.0.1369 + XVS 4.3.0.251). Build output: https://gist.github.com/Prashant360/2ea04f4bc339a09afb404357f3e53a1e