<?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>Florent Clairambault &#187; GAC</title>
	<atom:link href="http://florent.clairambault.fr/tag/gac/feed" rel="self" type="application/rss+xml" />
	<link>http://florent.clairambault.fr</link>
	<description></description>
	<lastBuildDate>Sat, 04 Feb 2012 19:56:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-alpha-19719</generator>
		<item>
		<title>GAC Download Cache</title>
		<link>http://florent.clairambault.fr/gac-download-cache?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=gac-download-cache</link>
		<comments>http://florent.clairambault.fr/gac-download-cache#comments</comments>
		<pubDate>Thu, 25 Jun 2009 20:55:40 +0000</pubDate>
		<dc:creator>Florent Clairambault</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[GAC]]></category>

		<guid isPermaLink="false">http://florent.clairambault.fr/?p=411</guid>
		<description><![CDATA[There&#8217;s one little feature that you must have totally forgotten in the .Net framework, but it is great. We can tell our apps to download automatically some DLL we would expect to be in the GAC and that are not. This is one freaking great feature. Instead of forcing your users to install the librairies [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s one little feature that you must have totally forgotten in the .Net framework, but it is great.</p>
<p>We can tell our apps to download automatically some DLL we would expect to be in the GAC and that are not. This is one freaking great feature. Instead of forcing your users to install the librairies in their GAC or including the libraries with your applications, you can specify the URL(s) of the DLL(s) your software application depends on. When you launch your program, the .Net framework program will download them automatically if they&#8217;re not already in the GAC download cache.</p>
<p>You just have to add something like that in the file &#8220;yourapp.exe.config&#8221; in the same directory of your &#8220;yourapp.exe&#8221; application.</p>

<div class="wp_codebox"><table><tr id="p4112"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code" id="p411code2"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;runtime<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;assemblyBinding</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;urn:schemas-microsoft-com:asm.v1&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependentAssembly<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;assemblyIdentity</span></span>
<span style="color: #009900;">          <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Lib&quot;</span></span>
<span style="color: #009900;">          <span style="color: #000066;">publicKeyToken</span>=<span style="color: #ff0000;">&quot;9b52b2ba78ecf379&quot;</span></span>
<span style="color: #009900;">          <span style="color: #000066;">culture</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;codeBase</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0.0.0&quot;</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;http://www.yourserver.com/dw-assemblies/Lib.dll&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependentAssembly<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/assemblyBinding<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/runtime<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>This avoids to :</p>
<ul>
<li>Install something in the GAC</li>
<li>Package the required assembly with your software</li>
<li>Download or copy the required assemblys for each of your software</li>
<li>Clean your old assemblys once your don&#8217;t require them</li>
</ul>
<p>You can see the content of your download cache by typing :</p>
<pre lang="cmd" style="color: #fff; background-color: #000; font-weight: bold">
# gacutil.exe /ldl
</pre>
<p>And you can clear your download cache by typing :</p>
<pre lang="cmd" style="color: #fff; background-color: #000; font-weight: bold">
# gacutil.exe /cdl
</pre>
]]></content:encoded>
			<wfw:commentRss>http://florent.clairambault.fr/gac-download-cache/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 1/13 queries in 0.003 seconds using disk: basic
Object Caching 362/372 objects using disk: basic

Served from: florent.clairambault.fr @ 2012-02-07 10:12:32 -->
