<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>.: microcode.es :. &#187; assemblyfileversion</title>
	<atom:link href="http://www.microcode.es/tag/assemblyfileversion/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.microcode.es</link>
	<description>Un blog sobre programación en .NET y otras locuras más...</description>
	<lastBuildDate>Mon, 30 Aug 2010 21:29:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>C# Como obtener la fecha de compilaci&#243;n de un ensamblado</title>
		<link>http://www.microcode.es/2010/01/11/c-como-obtener-la-fecha-de-compilacin-de-un-ensamblado/</link>
		<comments>http://www.microcode.es/2010/01/11/c-como-obtener-la-fecha-de-compilacin-de-un-ensamblado/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 21:47:08 +0000</pubDate>
		<dc:creator>Indigo</dc:creator>
				<category><![CDATA[Programacion]]></category>
		<category><![CDATA[assembly]]></category>
		<category><![CDATA[assemblyfileversion]]></category>
		<category><![CDATA[assemblyversion]]></category>
		<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://www.microcode.es/2010/01/11/c-como-obtener-la-fecha-de-compilacin-de-un-ensamblado/</guid>
		<description><![CDATA[Para poder obtener la fecha de compilacion de un ensamblado, tendremos que hacer dos cosas

1.- Modificar las líneas AssemblyVersion y AssemblyFileVersion del fichero AssemblyInfo.cs

// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version
//      Build [...]]]></description>
			<content:encoded><![CDATA[<p>Para poder obtener la fecha de compilacion de un ensamblado, tendremos que hacer dos cosas<br />
<span id="more-312"></span><br />
1.- Modificar las líneas <strong>AssemblyVersion</strong> y <strong>AssemblyFileVersion</strong> del fichero <strong>AssemblyInfo.cs</strong></p>
<div id="scid:DFDE9937-D816-47f4-A306-7B60D5CE5AC0:e0b71070-949e-46a4-9808-18388f87fd46" class="wlWriterEditableSmartContent" style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px">
<pre class="brush: csharp; gutter: false; first-line: 1; tab-size: 4;  toolbar: true; ">// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version
//      Build Number
//      Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("0.1.*")]
[assembly: AssemblyFileVersion("0.1.1.0")]</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>Del <strong>AssemblyVersion</strong> obtendremos la fecha de compilación mientras que la línea <strong>AssemblyFileVersion</strong> es de donde sacamos la versión del programa (aquí se puede usar cualquier numeración). Para esto usamos el siguiente código</p>
<div id="scid:DFDE9937-D816-47f4-A306-7B60D5CE5AC0:92d96afa-4850-490b-9713-d656caa359f3" class="wlWriterEditableSmartContent" style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px">
<pre class="brush: csharp; gutter: false; first-line: 1; tab-size: 4;  toolbar: true; ">Assembly assembly = Assembly.GetExecutingAssembly();

FileVersionInfo versionInfo = FileVersionInfo.GetVersionInfo(assembly.Location);

DateTime assemblyDate = new DateTime(2000, 1, 1)
        .AddDays(assembly.GetName().Version.Build)
        .AddSeconds(assembly.GetName().Version.Revision * 2);

version = string.Format("{0}.{1}.{2} del {3}",
    versionInfo.ProductMajorPart,
    versionInfo.ProductMinorPart,
    versionInfo.ProductBuildPart,
    assemblyDate.ToString("dd/MM/yyyy"));</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
]]></content:encoded>
			<wfw:commentRss>http://www.microcode.es/2010/01/11/c-como-obtener-la-fecha-de-compilacin-de-un-ensamblado/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

