<?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</title>
    <link>http://hoser.lander.ca/</link>
    <description>(none)</description>
    <language>en-us</language>
    <copyright>Rich Lander</copyright>
    <lastBuildDate>Fri, 11 Dec 2009 18:15:52 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=2d5901e8-2472-4258-b4b6-720a53309881</trackback:ping>
      <pingback:server>http://hoser.lander.ca/pingback.aspx</pingback:server>
      <pingback:target>http://hoser.lander.ca/PermaLink,guid,2d5901e8-2472-4258-b4b6-720a53309881.aspx</pingback:target>
      <dc:creator>Rich Lander</dc:creator>
      <wfw:comment>http://hoser.lander.ca/CommentView,guid,2d5901e8-2472-4258-b4b6-720a53309881.aspx</wfw:comment>
      <wfw:commentRss>http://hoser.lander.ca/SyndicationService.asmx/GetEntryCommentsRss?guid=2d5901e8-2472-4258-b4b6-720a53309881</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://hoser.lander.ca/content/binary/WindowsLiveWriter/HowtochecktheassemblywhichisintheGACfrom_8837/198%20-%20Copy.jpg">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="198 - Copy" border="0" alt="198 - Copy" align="right" src="http://hoser.lander.ca/content/binary/WindowsLiveWriter/HowtochecktheassemblywhichisintheGACfrom_8837/198%20-%20Copy_thumb.jpg" width="244" height="164" />
          </a> I
received this question this morning from the <a href="http://www.microsoft.com/midsizebusiness/member-services/Online-Concierge-FAQ.aspx">Microsoft
Online Concierge</a>. We have a Concierge? Who knew?! Can you set me a wake-up time
please, for 10AM? Oh, and a full breakfast would be excellent too.
</p>
        <p>
The specific question was: 
<br />
“I want to check the assembly residing in GAC, previously we use to check using gacutil,
but now it is not a part of .net framework so is there any replacement for gacutil?”
</p>
        <p>
I’ve seen this same question many times before, almost verbatim. Clearly, time to
get something on the InterWebs to slow down the frequency of it.
</p>
        <p>
The short answer is that gacutil is still your answer, but that it lives in the SDK
(<a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=fe6f2099-b7b4-4f47-a244-c96d69c35dec&amp;DisplayLang=en">v2</a>, <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=E6E1C3DF-A74F-4207-8586-711EBE331CDC&amp;displaylang=en">v3.5</a>, <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505&amp;displaylang=en">v3.5</a>).
It doesn’t ship with the redist product, and since gacutil is intended as a development
time scenario only, that makes sense. End-users (the ones using your apps) shouldn’t
be messing with the GAC.
</p>
        <p>
From what I understand, Gacutil *did* end up on customer machines in a service pack
of .NET 1.1. Apparently, the SP relied on gacutil.exe to do GACing, and did not delete
the exe as part of its final cleanup. So, there were two mistakes there (in order):
using a different set of tools/APIs than what we guide customers to use, and leaving
behind turds on end-user machines. Bad, bad, bad. In any case, gacutil.exe was never
intended to be part of the end-user install.
</p>
        <p>
Gacutil also ships with most (maybe all) SKUs of VS. So, if you open the VS command-prompt,
you just need to type “gacutil” you’ll see it print a bunch of command-line switch
help.
</p>
        <p>
To check if an assembly is in the GAC, you can type one of the following two forms:
</p>
        <ul>
          <li>
gacutil /l [simple name] 
</li>
          <li>
gacutil /l [full strong name] 
</li>
        </ul>
        <p>
Here are two examples, using the .NET 4 gacutil:
</p>
        <blockquote>
          <p>
            <font face="Courier New">C:\Users\rlander\Documents\Visual Studio 2010\Projects&gt;<font color="#ff0000">gacutil
/l System</font><br />
Microsoft (R) .NET Global Assembly Cache Utility.  Version 4.0.21201.0 
<br />
Copyright (c) Microsoft Corporation.  All rights reserved. </font>
          </p>
          <p>
            <font face="Courier New">The Global Assembly Cache contains the following assemblies: 
<br />
  System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089,
pro 
<br />
cessorArchitecture=MSIL 
<br />
  System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089,
pro 
<br />
cessorArchitecture=MSIL </font>
          </p>
          <p>
            <font face="Courier New">Number of items = 2 </font>
          </p>
          <p>
            <font face="Courier New">C:\Users\rlander\Documents\Visual Studio 2010\Projects&gt;<font color="#ff0000">gacutil
/l "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" 
<br /></font>Microsoft (R) .NET Global Assembly Cache Utility.  Version 4.0.21201.0 
<br />
Copyright (c) Microsoft Corporation.  All rights reserved. </font>
          </p>
          <p>
            <font face="Courier New">The Global Assembly Cache contains the following assemblies: 
<br />
  System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089,
pro 
<br />
cessorArchitecture=MSIL </font>
          </p>
          <p>
            <font face="Courier New">Number of items = 1 </font>
          </p>
          <p>
            <font face="Courier New">C:\Users\rlander\Documents\Visual Studio 2010\Projects&gt;</font>
          </p>
        </blockquote>
        <p>
Notice that specifying “<font face="Courier New">System</font>” (simple name only)
returns both the v4 and v2 version of the assembly, but specifying the “<font face="Courier New">System,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</font>” (full strong
name) returns just the v4 version of the assembly. That makes sense, for a general
query (the first one) and a specific query (the second one).
</p>
        <p>
If I had passed in mscorlib, System.Web or System.Data, I would have seen 4 assemblies,
as those assemblies are bit-specific, and require a different compiled assembly (using
the <a href="http://msdn.microsoft.com/en-us/library/zekwfyz4.aspx">platform switch</a>)
for each processor type (X86, X64). See:
</p>
        <blockquote>
          <p>
            <font face="Courier New">C:\Users\rlander\Documents\Visual Studio 2010\Projects&gt;<font color="#ff0000">gacutil
/l System.Web</font><br />
Microsoft (R) .NET Global Assembly Cache Utility.  Version 4.0.21201.0 
<br />
Copyright (c) Microsoft Corporation.  All rights reserved. </font>
          </p>
          <p>
            <font face="Courier New">The Global Assembly Cache contains the following assemblies: 
<br />
  System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, 
<br />
processorArchitecture=AMD64 
<br />
  System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, 
<br />
processorArchitecture=x86 
<br />
  System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, 
<br />
processorArchitecture=AMD64 
<br />
  System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, 
<br />
processorArchitecture=x86 </font>
          </p>
          <p>
            <font face="Courier New">Number of items = 4 </font>
          </p>
        </blockquote>
        <p>
If you <em>do</em> need to check whether assemblies are in the GAC on end-user machines,
we do have a <a href="http://msdn.microsoft.com/en-us/library/ms404523.aspx">set of
APIs</a> for doing that. Being that they are APIs, you need to code to them, and they
are native. A good question is whether a set of first-class managed APIs would be
generally useful to developers. You can do <a href="http://www.bing.com/search?q=fusion+API+sample+assembly">searches
for samples</a>, which would likely help you.
</p>
        <p>
MSI has support for installing and uninstalling assemblies. For that scenario, you
should just rely on that support. That’s what Visual Studio does, for example. I should
note that MSI supports installing .NET 4 assemblies; no updates are required for that.
</p>
        <p>
Looking back at the <a href="http://hoser.lander.ca/SearchView.aspx?q=gacutil">history
of this blog</a>, it looks like I take a few moments out to answer this question every
2 years. It appears that I’m right on target again, in late 2009. See you again (on
this topic) in late 2011! Hopefully not.
</p>
        <img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=2d5901e8-2472-4258-b4b6-720a53309881" />
      </body>
      <title>How to check the assembly which is in the GAC from a command line</title>
      <guid isPermaLink="false">http://hoser.lander.ca/PermaLink,guid,2d5901e8-2472-4258-b4b6-720a53309881.aspx</guid>
      <link>http://hoser.lander.ca/2009/12/11/HowToCheckTheAssemblyWhichIsInTheGACFromACommandLine.aspx</link>
      <pubDate>Fri, 11 Dec 2009 18:15:52 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://hoser.lander.ca/content/binary/WindowsLiveWriter/HowtochecktheassemblywhichisintheGACfrom_8837/198%20-%20Copy.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="198 - Copy" border="0" alt="198 - Copy" align="right" src="http://hoser.lander.ca/content/binary/WindowsLiveWriter/HowtochecktheassemblywhichisintheGACfrom_8837/198%20-%20Copy_thumb.jpg" width="244" height="164" /&gt;&lt;/a&gt; I
received this question this morning from the &lt;a href="http://www.microsoft.com/midsizebusiness/member-services/Online-Concierge-FAQ.aspx"&gt;Microsoft
Online Concierge&lt;/a&gt;. We have a Concierge? Who knew?! Can you set me a wake-up time
please, for 10AM? Oh, and a full breakfast would be excellent too.
&lt;/p&gt;
&lt;p&gt;
The specific question was: 
&lt;br /&gt;
“I want to check the assembly residing in GAC, previously we use to check using gacutil,
but now it is not a part of .net framework so is there any replacement for gacutil?”
&lt;/p&gt;
&lt;p&gt;
I’ve seen this same question many times before, almost verbatim. Clearly, time to
get something on the InterWebs to slow down the frequency of it.
&lt;/p&gt;
&lt;p&gt;
The short answer is that gacutil is still your answer, but that it lives in the SDK
(&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=fe6f2099-b7b4-4f47-a244-c96d69c35dec&amp;amp;DisplayLang=en"&gt;v2&lt;/a&gt;, &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=E6E1C3DF-A74F-4207-8586-711EBE331CDC&amp;amp;displaylang=en"&gt;v3.5&lt;/a&gt;, &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505&amp;amp;displaylang=en"&gt;v3.5&lt;/a&gt;).
It doesn’t ship with the redist product, and since gacutil is intended as a development
time scenario only, that makes sense. End-users (the ones using your apps) shouldn’t
be messing with the GAC.
&lt;/p&gt;
&lt;p&gt;
From what I understand, Gacutil *did* end up on customer machines in a service pack
of .NET 1.1. Apparently, the SP relied on gacutil.exe to do GACing, and did not delete
the exe as part of its final cleanup. So, there were two mistakes there (in order):
using a different set of tools/APIs than what we guide customers to use, and leaving
behind turds on end-user machines. Bad, bad, bad. In any case, gacutil.exe was never
intended to be part of the end-user install.
&lt;/p&gt;
&lt;p&gt;
Gacutil also ships with most (maybe all) SKUs of VS. So, if you open the VS command-prompt,
you just need to type “gacutil” you’ll see it print a bunch of command-line switch
help.
&lt;/p&gt;
&lt;p&gt;
To check if an assembly is in the GAC, you can type one of the following two forms:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
gacutil /l [simple name] 
&lt;/li&gt;
&lt;li&gt;
gacutil /l [full strong name] 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Here are two examples, using the .NET 4 gacutil:
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;C:\Users\rlander\Documents\Visual Studio 2010\Projects&amp;gt;&lt;font color="#ff0000"&gt;gacutil
/l System&lt;/font&gt; 
&lt;br /&gt;
Microsoft (R) .NET Global Assembly Cache Utility.&amp;#160; Version 4.0.21201.0 
&lt;br /&gt;
Copyright (c) Microsoft Corporation.&amp;#160; All rights reserved. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;The Global Assembly Cache contains the following assemblies: 
&lt;br /&gt;
&amp;#160; System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089,
pro 
&lt;br /&gt;
cessorArchitecture=MSIL 
&lt;br /&gt;
&amp;#160; System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089,
pro 
&lt;br /&gt;
cessorArchitecture=MSIL &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;Number of items = 2 &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;C:\Users\rlander\Documents\Visual Studio 2010\Projects&amp;gt;&lt;font color="#ff0000"&gt;gacutil
/l &amp;quot;System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;quot; 
&lt;br /&gt;
&lt;/font&gt;Microsoft (R) .NET Global Assembly Cache Utility.&amp;#160; Version 4.0.21201.0 
&lt;br /&gt;
Copyright (c) Microsoft Corporation.&amp;#160; All rights reserved. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;The Global Assembly Cache contains the following assemblies: 
&lt;br /&gt;
&amp;#160; System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089,
pro 
&lt;br /&gt;
cessorArchitecture=MSIL &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;Number of items = 1 &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;C:\Users\rlander\Documents\Visual Studio 2010\Projects&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
Notice that specifying “&lt;font face="Courier New"&gt;System&lt;/font&gt;” (simple name only)
returns both the v4 and v2 version of the assembly, but specifying the “&lt;font face="Courier New"&gt;System,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&lt;/font&gt;” (full strong
name) returns just the v4 version of the assembly. That makes sense, for a general
query (the first one) and a specific query (the second one).
&lt;/p&gt;
&lt;p&gt;
If I had passed in mscorlib, System.Web or System.Data, I would have seen 4 assemblies,
as those assemblies are bit-specific, and require a different compiled assembly (using
the &lt;a href="http://msdn.microsoft.com/en-us/library/zekwfyz4.aspx"&gt;platform switch&lt;/a&gt;)
for each processor type (X86, X64). See:
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;font face="Courier New"&gt;C:\Users\rlander\Documents\Visual Studio 2010\Projects&amp;gt;&lt;font color="#ff0000"&gt;gacutil
/l System.Web&lt;/font&gt; 
&lt;br /&gt;
Microsoft (R) .NET Global Assembly Cache Utility.&amp;#160; Version 4.0.21201.0 
&lt;br /&gt;
Copyright (c) Microsoft Corporation.&amp;#160; All rights reserved. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;The Global Assembly Cache contains the following assemblies: 
&lt;br /&gt;
&amp;#160; System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, 
&lt;br /&gt;
processorArchitecture=AMD64 
&lt;br /&gt;
&amp;#160; System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, 
&lt;br /&gt;
processorArchitecture=x86 
&lt;br /&gt;
&amp;#160; System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, 
&lt;br /&gt;
processorArchitecture=AMD64 
&lt;br /&gt;
&amp;#160; System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, 
&lt;br /&gt;
processorArchitecture=x86 &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;Number of items = 4 &lt;/font&gt;
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
If you &lt;em&gt;do&lt;/em&gt; need to check whether assemblies are in the GAC on end-user machines,
we do have a &lt;a href="http://msdn.microsoft.com/en-us/library/ms404523.aspx"&gt;set of
APIs&lt;/a&gt; for doing that. Being that they are APIs, you need to code to them, and they
are native. A good question is whether a set of first-class managed APIs would be
generally useful to developers. You can do &lt;a href="http://www.bing.com/search?q=fusion+API+sample+assembly"&gt;searches
for samples&lt;/a&gt;, which would likely help you.
&lt;/p&gt;
&lt;p&gt;
MSI has support for installing and uninstalling assemblies. For that scenario, you
should just rely on that support. That’s what Visual Studio does, for example. I should
note that MSI supports installing .NET 4 assemblies; no updates are required for that.
&lt;/p&gt;
&lt;p&gt;
Looking back at the &lt;a href="http://hoser.lander.ca/SearchView.aspx?q=gacutil"&gt;history
of this blog&lt;/a&gt;, it looks like I take a few moments out to answer this question every
2 years. It appears that I’m right on target again, in late 2009. See you again (on
this topic) in late 2011! Hopefully not.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=2d5901e8-2472-4258-b4b6-720a53309881" /&gt;</description>
      <comments>http://hoser.lander.ca/CommentView,guid,2d5901e8-2472-4258-b4b6-720a53309881.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://hoser.lander.ca/Trackback.aspx?guid=2e06c5b3-986f-45de-b86c-bfc5cc10f0eb</trackback:ping>
      <pingback:server>http://hoser.lander.ca/pingback.aspx</pingback:server>
      <pingback:target>http://hoser.lander.ca/PermaLink,guid,2e06c5b3-986f-45de-b86c-bfc5cc10f0eb.aspx</pingback:target>
      <dc:creator>Rich Lander</dc:creator>
      <wfw:comment>http://hoser.lander.ca/CommentView,guid,2e06c5b3-986f-45de-b86c-bfc5cc10f0eb.aspx</wfw:comment>
      <wfw:commentRss>http://hoser.lander.ca/SyndicationService.asmx/GetEntryCommentsRss?guid=2e06c5b3-986f-45de-b86c-bfc5cc10f0eb</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I posted an <a href="http://blogs.msdn.com/clrteam/archive/2009/12/01/sharing-silverlight-assemblies-with-net-apps.aspx">article</a> on
the CLR Team blog on a new scenario that we enabled for sharing assemblies between
Silverlight and .NET. This is one of the features that I worked on in the .NET 4 cycle.
</p>
        <p>
          <a href="http://blogs.msdn.com/clrteam/archive/2009/12/01/sharing-silverlight-assemblies-with-net-apps.aspx">http://blogs.msdn.com/clrteam/archive/2009/12/01/sharing-silverlight-assemblies-with-net-apps.aspx</a>
        </p>
        <p>
 
</p>
        <img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=2e06c5b3-986f-45de-b86c-bfc5cc10f0eb" />
      </body>
      <title>Sharing Silverlight Assemblies with .NET Apps</title>
      <guid isPermaLink="false">http://hoser.lander.ca/PermaLink,guid,2e06c5b3-986f-45de-b86c-bfc5cc10f0eb.aspx</guid>
      <link>http://hoser.lander.ca/2009/12/08/SharingSilverlightAssembliesWithNETApps.aspx</link>
      <pubDate>Tue, 08 Dec 2009 23:53:02 GMT</pubDate>
      <description>&lt;p&gt;
I posted an &lt;a href="http://blogs.msdn.com/clrteam/archive/2009/12/01/sharing-silverlight-assemblies-with-net-apps.aspx"&gt;article&lt;/a&gt; on
the CLR Team blog on a new scenario that we enabled for sharing assemblies between
Silverlight and .NET. This is one of the features that I worked on in the .NET 4 cycle.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://blogs.msdn.com/clrteam/archive/2009/12/01/sharing-silverlight-assemblies-with-net-apps.aspx"&gt;http://blogs.msdn.com/clrteam/archive/2009/12/01/sharing-silverlight-assemblies-with-net-apps.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=2e06c5b3-986f-45de-b86c-bfc5cc10f0eb" /&gt;</description>
      <comments>http://hoser.lander.ca/CommentView,guid,2e06c5b3-986f-45de-b86c-bfc5cc10f0eb.aspx</comments>
      <category>Silverlight</category>
    </item>
    <item>
      <trackback:ping>http://hoser.lander.ca/Trackback.aspx?guid=7dfac062-eec3-4fc4-8562-146eb57ff715</trackback:ping>
      <pingback:server>http://hoser.lander.ca/pingback.aspx</pingback:server>
      <pingback:target>http://hoser.lander.ca/PermaLink,guid,7dfac062-eec3-4fc4-8562-146eb57ff715.aspx</pingback:target>
      <dc:creator>Rich Lander</dc:creator>
      <wfw:comment>http://hoser.lander.ca/CommentView,guid,7dfac062-eec3-4fc4-8562-146eb57ff715.aspx</wfw:comment>
      <wfw:commentRss>http://hoser.lander.ca/SyndicationService.asmx/GetEntryCommentsRss?guid=7dfac062-eec3-4fc4-8562-146eb57ff715</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://www.flickr.com/photos/39641695@N04/4039697112/in/set-72157622395654822/">
            <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" align="right" src="http://farm4.static.flickr.com/3550/4039697112_6523410603_m.jpg" />
          </a>I'm
doing a little project right now that requires me to know (among other things) the
number of hardlinks for a given file. I have a tool that already will tell me the
number of hard links for a given file, but I need to collect a bunch more information,
and I really hate calling out to an exe and collecting and parsing its output, as
part of a larger app. So, I set out to write that slightly larger app. 
</p>
        <p>
Having never written an app that cares about hardlinks, I didn't know whether or not
the BCL had APIs that exposed this info. It doesn't. Whether it should expose this
info is a whole other question. So, I resorted to p/invoke, which is fine. I
did a few searches and found that there isn't too much info out there on doing this
from .NET, hence my motivation for writing this post.
</p>
        <p>
I started out with <font size="2" face="Consolas"><font size="2" face="Consolas"><a href="http://pinvoke.net/default.aspx/ntdll/NtQueryInformationFile.html">NtQueryInformationFile</a>. </font></font>I'm
pretty sure that the p/invoke signature on p/invoke.net is wrong. I wasn't able to
get this function working to my satisfaction, but can share where I ended up, in the
hope that it might help someone:
</p>
        <font size="2" face="Consolas">
          <font size="2" face="Consolas">
            <pre>
              <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: black; FONT-SIZE: 11px"> [DllImport(<span style="BACKGROUND-COLOR: #e4e4e4; FONT-FAMILY: Courier New; COLOR: #666666; FONT-SIZE: 11px">"ntdll.dll"</span>,
SetLastError=<span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">true</span>)] <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">static</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">extern</span> Int32
NtQueryInformationFile(IntPtr fileHandle, <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">ref</span> IO_STATUS_BLOCK
IoStatusBlock, [MarshalAs(UnmanagedType.LPArray)] Byte[] arrayBuffer, <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">uint</span> length,
FILE_INFORMATION_CLASS fileInformation); </span>
            </pre>
          </font>
        </font>
        <p>
FWIW, I allocated a byte[2048], and passed in <font size="2" face="Consolas"><font size="2" face="Consolas">(</font></font><font color="#0000ff" size="2" face="Consolas"><font color="#0000ff" size="2" face="Consolas"><font color="#0000ff" size="2" face="Consolas">uint</font></font></font><font size="2" face="Consolas"><font size="2" face="Consolas">)array.Length </font></font>as
the length paramter. 2k was overkill for what I needed, but at least got me a
bunch of bytes. I wasn't too sure what to do next, so decided to look for something
easier. I was guessing that I needed to write a struct who fields mapped over that
byte[], but I wasn't sure what the meaning of those fields was going to be. I couldn't
find any docs that would have that easier, and didn't see any code samples either.
</p>
        <p>
The good news is that I found another function -- <a href="http://pinvoke.net/default.aspx/kernel32/GetFileInformationByHandle.html">GetFileInformationByHandle</a> --
that is much easier to use, and that did work for me.
</p>
        <pre>
          <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: black; FONT-SIZE: 11px"> [DllImport(<span style="BACKGROUND-COLOR: #e4e4e4; FONT-FAMILY: Courier New; COLOR: #666666; FONT-SIZE: 11px">"kernel32.dll"</span>,
SetLastError <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: red; FONT-SIZE: 11px">=</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">true</span>)] <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">static</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">extern</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">bool</span> GetFileInformationByHandle(IntPtr
hFile, <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">out</span> BY_HANDLE_FILE_INFORMATION
lpFileInformation);</span>
        </pre>
        <p>
You can see my app below. For now, it just contains calculates the hard-links, which
is the part that I tackled first. I'll now move to writing the rest of my experiment.
</p>
        <pre>
          <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: black; FONT-SIZE: 11px">
            <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">using</span> System; <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">using</span> System.Runtime.InteropServices; <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">using</span> System.IO; <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">namespace</span> banff
{ <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">class</span> Program
{ <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">static</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">void</span> Main(<span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">string</span>[]
args) { <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">if</span> (args
== <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">null</span> ||
args.Length == 0) { Console.WriteLine(<span style="BACKGROUND-COLOR: #e4e4e4; FONT-FAMILY: Courier New; COLOR: #666666; FONT-SIZE: 11px">"Please
specify a file to check"</span>); <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">return</span>;
} <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">else</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">if</span> (!File.Exists(args[0]))
{ Console.WriteLine(<span style="BACKGROUND-COLOR: #e4e4e4; FONT-FAMILY: Courier New; COLOR: #666666; FONT-SIZE: 11px">"File
doesn't exist"</span>); } FileStream fs <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: red; FONT-SIZE: 11px">=</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">null</span>;
fs <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: red; FONT-SIZE: 11px">=</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">new</span> FileStream(args[0],FileMode.Open,FileAccess.Read);
BY_HANDLE_FILE_INFORMATION fileInfo; Boolean result <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: red; FONT-SIZE: 11px">=</span> GetFileInformationByHandle(fs.Handle, <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">out</span> fileInfo);
Console.WriteLine(fileInfo.NumberOfLinks); fs.Close(); } [DllImport(<span style="BACKGROUND-COLOR: #e4e4e4; FONT-FAMILY: Courier New; COLOR: #666666; FONT-SIZE: 11px">"kernel32.dll"</span>,
SetLastError <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: red; FONT-SIZE: 11px">=</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">true</span>)] <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">static</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">extern</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">bool</span> GetFileInformationByHandle(IntPtr
hFile, <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">out</span> BY_HANDLE_FILE_INFORMATION
lpFileInformation); <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">struct</span> BY_HANDLE_FILE_INFORMATION
{ <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">public</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">uint</span> FileAttributes; <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">public</span> FILETIME
CreationTime; <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">public</span> FILETIME
LastAccessTime; <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">public</span> FILETIME
LastWriteTime; <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">public</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">uint</span> VolumeSerialNumber; <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">public</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">uint</span> FileSizeHigh; <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">public</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">uint</span> FileSizeLow; <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">public</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">uint</span> NumberOfLinks; <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">public</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">uint</span> FileIndexHigh; <span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">public</span><span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px">uint</span> FileIndexLow;
} } } </span>
        </pre>
        <p>
 
</p>
        <p>
 
</p>
        <img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=7dfac062-eec3-4fc4-8562-146eb57ff715" />
      </body>
      <title>Determining Number of Hardlinks for a File</title>
      <guid isPermaLink="false">http://hoser.lander.ca/PermaLink,guid,7dfac062-eec3-4fc4-8562-146eb57ff715.aspx</guid>
      <link>http://hoser.lander.ca/2009/12/08/DeterminingNumberOfHardlinksForAFile.aspx</link>
      <pubDate>Tue, 08 Dec 2009 19:19:57 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://www.flickr.com/photos/39641695@N04/4039697112/in/set-72157622395654822/"&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" align=right src="http://farm4.static.flickr.com/3550/4039697112_6523410603_m.jpg"&gt;&lt;/a&gt;I'm
doing a little project right now that requires me to know (among other things) the
number of hardlinks for a given file. I have a tool that already will tell me the
number of hard links for a given file, but I need to collect a bunch more information,
and I really hate calling out to an exe and collecting and parsing its output, as
part of a larger app. So, I set out to write that slightly larger app. 
&lt;/p&gt;
&lt;p&gt;
Having never written an app that cares about hardlinks, I didn't know whether or not
the BCL had APIs that exposed this info. It doesn't. Whether it should expose this
info is a whole other question.&amp;nbsp;So, I resorted to p/invoke, which is fine. I
did a few searches and found that there isn't too much info out there on doing this
from .NET, hence my motivation for writing this post.
&lt;/p&gt;
&lt;p&gt;
I started out with&amp;nbsp;&lt;font size=2 face=Consolas&gt;&lt;font size=2 face=Consolas&gt;&lt;a href="http://pinvoke.net/default.aspx/ntdll/NtQueryInformationFile.html"&gt;NtQueryInformationFile&lt;/a&gt;. &lt;/font&gt;&lt;/font&gt;I'm
pretty sure that the p/invoke signature on p/invoke.net is wrong. I wasn't able to
get this function working to my satisfaction, but can share where I ended up, in the
hope that it might help someone:
&lt;/p&gt;
&lt;font size=2 face=Consolas&gt;&lt;font size=2 face=Consolas&gt;&lt;pre&gt;&lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: black; FONT-SIZE: 11px"&gt; [DllImport(&lt;span style="BACKGROUND-COLOR: #e4e4e4; FONT-FAMILY: Courier New; COLOR: #666666; FONT-SIZE: 11px"&gt;"ntdll.dll"&lt;/span&gt;,
SetLastError=&lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;true&lt;/span&gt;)] &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;static&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;extern&lt;/span&gt; Int32
NtQueryInformationFile(IntPtr fileHandle, &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;ref&lt;/span&gt; IO_STATUS_BLOCK
IoStatusBlock, [MarshalAs(UnmanagedType.LPArray)] Byte[] arrayBuffer, &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;uint&lt;/span&gt; length,
FILE_INFORMATION_CLASS fileInformation); &lt;/span&gt;&lt;/pre&gt;&lt;/font&gt;&lt;/font&gt; 
&lt;p&gt;
FWIW, I allocated a byte[2048], and passed in&amp;nbsp;&lt;font size=2 face=Consolas&gt;&lt;font size=2 face=Consolas&gt;(&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff size=2 face=Consolas&gt;&lt;font color=#0000ff size=2 face=Consolas&gt;&lt;font color=#0000ff size=2 face=Consolas&gt;uint&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2 face=Consolas&gt;&lt;font size=2 face=Consolas&gt;)array.Length &lt;/font&gt;&lt;/font&gt;as
the&amp;nbsp;length paramter. 2k was overkill for what I needed, but at least got me a
bunch of bytes. I wasn't too sure what to do next, so decided to look for something
easier. I was guessing that I needed to write a struct who fields mapped over that
byte[], but I wasn't sure what the meaning of those fields was going to be. I couldn't
find any docs that would have that easier, and didn't see any code samples either.
&lt;/p&gt;
&lt;p&gt;
The good news is that I found another function -- &lt;a href="http://pinvoke.net/default.aspx/kernel32/GetFileInformationByHandle.html"&gt;GetFileInformationByHandle&lt;/a&gt; --
that is much easier to use, and that did work for me.
&lt;/p&gt;
&lt;pre&gt;&lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: black; FONT-SIZE: 11px"&gt; [DllImport(&lt;span style="BACKGROUND-COLOR: #e4e4e4; FONT-FAMILY: Courier New; COLOR: #666666; FONT-SIZE: 11px"&gt;"kernel32.dll"&lt;/span&gt;,
SetLastError &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: red; FONT-SIZE: 11px"&gt;=&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;true&lt;/span&gt;)] &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;static&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;extern&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;bool&lt;/span&gt; GetFileInformationByHandle(IntPtr
hFile, &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;out&lt;/span&gt; BY_HANDLE_FILE_INFORMATION
lpFileInformation);&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
You can see my app below. For now, it just contains calculates the hard-links, which
is the part that I tackled first. I'll now move to writing the rest of my experiment.
&lt;/p&gt;
&lt;pre&gt;&lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: black; FONT-SIZE: 11px"&gt;&lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;using&lt;/span&gt; System; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;using&lt;/span&gt; System.Runtime.InteropServices; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;using&lt;/span&gt; System.IO; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;namespace&lt;/span&gt; banff
{ &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;class&lt;/span&gt; Program
{ &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;static&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;void&lt;/span&gt; Main(&lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;string&lt;/span&gt;[]
args) { &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;if&lt;/span&gt; (args
== &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;null&lt;/span&gt; ||
args.Length == 0) { Console.WriteLine(&lt;span style="BACKGROUND-COLOR: #e4e4e4; FONT-FAMILY: Courier New; COLOR: #666666; FONT-SIZE: 11px"&gt;"Please
specify a file to check"&lt;/span&gt;); &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;return&lt;/span&gt;;
} &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;else&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;if&lt;/span&gt; (!File.Exists(args[0]))
{ Console.WriteLine(&lt;span style="BACKGROUND-COLOR: #e4e4e4; FONT-FAMILY: Courier New; COLOR: #666666; FONT-SIZE: 11px"&gt;"File
doesn't exist"&lt;/span&gt;); } FileStream fs &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: red; FONT-SIZE: 11px"&gt;=&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;null&lt;/span&gt;;
fs &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: red; FONT-SIZE: 11px"&gt;=&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;new&lt;/span&gt; FileStream(args[0],FileMode.Open,FileAccess.Read);
BY_HANDLE_FILE_INFORMATION fileInfo; Boolean result &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: red; FONT-SIZE: 11px"&gt;=&lt;/span&gt; GetFileInformationByHandle(fs.Handle, &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;out&lt;/span&gt; fileInfo);
Console.WriteLine(fileInfo.NumberOfLinks); fs.Close(); } [DllImport(&lt;span style="BACKGROUND-COLOR: #e4e4e4; FONT-FAMILY: Courier New; COLOR: #666666; FONT-SIZE: 11px"&gt;"kernel32.dll"&lt;/span&gt;,
SetLastError &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: red; FONT-SIZE: 11px"&gt;=&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;true&lt;/span&gt;)] &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;static&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;extern&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;bool&lt;/span&gt; GetFileInformationByHandle(IntPtr
hFile, &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;out&lt;/span&gt; BY_HANDLE_FILE_INFORMATION
lpFileInformation); &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;struct&lt;/span&gt; BY_HANDLE_FILE_INFORMATION
{ &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;public&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;uint&lt;/span&gt; FileAttributes; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;public&lt;/span&gt; FILETIME
CreationTime; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;public&lt;/span&gt; FILETIME
LastAccessTime; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;public&lt;/span&gt; FILETIME
LastWriteTime; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;public&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;uint&lt;/span&gt; VolumeSerialNumber; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;public&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;uint&lt;/span&gt; FileSizeHigh; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;public&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;uint&lt;/span&gt; FileSizeLow; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;public&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;uint&lt;/span&gt; NumberOfLinks; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;public&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;uint&lt;/span&gt; FileIndexHigh; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;public&lt;/span&gt; &lt;span style="BACKGROUND-COLOR: transparent; FONT-FAMILY: Courier New; COLOR: blue; FONT-SIZE: 11px"&gt;uint&lt;/span&gt; FileIndexLow;
} } } &lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=7dfac062-eec3-4fc4-8562-146eb57ff715" /&gt;</description>
      <comments>http://hoser.lander.ca/CommentView,guid,7dfac062-eec3-4fc4-8562-146eb57ff715.aspx</comments>
      <category>Code Samples</category>
    </item>
    <item>
      <trackback:ping>http://hoser.lander.ca/Trackback.aspx?guid=fb296717-82ac-4903-ac4a-4f6a3d2793e0</trackback:ping>
      <pingback:server>http://hoser.lander.ca/pingback.aspx</pingback:server>
      <pingback:target>http://hoser.lander.ca/PermaLink,guid,fb296717-82ac-4903-ac4a-4f6a3d2793e0.aspx</pingback:target>
      <dc:creator>Rich Lander</dc:creator>
      <wfw:comment>http://hoser.lander.ca/CommentView,guid,fb296717-82ac-4903-ac4a-4f6a3d2793e0.aspx</wfw:comment>
      <wfw:commentRss>http://hoser.lander.ca/SyndicationService.asmx/GetEntryCommentsRss?guid=fb296717-82ac-4903-ac4a-4f6a3d2793e0</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
A few months ago, we started the <a href="http://blogs.msdn.com/clrteam/">CLR Team
Blog</a>. There are quite a number of posts there and we're getting quite a lot of
traffic to the site. It has been a long time overdue, but I'm really excited that
our team has a single face now. Please do pop by and take a look.
</p>
        <p>
In addition, the team just completed a ton (a dozen or so) of <a href="http://blogs.msdn.com/clrteam/archive/tags/Channel+9/default.aspx">Channel
9 videos</a>. I've only watched the one with Vance so far, but I expect that they
are all very good. If you are a propeller-head, like the rest of us, you'll likely
get a kick out of these.
</p>
        <p>
Now that we've shipped Beta 1 of the .NET 4, we should see quite a number of posts
on .NET 4. Please do provide us with feedback on what we've built. We're very interesting
in what you think.
</p>
        <img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=fb296717-82ac-4903-ac4a-4f6a3d2793e0" />
      </body>
      <title>CLR Team Blog</title>
      <guid isPermaLink="false">http://hoser.lander.ca/PermaLink,guid,fb296717-82ac-4903-ac4a-4f6a3d2793e0.aspx</guid>
      <link>http://hoser.lander.ca/2009/05/29/CLRTeamBlog.aspx</link>
      <pubDate>Fri, 29 May 2009 04:45:12 GMT</pubDate>
      <description>&lt;p&gt;
A few months ago, we started the &lt;a href="http://blogs.msdn.com/clrteam/"&gt;CLR Team
Blog&lt;/a&gt;. There are quite a number of posts there and we're getting quite a lot of
traffic to the site. It has been a long time overdue, but I'm really excited that
our team has a single face now. Please do pop by and take a look.
&lt;/p&gt;
&lt;p&gt;
In addition, the team just completed a ton (a dozen or so) of &lt;a href="http://blogs.msdn.com/clrteam/archive/tags/Channel+9/default.aspx"&gt;Channel
9 videos&lt;/a&gt;. I've only watched the one with Vance so far, but I expect that they
are all very good. If you are a propeller-head, like the rest of us, you'll likely
get a kick out of these.
&lt;/p&gt;
&lt;p&gt;
Now that we've shipped Beta 1 of the .NET 4, we should see quite a number of posts
on .NET 4. Please do provide us with feedback on what we've built. We're very interesting
in what you think.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=fb296717-82ac-4903-ac4a-4f6a3d2793e0" /&gt;</description>
      <comments>http://hoser.lander.ca/CommentView,guid,fb296717-82ac-4903-ac4a-4f6a3d2793e0.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://hoser.lander.ca/Trackback.aspx?guid=f801a223-40c1-4fcb-90b9-a67da1ca73fa</trackback:ping>
      <pingback:server>http://hoser.lander.ca/pingback.aspx</pingback:server>
      <pingback:target>http://hoser.lander.ca/PermaLink,guid,f801a223-40c1-4fcb-90b9-a67da1ca73fa.aspx</pingback:target>
      <dc:creator>Rich Lander</dc:creator>
      <wfw:comment>http://hoser.lander.ca/CommentView,guid,f801a223-40c1-4fcb-90b9-a67da1ca73fa.aspx</wfw:comment>
      <wfw:commentRss>http://hoser.lander.ca/SyndicationService.asmx/GetEntryCommentsRss?guid=f801a223-40c1-4fcb-90b9-a67da1ca73fa</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Having installed Windows 7 RC, I decided to try <a href="http://www.microsoft.com/windows/virtual-pc/default.aspx">Windows
Virtual PC</a>. I had heard a number of months ago that we were building a new version
for Windows 7 that took advantage, actually required, hardware virtualization, but
had never tried it. Anyway, I'm quite happy with the experience. I had to do some
Vista --&gt; Win7 upgrade testing over the weekend, and did a bunch of it in the new
virtual PC. It was quite easy and pretty performant. It also didn't 0wn my machine
(the host OS), in terms of performance. I actually kept a virtual machine of Win7
up (that I was testing) for a number of days, even through a number of sleeps (close
laptop). It didn't seem to bother my laptop having the VPC up, even though I had a
ton of other apps open, and I did fiddle with the Win7 VPC along the way. There just
wasn't much of a motivation to close the session. Cool!
</p>
        <p>
I first ran a <a href="http://www.microsoft.com/windows/virtual-pc/support/configure-bios.aspx">tool</a> to
ensure that my chip (AMD or Intel) supported hardware virtualization. It takes just
a few mins to run. It is a good thing to verify that you will have virtualization
supported when you make your next PC/chip purchase. I certainly will. Fortunately,
two of my work machines support it, and just one doesn't.
</p>
        <p>
I briefly tried the XP mode. Seems to work! I can see using this for <a href="http://www.sondigo.com/sirocco/overview">the
one XP app</a> that I have that doesn't (yet) work on Win7. Scott has a <a href="http://www.hanselman.com/blog/Windows7SeamlessAppsInWindowsVirtualPCVirtualXPAndApplicationCompatibility.aspx">great
post</a> on how to use XP mode.
</p>
        <p>
I also like how the management of the virtual machines is implemented via shell extentions
(to the Windows Shell). It feels like (and is) a really light-weight experience. I've
never really gotten into virtual machines before, and I think that this version will
finally hook me!
</p>
        <img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=f801a223-40c1-4fcb-90b9-a67da1ca73fa" />
      </body>
      <title>Windows Virtual PC</title>
      <guid isPermaLink="false">http://hoser.lander.ca/PermaLink,guid,f801a223-40c1-4fcb-90b9-a67da1ca73fa.aspx</guid>
      <link>http://hoser.lander.ca/2009/05/29/WindowsVirtualPC.aspx</link>
      <pubDate>Fri, 29 May 2009 04:15:04 GMT</pubDate>
      <description>&lt;p&gt;
Having installed Windows 7 RC, I decided to try &lt;a href="http://www.microsoft.com/windows/virtual-pc/default.aspx"&gt;Windows
Virtual PC&lt;/a&gt;. I had heard a number of months ago that we were building a new version
for Windows 7 that took advantage, actually required, hardware virtualization, but
had never tried it. Anyway, I'm quite happy with the experience. I had to do some
Vista --&gt; Win7 upgrade testing over the weekend, and did a bunch of it in the new
virtual PC. It was quite easy and pretty performant. It also didn't 0wn my machine
(the host OS), in terms of performance. I actually kept a virtual machine of Win7
up (that I was testing) for a number of days, even through a number of sleeps (close
laptop). It didn't seem to bother my laptop having the VPC up, even though I had a
ton of other apps open, and I did fiddle with the Win7 VPC along the way. There just
wasn't much of a motivation to close the session. Cool!
&lt;/p&gt;
&lt;p&gt;
I first ran a &lt;a href="http://www.microsoft.com/windows/virtual-pc/support/configure-bios.aspx"&gt;tool&lt;/a&gt; to
ensure that my chip (AMD or Intel) supported hardware virtualization. It takes just
a few mins to run. It is a good thing to verify that you will have virtualization
supported when you make your next PC/chip purchase. I certainly will. Fortunately,
two of my work machines support it, and just one doesn't.
&lt;/p&gt;
&lt;p&gt;
I briefly tried the XP mode. Seems to work! I can see using this for &lt;a href="http://www.sondigo.com/sirocco/overview"&gt;the
one XP app&lt;/a&gt; that I have that doesn't (yet) work on Win7. Scott has a &lt;a href="http://www.hanselman.com/blog/Windows7SeamlessAppsInWindowsVirtualPCVirtualXPAndApplicationCompatibility.aspx"&gt;great
post&lt;/a&gt; on how to use XP mode.
&lt;/p&gt;
&lt;p&gt;
I also like how the management of the virtual machines is implemented via shell extentions
(to the Windows Shell). It feels like (and is) a really light-weight experience. I've
never really gotten into virtual machines before, and I think that this version will
finally hook me!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=f801a223-40c1-4fcb-90b9-a67da1ca73fa" /&gt;</description>
      <comments>http://hoser.lander.ca/CommentView,guid,f801a223-40c1-4fcb-90b9-a67da1ca73fa.aspx</comments>
    </item>
    <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=8b737448-f120-4f5f-ba9e-217c8f513b57</trackback:ping>
      <pingback:server>http://hoser.lander.ca/pingback.aspx</pingback:server>
      <pingback:target>http://hoser.lander.ca/PermaLink,guid,8b737448-f120-4f5f-ba9e-217c8f513b57.aspx</pingback:target>
      <dc:creator>Rich Lander</dc:creator>
      <wfw:comment>http://hoser.lander.ca/CommentView,guid,8b737448-f120-4f5f-ba9e-217c8f513b57.aspx</wfw:comment>
      <wfw:commentRss>http://hoser.lander.ca/SyndicationService.asmx/GetEntryCommentsRss?guid=8b737448-f120-4f5f-ba9e-217c8f513b57</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font size="3">I posted last year about the </font>
          <a href="http://hoser.lander.ca/2007/12/04/WiringTheHouseForCAT5e.aspx">
            <font size="3">home
network</font>
          </a>
          <font size="3"> that I had built. It was actually a fair bit of
work and somewhat expensive to get the base network and the initial set of drops setup.
It also required a fair bit of thinking and up-front design to get the network structured
in such a way that it would work for my up-front needs, and then would scale for new
scenarios that I could imagine. It may seem like the task is really simple, and it
kind of is on the face of it. </font>
        </p>
        <p>
          <font size="3">The difficulty is that you need to think through how many CAT5e/6 cables
that you string between major areas of your house. For example, my cable modem and
HDHR devices are in my garage (where my cable comes into the house), my gigE switch,
a bunch of machines and my VOIP box are in my basement, and my wifi AP is
in my attic. That may sound horribly bizarre, but each device is really in the best
location for its purpose, and I needed to ensure that I had enough cable going between
locations to handle the neccessary connectivity.</font>
        </p>
        <p>
          <font size="3">That also doesn't count that I am running voice (voice originating
from my VOIP box) throughout the house over some of these lines, which means that
I have to add another line for analog voice between the major areas of house beyond
what I need for the IP network.</font>
        </p>
        <p>
          <font size="3">My point in this post is that after nearly a year, I decided to add
three more drops on the top floor of the house. Other than the requirement to crawl
into the corners of my attic for one of the drops, it was really, really easy
to tie into the base network that I'd setup months ago. It was very clear what I needed
to do to tie into the network, and it all worked the first time.</font>
        </p>
        <p>
          <font size="3">In addition, I decided to hook up all three of the new drops for data
for now, but it will take me just a few mins to 'downgrade' one of them to voice
should I want to. It is really nice to have that degree of freedom w/o having
to re-wire or otherwise re-do any of the work that I've done. </font>
        </p>
        <img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=8b737448-f120-4f5f-ba9e-217c8f513b57" />
      </body>
      <title>Extending my home network</title>
      <guid isPermaLink="false">http://hoser.lander.ca/PermaLink,guid,8b737448-f120-4f5f-ba9e-217c8f513b57.aspx</guid>
      <link>http://hoser.lander.ca/2008/09/26/ExtendingMyHomeNetwork.aspx</link>
      <pubDate>Fri, 26 Sep 2008 21:48:51 GMT</pubDate>
      <description>&lt;p&gt;
&lt;font size=3&gt;I posted last year about the &lt;/font&gt;&lt;a href="http://hoser.lander.ca/2007/12/04/WiringTheHouseForCAT5e.aspx"&gt;&lt;font size=3&gt;home
network&lt;/font&gt;&lt;/a&gt;&lt;font size=3&gt; that I had built. It was actually a fair bit of work
and somewhat expensive to get the base network and the initial set of drops setup.
It also required a fair bit of thinking and up-front design to get the network structured
in such a way that it would work for my up-front needs, and then would scale for new
scenarios that I could imagine. It may seem like the task is really simple, and it
kind of is on the face of it. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size=3&gt;The difficulty is that you need to think through how many CAT5e/6 cables
that you string between major areas of your house. For example, my cable modem and
HDHR devices are in my garage (where my cable comes into the house), my gigE switch,
a bunch of machines&amp;nbsp;and my VOIP box&amp;nbsp;are in my basement, and my wifi AP is
in my attic. That may sound horribly bizarre, but each device is really in the best
location for its purpose, and I needed to ensure that I had enough cable going between
locations to handle the neccessary connectivity.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size=3&gt;That also doesn't count that I am running voice (voice originating from
my VOIP box) throughout the house over some of these lines, which means that I have
to add another line for analog voice between the major areas of house beyond what
I need for the IP network.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size=3&gt;My point in this post is that after nearly a year, I decided to add three
more drops on the top floor of the house. Other than the requirement to crawl into
the corners of&amp;nbsp;my attic for one of the drops, it was really, really easy to tie
into the base network that I'd setup months ago. It was very clear what I needed to
do to tie into the network, and it all worked the first time.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size=3&gt;In addition, I decided to hook up all three of the new drops for data
for now, but&amp;nbsp;it will take me just a few mins to 'downgrade' one of them to voice
should I want to. It is really nice to have that degree of&amp;nbsp;freedom w/o having
to re-wire or otherwise re-do any of the work that I've done.&amp;nbsp;&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=8b737448-f120-4f5f-ba9e-217c8f513b57" /&gt;</description>
      <comments>http://hoser.lander.ca/CommentView,guid,8b737448-f120-4f5f-ba9e-217c8f513b57.aspx</comments>
      <category>Networking</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=c9cad210-3a70-4536-b94d-118d089a4062</trackback:ping>
      <pingback:server>http://hoser.lander.ca/pingback.aspx</pingback:server>
      <pingback:target>http://hoser.lander.ca/PermaLink,guid,c9cad210-3a70-4536-b94d-118d089a4062.aspx</pingback:target>
      <dc:creator>Rich Lander</dc:creator>
      <wfw:comment>http://hoser.lander.ca/CommentView,guid,c9cad210-3a70-4536-b94d-118d089a4062.aspx</wfw:comment>
      <wfw:commentRss>http://hoser.lander.ca/SyndicationService.asmx/GetEntryCommentsRss?guid=c9cad210-3a70-4536-b94d-118d089a4062</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I finally decided that it was time to get a real network setup in my house. I had
some one-off network segments around the house for particular purposes, but not a
real whole-house network w/a set of primary interconnect points, in addition to CAT5e
drops around the house.
</p>
        <p>
This project really started this summer when we had the house painted. I ripped off
(imagine a violent action) all the coax and phone cords off the side of the house
prior to the painting, both to ensure that the paint got under the wires, and to remove
them permanently. I bought an <a href="http://www.silicondust.com/">HDHR</a> at the
same time to enable a new cable connection to my TV, over one of the network segments
that I mentioned earlier. That worked out nicely. Still, I wanted to be able to use
my HDHR on any PC in the house, and that's kinda difficult to reliably over 'g' wireless.
Others may argue the fact, but try viewing HD content, and you'll see that 'g' falls
on its face for that application, particularly if you have multiple streams going
at once. I could have gone 'n' and will, but I really wanted to get a gigE network
up and running, since it is fast and reliable.
</p>
        <p>
I also should note that my existing phone network had already proven to be pretty
bad. So, I already had an existing need to fix that.
</p>
        <p>
Off to Home Depot, which is pretty much the answer to all issues relating to the home.
Come back with 1000ft of riser CAT5e, 50 RJ45 connectors, a <a href="http://www.idealindustries.com/products/datacomm/tools/telemaster_telephone_tool.jsp">Ideal
crimper</a> and and <a href="http://www.idealindustries.com/prodDetail.do?prodId=62-200&amp;div=2&amp;l1=testers&amp;l2=testers_twisted_pair&amp;l3=62-200">Ideal
LinkMaster</a> CAT5 line tester. I also bought 8 large pieces of drywall, wood, some
insulation and a whole ton of other odds and sods, but that is indeed another project.
</p>
        <p>
I'm finding that cutting (to length) and crimping CAT5 is something of a challenge.
It is conceptually simple, but I appear to be still mastering this task. I've made
a bunch of mistakes, such as not following a wiring standard at first (even though
I've used them before for my earlier network segments), mistaking the pin order of
the connectors, and then incorrectly ordering the pins once I'd chosen T568A as the
standard to use. The test tool is kinda neat since it tells you exactly where and
how you've messed up. This is pretty useful if you've got a 50ft segment from your
basement to your attic that isn't able to create a connection.
</p>
        <p>
When I'm done, I'll have both a new phone network (over CAT5) and data network. The
phone network actually only uses 1/4 of a CAT5 line, but that's OK. The 'backbone'
is two CAT5 (one data, one phone) lines and one additional CAT5 line that I may need
later for some unknown reason. Every drop (phone or data) connects to this backbone
at one of three interconnect points (garage, attic and wiring closet in the basement).
This allows me to easily add machines, NAS, APs and pretty much any other kinda IP
appliance (like the HDHR) at any point in the network.
</p>
        <p>
My neighbor, who is in his 70s, keeps making references to me being able to "run Microsoft
on this network". It is pretty funny to hear that viewpoint. I'm sure that there is
more XBox Live traffic during the day on the internal MSFT network than my wee network
would ever be able to handle, except maybe on Christmas day ;)
</p>
        <img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=c9cad210-3a70-4536-b94d-118d089a4062" />
      </body>
      <title>Wiring the house for CAT5e</title>
      <guid isPermaLink="false">http://hoser.lander.ca/PermaLink,guid,c9cad210-3a70-4536-b94d-118d089a4062.aspx</guid>
      <link>http://hoser.lander.ca/2007/12/04/WiringTheHouseForCAT5e.aspx</link>
      <pubDate>Tue, 04 Dec 2007 07:20:53 GMT</pubDate>
      <description>&lt;p&gt;
I finally decided that it was time to get a real network setup in my house. I had
some one-off network segments around the house for particular purposes, but not a
real whole-house network w/a set of primary interconnect points, in addition to CAT5e
drops around the house.
&lt;/p&gt;
&lt;p&gt;
This project really started this summer when we had the house painted. I ripped off
(imagine a violent action) all the coax and phone cords off the side of the house
prior to the painting, both to ensure that the paint got under the wires, and to remove
them permanently. I bought an &lt;a href="http://www.silicondust.com/"&gt;HDHR&lt;/a&gt; at the
same time to enable a new cable connection to my TV, over one of the network segments
that I mentioned earlier. That worked out nicely. Still, I wanted to be able to use
my HDHR on any PC in the house, and that's kinda difficult to reliably over 'g' wireless.
Others may argue the fact, but try viewing HD content, and you'll see that 'g' falls
on its face for that application, particularly if you have multiple streams going
at once. I could have gone 'n' and will, but I really wanted to get a gigE network
up and running, since it is fast and reliable.
&lt;/p&gt;
&lt;p&gt;
I also should note that my existing phone network had already proven to be pretty
bad. So, I already had an existing need to fix that.
&lt;/p&gt;
&lt;p&gt;
Off to Home Depot, which is pretty much the answer to all issues relating to the home.
Come back with 1000ft of riser CAT5e, 50 RJ45 connectors, a &lt;a href="http://www.idealindustries.com/products/datacomm/tools/telemaster_telephone_tool.jsp"&gt;Ideal
crimper&lt;/a&gt; and and &lt;a href="http://www.idealindustries.com/prodDetail.do?prodId=62-200&amp;amp;div=2&amp;amp;l1=testers&amp;amp;l2=testers_twisted_pair&amp;amp;l3=62-200"&gt;Ideal
LinkMaster&lt;/a&gt; CAT5 line tester. I also bought 8 large pieces of drywall, wood, some
insulation and a whole ton of other odds and sods, but that is indeed another project.
&lt;/p&gt;
&lt;p&gt;
I'm finding that cutting (to length) and crimping CAT5 is something of a challenge.
It is conceptually simple, but I appear to be still mastering this task. I've made
a bunch of mistakes, such as not following a wiring standard at first (even though
I've used them before for my earlier network segments), mistaking the pin order of
the connectors, and then incorrectly ordering the pins once I'd chosen T568A as the
standard to use. The test tool is kinda neat since it tells you exactly where and
how you've messed up. This is pretty useful if you've got a 50ft segment from your
basement to your attic that isn't able to create a connection.
&lt;/p&gt;
&lt;p&gt;
When I'm done, I'll have both a new phone network (over CAT5) and data network. The
phone network actually only uses 1/4 of a CAT5 line, but that's OK. The 'backbone'
is two CAT5 (one data, one phone) lines and one additional CAT5 line that I may need
later for some unknown reason. Every drop (phone or data) connects to this backbone
at one of three interconnect points (garage, attic and wiring closet in the basement).
This allows me to easily add machines, NAS, APs and pretty much any other kinda IP
appliance (like the HDHR) at any point in the network.
&lt;/p&gt;
&lt;p&gt;
My neighbor, who is in his 70s, keeps making references to me being able to "run Microsoft
on this network". It is pretty funny to hear that viewpoint. I'm sure that there is
more XBox Live traffic during the day on the internal MSFT network than my wee network
would ever be able to handle, except maybe on Christmas day ;)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=c9cad210-3a70-4536-b94d-118d089a4062" /&gt;</description>
      <comments>http://hoser.lander.ca/CommentView,guid,c9cad210-3a70-4536-b94d-118d089a4062.aspx</comments>
      <category>Networking</category>
    </item>
    <item>
      <trackback:ping>http://hoser.lander.ca/Trackback.aspx?guid=9f0e2c49-9cb4-46c5-b5b6-e06842f80f52</trackback:ping>
      <pingback:server>http://hoser.lander.ca/pingback.aspx</pingback:server>
      <pingback:target>http://hoser.lander.ca/PermaLink,guid,9f0e2c49-9cb4-46c5-b5b6-e06842f80f52.aspx</pingback:target>
      <dc:creator>Rich Lander</dc:creator>
      <wfw:comment>http://hoser.lander.ca/CommentView,guid,9f0e2c49-9cb4-46c5-b5b6-e06842f80f52.aspx</wfw:comment>
      <wfw:commentRss>http://hoser.lander.ca/SyndicationService.asmx/GetEntryCommentsRss?guid=9f0e2c49-9cb4-46c5-b5b6-e06842f80f52</wfw:commentRss>
      <title>Silverlight User Controls and this.Children</title>
      <guid isPermaLink="false">http://hoser.lander.ca/PermaLink,guid,9f0e2c49-9cb4-46c5-b5b6-e06842f80f52.aspx</guid>
      <link>http://hoser.lander.ca/2007/09/11/SilverlightUserControlsAndThisChildren.aspx</link>
      <pubDate>Tue, 11 Sep 2007 21:01:58 GMT</pubDate>
      <description>&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;More Silverlight exploration.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;&lt;/font&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;I want to create a user control that has the
concept of children that I can add (this.Children.Add()). I see that Panel adds this
concept, but that Control is missing it. At the same time, Control provides the InitializeFromXaml
helper, which seems to be pretty integral to user controls. Panel and Control are
completely disjoint (in terms of inheritance chain), so you cannot nicely merge these
two.&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=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 0pt"&gt;
&lt;font face=Calibri color=#000000 size=3&gt;What are folks expected to do in this situation? &lt;/font&gt;&lt;font face=Calibri color=#000000 size=3&gt;Good
question. The team is aware of this, and working on a solution. In the meantime, you
(and me) will will need to do some hacking to get the control children outcome.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=9f0e2c49-9cb4-46c5-b5b6-e06842f80f52" /&gt;</description>
      <comments>http://hoser.lander.ca/CommentView,guid,9f0e2c49-9cb4-46c5-b5b6-e06842f80f52.aspx</comments>
      <category>Silverlight</category>
    </item>
    <item>
      <trackback:ping>http://hoser.lander.ca/Trackback.aspx?guid=0ad7160e-0d96-459e-bfb3-35fe05d83c3f</trackback:ping>
      <pingback:server>http://hoser.lander.ca/pingback.aspx</pingback:server>
      <pingback:target>http://hoser.lander.ca/PermaLink,guid,0ad7160e-0d96-459e-bfb3-35fe05d83c3f.aspx</pingback:target>
      <dc:creator>Rich Lander</dc:creator>
      <wfw:comment>http://hoser.lander.ca/CommentView,guid,0ad7160e-0d96-459e-bfb3-35fe05d83c3f.aspx</wfw:comment>
      <wfw:commentRss>http://hoser.lander.ca/SyndicationService.asmx/GetEntryCommentsRss?guid=0ad7160e-0d96-459e-bfb3-35fe05d83c3f</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <title>(Annoying) Sealed Classes in Silverlight</title>
      <guid isPermaLink="false">http://hoser.lander.ca/PermaLink,guid,0ad7160e-0d96-459e-bfb3-35fe05d83c3f.aspx</guid>
      <link>http://hoser.lander.ca/2007/09/11/AnnoyingSealedClassesInSilverlight.aspx</link>
      <pubDate>Tue, 11 Sep 2007 18:16:48 GMT</pubDate>
      <description>&lt;p&gt;
I had a strange (and not particularly pleasant) morning today, so I quickly decided
as I entered my office that I wouldn't be doing any work this morning. Time&amp;nbsp;to
open VS and kick on Silverlight a bit more. 
&lt;/p&gt;
&lt;p&gt;
I'm thinking that the task for the morning is to write a fancy Image subclass. Sit
down, new SL project, add a user control and add ": Image" to my class declaration.
Turns out that doesn't work. Huh?
&lt;/p&gt;
&lt;p&gt;
I open up the object browser, and System.Windows.Controls.Image is 'sealed'. Ouch!
You have to subclass Control, or MediaBase. This isn't the experience that I was looking
for. Hmm. Answer: Send mail ...
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;b&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'"&gt;&lt;font face="Courier New" color=#000000&gt;From:&lt;/font&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'"&gt;&lt;font color=#000000&gt;&lt;font face="Courier New"&gt; Richard
Lander 
&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Tuesday, September 11, 2007 10:50 AM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Rich's Buddies in Jolt team&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt; Image
is sealed. Why?&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&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="Courier New" 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 face="Courier New" color=#000000&gt;I was noticing that all the end-point classes
(Image, Textblock, …) are sealed. What’s the thinking on that? It definitely inhibits
the developer experience.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;
&lt;o:p&gt;
&lt;font face="Courier New" 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 face="Courier New" color=#000000&gt;rich&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;
I'm still waiting back on the final answer, but I'm guessing (and hoping) that this
is issue is a bug. It has to be.
&lt;/p&gt;
&lt;p&gt;
I also noticed &lt;a href="http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2007/08/10/9578.aspx"&gt;someone
else running into a variant of this issue&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
I'll keep on pusing on this one.
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&gt;
&lt;img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=0ad7160e-0d96-459e-bfb3-35fe05d83c3f" /&gt;</description>
      <comments>http://hoser.lander.ca/CommentView,guid,0ad7160e-0d96-459e-bfb3-35fe05d83c3f.aspx</comments>
      <category>Silverlight</category>
    </item>
    <item>
      <trackback:ping>http://hoser.lander.ca/Trackback.aspx?guid=cd301725-9e4b-4b03-bbe9-1cfea06424b0</trackback:ping>
      <pingback:server>http://hoser.lander.ca/pingback.aspx</pingback:server>
      <pingback:target>http://hoser.lander.ca/PermaLink,guid,cd301725-9e4b-4b03-bbe9-1cfea06424b0.aspx</pingback:target>
      <dc:creator>Rich Lander</dc:creator>
      <wfw:comment>http://hoser.lander.ca/CommentView,guid,cd301725-9e4b-4b03-bbe9-1cfea06424b0.aspx</wfw:comment>
      <wfw:commentRss>http://hoser.lander.ca/SyndicationService.asmx/GetEntryCommentsRss?guid=cd301725-9e4b-4b03-bbe9-1cfea06424b0</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I imagine that most developers when presented with the concept of Silverlight have
a very joyous first response. And then the next thought is a pragmatic one of wondering
how much code (source or binaries) can be shared between Orcas and Silverlight. In
the past, I've come across some pretty interesting uses of ASP.NET to share experiences
across both the server and the offline client. Today, I'm pretty sure that we can
offer a better scenario than that.
</p>
        <p>
Before we go into details, let's talk scenarios. My dream scenario is that <a href="http://turbotax.intuit.com/">TurboTax</a> would
move their web-based version to Silverlight, and their client version to full WPF.
For the Silverlight version, I'm thinking of a pretty immersive application, along
the lines of the <a href="http://www.nibblestutorials.net/">nibbles tutorial</a> or
the new <a href="http://www.tafiti.com/">Tafiti search app</a>. I can easily see a
major improvement in customer experience, including for me, a multi-year TurboTax
customer.
</p>
        <p>
The question on the table is the degree to which Turbotax developers (for my dream
scenario) could share code across those two presentations of Silverlight. There
are two parts of that: the UI layer (WPF code, xaml and other assets), and then the
business logic. Although possibly the most interesting topic, I won't address the
UI at this point since the WPF and Jolt teams are still working out the kinks on that
issue. The business logic aspect of the issue is well within the purview of what I've
been working on. 
</p>
        <p>
Our goal for business logic has been pretty simple: subset the existing Orcas
stack for the BCL, XML and other base technologies in a very, very compatible way.
We want folks to be able to take their Silverlight business logic, and re-use it on
the desktop. For Turbotax, you could imagine them being able to port all the code
that calculates your taxes against the static IRS tax tables to Orcas. At this
point, we're focussed on making source re-use work really well. Binary porting is
definitely something that's on our list, but not what we consider to be the mainline
scenario since you'll need to re-compile your UI code anyway. I'd like your feedback
on it if you have a differing opinion.
</p>
        <p>
You might notice that I'm talking about porting code from Silverlight *to* Orcas.
The reverse direction isn't nearly as compelling. By definition, Silverlight will
always be a subset of Orcas, and your Orcas code may have a lot of dependencies on
types that are only part of Orcas. Starting from Silverlight, you know that all of
the APIs that you use will also be on Orcas, and you're experience porting to Orcas
will be straightforward.
</p>
        <p>
One kink is that we've added APIs to Silverlight that are not in Orcas. So, my story
as described above is actually a little flawed. Naturally, we'll add those to the
next desktop release after Orcas, but there is a question of how to deal with that
in the meantime. We do have a solution for that that we're working on. I'll post
on that when I have firm details available.
</p>
        <img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=cd301725-9e4b-4b03-bbe9-1cfea06424b0" />
      </body>
      <title>Sharing Code Between Silverlight and Orcas</title>
      <guid isPermaLink="false">http://hoser.lander.ca/PermaLink,guid,cd301725-9e4b-4b03-bbe9-1cfea06424b0.aspx</guid>
      <link>http://hoser.lander.ca/2007/08/28/SharingCodeBetweenSilverlightAndOrcas.aspx</link>
      <pubDate>Tue, 28 Aug 2007 05:00:00 GMT</pubDate>
      <description>&lt;p&gt;
I imagine that most developers when presented with the concept of Silverlight have
a very joyous first response. And then the next thought is a pragmatic one of wondering
how much code (source or binaries) can be shared between Orcas and Silverlight. In
the past, I've come across some pretty interesting uses of ASP.NET to share experiences
across both the server and the offline client. Today, I'm pretty sure that we can
offer a better scenario than that.
&lt;/p&gt;
&lt;p&gt;
Before we go into details, let's talk scenarios. My dream scenario is that &lt;a href="http://turbotax.intuit.com/"&gt;TurboTax&lt;/a&gt; would
move their web-based version to Silverlight, and their client version to full WPF.
For the Silverlight version, I'm thinking of a pretty immersive application, along
the lines of the &lt;a href="http://www.nibblestutorials.net/"&gt;nibbles tutorial&lt;/a&gt; or
the new &lt;a href="http://www.tafiti.com/"&gt;Tafiti search app&lt;/a&gt;. I can easily see a
major improvement in customer experience, including for me, a multi-year TurboTax
customer.
&lt;/p&gt;
&lt;p&gt;
The question on the table is the degree to which Turbotax developers (for my dream
scenario)&amp;nbsp;could share code across those two presentations of Silverlight. There
are two parts of that: the UI layer (WPF code, xaml and other assets), and then the
business logic. Although possibly the most interesting topic, I won't address the
UI at this point since the WPF and Jolt teams are still working out the kinks on that
issue. The business logic aspect of the issue is well within the purview of what I've
been working on. 
&lt;/p&gt;
&lt;p&gt;
Our goal for business logic&amp;nbsp;has been pretty simple: subset the existing Orcas
stack for the BCL, XML and other base technologies in a very, very compatible way.
We want folks to be able to take their Silverlight business logic, and re-use it on
the desktop. For Turbotax, you could imagine them being able to port all the code
that calculates your taxes against the static IRS tax tables to Orcas.&amp;nbsp;At this
point, we're focussed on making source re-use work really well. Binary porting is
definitely something that's on our list, but not what we consider to be the mainline
scenario since you'll need to re-compile your UI code anyway. I'd like your feedback
on it if you have a differing opinion.
&lt;/p&gt;
&lt;p&gt;
You might notice that I'm talking about porting code from Silverlight *to* Orcas.
The reverse direction isn't nearly as compelling. By definition, Silverlight will
always be a subset of Orcas, and your Orcas code may have a lot of dependencies on
types that are only part of Orcas. Starting from Silverlight, you know that all of
the APIs that you use will also be on Orcas, and you're experience porting to Orcas
will be straightforward.
&lt;/p&gt;
&lt;p&gt;
One kink is that we've added APIs to Silverlight that are not in Orcas. So, my story
as described above is actually a little flawed. Naturally, we'll add those to the
next desktop release after Orcas, but there is a question of how to deal with that
in the meantime. We do have a solution for that&amp;nbsp;that we're working on. I'll post
on that when I have firm details available.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=cd301725-9e4b-4b03-bbe9-1cfea06424b0" /&gt;</description>
      <comments>http://hoser.lander.ca/CommentView,guid,cd301725-9e4b-4b03-bbe9-1cfea06424b0.aspx</comments>
      <category>Compatibility</category>
      <category>Silverlight</category>
    </item>
    <item>
      <trackback:ping>http://hoser.lander.ca/Trackback.aspx?guid=a884663f-43da-40db-bed5-ac4362c00875</trackback:ping>
      <pingback:server>http://hoser.lander.ca/pingback.aspx</pingback:server>
      <pingback:target>http://hoser.lander.ca/PermaLink,guid,a884663f-43da-40db-bed5-ac4362c00875.aspx</pingback:target>
      <dc:creator>Rich Lander</dc:creator>
      <wfw:comment>http://hoser.lander.ca/CommentView,guid,a884663f-43da-40db-bed5-ac4362c00875.aspx</wfw:comment>
      <wfw:commentRss>http://hoser.lander.ca/SyndicationService.asmx/GetEntryCommentsRss?guid=a884663f-43da-40db-bed5-ac4362c00875</wfw:commentRss>
      <slash:comments>5</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Judging by the search engine traffic to my blog, it appears like folks are still looking
for gacutil! 
</p>
        <p>
I wrote <a href="http://hoser.lander.ca/2005/12/06/GACUtilV20WhereToGetIt.aspx">this
post</a> almost 2 years ago, relating to Whidbey, and the location of gacutil at
that time.
</p>
        <p>
Gacutil, and the rest of the SDK, has moved again. You can install it with <a href="http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx">VS
2008</a> or <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=74DD6E2D-89C6-4E1E-AF00-FC7D70F15439&amp;displaylang=en">separately</a>.
In either case, once installed, you'll find it on your disk @ C:\Program Files\Microsoft
SDKs\Windows\v6.0A\bin\gacutil.exe.
</p>
        <p>
BTW: The .NET Framework SDK now has a new name, so searching for the .NET Framework
SDK doesn't work as well now. It is now called "Microsoft® Windows® Software Development
Kit (SDK) for Windows Server® 2008 and .NET Framework 3.5".
</p>
        <img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=a884663f-43da-40db-bed5-ac4362c00875" />
      </body>
      <title>Orcas Gacutil -- Where to get it -- and the Rest of the .NET SDK</title>
      <guid isPermaLink="false">http://hoser.lander.ca/PermaLink,guid,a884663f-43da-40db-bed5-ac4362c00875.aspx</guid>
      <link>http://hoser.lander.ca/2007/08/28/OrcasGacutilWhereToGetItAndTheRestOfTheNETSDK.aspx</link>
      <pubDate>Tue, 28 Aug 2007 04:45:21 GMT</pubDate>
      <description>&lt;p&gt;
Judging by the search engine traffic to my blog, it appears like folks are still looking
for gacutil! 
&lt;/p&gt;
&lt;p&gt;
I wrote &lt;a href="http://hoser.lander.ca/2005/12/06/GACUtilV20WhereToGetIt.aspx"&gt;this
post&lt;/a&gt; almost 2 years ago, relating to Whidbey, and the location of gacutil&amp;nbsp;at
that time.
&lt;/p&gt;
&lt;p&gt;
Gacutil, and the rest of the SDK, has moved again. You can install it with &lt;a href="http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx"&gt;VS
2008&lt;/a&gt; or &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=74DD6E2D-89C6-4E1E-AF00-FC7D70F15439&amp;amp;displaylang=en"&gt;separately&lt;/a&gt;.
In either case, once installed,&amp;nbsp;you'll find it on your disk @ C:\Program Files\Microsoft
SDKs\Windows\v6.0A\bin\gacutil.exe.
&lt;/p&gt;
&lt;p&gt;
BTW: The .NET Framework SDK now has a new name, so searching for the .NET Framework
SDK doesn't work as well now. It is now called "Microsoft® Windows® Software Development
Kit (SDK) for Windows Server® 2008 and .NET Framework 3.5".
&lt;/p&gt;
&lt;img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=a884663f-43da-40db-bed5-ac4362c00875" /&gt;</description>
      <comments>http://hoser.lander.ca/CommentView,guid,a884663f-43da-40db-bed5-ac4362c00875.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://hoser.lander.ca/Trackback.aspx?guid=8f9edc04-b12a-47e8-b52e-88ad617eabf5</trackback:ping>
      <pingback:server>http://hoser.lander.ca/pingback.aspx</pingback:server>
      <pingback:target>http://hoser.lander.ca/PermaLink,guid,8f9edc04-b12a-47e8-b52e-88ad617eabf5.aspx</pingback:target>
      <dc:creator>Rich Lander</dc:creator>
      <wfw:comment>http://hoser.lander.ca/CommentView,guid,8f9edc04-b12a-47e8-b52e-88ad617eabf5.aspx</wfw:comment>
      <wfw:commentRss>http://hoser.lander.ca/SyndicationService.asmx/GetEntryCommentsRss?guid=8f9edc04-b12a-47e8-b52e-88ad617eabf5</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I've been using Terminal Services (AKA 'Remote Desktop') since I started working at
Microsoft in 2000. Back then, we were using Windows 2000, natually. After having used
the 9x family of Windows since Win 3.1 (and DOS before that), the whole concept of
'TS' seemed pretty incredible. Yes, I'd used similar facilities on other OSes, such
as Solaris, but never on Windows.
</p>
        <p>
          <a href="http://www.microsoft.com/windowsserver2008/default.mspx">Windows Server 2008</a> brings
along with it another similar and related breakthrough. It's called <a href="http://www.microsoft.com/windowsserver2008/evaluation/overview.mspx#EUD">RemoteApp</a>.
Instead of remoting a whole desktop, it remotes an application. The initial logon
process is very similar to Remote Desktop, but after that, you really do have a
window that operates just like any other window on your desktop. There are some aspects
of 'remote-ness' that leak through, but they are far, far, overpowered by the utility
of the feature. Also, you don't need to logon for each window, just once for the machine
from which the RemoteApps are remoted.
</p>
        <p>
I've been dogfooding this feature for a while, and I find it incredibly useful and
productive when working from home (which I do a fair bit -- like right now). Imagine
having a RemoteApp IE window on your desktop that is on your corporate network. You
have your regular IE on your desktop that you use to <a href="http://www.engadget.com/">view
random web content</a>, and the RemoteApp IE that you use to browse your corporate
network. This is super useful for sharepoint sites on your corporate network.
</p>
        <p>
Next step is to convince (A) your CFO to buy a bunch of Windows Server 2008 boxen,
and (B) get your admins to turn on this feature.
</p>
        <img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=8f9edc04-b12a-47e8-b52e-88ad617eabf5" />
      </body>
      <title>RemoteApp on Windows Server 2008</title>
      <guid isPermaLink="false">http://hoser.lander.ca/PermaLink,guid,8f9edc04-b12a-47e8-b52e-88ad617eabf5.aspx</guid>
      <link>http://hoser.lander.ca/2007/08/15/RemoteAppOnWindowsServer2008.aspx</link>
      <pubDate>Wed, 15 Aug 2007 05:08:45 GMT</pubDate>
      <description>&lt;p&gt;
I've been using Terminal Services (AKA 'Remote Desktop') since I started working at
Microsoft in 2000. Back then, we were using Windows 2000, natually. After having used
the 9x family of Windows since Win 3.1 (and DOS before that), the whole concept of
'TS' seemed pretty incredible. Yes, I'd used similar facilities on other OSes, such
as Solaris, but never on Windows.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.microsoft.com/windowsserver2008/default.mspx"&gt;Windows Server 2008&lt;/a&gt; brings
along with it another similar and related breakthrough. It's called &lt;a href="http://www.microsoft.com/windowsserver2008/evaluation/overview.mspx#EUD"&gt;RemoteApp&lt;/a&gt;.
Instead of remoting a whole desktop, it remotes an application. The initial logon
process is very similar to Remote Desktop, but after that, you really do have&amp;nbsp;a
window that operates just like any other window on your desktop. There are some aspects
of 'remote-ness' that leak through, but they are far, far, overpowered by the utility
of the feature. Also, you don't need to logon for each window, just once for the machine
from which the RemoteApps are remoted.
&lt;/p&gt;
&lt;p&gt;
I've been dogfooding this feature for a while, and I find it incredibly useful and
productive when working from home (which I do a fair bit -- like right now). Imagine
having a RemoteApp IE window on your desktop that is on your corporate network. You
have your regular IE on your desktop that you use to &lt;a href="http://www.engadget.com/"&gt;view
random web content&lt;/a&gt;, and the RemoteApp IE that you use to browse your corporate
network. This is super useful for sharepoint sites on your corporate network.
&lt;/p&gt;
&lt;p&gt;
Next step is to convince (A) your CFO to buy a bunch of Windows Server 2008 boxen,
and (B) get your admins to turn on this feature.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=8f9edc04-b12a-47e8-b52e-88ad617eabf5" /&gt;</description>
      <comments>http://hoser.lander.ca/CommentView,guid,8f9edc04-b12a-47e8-b52e-88ad617eabf5.aspx</comments>
      <category>Windows Server</category>
    </item>
    <item>
      <trackback:ping>http://hoser.lander.ca/Trackback.aspx?guid=bd41d6a9-a397-4b7e-82b7-097473241166</trackback:ping>
      <pingback:server>http://hoser.lander.ca/pingback.aspx</pingback:server>
      <pingback:target>http://hoser.lander.ca/PermaLink,guid,bd41d6a9-a397-4b7e-82b7-097473241166.aspx</pingback:target>
      <dc:creator>Rich Lander</dc:creator>
      <wfw:comment>http://hoser.lander.ca/CommentView,guid,bd41d6a9-a397-4b7e-82b7-097473241166.aspx</wfw:comment>
      <wfw:commentRss>http://hoser.lander.ca/SyndicationService.asmx/GetEntryCommentsRss?guid=bd41d6a9-a397-4b7e-82b7-097473241166</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The comments on <a href="http://hoser.lander.ca/CommentView,guid,e9fae18d-b233-44c4-ace2-22b3bc4710b5.aspx#commentstart">yesterday's
post</a> on compatibility are pretty interesting.
</p>
        <p>
There are effectively four options available when you find yourself a few versions
into a platform and realize that you've made mistakes:
</p>
        <ol>
          <li>
Keep the mistakes, and potentially propogate those mistakes into other parts of the
platform</li>
          <li>
Rip out the mistakes, re-design the feature (sans mistakes) and accept the breaking
change and broken apps</li>
          <li>
Re-design the feature without the mistakes, add that re-designed feature to the
product, deprecate the old broken feature, and accept duplication for some period
of time until the older feature is ripped from the product</li>
          <li>
Re-design the feature, add some elaborate compatibility mechanism to emulate the old
behaviour, and sign up to maintain the elaborate compatibility mechanism for a long
time</li>
        </ol>
        <p>
There may be some other options, but these are the ones that come to mind.
</p>
        <p>
The comments from yesterday were in favour of (2).
</p>
        <p>
I'm in favour of (3) as the primary model for making the product better, with a little
bit of (2). I'm also willing to accept some of (1). I really dislike (4), as it doesn't
benefit anyone in the long-term. (3) works well for individual APIs, but doesn't work
well for whole sub-systems, such as the loader. If you change the loader in an incompatible
way, you're really looking at options (2) or (4).
</p>
        <p>
We've actually made a bunch of changes in Silverlight to improve the platform. As
examples, we've removed non-generic collections, and have changed the way String comparisons
work. We also changed the binder pretty significantly. Not to mention a new security
system ... Oh, and we also included a stripped down XMLReader/Writer!
</p>
        <p>
Compatibility is a tough balance relative to product evolution. We've been discussing
this exact issue a lot over the last year, and the best way to evolve the project
forward. The trick is coming up with a model that you really life, doesn't hugely
impact the engineering process, doesn't inhibit product evolution going forward, and
is explainable to customers. Taking submissions now ...
</p>
        <img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=bd41d6a9-a397-4b7e-82b7-097473241166" />
      </body>
      <title>The Various Choices For Compatibility (or not)</title>
      <guid isPermaLink="false">http://hoser.lander.ca/PermaLink,guid,bd41d6a9-a397-4b7e-82b7-097473241166.aspx</guid>
      <link>http://hoser.lander.ca/2007/08/09/TheVariousChoicesForCompatibilityOrNot.aspx</link>
      <pubDate>Thu, 09 Aug 2007 05:45:33 GMT</pubDate>
      <description>&lt;p&gt;
The comments on &lt;a href="http://hoser.lander.ca/CommentView,guid,e9fae18d-b233-44c4-ace2-22b3bc4710b5.aspx#commentstart"&gt;yesterday's
post&lt;/a&gt; on compatibility are pretty interesting.
&lt;/p&gt;
&lt;p&gt;
There are effectively four options available when you find yourself a few versions
into a platform and realize that you've made mistakes:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Keep the mistakes, and potentially propogate those mistakes into other parts of the
platform&lt;/li&gt;
&lt;li&gt;
Rip out the mistakes, re-design the feature (sans mistakes) and accept the breaking
change and broken apps&lt;/li&gt;
&lt;li&gt;
Re-design the feature without the mistakes, add that re-designed&amp;nbsp;feature to the
product, deprecate the old broken feature, and accept duplication for some period
of time until the older feature is ripped from the product&lt;/li&gt;
&lt;li&gt;
Re-design the feature, add some elaborate compatibility mechanism to emulate the old
behaviour, and sign up to maintain the elaborate compatibility mechanism for a long
time&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
There may be some other options, but these are the ones that come to mind.
&lt;/p&gt;
&lt;p&gt;
The comments from yesterday were in favour of (2).
&lt;/p&gt;
&lt;p&gt;
I'm in favour of (3) as the primary model for making the product better, with a little
bit of (2). I'm also willing to accept some of (1). I really dislike (4), as it doesn't
benefit anyone in the long-term. (3) works well for individual APIs, but doesn't work
well for whole sub-systems, such as the loader. If you change the loader in an incompatible
way, you're really looking at options (2) or (4).
&lt;/p&gt;
&lt;p&gt;
We've actually made a bunch of changes in Silverlight to improve the platform. As
examples, we've removed non-generic collections, and have changed the way String comparisons
work. We also changed the binder pretty significantly. Not to mention a new security
system ... Oh, and we also included a stripped down XMLReader/Writer!
&lt;/p&gt;
&lt;p&gt;
Compatibility is a tough balance relative to product evolution. We've been discussing
this exact issue a lot over the last year, and the best way to evolve the project
forward. The trick is coming up with a model that you really life, doesn't hugely
impact the engineering process, doesn't inhibit product evolution going forward, and
is explainable to customers. Taking submissions now ...
&lt;/p&gt;
&lt;img width="0" height="0" src="http://hoser.lander.ca/aggbug.ashx?id=bd41d6a9-a397-4b7e-82b7-097473241166" /&gt;</description>
      <comments>http://hoser.lander.ca/CommentView,guid,bd41d6a9-a397-4b7e-82b7-097473241166.aspx</comments>
      <category>Compatibility</category>
    </item>
  </channel>
</rss>