<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Display Assembly Version Information</title><link>https://www.infopathdev.com:443/forums/thread/50266.aspx</link><pubDate>Sat, 02 Jan 2010 13:37:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50266</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50266.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=50266</wfw:commentRss><description>&lt;p&gt;Reflection is great, no? Thanks for publishing the tip!&lt;/p&gt;</description></item><item><title>Display Assembly Version Information</title><link>https://www.infopathdev.com:443/forums/thread/50148.aspx</link><pubDate>Wed, 23 Dec 2009 17:52:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50148</guid><dc:creator>turfnsurf4me</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50148.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=50148</wfw:commentRss><description>&lt;p&gt;For anyone that&amp;#39;s interested....&lt;/p&gt;
&lt;p&gt;At times.....it&amp;#39;s nice to have the version number of your code displayed someplace for the purposes of quickly identifying the &amp;quot;build&amp;quot; of the&amp;nbsp;form. That is of course if you have managed code&amp;nbsp;associated with your form. Here&amp;#39;s one way of accomplishing this or how I implemented such a thing.&lt;/p&gt;
&lt;p&gt;In your code....&amp;nbsp; C#&amp;nbsp; you have to include the System.Reflection assembly such as...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;strong&gt;using System.Reflection&lt;/strong&gt;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I placed a textbox on my form and added the following code in&amp;nbsp;the FormEvents_Loading() event: &lt;/p&gt;
&lt;p&gt;&lt;br /&gt;XPathNavigator root = MainDataSource.CreateNavigator();&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Assembly a = Assembly.GetExecutionAssembly();&lt;br /&gt;AssemblyName an = a.GetName();&lt;br /&gt;Version v = an.Version;&lt;br /&gt;root.SelectSingleNode(&amp;quot;//my:txtVersion&amp;quot;, NamespaceManager).SetValue(&amp;quot;Ver:&amp;quot; + v.Major + &amp;quot;.&amp;quot; + v.Minor + &amp;quot;.&amp;quot; + v.Revision);&lt;/p&gt;
&lt;p&gt;You can manipulate the assembly version to your hearts content in the AssemblyInfo.cs file that&amp;#39;s part of your Visual Studio project. In that file you&amp;#39;ll see&lt;/p&gt;
&lt;p&gt;[assembly: AssemblyVersion(1.0.0.0)]&lt;/p&gt;
&lt;p&gt;The numbers&amp;nbsp;are all explained in that file. Meaning what those numbers represent. That being&amp;nbsp;the Major and Minor versions, Build&amp;nbsp;and Revision numbers.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;One caveat to all this. If you plan to hardcode your number such as 1.0.0.0 and so forth. Each time you publish your form, you&amp;#39;ll have to manualy change one of those numbers, build and then publish. Otherwise, Sharepoint is going to complain the same version exists. One way around all that is to use a wildcard in your numbering such as&lt;/p&gt;
&lt;p&gt;[assembly: AssemblyVersion(1.0.*)]&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>