<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>CLR Hoser - Versioning</title>
    <link>http://hoser.lander.ca/</link>
    <description>(none)</description>
    <language>en-us</language>
    <copyright>Rich Lander</copyright>
    <lastBuildDate>Thu, 23 Oct 2008 17:40:49 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>rich@lander.ca</managingEditor>
    <webMaster>rich@lander.ca</webMaster>
    <item>
      <trackback:ping>http://hoser.lander.ca/Trackback.aspx?guid=25f1cfe6-f2e2-45f4-aabd-b1eee016fd17</trackback:ping>
      <pingback:server>http://hoser.lander.ca/pingback.aspx</pingback:server>
      <pingback:target>http://hoser.lander.ca/PermaLink,guid,25f1cfe6-f2e2-45f4-aabd-b1eee016fd17.aspx</pingback:target>
      <dc:creator>Rich Lander</dc:creator>
      <wfw:comment>http://hoser.lander.ca/CommentView,guid,25f1cfe6-f2e2-45f4-aabd-b1eee016fd17.aspx</wfw:comment>
      <wfw:commentRss>http://hoser.lander.ca/SyndicationService.asmx/GetEntryCommentsRss?guid=25f1cfe6-f2e2-45f4-aabd-b1eee016fd17</wfw:commentRss>
      <slash:comments>9</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://hoser.lander.ca/content/binary/WindowsLiveWriter/WhatdoIwantforv2Applications_938B/20081014%20028.jpg">
            <img style="BORDER-RIGHT-WIDTH: 0px; MARGIN: 0px 0px 0px 5px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title="20081014 028" border="0" alt="20081014 028" align="right" src="http://hoser.lander.ca/content/binary/WindowsLiveWriter/WhatdoIwantforv2Applications_938B/20081014%20028_thumb.jpg" width="308" height="207" />
          </a> I’m
addressing the v2 question first. It is hard to know what to do in v1 if you don’t
know where you want to end up when you go to build and deploy v2 (and later versions)
of your product.
</p>
        <p>
First, I'm going back to the three different product categories that I <a href="http://hoser.lander.ca/2008/09/26/LookingIntoDeploymentShippingYourV2.aspx">outlined
earlier</a>. I'm going to collapse the two different types of applications into just
one category. Today's post is about applications. The next one will be about components.
</p>
        <p>
          <strong>
            <font size="2">Applications</font>
          </strong>
        </p>
        <p>
For v2, you will want one of two situations: 
</p>
        <ul>
          <li>
my v2 application completely replaces my v1 version entirely, or 
</li>
          <li>
my v2 application installs side-by-side with v1 and the two versions do not affect
or interact with one another 
</li>
        </ul>
        <p>
In most cases, I suspect that folks want the former. As an example, almost no one
expects or wants to continue to use Office 2003 after installing Office 2007 on their
machine. Something like TurboTax is the example that breaks that rule.
</p>
        <p>
If you opt to install your application side-by-side with the older version of your
application, then you might need to consider the safety of side-by-side versions of
the various libraries that you depend on. The specific scenario that I’m imagining
is that v2 of your application might be perfectly side-by-side with the v1 version,
but the newer version of the MathLib library that you depend on might not be properly
designed for a side-by-side install. Let's assume that you purchased MathLib from
MathCorp, and that the versioning/servicing scheme of MathLib is different (naturally)
than what you employ for the libraries that you build for your own application.
</p>
        <p>
There are (at least) two obvious gotchas that I can imagine: 
</p>
        <ul>
          <li>
MathLib doesn’t install side-by-side, but always overwrites older library versions
with newer versions, and the MathLib developers made a breaking change this release
(oops!), or 
</li>
          <li>
MathLib reads mathematic constants from a file at a particular location, and the format
of the file changed, but the location did not (oops!), which will break the old version 
</li>
        </ul>
        <p>
And to the other option, if you opt to replace the earlier version of your application,
you don't risk breaking the earlier version of your app (since it is now gone), but
you still have the risk that you might affect another app on the machine that relies
on MathLib in the same ways described above.
</p>
        <p>
What I’ve just described is essentially the well-known “dll hell” problem. I’d hope
that most developers are familiar with this problem and have enough information to
avoid it. However, it is sometimes non-obvious that you are about to walk off that
cliff. This post is really intended to get folks to think a little more about that
cliff.
</p>
        <p>
This whole scenario assumes that MathLib is installed in some global fashion, either
to the GAC, or to a global directory, such as "C:\Program Files\MathCorp\MathLib".
If MathLib is installed with the application, in the application directory, then this
whole problem goes away. At that point, you really are back to the monolithic application
that I discussed earlier where the entirety of the application is installed and serviced
uniformly, in time and location.
</p>
        <p>
To be clear, I'm not trying to push developers toward private installs. There are
downsides to approach that too. The meta-message is that you need to understand the
potential impact of deploying your v2, and align your v2 goals around avoiding those
impacts.
</p>
        <p>
What's with the picture in the post? I recently purchased a digital SLR and am getting
into photography as a hobby of sorts. The pic is just to add something extra to the
post. I like this particular picture since there is a lot to look at visually, and
because the focus is pretty narrow and well off center. It is also fun to see a child’s
toy as an artifact to study.
</p>
        <img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=25f1cfe6-f2e2-45f4-aabd-b1eee016fd17" />
      </body>
      <title>What do I want for v2: Applications?</title>
      <guid isPermaLink="false">http://hoser.lander.ca/PermaLink,guid,25f1cfe6-f2e2-45f4-aabd-b1eee016fd17.aspx</guid>
      <link>http://hoser.lander.ca/2008/10/23/WhatDoIWantForV2Applications.aspx</link>
      <pubDate>Thu, 23 Oct 2008 17:40:49 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://hoser.lander.ca/content/binary/WindowsLiveWriter/WhatdoIwantforv2Applications_938B/20081014%20028.jpg"&gt;&lt;img style="BORDER-RIGHT-WIDTH: 0px; MARGIN: 0px 0px 0px 5px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title="20081014 028" border=0 alt="20081014 028" align=right src="http://hoser.lander.ca/content/binary/WindowsLiveWriter/WhatdoIwantforv2Applications_938B/20081014%20028_thumb.jpg" width=308 height=207&gt;&lt;/a&gt; I’m
addressing the v2 question first. It is hard to know what to do in v1 if you don’t
know where you want to end up when you go to build and deploy v2 (and later versions)
of your product.
&lt;/p&gt;
&lt;p&gt;
First, I'm going back to the three different product categories that I &lt;a href="http://hoser.lander.ca/2008/09/26/LookingIntoDeploymentShippingYourV2.aspx"&gt;outlined
earlier&lt;/a&gt;. I'm going to collapse the two different types of applications into just
one category. Today's post is about applications. The next one will be about components.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;&lt;font size=2&gt;Applications&lt;/font&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
For v2, you will want one of two situations: 
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
my v2 application completely replaces my v1 version entirely, or 
&lt;li&gt;
my v2 application installs side-by-side with v1 and the two versions do not affect
or interact with one another 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
In most cases, I suspect that folks want the former. As an example, almost no one
expects or wants to continue to use Office 2003 after installing Office 2007 on their
machine. Something like TurboTax is the example that breaks that rule.
&lt;/p&gt;
&lt;p&gt;
If you opt to install your application side-by-side with the older version of your
application, then you might need to consider the safety of side-by-side versions of
the various libraries that you depend on. The specific scenario that I’m imagining
is that v2 of your application might be perfectly side-by-side with the v1 version,
but the newer version of the MathLib library that you depend on might not be properly
designed for a side-by-side install. Let's assume that you purchased MathLib from
MathCorp, and that the versioning/servicing scheme of MathLib is different (naturally)
than what you employ for the libraries that you build for your own application.
&lt;/p&gt;
&lt;p&gt;
There are (at least) two obvious gotchas that I can imagine: 
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
MathLib doesn’t install side-by-side, but always overwrites older library versions
with newer versions, and the MathLib developers made a breaking change this release
(oops!), or 
&lt;li&gt;
MathLib reads mathematic constants from a file at a particular location, and the format
of the file changed, but the location did not (oops!), which will break the old version 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
And to the other option, if you opt to replace the earlier version of your application,
you don't risk breaking the earlier version of your app (since it is now gone), but
you still have the risk that you might affect another app on the machine that relies
on MathLib in the same ways described above.
&lt;/p&gt;
&lt;p&gt;
What I’ve just described is essentially the well-known “dll hell” problem. I’d hope
that most developers are familiar with this problem and have enough information to
avoid it. However, it is sometimes non-obvious that you are about to walk off that
cliff. This post is really intended to get folks to think a little more about that
cliff.
&lt;/p&gt;
&lt;p&gt;
This whole scenario assumes that MathLib is installed in some global fashion, either
to the GAC, or to a global directory, such as "C:\Program Files\MathCorp\MathLib".
If MathLib is installed with the application, in the application directory, then this
whole problem goes away. At that point, you really are back to the monolithic application
that I discussed earlier where the entirety of the application is installed and serviced
uniformly, in time and location.
&lt;/p&gt;
&lt;p&gt;
To be clear, I'm not trying to push developers toward private installs. There are
downsides to approach that too. The meta-message is that you need to understand the
potential impact of deploying your v2, and align your v2 goals around avoiding those
impacts.
&lt;/p&gt;
&lt;p&gt;
What's with the picture in the post? I recently purchased a digital SLR and am getting
into photography as a hobby of sorts. The pic is just to add something extra to the
post. I like this particular picture since there is a lot to look at visually, and
because the focus is pretty narrow and well off center. It is also fun to see a child’s
toy as an artifact to study.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=25f1cfe6-f2e2-45f4-aabd-b1eee016fd17" /&gt;</description>
      <comments>http://hoser.lander.ca/CommentView,guid,25f1cfe6-f2e2-45f4-aabd-b1eee016fd17.aspx</comments>
      <category>Deployment</category>
      <category>Loader</category>
      <category>Versioning</category>
    </item>
    <item>
      <trackback:ping>http://hoser.lander.ca/Trackback.aspx?guid=731a3383-6d88-40fa-967b-19c3a3e6fe7c</trackback:ping>
      <pingback:server>http://hoser.lander.ca/pingback.aspx</pingback:server>
      <pingback:target>http://hoser.lander.ca/PermaLink,guid,731a3383-6d88-40fa-967b-19c3a3e6fe7c.aspx</pingback:target>
      <dc:creator>Rich Lander</dc:creator>
      <wfw:comment>http://hoser.lander.ca/CommentView,guid,731a3383-6d88-40fa-967b-19c3a3e6fe7c.aspx</wfw:comment>
      <wfw:commentRss>http://hoser.lander.ca/SyndicationService.asmx/GetEntryCommentsRss?guid=731a3383-6d88-40fa-967b-19c3a3e6fe7c</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p style="MARGIN: 0in 0in 10pt" class="MsoNormal">
          <font color="#000000" size="3" face="Calibri">Lately, I’ve been thinking about the
overall .NET deployment and servicing story. There are a number of aspects of deployment
that one can consider. The particular issues that are salient for your product depend
a lot on the kind of code you deploy onto end-user machines. </font>
        </p>
        <p style="MARGIN: 0in 0in 10pt" class="MsoNormal">
          <font color="#000000" size="3" face="Calibri">First, let’s look at the different kinds
of products that developers might build, and need to deploy:</font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpFirst">
          <font color="#000000">
            <span style="mso-ascii-font-family: Calibri; mso-fareast-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">-</font>
                <span style="FONT: 7pt 'Times New Roman'">          </span>
              </span>
            </span>
            <font size="3" face="Calibri">Monolithic
applications</font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'">
              <span style="mso-list: Ignore">
                <font size="3">o</font>
                <span style="FONT: 7pt 'Times New Roman'">   </span>
              </span>
            </span>
            <font size="3" face="Calibri">A
single exe that is not dependent on any libraries, other than the .NET Framework itself,
or</font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'">
              <span style="mso-list: Ignore">
                <font size="3">o</font>
                <span style="FONT: 7pt 'Times New Roman'">   </span>
              </span>
            </span>
            <font size="3" face="Calibri">Solely
dependent on libraries that are serviced/upgraded with the application</font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-ascii-font-family: Calibri; mso-fareast-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">-</font>
                <span style="FONT: 7pt 'Times New Roman'">          </span>
              </span>
            </span>
            <font size="3" face="Calibri">Aggregate
applications</font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'">
              <span style="mso-list: Ignore">
                <font size="3">o</font>
                <span style="FONT: 7pt 'Times New Roman'">   </span>
              </span>
            </span>
            <font size="3" face="Calibri">Dependent
(at least partially) on libraries (or controls or components) that are installed/serviced/upgraded
separately (in ‘time’ and/or ‘location’) from the application</font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'">
              <span style="mso-list: Ignore">
                <font size="3">o</font>
                <span style="FONT: 7pt 'Times New Roman'">   </span>
              </span>
            </span>
            <font face="Calibri">
              <font size="3">These
libraries are likely sourced from a 3<sup>rd</sup></font>
              <font size="3"> party</font>
            </font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpMiddle">
          <font color="#000000">
            <span style="mso-ascii-font-family: Calibri; mso-fareast-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">-</font>
                <span style="FONT: 7pt 'Times New Roman'">          </span>
              </span>
            </span>
            <font size="3" face="Calibri">Components,
controls or class libraries</font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 10pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class="MsoListParagraphCxSpLast">
          <font color="#000000">
            <span style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'">
              <span style="mso-list: Ignore">
                <font size="3">o</font>
                <span style="FONT: 7pt 'Times New Roman'">   </span>
              </span>
            </span>
            <font size="3" face="Calibri">You
build assemblies that other developers reference in their applications (both ‘Monolithic’
and ‘Aggregate’ applications as described above) or other libraries</font>
          </font>
        </p>
        <p style="MARGIN: 0in 0in 10pt" class="MsoNormal">
          <font color="#000000" size="3" face="Calibri">While we’re thinking broadly, one is
left wondering what the critical questions are to think about for each of the deployment
cases above. There are a lot of questions that one can imagine looking into. They
range from .NET Framework and application deployment, to servicing multiple versions
of your applications out in the wild, to safely deploying a new version of your API
(class libraries) onto end-user machines w/o any adverse impact.</font>
        </p>
        <p style="MARGIN: 0in 0in 10pt" class="MsoNormal">
          <font color="#000000" size="3" face="Calibri">The first one that I’d like to look
at is: “Am I building my product correctly for the future?” This question, though,
really boils down into two important questions:</font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpFirst">
          <font color="#000000">
            <span style="mso-ascii-font-family: Calibri; mso-fareast-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">-</font>
                <span style="FONT: 7pt 'Times New Roman'">          </span>
              </span>
            </span>
            <font size="3" face="Calibri">What
do I need to think about when shipping v1 of my product?</font>
          </font>
        </p>
        <p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraphCxSpLast">
          <font color="#000000">
            <span style="mso-ascii-font-family: Calibri; mso-fareast-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri">
              <span style="mso-list: Ignore">
                <font size="3" face="Calibri">-</font>
                <span style="FONT: 7pt 'Times New Roman'">          </span>
              </span>
            </span>
            <font size="3" face="Calibri">What
do I need to do to safely, correctly and seamlessly ship v2 of my product?</font>
          </font>
        </p>
        <p style="MARGIN: 0in 0in 10pt" class="MsoNormal">
          <font color="#000000" size="3" face="Calibri">Those questions seem very simple, and
they are on the surface. The answers are not overly complicated, but do require some
up-front thought to ensure that you end up where you want to. </font>
        </p>
        <p style="MARGIN: 0in 0in 10pt" class="MsoNormal">
          <font color="#000000" size="3" face="Calibri">We have had folks come to us after a
successful v1, not quite sure what to do for v2. You may be wondering what the crux
of this is … you just hit ‘go’ on csc/vbc another time and you’re done, right? Maybe.
It all depends on how you want your code to behave when you ship your second version.</font>
        </p>
        <p style="MARGIN: 0in 0in 10pt" class="MsoNormal">
          <font color="#000000" size="3" face="Calibri">Note that I call out v2 specifically
(and not v3 and v4) since v2 is the first version after your initial one, and will
be the time when you need to address any issues that come up with shipping again.
Once you’ve got a plan in place, you’ll be able to rinse and repeat for each subsequent
version (provided that you have a good plan).</font>
        </p>
        <p style="MARGIN: 0in 0in 10pt" class="MsoNormal">
          <font color="#000000" size="3" face="Calibri">In my next posts, I’ll answer this question
for each of the product types listed at the top of the post.</font>
        </p>
        <img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=731a3383-6d88-40fa-967b-19c3a3e6fe7c" />
      </body>
      <title>Looking into Deployment – Shipping your v2</title>
      <guid isPermaLink="false">http://hoser.lander.ca/PermaLink,guid,731a3383-6d88-40fa-967b-19c3a3e6fe7c.aspx</guid>
      <link>http://hoser.lander.ca/2008/09/26/LookingIntoDeploymentShippingYourV2.aspx</link>
      <pubDate>Fri, 26 Sep 2008 16:57:56 GMT</pubDate>
      <description>&lt;p style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;Lately, I’ve been thinking about the overall
.NET deployment and servicing story. There are a number of aspects of deployment that
one can consider. The particular issues that are salient for your product depend a
lot on the kind of code you deploy onto end-user machines. &lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;First, let’s look at the different kinds of
products that developers might build, and need to deploy:&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpFirst&gt;
&lt;font color=#000000&gt;&lt;span style="mso-ascii-font-family: Calibri; mso-fareast-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;-&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;Monolithic
applications&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3&gt;o&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;A
single exe that is not dependent on any libraries, other than the .NET Framework itself,
or&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3&gt;o&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;Solely
dependent on libraries that are serviced/upgraded with the application&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-ascii-font-family: Calibri; mso-fareast-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;-&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;Aggregate
applications&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3&gt;o&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;Dependent
(at least partially) on libraries (or controls or components) that are installed/serviced/upgraded
separately (in ‘time’ and/or ‘location’) from the application&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3&gt;o&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri&gt;&lt;font size=3&gt;These
libraries are likely sourced from a 3&lt;sup&gt;rd&lt;/sup&gt;&lt;/font&gt;&lt;font size=3&gt; party&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;
&lt;font color=#000000&gt;&lt;span style="mso-ascii-font-family: Calibri; mso-fareast-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;-&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;Components,
controls or class libraries&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 10pt 1in; mso-list: l0 level2 lfo1; mso-add-space: auto" class=MsoListParagraphCxSpLast&gt;
&lt;font color=#000000&gt;&lt;span style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3&gt;o&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;You
build assemblies that other developers reference in their applications (both ‘Monolithic’
and ‘Aggregate’ applications as described above) or other libraries&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;While we’re thinking broadly, one is left
wondering what the critical questions are to think about for each of the deployment
cases above. There are a lot of questions that one can imagine looking into. They
range from .NET Framework and application deployment, to servicing multiple versions
of your applications out in the wild, to safely deploying a new version of your API
(class libraries) onto end-user machines w/o any adverse impact.&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;The first one that I’d like to look at is:
“Am I building my product correctly for the future?” This question, though, really
boils down into two important questions:&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpFirst&gt;
&lt;font color=#000000&gt;&lt;span style="mso-ascii-font-family: Calibri; mso-fareast-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;-&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;What
do I need to think about when shipping v1 of my product?&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpLast&gt;
&lt;font color=#000000&gt;&lt;span style="mso-ascii-font-family: Calibri; mso-fareast-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;font size=3 face=Calibri&gt;-&lt;/font&gt;&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size=3 face=Calibri&gt;What
do I need to do to safely, correctly and seamlessly ship v2 of my product?&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;Those questions seem very simple, and they
are on the surface. The answers are not overly complicated, but do require some up-front
thought to ensure that you end up where you want to. &lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;We have had folks come to us after a successful
v1, not quite sure what to do for v2. You may be wondering what the crux of this is
… you just hit ‘go’ on csc/vbc another time and you’re done, right? Maybe. It all
depends on how you want your code to behave when you ship your second version.&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;Note that I call out v2 specifically (and
not v3 and v4) since v2 is the first version after your initial one, and will be the
time when you need to address any issues that come up with shipping again. Once you’ve
got a plan in place, you’ll be able to rinse and repeat for each subsequent version
(provided that you have a good plan).&lt;/font&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;
&lt;font color=#000000 size=3 face=Calibri&gt;In my next posts, I’ll answer this question
for each of the product types listed at the top of the post.&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=731a3383-6d88-40fa-967b-19c3a3e6fe7c" /&gt;</description>
      <comments>http://hoser.lander.ca/CommentView,guid,731a3383-6d88-40fa-967b-19c3a3e6fe7c.aspx</comments>
      <category>Loader</category>
      <category>Versioning</category>
      <category>Deployment</category>
    </item>
    <item>
      <trackback:ping>http://hoser.lander.ca/Trackback.aspx?guid=0947990c-3ca6-4e15-9a39-cfc609b5141b</trackback:ping>
      <pingback:server>http://hoser.lander.ca/pingback.aspx</pingback:server>
      <pingback:target>http://hoser.lander.ca/PermaLink,guid,0947990c-3ca6-4e15-9a39-cfc609b5141b.aspx</pingback:target>
      <dc:creator>Rich Lander</dc:creator>
      <wfw:comment>http://hoser.lander.ca/CommentView,guid,0947990c-3ca6-4e15-9a39-cfc609b5141b.aspx</wfw:comment>
      <wfw:commentRss>http://hoser.lander.ca/SyndicationService.asmx/GetEntryCommentsRss?guid=0947990c-3ca6-4e15-9a39-cfc609b5141b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I took another look at the FileVersion sample. I wish the API was actually a little
different. The API actually makes sense as a general use API, but it isn't as user-friendly
as I would like. I wish that there were an instance method on the Assembly class called
"GetFileVersion" or something like that it took nothing and returned a Version class.
</p>
        <p>
Here is more of less what it would look like, except that the GetFileVersion wouldn't
be static, it wouldn't take anything and would be on the assembly class.
</p>
        <p>
If you look @ the FileVersion class, there is a lot of stuff on there, and it is a
super wonky API anyway. I don't understand why it has a single static method that
more or less acts that the instance constructor. Why not just have a constructor that
takes a string or a FileInfo or even a FileStream. Bad API design. I prefer the Version
class a lot more since it is super simple. I
</p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> System;<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> System.Reflection;<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> System.Diagnostics;<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">namespace</span> FileVersion<br />
{<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">class</span> Program<br />
{<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">static</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> Main(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">string</span>[]
args)<br />
{<br />
Assembly asm;<br />
Version ver;<br /><br />
asm <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> Assembly.Load(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"</span>);<br />
ver <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> GetFileVersion(asm);<br />
Console.WriteLine(ver.ToString());<br />
}<br /><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">static</span> Version
GetFileVersion(Assembly asm)<br />
{<br />
FileVersionInfo versionInfo;<br />
Version ver;<br /><br />
versionInfo <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> FileVersionInfo.GetVersionInfo(asm.Location);<br />
ver <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> Version(versionInfo.FileMajorPart,
versionInfo.FileMinorPart, versionInfo.FileBuildPart, versionInfo.FilePrivatePart);<br /><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span> ver;<br />
}<br />
}<br />
}</span>
        </pre>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <font face="Verdana" color="#003300" size="2">If
you look @ the FileVersion class, there is a lot of stuff on there, and it is a super
wonky API anyway. I don't understand why it has a single static method that more or
less acts like an instance constructor. Why not just have a constructor that takes
a string or a FileInfo or even a FileStream. Bad API design. I prefer the above method
(for the assembly case) that returns the Version class since it is super simple. I
realize that the native file version is a string, so can contain more stuff, but the
4-part version number is really all I want.</font>
            <br />
          </span>
        </p>
        <img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=0947990c-3ca6-4e15-9a39-cfc609b5141b" />
      </body>
      <title>FileVersion Sample</title>
      <guid isPermaLink="false">http://hoser.lander.ca/PermaLink,guid,0947990c-3ca6-4e15-9a39-cfc609b5141b.aspx</guid>
      <link>http://hoser.lander.ca/2006/11/29/FileVersionSample.aspx</link>
      <pubDate>Wed, 29 Nov 2006 03:39:29 GMT</pubDate>
      <description>&lt;p&gt;
I took another look at the FileVersion sample. I wish the API was actually a little
different. The API actually makes sense as a general use API, but it isn't as user-friendly
as I would like. I wish that there were an instance method on the Assembly class called
"GetFileVersion" or something like that it took nothing and returned a Version class.
&lt;/p&gt;
&lt;p&gt;
Here is more of less what it would look like, except that the GetFileVersion wouldn't
be static, it wouldn't take anything and would be on the assembly class.
&lt;/p&gt;
&lt;p&gt;
If you look @ the FileVersion class, there is a lot of stuff on there, and it is a
super wonky API anyway. I don't understand why it has a single static method that
more or less acts that the instance constructor. Why not just have a constructor that
takes a string or a FileInfo or even a FileStream. Bad API design. I prefer the Version
class a lot more since it is super simple. I
&lt;/p&gt;
&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;using&lt;/span&gt; System;&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;using&lt;/span&gt; System.Reflection;&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;using&lt;/span&gt; System.Diagnostics;&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;namespace&lt;/span&gt; FileVersion&lt;br&gt;
{&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;class&lt;/span&gt; Program&lt;br&gt;
{&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;static&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;void&lt;/span&gt; Main(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;string&lt;/span&gt;[]
args)&lt;br&gt;
{&lt;br&gt;
Assembly asm;&lt;br&gt;
Version ver;&lt;br&gt;
&lt;br&gt;
asm &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; Assembly.Load(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"&lt;/span&gt;);&lt;br&gt;
ver &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; GetFileVersion(asm);&lt;br&gt;
Console.WriteLine(ver.ToString());&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;static&lt;/span&gt; Version
GetFileVersion(Assembly asm)&lt;br&gt;
{&lt;br&gt;
FileVersionInfo versionInfo;&lt;br&gt;
Version ver;&lt;br&gt;
&lt;br&gt;
versionInfo &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; FileVersionInfo.GetVersionInfo(asm.Location);&lt;br&gt;
ver &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;new&lt;/span&gt; Version(versionInfo.FileMajorPart,
versionInfo.FileMinorPart, versionInfo.FileBuildPart, versionInfo.FilePrivatePart);&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;return&lt;/span&gt; ver;&lt;br&gt;
}&lt;br&gt;
}&lt;br&gt;
}&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;font face=Verdana color=#003300 size=2&gt;If
you look @ the FileVersion class, there is a lot of stuff on there, and it is a super
wonky API anyway. I don't understand why it has a single static method that more or
less acts like an instance constructor. Why not just have a constructor that takes
a string or a FileInfo or even a FileStream. Bad API design. I prefer the above method
(for the assembly case) that returns the Version class since it is super simple. I
realize that the native file version is a string, so can contain more stuff, but the
4-part version number is really all I want.&lt;/font&gt;
&lt;br&gt;
&lt;/p&gt;
&gt;&lt;img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=0947990c-3ca6-4e15-9a39-cfc609b5141b" /&gt;</description>
      <comments>http://hoser.lander.ca/CommentView,guid,0947990c-3ca6-4e15-9a39-cfc609b5141b.aspx</comments>
      <category>Code Samples</category>
      <category>Loader</category>
      <category>Versioning</category>
    </item>
    <item>
      <trackback:ping>http://hoser.lander.ca/Trackback.aspx?guid=59fd3932-1564-4412-b94f-edf4a447302e</trackback:ping>
      <pingback:server>http://hoser.lander.ca/pingback.aspx</pingback:server>
      <pingback:target>http://hoser.lander.ca/PermaLink,guid,59fd3932-1564-4412-b94f-edf4a447302e.aspx</pingback:target>
      <dc:creator>Rich Lander</dc:creator>
      <wfw:comment>http://hoser.lander.ca/CommentView,guid,59fd3932-1564-4412-b94f-edf4a447302e.aspx</wfw:comment>
      <wfw:commentRss>http://hoser.lander.ca/SyndicationService.asmx/GetEntryCommentsRss?guid=59fd3932-1564-4412-b94f-edf4a447302e</wfw:commentRss>
      <title>Native File Version</title>
      <guid isPermaLink="false">http://hoser.lander.ca/PermaLink,guid,59fd3932-1564-4412-b94f-edf4a447302e.aspx</guid>
      <link>http://hoser.lander.ca/2006/11/29/NativeFileVersion.aspx</link>
      <pubDate>Wed, 29 Nov 2006 00:00:36 GMT</pubDate>
      <description>&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;The file version number is a native code concept
– meaning not originating from the .NET Framework. This version number is a resource
found within the resource section of the &lt;/font&gt;&lt;a href="http://www.microsoft.com/whdc/system/platform/firmware/PECOFF.mspx"&gt;&lt;font face=Calibri size=3&gt;windows
PE (portable executable) format&lt;/font&gt;&lt;/a&gt;&lt;font face=Calibri color=#000000 size=3&gt; of
a managed or native code dll. This resource is named “FILEVERSION”. This version number
is used for information purposes only, not for any runtime purposes such as binding.
In addition, this version number does not have to conform to a particular format,
but is only a string, although it does typically takes the form of a simple four-part
number (i.e. 1.2.3.4).&lt;/font&gt;
&lt;/p&gt;
&lt;h3 style="MARGIN: 10pt 0in 0pt"&gt;&lt;font face=Cambria color=#4f81bd size=3&gt;Reading the
File Version&lt;/font&gt;
&lt;/h3&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;The easiest way to view this number is to
view the properties of a file in Windows Explorer. The version number listed is the
file version number. The product version is also listed, although I don’t know how
the two numbers differ exactly. Naturally, you can access the file version from code.
The following code does just that, largely using the &lt;/font&gt;&lt;span style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;System.Diagnostics.&lt;/font&gt;&lt;span style="COLOR: teal"&gt;FileVersionInfo&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri color=#000000 size=3&gt; class,
which I’ve never used before. In fact, I had to ask someone else on the loader team
for that information.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt; System;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt; System.Reflection;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt; System.Diagnostics;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;namespace&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt; FileVersion&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;class&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: teal"&gt;Program&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;static&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: blue"&gt;void&lt;/span&gt;&lt;font color=#000000&gt; Main(&lt;/font&gt;&lt;span style="COLOR: blue"&gt;string&lt;/span&gt;&lt;font color=#000000&gt;[]
args)&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: teal"&gt;Assembly&lt;/span&gt;&lt;font color=#000000&gt; asm
= &lt;/font&gt;&lt;span style="COLOR: teal"&gt;Assembly&lt;/span&gt;&lt;font color=#000000&gt;.Load(&lt;/font&gt;&lt;span style="COLOR: maroon"&gt;"mscorlib,
Version=2.0.0.0, Culture=neutral, &amp;nbsp;PublicKeyToken=b77a5c561934e089"&lt;/span&gt;&lt;font color=#000000&gt;);&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;System.Diagnostics.&lt;/font&gt;&lt;span style="COLOR: teal"&gt;FileVersionInfo&lt;/span&gt;&lt;font color=#000000&gt; fvi
= &lt;/font&gt;&lt;span style="COLOR: teal"&gt;FileVersionInfo&lt;/span&gt;&lt;font color=#000000&gt;.GetVersionInfo(asm.Location);&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: teal"&gt;Console&lt;/span&gt;&lt;font color=#000000&gt;.WriteLine(fvi.FileVersion);&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;o:p&gt;
&lt;font face=Calibri color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;h3 style="MARGIN: 10pt 0in 0pt"&gt;&lt;font face=Cambria color=#4f81bd size=3&gt;Setting the
File Version&lt;/font&gt;
&lt;/h3&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;The CLR provides an assembly-level custom
attribute to set this version number for an assembly from managed code. This attribute
is called &lt;/font&gt;&lt;span style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;System.Reflection.&lt;/font&gt;&lt;span style="COLOR: teal"&gt;AssemblyFileVersion&lt;/span&gt;&lt;/span&gt;&lt;font face=Calibri color=#000000 size=3&gt;.
You can see how to set it below.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt; System;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt; System.Reflection;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;[assembly:System.Reflection.&lt;/font&gt;&lt;span style="COLOR: teal"&gt;AssemblyFileVersion&lt;/span&gt;&lt;font color=#000000&gt;(&lt;/font&gt;&lt;span style="COLOR: maroon"&gt;"2.3.4.5"&lt;/span&gt;&lt;font color=#000000&gt;)]&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;namespace&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt; ConsoleApplication1&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;class&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: teal"&gt;Program&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;static&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: blue"&gt;void&lt;/span&gt;&lt;font color=#000000&gt; Main(&lt;/font&gt;&lt;span style="COLOR: blue"&gt;string&lt;/span&gt;&lt;font color=#000000&gt;[]
args)&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Console.WriteLine(&lt;/font&gt;&lt;span style="COLOR: maroon"&gt;"I
just set the file version!"&lt;/span&gt;&lt;font color=#000000&gt;);&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;o:p&gt;
&lt;font face=Calibri color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;You can actually set this attribute in Visual
Studio 2005 via the properties menu. In that case, you cannot set it in code, as I’ve
done above, since you’ll then have two instances of the attribute. You only need to
set the attribute directly, as I’ve done&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;above,
if you are using the compiler directly, from the commandline.&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=59fd3932-1564-4412-b94f-edf4a447302e" /&gt;</description>
      <comments>http://hoser.lander.ca/CommentView,guid,59fd3932-1564-4412-b94f-edf4a447302e.aspx</comments>
      <category>Code Samples</category>
      <category>Loader</category>
      <category>Versioning</category>
    </item>
    <item>
      <trackback:ping>http://hoser.lander.ca/Trackback.aspx?guid=6effcb5f-d4c9-491a-84d5-05ec8306c6d8</trackback:ping>
      <pingback:server>http://hoser.lander.ca/pingback.aspx</pingback:server>
      <pingback:target>http://hoser.lander.ca/PermaLink,guid,6effcb5f-d4c9-491a-84d5-05ec8306c6d8.aspx</pingback:target>
      <dc:creator>Rich Lander</dc:creator>
      <wfw:comment>http://hoser.lander.ca/CommentView,guid,6effcb5f-d4c9-491a-84d5-05ec8306c6d8.aspx</wfw:comment>
      <wfw:commentRss>http://hoser.lander.ca/SyndicationService.asmx/GetEntryCommentsRss?guid=6effcb5f-d4c9-491a-84d5-05ec8306c6d8</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font color="#000000">Versioning and version numbers are always a bit confusing. For
the CLR and the .NET Framework, we’ve got lots of version numbers to think about.
I’d like to debunk any confusion around them, explain what each version number means,
how to view it and how to set it (if appropriate). Let’s take a look …</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font color="#000000">The version numbers that I’m going to discuss are:</font>
        </p>
        <p class="MsoListParagraphCxSpFirst" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1">
          <font color="#000000">
            <font face="Verdana">
              <span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol">
                <span style="mso-list: Ignore">·<span style="FONT: 7pt 'Times New Roman'"><font size="2">         </font></span></span>
              </span>Native
file version</font>
          </font>
        </p>
        <p class="MsoListParagraphCxSpMiddle" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1">
          <font color="#000000">
            <font face="Verdana">
              <span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol">
                <span style="mso-list: Ignore">·<span style="FONT: 7pt 'Times New Roman'"><font size="2">         </font></span></span>
              </span>Managed
assembly version</font>
          </font>
        </p>
        <p class="MsoListParagraphCxSpMiddle" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1">
          <font color="#000000">
            <font face="Verdana">
              <span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol">
                <span style="mso-list: Ignore">·<span style="FONT: 7pt 'Times New Roman'"><font size="2">         </font></span></span>
              </span>Metadata
version</font>
          </font>
        </p>
        <p class="MsoListParagraphCxSpMiddle" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1">
          <font color="#000000">
            <font face="Verdana">
              <span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol">
                <span style="mso-list: Ignore">·<span style="FONT: 7pt 'Times New Roman'"><font size="2">         </font></span></span>
              </span>Metadata
format version</font>
          </font>
        </p>
        <p class="MsoListParagraphCxSpLast" style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1">
          <font color="#000000">
            <font face="Verdana">
              <span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol">
                <span style="mso-list: Ignore">·<span style="FONT: 7pt 'Times New Roman'"><font size="2">         </font></span></span>
              </span>.NET
Framework versions</font>
          </font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font color="#000000">I’m going to discuss these version numbers (and anything else
that comes up) across the next few posts.</font>
        </p>
        <img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=6effcb5f-d4c9-491a-84d5-05ec8306c6d8" />
      </body>
      <title>.NET Framework Versions Numbers</title>
      <guid isPermaLink="false">http://hoser.lander.ca/PermaLink,guid,6effcb5f-d4c9-491a-84d5-05ec8306c6d8.aspx</guid>
      <link>http://hoser.lander.ca/2006/11/28/NETFrameworkVersionsNumbers.aspx</link>
      <pubDate>Tue, 28 Nov 2006 23:53:35 GMT</pubDate>
      <description>&lt;p&gt;
&lt;font color=#000000&gt;Versioning and version numbers are always a bit confusing. For
the CLR and the .NET Framework, we’ve got lots of version numbers to think about.
I’d like to debunk any confusion around them, explain what each version number means,
how to view it and how to set it (if appropriate). Let’s take a look …&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font color=#000000&gt;The version numbers that I’m going to discuss are:&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoListParagraphCxSpFirst style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;
&lt;font color=#000000&gt;&lt;font face=Verdana&gt;&lt;span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&lt;font size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Native
file version&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;
&lt;font color=#000000&gt;&lt;font face=Verdana&gt;&lt;span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&lt;font size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Managed
assembly version&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;
&lt;font color=#000000&gt;&lt;font face=Verdana&gt;&lt;span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&lt;font size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Metadata
version&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;
&lt;font color=#000000&gt;&lt;font face=Verdana&gt;&lt;span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&lt;font size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Metadata
format version&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoListParagraphCxSpLast style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;
&lt;font color=#000000&gt;&lt;font face=Verdana&gt;&lt;span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&lt;font size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.NET
Framework versions&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font color=#000000&gt;I’m going to discuss these version numbers (and anything else
that comes up) across the next few posts.&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=6effcb5f-d4c9-491a-84d5-05ec8306c6d8" /&gt;</description>
      <comments>http://hoser.lander.ca/CommentView,guid,6effcb5f-d4c9-491a-84d5-05ec8306c6d8.aspx</comments>
      <category>Loader</category>
      <category>Versioning</category>
    </item>
    <item>
      <trackback:ping>http://hoser.lander.ca/Trackback.aspx?guid=eec48629-9409-4526-832e-e9ad4553a82b</trackback:ping>
      <pingback:server>http://hoser.lander.ca/pingback.aspx</pingback:server>
      <pingback:target>http://hoser.lander.ca/PermaLink,guid,eec48629-9409-4526-832e-e9ad4553a82b.aspx</pingback:target>
      <dc:creator>Rich Lander</dc:creator>
      <wfw:comment>http://hoser.lander.ca/CommentView,guid,eec48629-9409-4526-832e-e9ad4553a82b.aspx</wfw:comment>
      <wfw:commentRss>http://hoser.lander.ca/SyndicationService.asmx/GetEntryCommentsRss?guid=eec48629-9409-4526-832e-e9ad4553a82b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The CLR loader offers a few APIs for loading assemblies, each of which have
a slightly different model and behaviour for how they go about the task. I'd like
to cover those and hopefully set folks on the best path for using loading assemblies.
</p>
        <p>
The APIs that I have in mind are:
</p>
        <ul>
          <li>
Assembly.Load(), and 
</li>
          <li>
Assembly.LoadWithPartialName()</li>
        </ul>
        <p>
First, you need to understand the concepts of fully-specified and partial assembly
names.  A fully specified name contains the following parts: the simple name,
version, culture, and public key or public key token. A partial name contains at least
the simple name and optionally any of the other parts of the full-specified name.
This concept is most relevant to the textual identity of an assembly. For example,
here is the fully-specified assembly textual identity for v2.0 System.dll: "System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". The textual identity
is a specially formatted string that is used to describe some or all of the aspects
of identifying an assembly. 
</p>
        <p>
Assembly.Load() takes a string as one of the overloads. The textual identity, as you
see formatted above, is just the sort of string that Load() is expecting. Load() also
takes other types, such as AssemblyName, but that's not important for the moment.
The textual identity can be fully or partially specified, and which one it is has
an important impact on the way that these loader APIs operate. The one you see above
for System.dll is fully specified, since all the parts are there. Note that there
is an additional part (or attribute) of the textual indentity that I've missed -- ProcessorArchitecture
-- but that complicates the discussion too much for not much benefit, so I'm
not going to cover it here.
</p>
        <p>
The following bit of code shows the use of these APIs with full- and partially-specified
names. The comments inline should pretty well explain what to expect
</p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> System;<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> System.Reflection;<br /><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">namespace</span> BindingByIdentity<br />
{<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">class</span> Program<br />
{<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">static</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> Main(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">string</span>[]
args)<br />
{<br />
Assembly asm;<br /><br /><span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">//LoadWithPartialName()
looks in both the appbase and the GAC, looking for the best match,</span><br /><span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">//where
"best match" isn't very clearly defined</span><br /><span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">//In
addition, this method has been deprecated, which means "don't use this anymore, and
it may be removed later"</span><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">try</span><br />
{<br />
Console.WriteLine(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Calling
LoadWithPartialName"</span>);<br />
asm <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> Assembly.LoadWithPartialName(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"System"</span>);<br />
Console.WriteLine(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Loaded:
{0}"</span>,asm.FullName);<br />
}<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">catch</span>(Exception
e)<br />
{<br />
Console.WriteLine(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"LoadWithPartialName
threw with the following exception:"</span>);<br />
Console.WriteLine(e.Message);<br />
}<br /><br /><br /><span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">//Load()
with a partial name looks only in the appbase</span><br /><span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">//There
is no gaurantee that you will get the assembly that you want</span><br /><span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">//In
the case that you have private bin paths specified, there are no order gaurantees</span><br /><span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">//This
particular use of the Assembly.Load() will always throw, since this assembly will
not be found (because it is GAC'd)</span><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">try</span><br />
{<br />
Console.WriteLine(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Calling
Load"</span>);<br />
asm <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> Assembly.Load(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"System,
PublicKeyToken=b77a5c561934e089"</span>);<br />
Console.WriteLine(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Loaded:
{0}"</span>, asm.FullName);<br />
}<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">catch</span>(Exception
e)<br />
{<br />
Console.WriteLine(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Load
threw with the following exception:"</span>);<br />
Console.WriteLine(e.Message);<br />
}<br /><br /><span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">//Load()
with a fully-specified name looks in the appbase and the GAC and gaurantees that you</span><br /><span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">//will
get the assembly that you asked for</span><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">try</span><br />
{<br />
Console.WriteLine(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Calling
Load"</span>);<br />
asm <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> Assembly.Load(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"</span>);<br />
Console.WriteLine(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Loaded:
{0}"</span>, asm.FullName);<br />
}<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">catch</span> (Exception
e)<br />
{<br />
Console.WriteLine(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Load
threw with the following exception:"</span>);<br />
Console.WriteLine(e.Message);<br />
}<br /><br /><br />
}<br />
}<br />
}<br /></span>
        </pre>
        <p>
Output:
</p>
        <p>
          <font color="#000000">Calling LoadWithPartialName<br />
Loaded: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089<br />
Calling Load<br />
Load threw with the following exception:<br />
Could not load file or assembly 'System, PublicKeyToken=b77a5c561934e089' or one<br />
 of its dependencies. The system cannot find the file specified.<br />
Calling Load<br />
Loaded: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</font>
        </p>
        <p>
The moral of this story is that Assembly.LoadWithPartialName() is always bad and shouldn't
be used since its behaviour isn't well-defined or predictable, and that you should
always fully-specify the textual identity strings that you pass into Assembly.Load().
It may be the case that partially specified strings "work" since the assemblies you
are attempted to load are always going to be in the app-base, but the fully-specified
names do make your code and your intentions more clear, particularly for the next
guy that has to look at the code you wrote. The funny thing is that sometimes "the
next guy" is you, just two months later ;)
</p>
        <p>
There is also the case that your code might not be strong-named. You should still
specify everything but the publickey/token in that case.
</p>
        <img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=eec48629-9409-4526-832e-e9ad4553a82b" />
      </body>
      <title>Loading by Identity</title>
      <guid isPermaLink="false">http://hoser.lander.ca/PermaLink,guid,eec48629-9409-4526-832e-e9ad4553a82b.aspx</guid>
      <link>http://hoser.lander.ca/2006/10/26/LoadingByIdentity.aspx</link>
      <pubDate>Thu, 26 Oct 2006 06:43:59 GMT</pubDate>
      <description>&lt;p&gt;
The&amp;nbsp;CLR loader&amp;nbsp;offers a few APIs for loading assemblies, each of which have
a slightly different model and behaviour for how they go about the task. I'd like
to cover those and hopefully set folks on the best path for using loading assemblies.
&lt;/p&gt;
&lt;p&gt;
The APIs that I have in mind are:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Assembly.Load(), and 
&lt;li&gt;
Assembly.LoadWithPartialName()&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
First, you need to understand the concepts of fully-specified and partial assembly
names. &amp;nbsp;A fully specified name contains the following parts: the simple name,
version, culture, and public key or public key token. A partial name contains at least
the simple name and optionally any of the other parts of the full-specified name.
This concept is most relevant to the textual identity of an assembly. For example,
here is the fully-specified assembly textual identity for v2.0 System.dll: "System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". The textual identity
is a specially formatted string that is used to describe some or all of the aspects
of identifying an assembly. 
&lt;/p&gt;
&lt;p&gt;
Assembly.Load() takes a string as one of the overloads. The textual identity, as you
see formatted above, is just the sort of string that Load() is expecting. Load() also
takes other types, such as AssemblyName, but that's not important for the moment.
The textual identity can be fully or partially specified, and which one it is has
an important impact on the way that these loader APIs operate. The one you see above
for System.dll is fully specified, since all the parts are there. Note that there
is an additional part (or attribute) of the textual indentity that I've missed --&amp;nbsp;ProcessorArchitecture
--&amp;nbsp;but that complicates the discussion too much for not much benefit, so I'm
not going to cover it here.
&lt;/p&gt;
&lt;p&gt;
The following bit of code shows the use of these APIs with full- and partially-specified
names. The comments inline should pretty well explain what to expect
&lt;/p&gt;
&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;using&lt;/span&gt; System;&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;using&lt;/span&gt; System.Reflection;&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;namespace&lt;/span&gt; BindingByIdentity&lt;br&gt;
{&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;class&lt;/span&gt; Program&lt;br&gt;
{&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;static&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;void&lt;/span&gt; Main(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;string&lt;/span&gt;[]
args)&lt;br&gt;
{&lt;br&gt;
Assembly asm;&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;//LoadWithPartialName()
looks in both the appbase and the GAC, looking for the best match,&lt;/span&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;//where
"best match" isn't very clearly defined&lt;/span&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;//In
addition, this method has been deprecated, which means "don't use this anymore, and
it may be removed later"&lt;/span&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;try&lt;/span&gt;
&lt;br&gt;
{&lt;br&gt;
Console.WriteLine(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Calling
LoadWithPartialName"&lt;/span&gt;);&lt;br&gt;
asm &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; Assembly.LoadWithPartialName(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"System"&lt;/span&gt;);&lt;br&gt;
Console.WriteLine(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Loaded:
{0}"&lt;/span&gt;,asm.FullName);&lt;br&gt;
}&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;catch&lt;/span&gt;(Exception
e)&lt;br&gt;
{&lt;br&gt;
Console.WriteLine(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"LoadWithPartialName
threw with the following exception:"&lt;/span&gt;);&lt;br&gt;
Console.WriteLine(e.Message);&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;//Load()
with a partial name looks only in the appbase&lt;/span&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;//There
is no gaurantee that you will get the assembly that you want&lt;/span&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;//In
the case that you have private bin paths specified, there are no order gaurantees&lt;/span&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;//This
particular use of the Assembly.Load() will always throw, since this assembly will
not be found (because it is GAC'd)&lt;/span&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;try&lt;/span&gt;
&lt;br&gt;
{&lt;br&gt;
Console.WriteLine(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Calling
Load"&lt;/span&gt;);&lt;br&gt;
asm &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; Assembly.Load(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"System,
PublicKeyToken=b77a5c561934e089"&lt;/span&gt;);&lt;br&gt;
Console.WriteLine(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Loaded:
{0}"&lt;/span&gt;, asm.FullName);&lt;br&gt;
}&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;catch&lt;/span&gt;(Exception
e)&lt;br&gt;
{&lt;br&gt;
Console.WriteLine(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Load
threw with the following exception:"&lt;/span&gt;);&lt;br&gt;
Console.WriteLine(e.Message);&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;//Load()
with a fully-specified name looks in the appbase and the GAC and gaurantees that you&lt;/span&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;//will
get the assembly that you asked for&lt;/span&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;try&lt;/span&gt;
&lt;br&gt;
{&lt;br&gt;
Console.WriteLine(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Calling
Load"&lt;/span&gt;);&lt;br&gt;
asm &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; Assembly.Load(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"&lt;/span&gt;);&lt;br&gt;
Console.WriteLine(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Loaded:
{0}"&lt;/span&gt;, asm.FullName);&lt;br&gt;
}&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;catch&lt;/span&gt; (Exception
e)&lt;br&gt;
{&lt;br&gt;
Console.WriteLine(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Load
threw with the following exception:"&lt;/span&gt;);&lt;br&gt;
Console.WriteLine(e.Message);&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
}&lt;br&gt;
}&lt;br&gt;
}&lt;br&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
Output:
&lt;/p&gt;
&lt;p&gt;
&lt;font color=#000000&gt;Calling LoadWithPartialName&lt;br&gt;
Loaded: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&lt;br&gt;
Calling Load&lt;br&gt;
Load threw with the following exception:&lt;br&gt;
Could not load file or assembly 'System, PublicKeyToken=b77a5c561934e089' or one&lt;br&gt;
&amp;nbsp;of its dependencies. The system cannot find the file specified.&lt;br&gt;
Calling Load&lt;br&gt;
Loaded: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
The moral of this story is that Assembly.LoadWithPartialName() is always bad and shouldn't
be used since its behaviour isn't well-defined or predictable, and that you should
always fully-specify the textual identity strings that you pass into Assembly.Load().
It may be the case that partially specified strings "work" since the assemblies you
are attempted to load are always going to be in the app-base, but the fully-specified
names do make your code and your intentions more clear, particularly for the next
guy that has to look at the code you wrote. The funny thing is that sometimes "the
next guy" is you, just two months later ;)
&lt;/p&gt;
&lt;p&gt;
There is also the case that your code might not be strong-named. You should still
specify everything but the publickey/token in that case.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=eec48629-9409-4526-832e-e9ad4553a82b" /&gt;</description>
      <comments>http://hoser.lander.ca/CommentView,guid,eec48629-9409-4526-832e-e9ad4553a82b.aspx</comments>
      <category>Code Samples</category>
      <category>Loader</category>
      <category>Versioning</category>
    </item>
    <item>
      <trackback:ping>http://hoser.lander.ca/Trackback.aspx?guid=40c20020-ce12-45e9-8f9c-770e90629173</trackback:ping>
      <pingback:server>http://hoser.lander.ca/pingback.aspx</pingback:server>
      <pingback:target>http://hoser.lander.ca/PermaLink,guid,40c20020-ce12-45e9-8f9c-770e90629173.aspx</pingback:target>
      <dc:creator>Rich Lander</dc:creator>
      <wfw:comment>http://hoser.lander.ca/CommentView,guid,40c20020-ce12-45e9-8f9c-770e90629173.aspx</wfw:comment>
      <wfw:commentRss>http://hoser.lander.ca/SyndicationService.asmx/GetEntryCommentsRss?guid=40c20020-ce12-45e9-8f9c-770e90629173</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I've heard "convention over configuration" a number of times, largely in reference
to Ruby on Rails. It's actually a really interested concept. It is simple in nature,
and those kind of concepts are always the best. As an aside, I think I'm done with
complicated concepts at this point ;) The question is where does the CLR loader lie
w/rt CoC and is that the correct place to be.
</p>
        <p>
I can tell you right away that the loader and binder are way, way over on the side
of configuration. And the default behaviour -- the behaviour you get before you need
to get into configuration -- is only useful for basic scenarios. Let me offer an example
if this is seeming a little too vague. So, you've got assembly A (A, Version=2.0.0.0)
and then you want to service it, giving us A' (A, Version=2.0.0.1). That's all good
and seems to make sense. It makes sense to increment the (managed) version number
to differentiate the two versions of the assembly. The only problem is that apps bound
to A (A, Version=2.0.0.0) will still load 2.0.0.0 and not 2.0.0.1 (assuming A and
A' were in the GAC).
</p>
        <p>
Hmmm ... where does that leave us, since that's not quite the behaviour (read:convention)
that we wanted. Well, we get to configure. Here are the choices available to us: re-compile
all apps out there with A', configure (app.config) all apps to bind to A' or generate
and install publisher policy to centrally configure all apps to bind to A'. And there
is one more option still available that differs from the rest: don't change the (managed)
version number in the first place to <i>better</i> conform to the loader convention.
Ughh!
</p>
        <p>
Hmmm again ... none of that sounds too good. So, what does Microsoft do, since you'd
think that they are going with the better option or maybe have some secret hidden
option for their use alone. Well, we (for the most part) go with not changing the
(managed) version number when we service our binaries, thereby conforming to the convention.
Pretty crappy, eh?
</p>
        <p>
The good news is that we're moving much more toward convention-based approaches for
v3. There will still be plenty of <a href="http://www.kintespace.com/rasxlog/?p=362">configurability
via XML</a>, but the vast majority of cases should just fall out of convention. Yeahh!!
</p>
        <p>
This sort of thing really does make you need to stop and think. Are the default behaviours
correct? Do they cover enough of the common scenarios? Do they address those common
scenarios deeply enough? There's nothing worse than software that covers a lot of
scenarios, but only 50% deeply enough in each. 100% enough in each is where I'm headed.
</p>
        <img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=40c20020-ce12-45e9-8f9c-770e90629173" />
      </body>
      <title>Convention over Configuration  as part of the CLR Loader</title>
      <guid isPermaLink="false">http://hoser.lander.ca/PermaLink,guid,40c20020-ce12-45e9-8f9c-770e90629173.aspx</guid>
      <link>http://hoser.lander.ca/2006/06/21/ConventionOverConfigurationAsPartOfTheCLRLoader.aspx</link>
      <pubDate>Wed, 21 Jun 2006 20:30:11 GMT</pubDate>
      <description>&lt;p&gt;
I've heard "convention over configuration" a number of times, largely in reference
to Ruby on Rails. It's actually a really interested concept. It is simple in nature,
and those kind of concepts are always the best. As an aside, I think I'm done with
complicated concepts at this point ;) The question is where does the CLR loader lie
w/rt CoC and is that the correct place to be.
&lt;/p&gt;
&lt;p&gt;
I can tell you right away that the loader and binder are way, way over on the side
of configuration. And the default behaviour -- the behaviour you get before you need
to get into configuration -- is only useful for basic scenarios. Let me offer an example
if this is seeming a little too vague. So, you've got assembly A (A, Version=2.0.0.0)
and then you want to service it, giving us A' (A, Version=2.0.0.1). That's all good
and seems to make sense. It makes sense to increment the (managed) version number
to differentiate the two versions of the assembly. The only problem is that apps bound
to A (A, Version=2.0.0.0) will still load 2.0.0.0 and not 2.0.0.1 (assuming A and
A' were in the GAC).
&lt;/p&gt;
&lt;p&gt;
Hmmm ... where does that leave us, since that's not quite the behaviour (read:convention)
that we wanted. Well, we get to configure. Here are the choices available to us: re-compile
all apps out there with A', configure (app.config) all apps to bind to A' or generate
and install publisher policy to centrally configure all apps to bind to A'. And there
is one more option still available that differs from the rest: don't change the (managed)
version number in the first place to &lt;i&gt;better&lt;/i&gt; conform to the loader convention.
Ughh!
&lt;/p&gt;
&lt;p&gt;
Hmmm again ... none of that sounds too good. So, what does Microsoft do, since you'd
think that they are going with the better option or maybe have some secret hidden
option for their use alone. Well, we (for the most part) go with not changing the
(managed) version number when we service our binaries, thereby conforming to the convention.
Pretty crappy, eh?
&lt;/p&gt;
&lt;p&gt;
The good news is that we're moving much more toward convention-based approaches for
v3. There will still be plenty of &lt;a href="http://www.kintespace.com/rasxlog/?p=362"&gt;configurability
via XML&lt;/a&gt;, but the vast majority of cases should just fall out of convention. Yeahh!!
&lt;/p&gt;
&lt;p&gt;
This sort of thing really does make you need to stop and think. Are the default behaviours
correct? Do they cover enough of the common scenarios? Do they address those common
scenarios deeply enough? There's nothing worse than software that covers a lot of
scenarios, but only 50% deeply enough in each. 100% enough in each is where I'm headed.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=40c20020-ce12-45e9-8f9c-770e90629173" /&gt;</description>
      <comments>http://hoser.lander.ca/CommentView,guid,40c20020-ce12-45e9-8f9c-770e90629173.aspx</comments>
      <category>Loader</category>
      <category>Versioning</category>
    </item>
    <item>
      <trackback:ping>http://hoser.lander.ca/Trackback.aspx?guid=5a5eedb4-b295-4bd4-8ff4-5d3ba959f08c</trackback:ping>
      <pingback:server>http://hoser.lander.ca/pingback.aspx</pingback:server>
      <pingback:target>http://hoser.lander.ca/PermaLink,guid,5a5eedb4-b295-4bd4-8ff4-5d3ba959f08c.aspx</pingback:target>
      <dc:creator>Rich Lander</dc:creator>
      <wfw:comment>http://hoser.lander.ca/CommentView,guid,5a5eedb4-b295-4bd4-8ff4-5d3ba959f08c.aspx</wfw:comment>
      <wfw:commentRss>http://hoser.lander.ca/SyndicationService.asmx/GetEntryCommentsRss?guid=5a5eedb4-b295-4bd4-8ff4-5d3ba959f08c</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I've been running an early adopter program for a couple months now for a bunch of
changes that we're making to the CLR binder/loader in the CLR v3 timeframe. The changes
are related to the binding model, versioning, servicing and an add-in model. Also,
just to be clear, this isn't .NET Framework v3.0 (AKA WinFX). This is the one after
that. Here is the blurb that I sent folks who I thought might be interested. Please
@ <a href="mailto:rlander@microsoft.com">mail me</a> if you are interested in participating.
</p>
        <p>
          <i>We have been busy designing some exciting new changes to the CLR loader/binder.
We'd like to start collecting feedback from customers about our change early, in order
to ensure that the final product is rock solid. The first phase of the program is
to validate that our changes are useful and to understand the compatibility of these
changes. In order to collect this information, we’d like you to run two tools on your
system so that we can learn more about how you – actually the managed apps you use
– use the loader and GAC. The one tool is a tool that collects very basic information
about the GAC, while the second tool is actually an instrumented CLR which logs data
about how the loader, binder and domains are used. The next phases involve running
a prototype version of the CLR that includes the new changes, but we’ll get to that
later, as it comes available.</i>
        </p>
        <p>
There are also a couple legal documents to sign, specifically an MSFT NDA and a license.
I'm happy to discuss those if you want to go to that stage.
</p>
        <img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=5a5eedb4-b295-4bd4-8ff4-5d3ba959f08c" />
      </body>
      <title>Early Adopter Program for CLR v3 -- Who's in?</title>
      <guid isPermaLink="false">http://hoser.lander.ca/PermaLink,guid,5a5eedb4-b295-4bd4-8ff4-5d3ba959f08c.aspx</guid>
      <link>http://hoser.lander.ca/2006/06/21/EarlyAdopterProgramForCLRV3WhosIn.aspx</link>
      <pubDate>Wed, 21 Jun 2006 00:38:12 GMT</pubDate>
      <description>&lt;p&gt;
I've been running an early adopter program for a couple months now for a bunch of
changes that we're making to the CLR binder/loader in the CLR v3 timeframe. The changes
are related to the binding model, versioning, servicing and an add-in model. Also,
just to be clear, this isn't .NET Framework v3.0 (AKA WinFX). This is the one after
that. Here is the blurb that I sent folks who I thought might be interested. Please
@ &lt;a href="mailto:rlander@microsoft.com"&gt;mail me&lt;/a&gt; if you are interested in participating.
&lt;/p&gt;
&lt;p&gt;
&lt;i&gt;We have been busy designing some exciting new changes to the CLR loader/binder.
We'd like to start collecting feedback from customers about our change early, in order
to ensure that the final product is rock solid. The first phase of the program is
to validate that our changes are useful and to understand the compatibility of these
changes. In order to collect this information, we’d like you to run two tools on your
system so that we can learn more about how you – actually the managed apps you use
– use the loader and GAC. The one tool is a tool that collects very basic information
about the GAC, while the second tool is actually an instrumented CLR which logs data
about how the loader, binder and domains are used. The next phases involve running
a prototype version of the CLR that includes the new changes, but we’ll get to that
later, as it comes available.&lt;/i&gt;
&lt;/p&gt;
&lt;p&gt;
There are also a couple legal documents to sign, specifically an MSFT NDA and a license.
I'm happy to discuss those if you want to go to that stage.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=5a5eedb4-b295-4bd4-8ff4-5d3ba959f08c" /&gt;</description>
      <comments>http://hoser.lander.ca/CommentView,guid,5a5eedb4-b295-4bd4-8ff4-5d3ba959f08c.aspx</comments>
      <category>AppDomains</category>
      <category>Compatibility</category>
      <category>Loader</category>
      <category>Versioning</category>
    </item>
    <item>
      <trackback:ping>http://hoser.lander.ca/Trackback.aspx?guid=e3c1498a-2a48-4ab4-ba16-cb4de3fee73b</trackback:ping>
      <pingback:server>http://hoser.lander.ca/pingback.aspx</pingback:server>
      <pingback:target>http://hoser.lander.ca/PermaLink,guid,e3c1498a-2a48-4ab4-ba16-cb4de3fee73b.aspx</pingback:target>
      <dc:creator>Rich Lander</dc:creator>
      <wfw:comment>http://hoser.lander.ca/CommentView,guid,e3c1498a-2a48-4ab4-ba16-cb4de3fee73b.aspx</wfw:comment>
      <wfw:commentRss>http://hoser.lander.ca/SyndicationService.asmx/GetEntryCommentsRss?guid=e3c1498a-2a48-4ab4-ba16-cb4de3fee73b</wfw:commentRss>
      <title>The Wonders of Whidbey Factoring Features – Part III: Friend Assemblies</title>
      <guid isPermaLink="false">http://hoser.lander.ca/PermaLink,guid,e3c1498a-2a48-4ab4-ba16-cb4de3fee73b.aspx</guid>
      <link>http://hoser.lander.ca/2005/11/21/TheWondersOfWhidbeyFactoringFeaturesPartIIIFriendAssemblies.aspx</link>
      <pubDate>Mon, 21 Nov 2005 18:46:14 GMT</pubDate>
      <description>&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;We’re now at least half way into
this set of posts on factoring features in Visual Studio 2005. The more I’ve thought
about getting this set of posts fully written up, the more I’ve found these features
interesting. My team produced them, so that helps, but I believe that a lot of developers
will end up needing these features as a part of their versioning plan.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;AKA
InternalsVisibleTo&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Friend assemblies are a nickname
for the InternalsVisibleTo attribute in the System.Runtime.CompilerServices namespace.
Not much of a stretch from the name, the use of the attribute allows you to specify
which assemblies (your friends) should have access to your internal types and members.
Just to remind you, “internal” != “private” – “internal” == “internal”.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;As you might guess, this attribute
must be set at the assembly-level. You might hope, however, that you could set this
attribute at a more fine-grained level. I can explain that more later.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;Syntax&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;The attribute is set in the following
way:&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;[assembly:InternalsVisibleTo(“MyOtherAssembly,
PublicKey=4asdsadasdsd”)&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Couple things … The constructor
of the attribute -- remember attributes are just types -- takes a textual assembly
identity. Next, you must specify at least an assembly name and optionally a public
key token. You can specify a culture as long as it is neutral. You cannot specify
a version. Some of this may be a surprise to you. I’ll explain that below.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face="Times New Roman"&gt;Design
Decision Points&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/b&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;In retrospect, I’m not sure that
making the public key token optional was the absolute best idea, but it was probably
was necessary for a lot of interesting scenarios. First, friend assemblies is not
a security feature, in the sense that visibility is not a security feature. Friend
assemblies is just about changing the usual bounds of visibility to something that
is more convenient for developers in a lot of cases.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;That all being said, friend assemblies
are really best kept to strong-named assemblies. Weak- or simple-named are very easily
spoof-able (by definition). As a result, someone can simply use a particular name
for their assembly and then get access to the internal fields in a simply-named assembly
from which you’ve granted friendship. Even if you only ship your code internally within
your business, this still isn’t a great plan. Think about it for a while and you’ll
probably begin to better understand why.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;It probably mostly goes without
saying, but strong-named assemblies can only have strong-named friends. Strong-named
assemblies can only depend on strong-named assemblies, so this point is moot anyway.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;I do feel strongly that disallowing
the version number was the right thing to do. The reason for that is that CLR binding
doesn’t always produce the version of an assembly that you expect. There are a lot
of mechanisms that can be at play, such as publisher policy, binding-redirects and
other binding/versioning changes that we have planned for the CLR v3. As a result,
you cannot assume that an assembly that depends on you is always going to be the same.
Remember, with friends, it isn’t that you are assuming that a dependency of yours
is going to be a particular version, but an assembly that is dependent on you. We
would have potentially made a different decision if friends was the opposite way around,
being a statement about your dependencies, but it isn’t.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;The ability to specify culture provided
that it is neutral is mostly a red-herring. There is no harm to specifying it, which
is why we allowed it, but it is best to think in general that culture isn’t allowed.
The main reason here is that you should not have code in culture-specific assemblies.&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=e3c1498a-2a48-4ab4-ba16-cb4de3fee73b" /&gt;</description>
      <comments>http://hoser.lander.ca/CommentView,guid,e3c1498a-2a48-4ab4-ba16-cb4de3fee73b.aspx</comments>
      <category>Loader</category>
      <category>Versioning</category>
      <category>Wonders of Whidbey Factoring Features</category>
    </item>
    <item>
      <trackback:ping>http://hoser.lander.ca/Trackback.aspx?guid=83dbcc51-5e75-4ce7-bdce-d43a8085ef6b</trackback:ping>
      <pingback:server>http://hoser.lander.ca/pingback.aspx</pingback:server>
      <pingback:target>http://hoser.lander.ca/PermaLink,guid,83dbcc51-5e75-4ce7-bdce-d43a8085ef6b.aspx</pingback:target>
      <dc:creator>Rich Lander</dc:creator>
      <wfw:comment>http://hoser.lander.ca/CommentView,guid,83dbcc51-5e75-4ce7-bdce-d43a8085ef6b.aspx</wfw:comment>
      <wfw:commentRss>http://hoser.lander.ca/SyndicationService.asmx/GetEntryCommentsRss?guid=83dbcc51-5e75-4ce7-bdce-d43a8085ef6b</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <title>The Wonders of Whidbey Factoring Features – Part II: Type Forwarders in Detail</title>
      <guid isPermaLink="false">http://hoser.lander.ca/PermaLink,guid,83dbcc51-5e75-4ce7-bdce-d43a8085ef6b.aspx</guid>
      <link>http://hoser.lander.ca/2005/10/04/TheWondersOfWhidbeyFactoringFeaturesPartIITypeForwardersInDetail.aspx</link>
      <pubDate>Tue, 04 Oct 2005 03:18:21 GMT</pubDate>
      <description>&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;It’s high time for the next installment
in this series. I was planning on getting to it sooner, but I’ve had a bunch of crazy
things going on to do with getting the .NET Framework integrated into Windows Vista
and planning for the next couple versions of the .NET Framework. None of that is calming
down, but it’s time to get out another installment none the less.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;I took a quick and somewhat vague
look at type forwarders in my previous post (on purpose). Some of you were likely
satisfied by that level of information and others are likely interested in more detail.
As the title of this post suggests, this is the place to get more detail. To best
do this, I’ve created a simple – and not particularly useful – application to demonstrate
how forwarders really work. I’ll include this app in my next post.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Here is the entire program (it is
only the Main method):&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt; System;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt; StringUtilities;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt; MathUtilities;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;namespace&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt; TypeForwarderApp&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;class&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: teal"&gt;Program&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;static&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: blue"&gt;void&lt;/span&gt;&lt;font color=#000000&gt;&lt;?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /&gt; 
&lt;st1:place w:st="on"&gt;Main&lt;/st1:place&gt;
(&lt;/font&gt;&lt;span style="COLOR: blue"&gt;string&lt;/span&gt;&lt;font color=#000000&gt;[] args)&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: teal"&gt;Int32&lt;/span&gt;&lt;font color=#000000&gt; int1,
int2, intSum, stringCharacterCount;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: teal"&gt;String&lt;/span&gt;&lt;font color=#000000&gt; initialString,
reversedString;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: teal"&gt;String&lt;/span&gt;&lt;font color=#000000&gt; appMessage;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;appMessage
= &lt;/font&gt;&lt;span style="COLOR: maroon"&gt;"This app doesn't really do anything useful"&lt;/span&gt;&lt;font color=#000000&gt;;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: teal"&gt;Console&lt;/span&gt;&lt;font color=#000000&gt;.WriteLine(appMessage);&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;int1
= 16;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;int2
= 14;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;initialString
= &lt;/font&gt;&lt;span style="COLOR: maroon"&gt;"Happy 30th Birthday Microsoft!"&lt;/span&gt;&lt;font color=#000000&gt;;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;intSum
= &lt;/font&gt;&lt;span style="COLOR: teal"&gt;MathUtil&lt;/span&gt;&lt;font color=#000000&gt;.Add(int1, int2);&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;reversedString
= &lt;/font&gt;&lt;span style="COLOR: teal"&gt;StringReverse&lt;/span&gt;&lt;font color=#000000&gt;.GetReversedString(initialString);&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;stringCharacterCount
= &lt;/font&gt;&lt;span style="COLOR: teal"&gt;StringCharacterCount&lt;/span&gt;&lt;font color=#000000&gt;.GetCount(initialString);&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: teal"&gt;Console&lt;/span&gt;&lt;font color=#000000&gt;.WriteLine();&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: teal"&gt;Console&lt;/span&gt;&lt;font color=#000000&gt;.WriteLine(&lt;/font&gt;&lt;span style="COLOR: maroon"&gt;"Initial
String : {0}"&lt;/span&gt;&lt;font color=#000000&gt;, initialString);&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: teal"&gt;Console&lt;/span&gt;&lt;font color=#000000&gt;.WriteLine(&lt;/font&gt;&lt;span style="COLOR: maroon"&gt;"Reversed
String: {0}"&lt;/span&gt;&lt;font color=#000000&gt;, reversedString);&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: teal"&gt;Console&lt;/span&gt;&lt;font color=#000000&gt;.WriteLine(&lt;/font&gt;&lt;span style="COLOR: maroon"&gt;"String
Length&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;: {0}"&lt;/span&gt;&lt;font color=#000000&gt;,
stringCharacterCount);&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: teal"&gt;Console&lt;/span&gt;&lt;font color=#000000&gt;.WriteLine();&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: teal"&gt;Console&lt;/span&gt;&lt;font color=#000000&gt;.WriteLine(&lt;/font&gt;&lt;span style="COLOR: maroon"&gt;"Integers:
{0}, {1}"&lt;/span&gt;&lt;font color=#000000&gt;, int1, int2);&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: teal"&gt;Console&lt;/span&gt;&lt;font color=#000000&gt;.WriteLine(&lt;/font&gt;&lt;span style="COLOR: maroon"&gt;"Sum&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;:
{0}"&lt;/span&gt;&lt;font color=#000000&gt;, intSum);&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: teal"&gt;Console&lt;/span&gt;&lt;font color=#000000&gt;.WriteLine();&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: teal"&gt;Console&lt;/span&gt;&lt;font color=#000000&gt;.WriteLine(&lt;/font&gt;&lt;span style="COLOR: teal"&gt;StringReverse&lt;/span&gt;&lt;font color=#000000&gt;.GetReversedString(appMessage));&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Like, I said, the program doesn’t
do anything useful. I included the birthday message given that two Fridays ago was
the annual Microsoft company meeting at SafeCo Field in 
&lt;st1:City w:st="on"&gt;
&lt;st1:place w:st="on"&gt;Seattle&lt;/st1:place&gt;
&lt;/st1:City&gt;
. The theme was “Beyond 30” celebrating the first 30 years of Microsoft, although
the content was much more about the future than the past (which I imagine most folks
there appreciated). The 25&lt;sup&gt;th&lt;/sup&gt; anniversary meeting was much more of a history
lesson. I think that was the one that Sinbad was at ;)&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;I’m going to concentrate on one
type, the &lt;/font&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;StringCharacterCount&lt;/span&gt;&lt;font face="Times New Roman" color=#000000 size=3&gt; type.
At the moment, it is part of the StringUtilties assembly. If we look at the MSIL code
within TypeForwarderApp.exe, we’ll see that clearly.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;This is the MSIL code within the
exe that calls the static method GetString on the &lt;/font&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;StringCharacterCount&lt;/span&gt;&lt;font face="Times New Roman" color=#000000 size=3&gt; type:&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;IL_0030:&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;call&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;int32
[StringUtilities]StringUtilities.StringCharacterCount::GetCount(string)&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;As you can see, the fact that &lt;/font&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;StringCharacterCount&lt;/span&gt;&lt;font face="Times New Roman" color=#000000 size=3&gt; lives
within the StringUtilities assembly is pretty apparent. Actually, you could go as
far as saying it is hard-coded. Hence the need for forwarders …&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Well, I’m a typical developer and
I’ve decided in my second version of StringUtilites and MathUtilites – I happen to
own them both – that &lt;/font&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;StringCharacterCount&lt;/span&gt;&lt;font face="Times New Roman" color=#000000 size=3&gt; is
really a math utility and less of a string utility. As a result, I’m going to move
this cool type to the MathUtilities assembly.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;I just moved it to the MathUtilties
assembly. You can see that it is indeed part of the MathUtilities assembly via the
MetaInfo (CTRL-M) view in ILDasm. &lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;TypeDef
#2 (02000003)&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;-------------------------------------------------------&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;TypDefName: &lt;b style="mso-bidi-font-weight: normal"&gt;StringUtilities.StringCharacterCount&lt;/b&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;(02000003)&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Flags&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;:
[Public] [AutoLayout] [Class] [AnsiClass] [BeforeFieldInit]&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;(00100001)&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Extends&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;:
01000001 [TypeRef] System.Object&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Method
#1 (06000003) 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;-------------------------------------------------------&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;MethodName:
GetCount (06000003)&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;b style="mso-bidi-font-weight: normal"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/b&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;Notice that the &lt;/font&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;StringCharacterCount&lt;/span&gt;&lt;font face="Times New Roman" color=#000000 size=3&gt; type
is still part of the StringUtilities namespace and not MathUtilties. This is for two
reasons: the namespace is part of the type name and type forwarders do not change
the type name in any way. Put another way, if I moved &lt;/font&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;StringCharacterCount&lt;/span&gt;&lt;font face="Times New Roman" color=#000000 size=3&gt; from
the one assembly to the other *and* changed its namespace, then I would have a breaking
change that even type forwarders could not mitigate.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;This all makes sense, but we have
yet to see the interesting part. What does the metadata within the new version of
StringUtilties look like? Let’s take a look at the manifest (another ILDasm view)
within the StringUtilties assembly. There are actually two additional directives that
we didn’t have before.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;.assembly
extern MathUtilities&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;.ver
1:0:0:0&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;}&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;.class
extern forwarder StringUtilities.StringCharacterCount&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;.assembly
extern MathUtilities&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;}&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font color=#000000&gt;&lt;font face="Times New Roman" size=3&gt;StringUtilties now has a dependency
on MathUtilties and there is this “&lt;/font&gt;&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;.class
extern forwarder&lt;/span&gt;&lt;font face="Times New Roman" size=3&gt;” line for “&lt;/font&gt;&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;StringUtilities.StringCharacterCount&lt;/span&gt;&lt;font face="Times New Roman" size=3&gt;”.
Clearly, we’ve hit our jackpot. The dependency on MathUtilities is clearly required,
given that StringUtilities intends to forward to it. The second directive, the class
directive, is a way to signal to the runtime that the assembly knows about the class,
but that it is located at another location. &lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;If we look further yet, we’ll see
that there is an entry in ExportedType table.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;ExportedType
#1 (27000001)&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;-------------------------------------------------------&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Token:
0x27000001&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Name:
StringUtilities.StringCharacterCount&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Implementation
token: 0x23000002&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;TypeDef
token: 0x00000000&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Flags&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;:
[NotPublic] [AutoLayout] [Class] [AnsiClass] [Forwarder]&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;(00200000)&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;We’re now looking at metadata instead
of the MSIL view (the directives) above. The ExportedType table is generally used
to publish all the types in child netmodules of an assembly – build a multi-module
assembly and you’ll notice this first-hand. In the case of multi-module assemblies,
the implementation token would point to the netmodule, not to a separate assembly.
In the case of type forwarders, the implementation token points (naturally) to a separate
assembly. We can easily prove that too. Look at the AssemblyRef entry for the MathUtilities
Assembly below.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;AssemblyRef
#2 (23000002)&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;-------------------------------------------------------&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Token:
0x23000002&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Public
Key or Token:&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Name:
MathUtilities&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Version:
1.0.0.0&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Major
Version: 0x00000001&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Minor
Version: 0x00000000&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Build
Number: 0x00000000&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Revision
Number: 0x00000000&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Locale:
&amp;lt;null&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;HashValue
Blob:&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;&lt;font color=#000000&gt;&lt;span style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Flags:
[none] (00000000)&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Times New Roman" color=#000000 size=3&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font color=#000000&gt;&lt;font face="Times New Roman" size=3&gt;Notice that its token (&lt;/font&gt;&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;0x23000002&lt;/span&gt;&lt;font face="Times New Roman"&gt;&lt;font size=3&gt;) &lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;font size=3&gt;matches
the implementation token of our forwarded type (&lt;/font&gt;&lt;/font&gt;&lt;span style="FONT-SIZE: 10.5pt; FONT-FAMILY: Fixedsys; mso-bidi-font-family: Fixedsys"&gt;0x23000002&lt;/span&gt;&lt;font face="Times New Roman" size=3&gt;).
There you go. That’s it! Now you know everything I’m going to tell you about type
forwarders.&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=83dbcc51-5e75-4ce7-bdce-d43a8085ef6b" /&gt;</description>
      <comments>http://hoser.lander.ca/CommentView,guid,83dbcc51-5e75-4ce7-bdce-d43a8085ef6b.aspx</comments>
      <category>Loader</category>
      <category>Versioning</category>
      <category>Wonders of Whidbey Factoring Features</category>
    </item>
    <item>
      <trackback:ping>http://hoser.lander.ca/Trackback.aspx?guid=f3d8944e-9c13-4531-b2aa-9784ca5bb916</trackback:ping>
      <pingback:server>http://hoser.lander.ca/pingback.aspx</pingback:server>
      <pingback:target>http://hoser.lander.ca/PermaLink,guid,f3d8944e-9c13-4531-b2aa-9784ca5bb916.aspx</pingback:target>
      <dc:creator>Rich Lander</dc:creator>
      <wfw:comment>http://hoser.lander.ca/CommentView,guid,f3d8944e-9c13-4531-b2aa-9784ca5bb916.aspx</wfw:comment>
      <wfw:commentRss>http://hoser.lander.ca/SyndicationService.asmx/GetEntryCommentsRss?guid=f3d8944e-9c13-4531-b2aa-9784ca5bb916</wfw:commentRss>
      <title>The Wonders of Whidbey Factoring Features – Part I: Type Forwarders</title>
      <guid isPermaLink="false">http://hoser.lander.ca/PermaLink,guid,f3d8944e-9c13-4531-b2aa-9784ca5bb916.aspx</guid>
      <link>http://hoser.lander.ca/2005/09/14/TheWondersOfWhidbeyFactoringFeaturesPartITypeForwarders.aspx</link>
      <pubDate>Wed, 14 Sep 2005 19:30:12 GMT</pubDate>
      <description>&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;font color=#000000&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;Type
forwarders are an interesting feature. If you’ve never needed them, you’ve probably
never thought about or imagined them. They were designed to allow developers to move
types from one assembly to another without breaking existing code that was dependent
on types living within a particular assembly. There are a bunch of reasons why you
might want to move types around; however existing type references will make that problematic.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;font color=#000000&gt;You may be
thinking “I move types between assemblies all the time and nothing breaks”. That may
be true if you are building &lt;i style="mso-bidi-font-style: normal"&gt;applications&lt;/i&gt; that
happen to have dependent assemblies. At the point that you build &lt;i style="mso-bidi-font-style: normal"&gt;frameworks&lt;/i&gt; that
other developers build apps on *and* you distribute those libraries as pre-compiled
binaries (not as source) *and* you promote apps built against earlier versions of
your framework to newer versions (say with publisher policy or binding re-directs)
without re-compiling apps, then you can easily run into this problem. 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font color=#000000&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /&gt;The
.NET Framework hits this scenario dead-on. 
&lt;st1:City w:st="on"&gt;
&lt;st1:place w:st="on"&gt;Everett&lt;/st1:place&gt;
&lt;/st1:City&gt;
apps, when run on Whidbey (i.e. Whidbey-only machines), for example, run against the
Whidbey .NET Framework libraries. That work without issue, but those 
&lt;st1:City w:st="on"&gt;Everett&lt;/st1:City&gt;
apps still expect types to be in the same place as they where in 
&lt;st1:City w:st="on"&gt;
&lt;st1:place w:st="on"&gt;Everett&lt;/st1:place&gt;
&lt;/st1:City&gt;
, which in the case of &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier; mso-bidi-font-family: 'Courier New'"&gt;System.String&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt; is
mscorlib.dll. If we moved &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier; mso-bidi-font-family: 'Courier New'"&gt;System.String&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt; to
system.dll, for example, we’d break 100% of 
&lt;st1:place w:st="on"&gt;
&lt;st1:City w:st="on"&gt;Everett&lt;/st1:City&gt;
&lt;/st1:place&gt;
apps run on Whidbey. Why? The CLR loader would no longer be able to resolve the type
reference – &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier; mso-bidi-font-family: 'Courier New'"&gt;[mscorlib]System.String&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt; --&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Fixedsys"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;stored
in the app’s metadata, but instead would throw a &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier; mso-bidi-font-family: 'Courier New'"&gt;System.TypeLoadException&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt; exception.
The app wouldn’t like that and neither would it’s users ;)&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font color=#000000&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;Before anyone
gets the wrong idea, we didn’t move &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;System&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Courier; mso-bidi-font-family: 'Courier New'"&gt;.String&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt; or
any other existing types in Whidbey. I’m merely using the .NET Framework as an example
of how framework developers could similarly run into this problem, which would be
the precursor for needing type forwarders.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;font color=#000000&gt;Enter type
forwarders. Type forwarders are a new MSIL directive that essentially say “type x
used to be in this assembly, but it is now in this other one. Maybe you should go
look over there”. Let me just show you.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;ol style="MARGIN-TOP: 0in" type=1&gt;
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level1 lfo1; tab-stops: list .5in"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;font color=#000000&gt;Create type
t1 in assembly asm1&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt; 
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level1 lfo1; tab-stops: list .5in"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;font color=#000000&gt;Create an
app that uses [asm1]t1 (that’s just short-hand for saying type t1 that lives in assembly
asm1)&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt; 
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level1 lfo1; tab-stops: list .5in"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;font color=#000000&gt;Run app. 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt; 
&lt;ol style="MARGIN-TOP: 0in" type=a&gt;
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level2 lfo1; tab-stops: list 1.0in"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;font color=#000000&gt;Loader loads
asm1&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt; 
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level2 lfo1; tab-stops: list 1.0in"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;font color=#000000&gt;Loader loads
t1&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt; 
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level2 lfo1; tab-stops: list 1.0in"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;font color=#000000&gt;Everything
works&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level1 lfo1; tab-stops: list .5in"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;font color=#000000&gt;Close app
and move back to VS 2005.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt; 
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level1 lfo1; tab-stops: list .5in"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;font color=#000000&gt;Move type
t1 from asm1 to asm2 (these will be two different projects)&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt; 
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level1 lfo1; tab-stops: list .5in"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;font color=#000000&gt;Create a forwarder
in asm1 that points to [asm2]t1&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt; 
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level1 lfo1; tab-stops: list .5in"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;font color=#000000&gt;Recompile
asm1 and asm2. Do not recompile the app.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt; 
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level1 lfo1; tab-stops: list .5in"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;font color=#000000&gt;Run app&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt; 
&lt;ol style="MARGIN-TOP: 0in" type=a&gt;
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level2 lfo1; tab-stops: list 1.0in"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;font color=#000000&gt;Loader loads
asm1&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt; 
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level2 lfo1; tab-stops: list 1.0in"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;font color=#000000&gt;Loader notices
forwarder directive in asm1, pointing to asm2&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt; 
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level2 lfo1; tab-stops: list 1.0in"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;font color=#000000&gt;Loader loads
asm2&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt; 
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level2 lfo1; tab-stops: list 1.0in"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;font color=#000000&gt;Loader loads
t1 (this time for asm2)&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt; 
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level2 lfo1; tab-stops: list 1.0in"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;font color=#000000&gt;Everything
works&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;font color=#000000&gt;You do need
to realize though that forwarders are really just a temporary crutch for older apps.
Notice that we didn’t re-compile the app above. That’s actually the point of the whole
scenario. We’re assuming that we don’t have the option of re-compiling the app, because
we don’t own it – in this scenario, we own the framework, not the app. When the owner
of the app does get the chance, we get the following list of activities:&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;ol style="MARGIN-TOP: 0in" type=1&gt;
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo2; tab-stops: list .5in"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;font color=#000000&gt;Re-compile
app against the latest version of asm2&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt; 
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo2; tab-stops: list .5in"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;font color=#000000&gt;Run new version
of app&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt; 
&lt;ol style="MARGIN-TOP: 0in" type=a&gt;
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level2 lfo2; tab-stops: list 1.0in"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;font color=#000000&gt;Loader loads
asm2&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt; 
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level2 lfo2; tab-stops: list 1.0in"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;font color=#000000&gt;Loader loads
t1&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt; 
&lt;li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level2 lfo2; tab-stops: list 1.0in"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;font color=#000000&gt;Everything
works&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;font color=#000000&gt;Notice that
we no longer visit the forwarder in asm1. When the app owner re-compiled the app,
the compiler found t1 in asm2. As a result, we no longer needed the mis-step in asm1.
Like I said earlier, forwarders are merely a crutch for apps compiled against older
versions of your framework. Once the apps are re-compiled against the new version
of your framework, the forwarder is no longer needed (for that app). Unfortunately,
you’ll need to keep that forwarder in place for some time, as there are likely a whole
host of other apps and add-ins to those apps still reliant on the forwarder to work
properly.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;font color=#000000&gt;My next post
will deal with the details of forwarders and I’ll post some source that uses the feature.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=f3d8944e-9c13-4531-b2aa-9784ca5bb916" /&gt;</description>
      <comments>http://hoser.lander.ca/CommentView,guid,f3d8944e-9c13-4531-b2aa-9784ca5bb916.aspx</comments>
      <category>Loader</category>
      <category>Versioning</category>
      <category>Wonders of Whidbey Factoring Features</category>
    </item>
    <item>
      <trackback:ping>http://hoser.lander.ca/Trackback.aspx?guid=ffd55b88-eab8-4215-a75b-1c01223876f6</trackback:ping>
      <pingback:server>http://hoser.lander.ca/pingback.aspx</pingback:server>
      <pingback:target>http://hoser.lander.ca/PermaLink,guid,ffd55b88-eab8-4215-a75b-1c01223876f6.aspx</pingback:target>
      <dc:creator>Rich Lander</dc:creator>
      <wfw:comment>http://hoser.lander.ca/CommentView,guid,ffd55b88-eab8-4215-a75b-1c01223876f6.aspx</wfw:comment>
      <wfw:commentRss>http://hoser.lander.ca/SyndicationService.asmx/GetEntryCommentsRss?guid=ffd55b88-eab8-4215-a75b-1c01223876f6</wfw:commentRss>
      <title>The Wonders of Whidbey Factoring Features – Part 0: Introduction</title>
      <guid isPermaLink="false">http://hoser.lander.ca/PermaLink,guid,ffd55b88-eab8-4215-a75b-1c01223876f6.aspx</guid>
      <link>http://hoser.lander.ca/2005/09/13/TheWondersOfWhidbeyFactoringFeaturesPart0Introduction.aspx</link>
      <pubDate>Tue, 13 Sep 2005 17:17:13 GMT</pubDate>
      <description>&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font color=#000000&gt;My last &lt;a href="http://hoser.lander.ca/CategoryView,category,Wonders%20of%20the%20Whidbey%20GAC.aspx"&gt;“Wonders
of Whidbey”&lt;/a&gt; series seemed to be quite well received, at least in terms of aggregator
traffic, so I thought that I’d do another one. This time, I’d like to talk about the
new factoring features in Whidbey. This topic has been bouncing around my head now
for quite some time, so it was easy to choose. I also have the next WoW series picked
out, but you’ll have to wait a little longer for that one.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font color=#000000&gt;I’d like to give you some insight into these features first. I’m
a little vague on the birth (early 2003?) of these two features, since I was not on
the CLR team yet, but working in another part of Microsoft at that time. I joined
the team in November 2003. In early 2003, a subset of the CLR team (and a bunch of
other folks from across the company) was working on some major improvements to managed
code versioning. They had a particular take on the problematic parts of the current
versioning system and had come up with quite an interesting solution. As part of that,
the team was going to do some serious factoring (moving types between assemblies)
of the .NET Framework, but that approach would have the negative effect of breaking
pretty much 100% of existing applications since type references included the assembly
identity. As a result, the team developed some cool factoring features in the CLR
to mitigate those problems. &lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font color=#000000&gt;We’re no longer going down the same path with versioning as we
thought we were back in 2003, but we’ve kept the factoring features in the product.
We do have some other uses for these features, but they are not quite as far reaching
as the earlier versioning plan. I think that Microsoft platform teams are realizing,
more and more, that many of the engineering problems that they face are not unique
to Microsoft, but are also faced by other software companies. That realization is
actually the basis of the &lt;a href="http://lab.msdn.microsoft.com/teamsystem/"&gt;Visual
Studio Team System&lt;/a&gt; products in a lot of ways. That’s a long way of saying that
we’ve kept these factoring features in the product, believing that they will be useful
to enough managed code developers out there. That being said, I don’t expect a lot
of folks out there to use these features. In fact, I’m hoping that adoption of these
features is left to niche scenarios, as I can imagine some folks painting themselves
into some bad corners if they do not use them judicially.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font color=#000000&gt;The features in question are colloquially called “Friend Assemblies”
and “Type Forwarders”. They have different names within the product, but I recommend
using these names since they are accurate and easier for folks to grasp than &lt;a href="http://winfx.msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/T_System_Runtime_CompilerServices_InternalsVisibleToAttribute.asp"&gt;InternalsVisibleTo&lt;/a&gt; and &lt;a href="http://winfx.msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/T_System_Runtime_CompilerServices_TypeForwardedToAttribute.asp"&gt;TypeForwardedTo&lt;/a&gt;.
Learn more about them in the following posts in this series.&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=ffd55b88-eab8-4215-a75b-1c01223876f6" /&gt;</description>
      <comments>http://hoser.lander.ca/CommentView,guid,ffd55b88-eab8-4215-a75b-1c01223876f6.aspx</comments>
      <category>Loader</category>
      <category>Versioning</category>
      <category>Wonders of Whidbey Factoring Features</category>
    </item>
    <item>
      <trackback:ping>http://hoser.lander.ca/Trackback.aspx?guid=f666707f-0e91-4862-a8a8-bfbae866367e</trackback:ping>
      <pingback:server>http://hoser.lander.ca/pingback.aspx</pingback:server>
      <pingback:target>http://hoser.lander.ca/PermaLink,guid,f666707f-0e91-4862-a8a8-bfbae866367e.aspx</pingback:target>
      <dc:creator>Rich Lander</dc:creator>
      <wfw:comment>http://hoser.lander.ca/CommentView,guid,f666707f-0e91-4862-a8a8-bfbae866367e.aspx</wfw:comment>
      <wfw:commentRss>http://hoser.lander.ca/SyndicationService.asmx/GetEntryCommentsRss?guid=f666707f-0e91-4862-a8a8-bfbae866367e</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I need to post on the assembly version number for Whidbey again, for two reasons:
(A) I never posted what it actually was, and (B) I posted some inaccurate data that
I'd like to correct.
</p>
        <p>
(A) is easy. The assembly version number for Beta 2 and RTM is: 2.0.0.0. This may
seem to make sense for a version number, however for Everett it was 1.0.5000.0 --
not sure why that was chosen. 
</p>
        <p>
(B) is slightly more complicated. I said in an <a href="/PermaLink.aspx?guid=25989d32-d6f6-4692-8731-b1498bad8c4d">earlier
post </a>that apps built on top of Whidbey Beta 1 (or earlier) would need to be recompiled.
That is not true. They will work fine on Whidbey RTM without re-compilation. What
will not work is Whidbey RTM apps running on the Whidbey beta 1 runtime -- which is
presumably not a scenario for anyone.
</p>
        <p>
(B) is true due to framework unification, which only applies to .NET Framework assemblies
(i.e. System.Web.dll). The assembly binder basically does a quick test to determine
if the version of a framework assembly is higher or lower than the one that ships
with a given runtime -- meaning the runtime currently being run in the process. If
it is higher, the load is rejected; if it is lower or equal, the referenced version
number is ignored and the version that shipped with that runtime is loaded instead.
We go through this algorithm to prevent Everett System.Web.dll running on Whidbey
with Whidbey System.dll. Those configurations are not supported, so we prevent them
from occuring.
</p>
        <img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=f666707f-0e91-4862-a8a8-bfbae866367e" />
      </body>
      <title>.NET Framework Assembly Version Number for Whidbey -- Updated</title>
      <guid isPermaLink="false">http://hoser.lander.ca/PermaLink,guid,f666707f-0e91-4862-a8a8-bfbae866367e.aspx</guid>
      <link>http://hoser.lander.ca/2005/05/23/NETFrameworkAssemblyVersionNumberForWhidbeyUpdated.aspx</link>
      <pubDate>Mon, 23 May 2005 23:05:18 GMT</pubDate>
      <description>&lt;p&gt;
I need to post on the assembly version&amp;nbsp;number for Whidbey again, for two reasons:
(A) I never posted what it actually was, and (B) I posted some inaccurate data that
I'd like to correct.
&lt;/p&gt;
&lt;p&gt;
(A) is easy. The assembly version number for Beta 2 and RTM is: 2.0.0.0. This may
seem to make sense for a version number, however for Everett it was 1.0.5000.0 --
not sure why that was chosen.&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
(B) is slightly more complicated. I said in an &lt;a href="/PermaLink.aspx?guid=25989d32-d6f6-4692-8731-b1498bad8c4d"&gt;earlier
post &lt;/a&gt;that apps built on top of Whidbey Beta 1 (or earlier) would need to be recompiled.
That is not true. They will work fine on Whidbey RTM without re-compilation. What
will not work is Whidbey RTM apps running on the Whidbey beta 1 runtime -- which is
presumably not a scenario for anyone.
&lt;/p&gt;
&lt;p&gt;
(B) is true due to framework unification, which only applies to .NET Framework assemblies
(i.e. System.Web.dll). The assembly binder basically does a quick test to determine
if the version of a framework assembly is higher or lower than the one that ships
with a given runtime -- meaning the runtime currently being run in the process. If
it is higher, the load is rejected; if it is lower or equal, the referenced version
number is ignored and the version that shipped with that runtime is loaded instead.
We go through this algorithm to prevent Everett System.Web.dll running on Whidbey
with Whidbey System.dll. Those configurations are not supported, so we prevent them
from occuring.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=f666707f-0e91-4862-a8a8-bfbae866367e" /&gt;</description>
      <comments>http://hoser.lander.ca/CommentView,guid,f666707f-0e91-4862-a8a8-bfbae866367e.aspx</comments>
      <category>Versioning</category>
    </item>
  </channel>
</rss>