WordPress database error: [INSERT, UPDATE command denied to user '51213-2'@'10.10.20.86' for table 'wp_options']
INSERT INTO `wp_options` (`option_name`, `option_value`, `autoload`) VALUES ('_transient_doing_cron', '1714541134.4263548851013183593750', 'yes') ON DUPLICATE KEY UPDATE `option_name` = VALUES(`option_name`), `option_value` = VALUES(`option_value`), `autoload` = VALUES(`autoload`)


Warning: Cannot modify header information - headers already sent by (output started at /home/lexiqued/www/WordPress/wp-includes/wp-db.php:1502) in /home/lexiqued/www/WordPress/wp-includes/feed-rss2-comments.php on line 8
Comments on: WP7 : how to get the version number of my application ? http://www.jonathanantoine.com/2011/11/07/wp7-how-to-get-the-version-number-of-my-application/ Yet another blog about... Thu, 22 Nov 2012 11:27:07 +0000 hourly 1 https://wordpress.org/?v=5.5.3 By: jitendra http://www.jonathanantoine.com/2011/11/07/wp7-how-to-get-the-version-number-of-my-application/comment-page-1/#comment-15775 Thu, 22 Nov 2012 11:27:07 +0000 http://www.jonathanantoine.com/?p=787#comment-15775 Thanks, i got the version….

]]>
By: jmix90 http://www.jonathanantoine.com/2011/11/07/wp7-how-to-get-the-version-number-of-my-application/comment-page-1/#comment-8109 Sat, 19 May 2012 08:36:52 +0000 http://www.jonathanantoine.com/?p=787#comment-8109 In reply to PaulW.

Sorry, I don\’t know VB 🙁

]]>
By: PaulW http://www.jonathanantoine.com/2011/11/07/wp7-how-to-get-the-version-number-of-my-application/comment-page-1/#comment-8079 Fri, 18 May 2012 16:08:39 +0000 http://www.jonathanantoine.com/?p=787#comment-8079 What would this look like in VB? I am having difficulty getting my code to recognize GetExecutingAssembly(), etc. I have an import for System.Reflection.

Thanks…

]]>
By: jmix90 http://www.jonathanantoine.com/2011/11/07/wp7-how-to-get-the-version-number-of-my-application/comment-page-1/#comment-750 Mon, 07 Nov 2011 16:29:41 +0000 http://www.jonathanantoine.com/?p=787#comment-750 In reply to southernsun.

As pointed out in the last line of my post 😉

]]>
By: southernsun http://www.jonathanantoine.com/2011/11/07/wp7-how-to-get-the-version-number-of-my-application/comment-page-1/#comment-749 Mon, 07 Nov 2011 15:36:05 +0000 http://www.jonathanantoine.com/?p=787#comment-749 you should also consider using State variables to store the initial result so you don't need to call this CPU extensive call again when you need the version number again. That's why the GetVersionFromManifestFile() is private and the GetVersion() is exposed to the user. This way it will try to get the Version number from the State variables and otherwise retrieve it from the manifest file.

]]>
By: jmix90 http://www.jonathanantoine.com/2011/11/07/wp7-how-to-get-the-version-number-of-my-application/comment-page-1/#comment-748 Mon, 07 Nov 2011 15:29:12 +0000 http://www.jonathanantoine.com/?p=787#comment-748 In reply to MBi.

Hello,

Thank you for your addition. It works fine and avoid parsing string but I think that creating the new AssemblyName do some other checks(see the remarks: http://msdn.microsoft.com/en-US/library/b6ccxba0(… which may cost more in performance ?

Regards,

]]>
By: jmix90 http://www.jonathanantoine.com/2011/11/07/wp7-how-to-get-the-version-number-of-my-application/comment-page-1/#comment-747 Mon, 07 Nov 2011 15:27:25 +0000 http://www.jonathanantoine.com/?p=787#comment-747 In reply to southernsun.

Thank, you this is nice too 🙂

]]>
By: MBi http://www.jonathanantoine.com/2011/11/07/wp7-how-to-get-the-version-number-of-my-application/comment-page-1/#comment-746 Mon, 07 Nov 2011 14:42:41 +0000 http://www.jonathanantoine.com/?p=787#comment-746 I'd rather avoid string operations:

Version assemblyVersion = (new AssemblyName(Assembly.GetExecutingAssembly().FullName)).Version;

]]>
By: MBi http://www.jonathanantoine.com/2011/11/07/wp7-how-to-get-the-version-number-of-my-application/comment-page-1/#comment-745 Mon, 07 Nov 2011 14:37:53 +0000 http://www.jonathanantoine.com/?p=787#comment-745 I think the following is more accurate:

AssemblyName assemblyName = new AssemblyName(Assembly.GetExecutingAssembly().FullName);

string assemblyVersion = assemblyName.Version.ToString();

]]>
By: southernsun http://www.jonathanantoine.com/2011/11/07/wp7-how-to-get-the-version-number-of-my-application/comment-page-1/#comment-741 Mon, 07 Nov 2011 13:14:19 +0000 http://www.jonathanantoine.com/?p=787#comment-741 Hi J, you can also just get this information from the WMManifest file. I created the following code based on an original example from Jeff Wilcox:

See GetVersionFromManifestFile() in
http://northernlights.codeplex.com/SourceControl/

This option doesn't care in which assembly you store your function. It will always read your main source, the WMManifest file.

]]>