I’m trying to set the Application version for my MonoTouch project, but it doesn’t seem like I have found the right location.
I’ve tried setting the version to 2.0.0 under:
-
the Solution>General>Main Settings>Version field
-
the Project>General>Main Settings>Version field (which can inherit from the solution)
-
the Info.plist>iOS Application Target>Version field
If I check the version using
string currentVersion = NSBundle.MainBundle.InfoDictionary["CFBundleVersion"].ToString();
I only ever get back 1.0 as the version. Am I missing a place to set the application version, or do I need to use a different method for checking the BundleVersion?
Here is the version info I am running
MonoDevelop 3.0.5
Installation UUID: 554868b3-3202-4955-bf88-38a3e5949a79
Runtime:
Mono 2.10.9 (tarball)
GTK 2.24.10
GTK# (2.12.0.0)
Package version: 210090011
Apple Developer Tools:
Xcode 4.5.1 (1842)
Build 4G1004
Monotouch: 6.0.6 (Evaluation)
Doing the same change in my own
Info.plistfile works perfectly with the code you provided, i.e. I do get the expected2.0.0string. I also tried it inside the iOS simulator since you’re using the evaluation version.I do have newer versions of the softwares – but they are not very different and I do not recall anything changed in those area.
Can you look (and maybe add it in your question) the content of your
Info.plist? it should be an XML file (default format used by MonoDevelop) and should have your2.0.0string inside it.If that does not work please zip a small sample that do so and attach it to a bug report as there might be something that does not, always, get updated ?!?