<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Ken Kopczyk &#187; GAC</title>
	<atom:link href="http://kenkopczyk.com/tag/gac/feed/" rel="self" type="application/rss+xml" />
	<link>http://kenkopczyk.com</link>
	<description>Hurdles in .NET WinForms Development</description>
	<lastBuildDate>Sat, 13 Mar 2010 03:50:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='kenkopczyk.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/60348bde5d188332d5268692846b25c7?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>Ken Kopczyk &#187; GAC</title>
		<link>http://kenkopczyk.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://kenkopczyk.com/osd.xml" title="Ken Kopczyk" />
	<atom:link rel='hub' href='http://kenkopczyk.com/?pushpress=hub'/>
		<item>
		<title>Referencing GAC Assemblies With Visual Studio 2005</title>
		<link>http://kenkopczyk.com/2009/08/15/referencing-gac-assemblies-with-visual-studio-2005/</link>
		<comments>http://kenkopczyk.com/2009/08/15/referencing-gac-assemblies-with-visual-studio-2005/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 02:56:26 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[GAC]]></category>

		<guid isPermaLink="false">http://kenkopczyk.com/?p=185</guid>
		<description><![CDATA[In Visual Studio 2005, adding an assembly reference is straight-forward and trivial, that is, unless the assembly you are trying to reference only exists in the GAC. There are a number of tabs in the Add Reference dialog, but they browse assemblies that are all located in standard directories. Global Assembly Cache The GAC is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kenkopczyk.com&amp;blog=6344943&amp;post=185&amp;subd=kkopczyk&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In Visual Studio 2005, adding an assembly reference is straight-forward and trivial, that is, unless the assembly you are trying to reference only exists in the GAC.  There are a number of tabs in the Add Reference dialog, but they browse assemblies that are all located in standard directories.</p>
<p><b>Global Assembly Cache</b><br />
The <a href="http://msdn.microsoft.com/en-us/library/yf1d93sz(VS.80).aspx">GAC</a> is special because it allows a pc to store multiple versions of the same .NET assembly.  This is made possible by strong naming.  More importantly, it provides a centralized location for .NET assemblies that need to be shared across multiple applications.  </p>
<p>When viewing the GAC via the Windows shell, you go here:  C:\Windows\Assembly.  However, the Explorer-like UI actually represents an aggregate of files and folders.  Windows is just trying to make it look nice and user friendly for us.</p>
<p><b>Tricking Visual Studio</b><br />
To trick Visual Studio into referencing a GAC assembly, you can do the following:<br />
1.)  Reference a copy of the assembly that is located outside of the GAC via the Add Reference dialog.  You can throw a copy on your Desktop and then reference it from there.  It doesn&#8217;t matter what the file&#8217;s location is.<br />
2.)  Install the assembly into the GAC.  There are a number of ways to do this.  The easiest way is to use the &#8220;Microsoft .NET Framework 2.0 Configuration&#8221; app.  You can find it by going to Control Panel &#8211;&gt;  Administrative Tools.  Once in the app, click &#8220;Manage the Assembly Cache&#8221; and then &#8220;Add an Assembly to the Assembly Cache.&#8221;<br />
3.)  Delete the assembly file that you referenced in step 1.  Go into Visual Studio and refresh the project.  The path of the reference should have automatically changed over to its GAC location (C:\Windows\assembly\&#8230;).<br />
4.)  You may want to set the reference&#8217;s &#8220;Copy Local&#8221; property to False so that the build does not produce a copy of the GAC assembly in the bin folder (to avoid confusion).  In doing so, you can be confident that your app is in fact hitting the GAC!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kkopczyk.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kkopczyk.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kkopczyk.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kkopczyk.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kkopczyk.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kkopczyk.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kkopczyk.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kkopczyk.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kkopczyk.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kkopczyk.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kkopczyk.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kkopczyk.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kkopczyk.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kkopczyk.wordpress.com/185/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kenkopczyk.com&amp;blog=6344943&amp;post=185&amp;subd=kkopczyk&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kenkopczyk.com/2009/08/15/referencing-gac-assemblies-with-visual-studio-2005/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/df43ecaeb5e162064d67f882431983c6?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">Ken</media:title>
		</media:content>
	</item>
	</channel>
</rss>