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.
This morning I opened up Xamarin Studio and it automatically updated Android to 4.6.2. After doing so the code I had that compiled fine yesterday no longer compiled, as it couldn't find a resource in a library.
So, I created a blank solution called LibraryTest with two projects - LibraryTest (an Android Application) and LibraryTestLibrary (an Android Library). I added a reference to LibraryTestLibrary to LibraryTest and chose "Rebuild all". Without typing even a single line of code it failed to compile, giving me the error:
'Library.Resource.String' does not contain a definition for 'library_name'
on the following line in Resource.designer.cs
LibraryTestLibrary.Resource.String.library_name = LibraryTest.Resource.String.library_name;
I'm using Windows 7 64-bit. Below is a copy of the About dialog from Xamarin Studio:
=== Xamarin Studio ===
Version 4.0.3 (build 13)
Installation UUID: c1db51a3-86d8-4052-bb98-70043a95ae41
Microsoft .NET 4.0.30319.18034
=== Xamarin.Android ===
Version: 4.6.2 (Starter Edition)
Android SDK: C:\Users\David.Wright\AppData\Local\Android\android-sdk
Supported Android versions:
2.1 (API level 7)
2.2 (API level 8)
2.3 (API level 10)
3.1 (API level 12)
4.0 (API level 14)
4.0.3 (API level 15)
Java SDK: C:\Program Files (x86)\Java\jdk1.6.0_39
=== Build Information ===
Release ID: 400030013
Build date: 2013-03-21 15:53:00Z
Xamarin addins: 906a1edff23bcfd0ab7518463620a8ee506eaea2
=== Operating System ===
Windows 6.1.7601.65536 (64-bit)
For now, I've managed to make it work by creating a separate C# file in the Resources folder called ResourceHack.cs which looks like this:
public partial class Resource
public partial class String
public const int library_name = 2130968578;
Obviously this is only a temporary workaround though.
Seeing same issue on Mac for me. Others are seeing this per http://forums.xamarin.com/discussion/3066/app-resource-string-does-not-contain-a-definition-for-library_name.
Could you try 4.7.x in the alpha channel? It reportedly fixes such resource issues.
4.7.2 seems to have fixed it. Thanks!
Fixed in monodroid/bs1/f9e70f3f.
This should be fixed in the 4.6.4 stable release.