Bug 10050 - Resources.String not including Resources / Values / Strings.xml Element
Summary: Resources.String not including Resources / Values / Strings.xml Element
Status: RESOLVED FEATURE
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 4.4.x
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-02-05 12:12 UTC by john gnazzo
Modified: 2016-09-14 07:28 UTC (History)
3 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:
RESOLVED FEATURE

Description john gnazzo 2013-02-05 12:12:37 UTC
Want to capture the application version information (android:versionName  in AndroidManifest.XML file) at run-time.
Uaing MonoDevelop 3.1.1
Added line to Resources / Values / Strings.xml file
<string name="AppVersion">@string/versionName</string>

Then tried to set variable in 
Pigout.App.Version = Resources.GetString(Resource.String.AppVersion); 

AppVersion was not recognized as part of Resources.String

I am thinking this is a bug.

Thanks in advance for your help.

P.S. Here are my environment settings:

MonoDevelop 3.1.1
Installation UUID: 8e48add1-e289-4ccd-8235-f4ce1be20fad
Runtime:
	Mono 2.10.9 (tarball)
	GTK 2.24.10
	GTK# (2.12.0.0)
	Package version: 210090011
Apple Developer Tools:
	 Xcode 4.5.2 (1847)
	 Build 4G2008a
Monotouch: 6.0.10
Mono for Android: 4.4.55
Android SDK: /Users/jgnazzo/Library/Developer/Xamarin/android-sdk-mac_x86
	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)
		4.1   (API level 16)
Java SDK: /usr
Xamarin.Mac: Not Installed
Build information:
	Release ID: 30101000
	Git revision: 5d928ec4f9d5864b4db04a1301b8a8649b43fb9d
	Build date: 2012-12-14 19:11:30+0000
	Xamarin addins: 80f2dcc8fe4ed316b3e77dde496fc33d90305047
Operating System:
	Mac OS X 10.8.2
	Darwin johns-MacBook-Pro.local 12.2.0 Darwin Kernel Version 12.2.0
	    Sat Aug 25 00:48:52 PDT 2012
	    root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64
Comment 1 Atsushi Eno 2016-09-14 07:28:25 UTC
Resource class only generates fields (or properties for libraries) from Android Resources. AndroidManifest.xml is not part of the "resources" and therefore you cannot retrieve values from AndroidManifest.xml from Resource class.