<?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>this.Pose() as Expert - Use the source Luke</title>
    <link>http://chrison.net/</link>
    <description />
    <language>en-us</language>
    <copyright>Christoph Wille</copyright>
    <lastBuildDate>Wed, 23 Jul 2008 13:04:16 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>christoph.wille@gmail.com</managingEditor>
    <webMaster>christoph.wille@gmail.com</webMaster>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=7dd40183-a18e-48fe-819c-6f5b7103feab</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,7dd40183-a18e-48fe-819c-6f5b7103feab.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,7dd40183-a18e-48fe-819c-6f5b7103feab.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=7dd40183-a18e-48fe-819c-6f5b7103feab</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I have created another (hopefully useful) checkin policy for Team Foundation Server
2008 - one that checks C# and VB.NET project files for COM references. The idea came
from a customer, where they require the developers to use "authorized" interop assemblies
instead of developers recreating those by simply adding a COM reference to each and
every project. And how do you prevent this? By having a TFS checkin policy in place.
</p>
        <p>
A COM reference looks like this in an MSBuild project file:
</p>
        <p>
          <font face="Courier New">  &lt;ItemGroup&gt;<br />
    &lt;COMReference Include="XcpControlLib"&gt;<br />
      &lt;Guid&gt;{283C8576-0726-4DBC-9609-3F855162009A}&lt;/Guid&gt;<br />
      &lt;VersionMajor&gt;1&lt;/VersionMajor&gt;<br />
      &lt;VersionMinor&gt;0&lt;/VersionMinor&gt;<br />
      &lt;Lcid&gt;0&lt;/Lcid&gt;<br />
      &lt;WrapperTool&gt;tlbimp&lt;/WrapperTool&gt;<br />
      &lt;Isolated&gt;False&lt;/Isolated&gt;<br />
    &lt;/COMReference&gt;<br />
  &lt;/ItemGroup&gt;</font>
        </p>
        <p>
Instead of searching for the string "&lt;COMReference" I decided to use the MSBuild
Engine API in my implementation:
</p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span>
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">override</span> PolicyFailure[]
Evaluate() { PendingChange[] checkedFiles <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> PendingCheckin.PendingChanges.CheckedPendingChanges;
ArrayList failures <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> ArrayList(); <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">foreach</span> (PendingChange
change <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">in</span> checkedFiles)
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">string</span> extension <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> Path.GetExtension(change.LocalItem); <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> ((0
== String.Compare(extension, <span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">".csproj"</span>, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">false</span>))
|| (0 == String.Compare(extension, <span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">".vbproj"</span>, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">false</span>)))
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> (change.ChangeType
== ChangeType.Edit || change.ChangeType == ChangeType.Add) { <span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">//
this is a workaround because project.Load(fileName doesn't work in the same process
as VS</span> FileStream fs <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> File.OpenRead(change.LocalItem);
Project project <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> Project();
project.Load(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> StreamReader(fs),
ProjectLoadSettings.IgnoreMissingImports); <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">foreach</span> (BuildItemGroup
big <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">in</span> project.ItemGroups)
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">foreach</span> (BuildItem
bi <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">in</span> big)
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">if</span> (0
== String.Compare(bi.Name, <span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"COMReference"</span>, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">true</span>))
{ PolicyFailure failure <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> PolicyFailure(String.Format(ComReferencePolicyStrings.activateMessage,
change.LocalItem), <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>);
failures.Add(failure); } } } } } } <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span> (PolicyFailure[])failures.ToArray(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">typeof</span>(PolicyFailure));
}</span>
        </pre>
        <p>
At first, I tried to load directly from the .??proj files, but Visual Studio (after
thinking a bit about it it is pretty obvious...) doesn't like someone inside its process
play around with the MSBuild engine. That's why I resorted to loading it indirectly.
</p>
        <p>
For installation I have provided checkinpolicy.reg, however, you must adapt the path
to the .dll before importing it into the registry. 
</p>
        <p>
          <font face="Courier New">Windows Registry Editor Version 5.00</font>
        </p>
        <p>
          <font face="Courier New">[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\TeamFoundation\SourceControl\Checkin
Policies]<br />
"ChrisOnNet.CheckinPolicies.ComReferencePolicy"="C:\\Work\\ChrisOnNet.CheckinPolicies.ComReferencePolicy.dll"</font>
        </p>
        <p>
Once registered, you can add it to your team projects:
</p>
        <p>
          <img src="http://chrison.net/content/binary/ComReferencesForbiddenPolicy.png" border="0" />
        </p>
        <p>
As usual I have included the source code (BSD licensed) in the download:
</p>
        <p>
          <a href="http://chrison.net/content/binary/ChrisOnNet.CheckinPolicies.ComReferencePolicy.zip">ChrisOnNet.CheckinPolicies.ComReferencePolicy.zip
(35.35 KB)</a>
        </p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=7dd40183-a18e-48fe-819c-6f5b7103feab" />
      </body>
      <title>COM References Forbidden Policy</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,7dd40183-a18e-48fe-819c-6f5b7103feab.aspx</guid>
      <link>http://chrison.net/COMReferencesForbiddenPolicy.aspx</link>
      <pubDate>Wed, 23 Jul 2008 13:04:16 GMT</pubDate>
      <description>&lt;p&gt;
I have created another (hopefully useful) checkin policy for Team Foundation Server
2008 - one that checks C# and VB.NET project files for COM references. The idea came
from a customer, where they require the developers to use "authorized" interop assemblies
instead of developers recreating those by simply adding a COM reference to each and
every project. And how do you prevent this? By having a TFS checkin policy in place.
&lt;/p&gt;
&lt;p&gt;
A COM reference looks like this in an MSBuild project file:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;nbsp; &amp;lt;ItemGroup&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;COMReference Include="XcpControlLib"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Guid&amp;gt;{283C8576-0726-4DBC-9609-3F855162009A}&amp;lt;/Guid&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;VersionMajor&amp;gt;1&amp;lt;/VersionMajor&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;VersionMinor&amp;gt;0&amp;lt;/VersionMinor&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Lcid&amp;gt;0&amp;lt;/Lcid&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;WrapperTool&amp;gt;tlbimp&amp;lt;/WrapperTool&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Isolated&amp;gt;False&amp;lt;/Isolated&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/COMReference&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;/ItemGroup&amp;gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Instead of searching for the string "&amp;lt;COMReference" I decided to use the MSBuild
Engine API in my implementation:
&lt;/p&gt;
&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;public&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;override&lt;/span&gt; PolicyFailure[]
Evaluate() { PendingChange[] checkedFiles &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; PendingCheckin.PendingChanges.CheckedPendingChanges;
ArrayList failures &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;new&lt;/span&gt; ArrayList(); &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;foreach&lt;/span&gt; (PendingChange
change &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;in&lt;/span&gt; checkedFiles)
{ &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;string&lt;/span&gt; extension &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; Path.GetExtension(change.LocalItem); &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;if&lt;/span&gt; ((0
== String.Compare(extension, &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;".csproj"&lt;/span&gt;, &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;false&lt;/span&gt;))
|| (0 == String.Compare(extension, &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;".vbproj"&lt;/span&gt;, &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;false&lt;/span&gt;)))
{ &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;if&lt;/span&gt; (change.ChangeType
== ChangeType.Edit || change.ChangeType == ChangeType.Add) { &lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;//
this is a workaround because project.Load(fileName doesn't work in the same process
as VS&lt;/span&gt; FileStream fs &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; File.OpenRead(change.LocalItem);
Project project &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;new&lt;/span&gt; Project();
project.Load(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;new&lt;/span&gt; StreamReader(fs),
ProjectLoadSettings.IgnoreMissingImports); &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;foreach&lt;/span&gt; (BuildItemGroup
big &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;in&lt;/span&gt; project.ItemGroups)
{ &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;foreach&lt;/span&gt; (BuildItem
bi &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;in&lt;/span&gt; big)
{ &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;if&lt;/span&gt; (0
== String.Compare(bi.Name, &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"COMReference"&lt;/span&gt;, &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;true&lt;/span&gt;))
{ PolicyFailure failure &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;new&lt;/span&gt; PolicyFailure(String.Format(ComReferencePolicyStrings.activateMessage,
change.LocalItem), &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;this&lt;/span&gt;);
failures.Add(failure); } } } } } } &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;return&lt;/span&gt; (PolicyFailure[])failures.ToArray(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;typeof&lt;/span&gt;(PolicyFailure));
}&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
At first, I tried to load directly from the .??proj files, but Visual Studio (after
thinking a bit about it it is pretty obvious...) doesn't like someone inside its process
play around with the MSBuild engine. That's why I resorted to loading it indirectly.
&lt;/p&gt;
&lt;p&gt;
For installation I have provided checkinpolicy.reg, however, you must adapt the path
to the .dll before importing it into the registry. 
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;Windows Registry Editor Version 5.00&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\TeamFoundation\SourceControl\Checkin
Policies]&lt;br&gt;
"ChrisOnNet.CheckinPolicies.ComReferencePolicy"="C:\\Work\\ChrisOnNet.CheckinPolicies.ComReferencePolicy.dll"&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Once registered, you can add it to your team projects:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://chrison.net/content/binary/ComReferencesForbiddenPolicy.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
As usual I have included the source code (BSD licensed) in the download:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://chrison.net/content/binary/ChrisOnNet.CheckinPolicies.ComReferencePolicy.zip"&gt;ChrisOnNet.CheckinPolicies.ComReferencePolicy.zip
(35.35 KB)&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=7dd40183-a18e-48fe-819c-6f5b7103feab" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,7dd40183-a18e-48fe-819c-6f5b7103feab.aspx</comments>
      <category>C#</category>
      <category>Team System</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=cad71ee8-c091-4feb-8e4b-592bd6052ce8</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,cad71ee8-c091-4feb-8e4b-592bd6052ce8.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,cad71ee8-c091-4feb-8e4b-592bd6052ce8.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=cad71ee8-c091-4feb-8e4b-592bd6052ce8</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Yesterday, we found ourselves at the receiving end of an attack against one of our
German Wikis that are running the <a href="http://www.screwturn.eu/">ScrewTurn</a> Wiki
software. Turns out that it was a security issue even with the then latest version
2.0.23. Dario Solera - the maintainer of ScrewTurn - acted real fast when I informed
him about the root cause of the attack and released v2.0.24 yesterday night. 
</p>
        <p>
Please <a href="http://www.screwturn.eu/download.ashx">download</a> and upgrade immediately!
The issue is being actively exploited (zero day if you so will).
</p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=cad71ee8-c091-4feb-8e4b-592bd6052ce8" />
      </body>
      <title>Important Security Fix for ScrewTurn</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,cad71ee8-c091-4feb-8e4b-592bd6052ce8.aspx</guid>
      <link>http://chrison.net/ImportantSecurityFixForScrewTurn.aspx</link>
      <pubDate>Fri, 08 Feb 2008 06:54:08 GMT</pubDate>
      <description>&lt;p&gt;
Yesterday, we found ourselves at the receiving end of an attack against one of our
German Wikis that are running the &lt;a href="http://www.screwturn.eu/"&gt;ScrewTurn&lt;/a&gt; Wiki
software. Turns out that it was a security issue even with the then latest version
2.0.23. Dario Solera - the maintainer of ScrewTurn - acted real fast when I informed
him about the root cause of the attack and released v2.0.24 yesterday night. 
&lt;/p&gt;
&lt;p&gt;
Please &lt;a href="http://www.screwturn.eu/download.ashx"&gt;download&lt;/a&gt; and upgrade immediately!
The issue is being actively exploited (zero day if you so will).
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=cad71ee8-c091-4feb-8e4b-592bd6052ce8" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,cad71ee8-c091-4feb-8e4b-592bd6052ce8.aspx</comments>
      <category>ASP.NET</category>
      <category>Security</category>
      <category>this</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=9fbb839e-8b5a-4739-9d68-2f50f22f9114</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,9fbb839e-8b5a-4739-9d68-2f50f22f9114.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,9fbb839e-8b5a-4739-9d68-2f50f22f9114.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=9fbb839e-8b5a-4739-9d68-2f50f22f9114</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This is a bugfix release for the previously posted <a href="http://chrison.net/nGalleryUpdatedForASPNET20.aspx">port
of nGallery to ASP.NET 3.5</a>. The following changes are incorporated:
</p>
        <ul>
          <li>
Bugfix: slideshow had "photos/" hardcoded in nGalleryLib (for navigation buttons)</li>
          <li>
Bugfix: Event log exceptions, please see <a href="http://todotnet.com/archive/0001/01/01/7472.aspx">Get
GoogleBot to crash your .NET 2.0 site</a> (plus <a href="http://www.mattcutts.com/blog/asp-net-2-and-url-rewriting-sometimes-harmful/">ASP.NET
2 + url rewriting considered harmful in some cases</a>). <a href="http://blogs.developpeur.org/nix/">Nicolas
Sorel</a> was nice enough to provide me with his .browser definition files.</li>
          <li>
Bugfix: default_highlight_image.jpg no longer resided in /photos and therefore caused
an exception for galleries that had no highlighted image; moved it back to \photos</li>
          <li>
Change: AlbumHandler no longer implements IHttpHandler</li>
          <li>
Change: AssemblyInfo.cs changed version to 2.0 to differentiate from original 1.6.1</li>
        </ul>
        <p>
That's all the changes that happened, here are the source and deployment files:
</p>
        <p>
          <a href="http://chrison.net/content/binary/nGalleryTNG2_ProjectFiles.zip">nGalleryTNG2_ProjectFiles.zip
(2.95 MB)</a>
          <br />
          <a href="http://chrison.net/content/binary/nGalleryTNG2_WebFiles.zip">nGalleryTNG2_WebFiles.zip
(1.03 MB)</a>
        </p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=9fbb839e-8b5a-4739-9d68-2f50f22f9114" />
      </body>
      <title>nGallery TNG Update</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,9fbb839e-8b5a-4739-9d68-2f50f22f9114.aspx</guid>
      <link>http://chrison.net/nGalleryTNGUpdate.aspx</link>
      <pubDate>Thu, 13 Dec 2007 10:42:52 GMT</pubDate>
      <description>&lt;p&gt;
This is a bugfix release for the previously posted &lt;a href="http://chrison.net/nGalleryUpdatedForASPNET20.aspx"&gt;port
of nGallery to ASP.NET 3.5&lt;/a&gt;. The following changes are incorporated:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Bugfix: slideshow had "photos/" hardcoded in nGalleryLib (for navigation buttons)&lt;/li&gt;
&lt;li&gt;
Bugfix: Event log exceptions, please see&amp;nbsp;&lt;a href="http://todotnet.com/archive/0001/01/01/7472.aspx"&gt;Get
GoogleBot to crash your .NET 2.0 site&lt;/a&gt; (plus &lt;a href="http://www.mattcutts.com/blog/asp-net-2-and-url-rewriting-sometimes-harmful/"&gt;ASP.NET
2 + url rewriting considered harmful in some cases&lt;/a&gt;). &lt;a href="http://blogs.developpeur.org/nix/"&gt;Nicolas
Sorel&lt;/a&gt; was nice enough to provide me with his .browser definition files.&lt;/li&gt;
&lt;li&gt;
Bugfix: default_highlight_image.jpg no longer resided in /photos and therefore caused
an exception for galleries that had no highlighted image; moved it back to \photos&lt;/li&gt;
&lt;li&gt;
Change: AlbumHandler no longer implements IHttpHandler&lt;/li&gt;
&lt;li&gt;
Change: AssemblyInfo.cs changed version to 2.0 to differentiate from original 1.6.1&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
That's all the changes that happened, here are the source and deployment files:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://chrison.net/content/binary/nGalleryTNG2_ProjectFiles.zip"&gt;nGalleryTNG2_ProjectFiles.zip
(2.95 MB)&lt;/a&gt;
&lt;br&gt;
&lt;a href="http://chrison.net/content/binary/nGalleryTNG2_WebFiles.zip"&gt;nGalleryTNG2_WebFiles.zip
(1.03 MB)&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=9fbb839e-8b5a-4739-9d68-2f50f22f9114" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,9fbb839e-8b5a-4739-9d68-2f50f22f9114.aspx</comments>
      <category>.NET</category>
      <category>ASP.NET</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=d95e8950-a8c7-450f-a9db-4f22704ce70b</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,d95e8950-a8c7-450f-a9db-4f22704ce70b.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,d95e8950-a8c7-450f-a9db-4f22704ce70b.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=d95e8950-a8c7-450f-a9db-4f22704ce70b</wfw:commentRss>
      <slash:comments>11</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://chrison.net/nGalleryTNGUpdate.aspx">I have posted an updated version</a>
        </p>
        <p>
Given my plans to rather sooner than later upgrade my server to IIS7, I am currently
switching all applications to ASP.NET 2.0 in preparation of this move. But there was
nGallery, which I used all over the place when I needed a photo gallery...
</p>
        <p>
Today I decided it was about time to do something about it, and gave converting nGallery
to .NET 2.0 a try (actually all the projects target .NET Framework 3.5). Turns out
it took me roundabout two hours for this whole endeavour. To save everybody else time,
here is my VS2008 solution tree:
</p>
        <p>
          <a href="http://chrison.net/content/binary/nGalleryTNG.zip">nGalleryTNG.zip (2.92
MB)</a>
        </p>
        <p>
What is changed compared to the original nGallery 1.6.1 for ASP.NET 1.1? Here is a
somewhat complete laundry list:
</p>
        <ul>
          <li>
Converted it to a Web Application project 
</li>
          <li>
Placed all third party source code in the ThirdParty folder. That way I can always
change and recompile if necessary. 
</li>
          <li>
Took all static images from the \photos directories and put them into \images. No
more mixing the photo handler &amp; photo cache with the Web site's images. 
</li>
          <li>
The album handler is now being abused in Application_BeginRequest, plus it now uses
RewritePath. Fixes the darn Server.Transfer errors. 
</li>
          <li>
Moved the configuration of nGallery from the data folder to App_Data. Other than that:
no configuration changes.</li>
        </ul>
        <p>
I did not switch to ASP.NET 2.0 master pages, it still uses the old user control approach.
But after all, I only needed it in a working fashion for 2.0+.
</p>
        <p>
Note: I only tested the XML-based storage because that's how I use nGallery. The SQL-storage
has received no testing whatsoever!
</p>
        <p>
Download Web site files only: <a href="http://chrison.net/content/binary/nGalleryTNG_WebSite.zip">nGalleryTNG_WebSite.zip
(924.39 KB)</a></p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=d95e8950-a8c7-450f-a9db-4f22704ce70b" />
      </body>
      <title>nGallery Updated For ASP.NET 2.0</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,d95e8950-a8c7-450f-a9db-4f22704ce70b.aspx</guid>
      <link>http://chrison.net/nGalleryUpdatedForASPNET20.aspx</link>
      <pubDate>Fri, 30 Nov 2007 14:07:36 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://chrison.net/nGalleryTNGUpdate.aspx"&gt;I have posted an updated version&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Given my plans to rather sooner than later upgrade my server to IIS7, I am currently
switching all applications to ASP.NET 2.0 in preparation of this move. But there was
nGallery, which I used all over the place when I needed a photo gallery...
&lt;/p&gt;
&lt;p&gt;
Today I decided it was about time to do something about it, and gave converting nGallery
to .NET 2.0 a try (actually all the projects target .NET Framework 3.5). Turns out
it took me roundabout two hours for this whole endeavour. To save everybody else time,
here is my VS2008 solution tree:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://chrison.net/content/binary/nGalleryTNG.zip"&gt;nGalleryTNG.zip (2.92
MB)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
What is changed compared to the original nGallery 1.6.1 for ASP.NET 1.1? Here is a
somewhat complete laundry list:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Converted it to a Web Application project 
&lt;li&gt;
Placed all third party source code in the ThirdParty folder. That way I can always
change and recompile if necessary. 
&lt;li&gt;
Took all static images from the \photos directories and put them into \images. No
more mixing the photo handler &amp;amp; photo cache with the Web site's images. 
&lt;li&gt;
The album handler is now being abused in Application_BeginRequest, plus it now uses
RewritePath. Fixes the darn Server.Transfer errors. 
&lt;li&gt;
Moved the configuration of nGallery from the data folder to App_Data. Other than that:
no configuration changes.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
I did not switch to ASP.NET 2.0 master pages, it still uses the old user control approach.
But after all, I only needed it in a working fashion for 2.0+.
&lt;/p&gt;
&lt;p&gt;
Note: I only tested the XML-based storage because that's how I use nGallery. The SQL-storage
has received no testing whatsoever!
&lt;/p&gt;
&lt;p&gt;
Download Web site files only: &lt;a href="http://chrison.net/content/binary/nGalleryTNG_WebSite.zip"&gt;nGalleryTNG_WebSite.zip
(924.39 KB)&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=d95e8950-a8c7-450f-a9db-4f22704ce70b" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,d95e8950-a8c7-450f-a9db-4f22704ce70b.aspx</comments>
      <category>2 Ohhhh</category>
      <category>3.5</category>
      <category>ASP.NET</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=e5341c27-7d29-4ecd-9122-cbf8ff704d28</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,e5341c27-7d29-4ecd-9122-cbf8ff704d28.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,e5341c27-7d29-4ecd-9122-cbf8ff704d28.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=e5341c27-7d29-4ecd-9122-cbf8ff704d28</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
If you are interested in <a href="http://www.codeplex.com/IronPython">IronPython</a>,
you should check out Matt's latest <a href="http://www.icsharpcode.net/opensource/sd/">SharpDevelop</a> addin: <a href="http://community.sharpdevelop.net/blogs/mattward/archive/2007/10/21/IronPythonIntegrationInSharpDevelop22.aspx">IronPython
Integration In SharpDevelop 2.2</a>. His blog post details the status of code completion,
Windows Forms designer support, plus: converting code from C# or VB.NET to IronPython. 
</p>
        <p>
Please note that this is a work in progress, and that the official release of this
addin will be for SharpDevelop 3 and IronPython 2.0.
</p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=e5341c27-7d29-4ecd-9122-cbf8ff704d28" />
      </body>
      <title>SharpDevelop Supports IronPython</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,e5341c27-7d29-4ecd-9122-cbf8ff704d28.aspx</guid>
      <link>http://chrison.net/SharpDevelopSupportsIronPython.aspx</link>
      <pubDate>Sun, 21 Oct 2007 17:36:15 GMT</pubDate>
      <description>&lt;p&gt;
If you are interested in &lt;a href="http://www.codeplex.com/IronPython"&gt;IronPython&lt;/a&gt;,
you should check out Matt's latest &lt;a href="http://www.icsharpcode.net/opensource/sd/"&gt;SharpDevelop&lt;/a&gt; addin: &lt;a href="http://community.sharpdevelop.net/blogs/mattward/archive/2007/10/21/IronPythonIntegrationInSharpDevelop22.aspx"&gt;IronPython
Integration In SharpDevelop 2.2&lt;/a&gt;. His blog post details the status of code completion,
Windows Forms designer support, plus: converting code from C# or VB.NET to IronPython. 
&lt;/p&gt;
&lt;p&gt;
Please note that this is a work in progress, and that the official release of this
addin will be for SharpDevelop 3 and IronPython 2.0.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=e5341c27-7d29-4ecd-9122-cbf8ff704d28" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,e5341c27-7d29-4ecd-9122-cbf8ff704d28.aspx</comments>
      <category>.NET</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=25ec2ef9-d32e-40ac-a496-a79b16abaab7</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,25ec2ef9-d32e-40ac-a496-a79b16abaab7.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,25ec2ef9-d32e-40ac-a496-a79b16abaab7.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=25ec2ef9-d32e-40ac-a496-a79b16abaab7</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Been on holidays, at conferences (eg last week Ask The Experts @ XTOPIA in Berlin),
and worked on various projects - a couple of reasons it was rather quiet lately in
this blog.
</p>
        <p>
Yesterday I decided I needed a simple guestbook application for a to-be-developed
private Web site, and because I didn't find anything that fit my needs I decided to
write one myself with the goal of (ab)using XLinq in the course of this endeavour:
</p>
        <p>
          <a href="http://chrison.net/content/binary/Guestbook_XLINQ.zip">Guestbook_XLINQ.zip
(7.09 KB)</a>
        </p>
        <p>
Caveat emptor: I am no designer (surprise!). But thanks to no design it should be
easy for you to add your own design. However, as <a href="http://msdn.microsoft.com/msdnmag/issues/07/09/">this
month's MSDN magazine is all about security</a>, I decided to make the application
production-ready security-wise. You'll find a lot of parsing plus XSRF protection
(note: this version does not check for integer overflow in calculating the start row).
</p>
        <p>
Missing features: this guestbook is not prepared for localization, nor does it use
a control-based approach (where you drop those in your pages and get an in-place guestbook).
</p>
        <p>
          <strong>Update</strong> a version of this application for VS2008 RTM is available <a href="http://chrison.net/XlinqGuestbookForVS2008RTM.aspx">here</a>.
</p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=25ec2ef9-d32e-40ac-a496-a79b16abaab7" />
      </body>
      <title>Really Simple Guestbook - With XLinq</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,25ec2ef9-d32e-40ac-a496-a79b16abaab7.aspx</guid>
      <link>http://chrison.net/ReallySimpleGuestbookWithXLinq.aspx</link>
      <pubDate>Mon, 15 Oct 2007 07:56:36 GMT</pubDate>
      <description>&lt;p&gt;
Been on holidays, at conferences (eg last week Ask The Experts @ XTOPIA in Berlin),
and worked on various projects - a couple of reasons it was rather quiet lately in
this blog.
&lt;/p&gt;
&lt;p&gt;
Yesterday I decided&amp;nbsp;I needed a simple guestbook application for a to-be-developed
private Web site, and because I didn't find anything that fit my needs I decided to
write one myself with the goal of (ab)using XLinq in the course of this endeavour:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://chrison.net/content/binary/Guestbook_XLINQ.zip"&gt;Guestbook_XLINQ.zip
(7.09 KB)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Caveat emptor: I am no designer (surprise!). But thanks to no design it should be
easy for you to add your own design. However, as &lt;a href="http://msdn.microsoft.com/msdnmag/issues/07/09/"&gt;this
month's MSDN magazine is all about security&lt;/a&gt;, I decided to make the application
production-ready security-wise. You'll find a lot of parsing plus XSRF protection
(note: this version does not check for integer overflow in calculating the start row).
&lt;/p&gt;
&lt;p&gt;
Missing features: this guestbook is not prepared for localization, nor does it use
a control-based approach (where you drop those in your pages and get an in-place&amp;nbsp;guestbook).
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Update&lt;/strong&gt; a version of this application for VS2008 RTM is available &lt;a href="http://chrison.net/XlinqGuestbookForVS2008RTM.aspx"&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=25ec2ef9-d32e-40ac-a496-a79b16abaab7" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,25ec2ef9-d32e-40ac-a496-a79b16abaab7.aspx</comments>
      <category>3.5</category>
      <category>ASP.NET</category>
      <category>Security</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=9a3e6d66-f446-4b95-8c1a-6960429ae4bd</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,9a3e6d66-f446-4b95-8c1a-6960429ae4bd.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,9a3e6d66-f446-4b95-8c1a-6960429ae4bd.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=9a3e6d66-f446-4b95-8c1a-6960429ae4bd</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Been following tf4mono development for quite a while, and now there is an installer
that works on Windows with .NET 2.0 (<a href="http://ropeonfire.blogspot.com/2007/08/tf4mono-for-windows.html">more
info</a>). Be sure to check out the comments as it doesn't seem to work on a machine
with Team Explorer already installed.
</p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=9a3e6d66-f446-4b95-8c1a-6960429ae4bd" />
      </body>
      <title>tf4mono for Windows</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,9a3e6d66-f446-4b95-8c1a-6960429ae4bd.aspx</guid>
      <link>http://chrison.net/tf4monoForWindows.aspx</link>
      <pubDate>Fri, 31 Aug 2007 08:05:14 GMT</pubDate>
      <description>&lt;p&gt;
Been following tf4mono development for quite a while, and now there is an installer
that works on Windows with .NET 2.0 (&lt;a href="http://ropeonfire.blogspot.com/2007/08/tf4mono-for-windows.html"&gt;more
info&lt;/a&gt;). Be sure to check out the comments as it doesn't seem to work on a machine
with Team Explorer already installed.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=9a3e6d66-f446-4b95-8c1a-6960429ae4bd" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,9a3e6d66-f446-4b95-8c1a-6960429ae4bd.aspx</comments>
      <category>Team System</category>
      <category>Use the source Luke</category>
      <category>Visual Studio</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=f7c2941d-2642-4169-a931-41eca9f79500</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,f7c2941d-2642-4169-a931-41eca9f79500.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,f7c2941d-2642-4169-a931-41eca9f79500.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=f7c2941d-2642-4169-a931-41eca9f79500</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The check-in policy for TFS is revved to v2.1 and it comes with the "Included Paths"
and "Excluded Namespaces" features announced earlier on my blog. The <a href="http://www.codeplex.com/TFSCCPolicy/Release/ProjectReleases.aspx?ReleaseId=5947">release
announcement</a> has more details; also, take a look at the <a href="http://www.codeplex.com/TFSCCPolicy/Wiki/View.aspx?title=Screenshots&amp;referringTitle=Home">screenshot
tour of configuring CCCP</a>.
</p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=f7c2941d-2642-4169-a931-41eca9f79500" />
      </body>
      <title>CCCP 2.1</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,f7c2941d-2642-4169-a931-41eca9f79500.aspx</guid>
      <link>http://chrison.net/CCCP21.aspx</link>
      <pubDate>Thu, 19 Jul 2007 15:04:37 GMT</pubDate>
      <description>&lt;p&gt;
The check-in policy for TFS is revved to v2.1 and it comes with the "Included Paths"
and "Excluded Namespaces" features announced earlier on my blog. The &lt;a href="http://www.codeplex.com/TFSCCPolicy/Release/ProjectReleases.aspx?ReleaseId=5947"&gt;release
announcement&lt;/a&gt; has more details;&amp;nbsp;also, take a look at the &lt;a href="http://www.codeplex.com/TFSCCPolicy/Wiki/View.aspx?title=Screenshots&amp;amp;referringTitle=Home"&gt;screenshot
tour of configuring&amp;nbsp;CCCP&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=f7c2941d-2642-4169-a931-41eca9f79500" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,f7c2941d-2642-4169-a931-41eca9f79500.aspx</comments>
      <category>Cool Download</category>
      <category>Team System</category>
      <category>Use the source Luke</category>
      <category>Visual Studio</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=b24a47ef-cb22-44be-853f-ebf5c7b1435f</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,b24a47ef-cb22-44be-853f-ebf5c7b1435f.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,b24a47ef-cb22-44be-853f-ebf5c7b1435f.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=b24a47ef-cb22-44be-853f-ebf5c7b1435f</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
When I released <a href="http://chrison.net/TFSCodeCommentCheckingPolicyCCCP20ReleasedFutures.aspx">version
2.0 of the TFS CCCP</a>, I also previewed one feature of the planned 2.1 release:
included source control paths. That prompted a <a href="http://chrison.net/CommentView,guid,f90d85dd-a31f-4aa2-b934-73e760f896f5.aspx#commentstart">comment
by Klaus</a> that excluding namespaces for eg auto-generated code (think CodeSmith
or code generated by GAT / GAX guidances) would be a nice feature too.
</p>
        <p>
So I carved out some time today, and built the UI plus added the necessary code changes.
To give you an idea what it will look like, here is a screenshot:
</p>
        <p>
          <img src="http://chrison.net/content/binary/CCCP21ExcludedPaths.png" border="0" />
        </p>
        <p>
To do: testing, documenting, packaging. 
</p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=b24a47ef-cb22-44be-853f-ebf5c7b1435f" />
      </body>
      <title>CCCP Checkin Policy - Excluded Namespaces</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,b24a47ef-cb22-44be-853f-ebf5c7b1435f.aspx</guid>
      <link>http://chrison.net/CCCPCheckinPolicyExcludedNamespaces.aspx</link>
      <pubDate>Wed, 18 Jul 2007 09:34:45 GMT</pubDate>
      <description>&lt;p&gt;
When I released &lt;a href="http://chrison.net/TFSCodeCommentCheckingPolicyCCCP20ReleasedFutures.aspx"&gt;version
2.0 of the TFS CCCP&lt;/a&gt;, I also previewed one feature of the planned 2.1 release:
included source control paths. That prompted a &lt;a href="http://chrison.net/CommentView,guid,f90d85dd-a31f-4aa2-b934-73e760f896f5.aspx#commentstart"&gt;comment
by Klaus&lt;/a&gt; that excluding namespaces for eg auto-generated code (think CodeSmith
or code generated by GAT / GAX guidances) would be a nice feature too.
&lt;/p&gt;
&lt;p&gt;
So I carved out some time today, and built the UI plus added the necessary code changes.
To give you an idea what it will look like, here is a screenshot:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://chrison.net/content/binary/CCCP21ExcludedPaths.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
To do: testing, documenting, packaging. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=b24a47ef-cb22-44be-853f-ebf5c7b1435f" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,b24a47ef-cb22-44be-853f-ebf5c7b1435f.aspx</comments>
      <category>Team System</category>
      <category>Use the source Luke</category>
      <category>Visual Studio</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=f90d85dd-a31f-4aa2-b934-73e760f896f5</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,f90d85dd-a31f-4aa2-b934-73e760f896f5.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,f90d85dd-a31f-4aa2-b934-73e760f896f5.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=f90d85dd-a31f-4aa2-b934-73e760f896f5</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Today, I finally released <a href="http://www.codeplex.com/TFSCCPolicy/Release/ProjectReleases.aspx?ReleaseId=5700">v2.0
of the code comment checking policy</a> for Team Foundation Server (TFS) / Visual
Studio Team System (VSTS) 2005. Two major new features: firstly, you can extend the
policy to do more restricitive checks (i.e. verify that the comments are actually
in line with the number of parameters). Secondly, you now get an MSBuild task to compute
"code comment coverage" during an automated build - independent of VSTS / TFS!
</p>
        <p>
As for future versions, it is already in source control - take the following team project
for example:
</p>
        <p>
          <img src="http://chrison.net/content/binary/scm1.PNG" border="0" />
        </p>
        <p>
Currently, you can turn on / off CCCP only for the entire team project. However, checking
a unit test project or a Windows Forms smart client is rather pointless (in my opinion
at least):
</p>
        <p>
          <img src="http://chrison.net/content/binary/scm2.PNG" border="0" />
        </p>
        <p>
It is much more helpful for library projects that are to be used by different in-house
or external customers, where with the help of eg Sandcastle you can create a nice
help file. Therefore, vNext will sport a "Paths to check" feature:
</p>
        <p>
          <img src="http://chrison.net/content/binary/scm3.PNG" border="0" />
        </p>
        <p>
I decided to go with include instead of exclude because it is much more explicit with
regards what is being checked and what not. Currently, this is only <a href="http://www.codeplex.com/TFSCCPolicy/SourceControl/ListDownloadableCommits.aspx">available
via source download</a>.
</p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=f90d85dd-a31f-4aa2-b934-73e760f896f5" />
      </body>
      <title>TFS Code Comment Checking Policy (CCCP) 2.0 Released / Futures</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,f90d85dd-a31f-4aa2-b934-73e760f896f5.aspx</guid>
      <link>http://chrison.net/TFSCodeCommentCheckingPolicyCCCP20ReleasedFutures.aspx</link>
      <pubDate>Mon, 16 Jul 2007 14:03:17 GMT</pubDate>
      <description>&lt;p&gt;
Today, I finally released &lt;a href="http://www.codeplex.com/TFSCCPolicy/Release/ProjectReleases.aspx?ReleaseId=5700"&gt;v2.0
of the code comment checking policy&lt;/a&gt; for Team Foundation Server (TFS) / Visual
Studio Team System (VSTS) 2005. Two major new features: firstly, you can extend the
policy to do more restricitive checks (i.e. verify that the comments are actually
in line with the number of parameters). Secondly, you now get an MSBuild task to compute
"code comment coverage"&amp;nbsp;during an automated build - independent of VSTS / TFS!
&lt;/p&gt;
&lt;p&gt;
As for future versions, it is already in source control - take the following team&amp;nbsp;project
for example:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://chrison.net/content/binary/scm1.PNG" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
Currently, you can turn on / off CCCP only for the entire team project. However, checking
a unit test project or a Windows Forms smart client is rather pointless (in my opinion
at least):
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://chrison.net/content/binary/scm2.PNG" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
It is much more helpful for library projects that are to be used by different in-house
or external customers, where with the help of eg Sandcastle you can create a nice
help file. Therefore, vNext will sport a "Paths to check" feature:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://chrison.net/content/binary/scm3.PNG" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
I decided to go with include instead of exclude because it is much more explicit with
regards what is being checked and what not. Currently, this is only &lt;a href="http://www.codeplex.com/TFSCCPolicy/SourceControl/ListDownloadableCommits.aspx"&gt;available
via source download&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=f90d85dd-a31f-4aa2-b934-73e760f896f5" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,f90d85dd-a31f-4aa2-b934-73e760f896f5.aspx</comments>
      <category>Cool Download</category>
      <category>Team System</category>
      <category>Use the source Luke</category>
      <category>Visual Studio</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=4f7ed9fb-2d7e-4ed6-9bba-a12f739db5c2</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,4f7ed9fb-2d7e-4ed6-9bba-a12f739db5c2.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,4f7ed9fb-2d7e-4ed6-9bba-a12f739db5c2.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=4f7ed9fb-2d7e-4ed6-9bba-a12f739db5c2</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The recently released version of <a href="http://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NET">CruiseControl.NET</a> has
a small issue with MSBuild Output in the Web dashboard: <em>Unable to load transform:
c:\ccnet\webdashboard\xsl\msbuild.xsl</em>. A fix can be found in <a href="http://groups.google.com.ag/group/ccnet-user/browse_thread/thread/6ca4e259d91399ff">this
thread in the fourth post</a>. The reason to upgrade to 1.3? CC.NET now runs on .NET
2.0 (it has been ported), and it has a feature I want to try: <a href="http://confluence.public.thoughtworks.org/display/CCNET/Integration+Queues">integration
queues</a>.
</p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=4f7ed9fb-2d7e-4ed6-9bba-a12f739db5c2" />
      </body>
      <title>CruiseControl.NET 1.3.0.2918 &amp; MSBuild Output</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,4f7ed9fb-2d7e-4ed6-9bba-a12f739db5c2.aspx</guid>
      <link>http://chrison.net/CruiseControlNET1302918MSBuildOutput.aspx</link>
      <pubDate>Sun, 24 Jun 2007 18:32:38 GMT</pubDate>
      <description>&lt;p&gt;
The recently released version of &lt;a href="http://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NET"&gt;CruiseControl.NET&lt;/a&gt; has
a small issue with MSBuild Output in the Web dashboard: &lt;em&gt;Unable to load transform:
c:\ccnet\webdashboard\xsl\msbuild.xsl&lt;/em&gt;. A fix can be found in &lt;a href="http://groups.google.com.ag/group/ccnet-user/browse_thread/thread/6ca4e259d91399ff"&gt;this
thread in the fourth post&lt;/a&gt;. The reason to upgrade to 1.3? CC.NET now runs on .NET
2.0 (it has been ported), and it has a feature I want to try: &lt;a href="http://confluence.public.thoughtworks.org/display/CCNET/Integration+Queues"&gt;integration
queues&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=4f7ed9fb-2d7e-4ed6-9bba-a12f739db5c2" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,4f7ed9fb-2d7e-4ed6-9bba-a12f739db5c2.aspx</comments>
      <category>.NET</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=aacde784-317d-4e2c-b277-8012f19cebe3</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,aacde784-317d-4e2c-b277-8012f19cebe3.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,aacde784-317d-4e2c-b277-8012f19cebe3.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=aacde784-317d-4e2c-b277-8012f19cebe3</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
On May 10<sup>th</sup>, we recorded the <a href="http://www.dotnetrocks.com/default.aspx?showNum=245">interview
on SharpDevelop that is now live on .NET Rocks</a>. The interview starts around
minute ten in this show. I tried to give some background on project history (if you
really, really want all the details: <a href="http://www.icsharpcode.net/OpenSource/SD/Changes.aspx">look
here</a>), some of its <a href="http://community.sharpdevelop.net/blogs/mattward/articles/FeatureTour.aspx">features</a>,
where we stand today in <a href="http://community.sharpdevelop.net/blogs/mattward/articles/VisualStudioExpressComparison.aspx">comparison
to VS Express</a>, what's up next (hint: version 2.2 end of this month), and what
the <a href="http://wiki.sharpdevelop.net/RoadmapVersion3x.ashx">near future</a> holds
for SharpDevelop.
</p>
        <p>
After the interview I realized that I mentioned most devs only by their first name,
which happens if you are part of the team for nearly seven years! Therefore, I'd like
to formally apologize for any confusion this might create and point to the <a href="http://wiki.sharpdevelop.net/Contributors.ashx">development
team page</a> on our Wiki. There, you will find <a href="http://wiki.sharpdevelop.net/DanielGrunwald.ashx">Daniel
Grunwald</a> (current technical lead), Mike Krüger (project founder now working for
Novell on MonoDevelop, read an <a href="http://www.icsharpcode.net/pub/relations/interviewmike.aspx">interview
with Mike</a>), Matt Ward, David Srbecky and the many others who make and made SharpDevelop
the #1 open source IDE for .NET. Thanks guys!
</p>
        <p>
A couple of links in closing: <a href="http://www.icsharpcode.net/OpenSource/SD/Download/">Download</a><a href="http://wiki.sharpdevelop.net/">Wiki</a><a href="http://community.sharpdevelop.net/forums/">Forum</a></p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=aacde784-317d-4e2c-b277-8012f19cebe3" />
      </body>
      <title>Me on .NET Rocks</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,aacde784-317d-4e2c-b277-8012f19cebe3.aspx</guid>
      <link>http://chrison.net/MeOnNETRocks.aspx</link>
      <pubDate>Wed, 13 Jun 2007 10:35:15 GMT</pubDate>
      <description>&lt;p&gt;
On May 10&lt;sup&gt;th&lt;/sup&gt;, we recorded the &lt;a href="http://www.dotnetrocks.com/default.aspx?showNum=245"&gt;interview
on SharpDevelop that is now live on .NET Rocks&lt;/a&gt;.&amp;nbsp;The interview starts around
minute ten in this show. I tried to give some background on project history (if you
really, really want all the details: &lt;a href="http://www.icsharpcode.net/OpenSource/SD/Changes.aspx"&gt;look
here&lt;/a&gt;), some of its &lt;a href="http://community.sharpdevelop.net/blogs/mattward/articles/FeatureTour.aspx"&gt;features&lt;/a&gt;,
where we stand today in &lt;a href="http://community.sharpdevelop.net/blogs/mattward/articles/VisualStudioExpressComparison.aspx"&gt;comparison
to VS Express&lt;/a&gt;, what's up next (hint: version 2.2 end of this month), and what
the &lt;a href="http://wiki.sharpdevelop.net/RoadmapVersion3x.ashx"&gt;near future&lt;/a&gt; holds
for SharpDevelop.
&lt;/p&gt;
&lt;p&gt;
After the interview I realized that I mentioned most devs only by their first name,
which happens if you are part of the team for nearly seven years! Therefore, I'd like
to formally apologize for any confusion this might create and point to the &lt;a href="http://wiki.sharpdevelop.net/Contributors.ashx"&gt;development
team page&lt;/a&gt; on our Wiki. There, you will find &lt;a href="http://wiki.sharpdevelop.net/DanielGrunwald.ashx"&gt;Daniel
Grunwald&lt;/a&gt; (current technical lead), Mike Krüger (project founder now working for
Novell on MonoDevelop, read an &lt;a href="http://www.icsharpcode.net/pub/relations/interviewmike.aspx"&gt;interview
with Mike&lt;/a&gt;), Matt Ward, David Srbecky and the many others who make and made SharpDevelop
the #1 open source IDE for .NET. Thanks guys!
&lt;/p&gt;
&lt;p&gt;
A couple of links in closing: &lt;a href="http://www.icsharpcode.net/OpenSource/SD/Download/"&gt;Download&lt;/a&gt; &lt;a href="http://wiki.sharpdevelop.net/"&gt;Wiki&lt;/a&gt; &lt;a href="http://community.sharpdevelop.net/forums/"&gt;Forum&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=aacde784-317d-4e2c-b277-8012f19cebe3" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,aacde784-317d-4e2c-b277-8012f19cebe3.aspx</comments>
      <category>this</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=06b9d0b7-8913-4f95-82fc-70e5cf95425e</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,06b9d0b7-8913-4f95-82fc-70e5cf95425e.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,06b9d0b7-8913-4f95-82fc-70e5cf95425e.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=06b9d0b7-8913-4f95-82fc-70e5cf95425e</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Today, I <a href="http://www.codeplex.com/TFSCCPolicy/Release/ProjectReleases.aspx?ReleaseId=4529">uploaded
a preview of version 2.0 to CodePlex</a>. There are two big ticket new items in comparison
to version 1.3:
</p>
        <ul>
          <li>
            <strong>Plugin support</strong> The TFS checkin policy only tests for existence of
code comments. For many applications, this is just fine. However, sometimes you also
want to test for completeness of comments (i.e. a refactoring "broke" the documented
parameter list). In this case you can use the new extensibility API, which comes with
two sample plugins in the cccplibcontrib project. The API allows you to select which
checking you want to override or complement, and you get full access to the parsed
source file just like the stock implementation ("abuse" for non-code commment checking
purposes obviously possible too). If you come up with a cool plugin, be sure to contact
me for inclusion into the contrib project! 
</li>
          <li>
            <strong>MSBuild task</strong> This build task lives in cccplib, which is entirely
independent of TFS or VSTS (it was written by <a href="http://community.sharpdevelop.net/blogs/mattward/default.aspx">Matt
Ward</a>). Therefore, you can use it eg with CruiseControl.NET or simply as part of
the local .*proj files. What's the purpose of this build task anyways? Simple: as
part of the build, you get information on "code comment coverage", just like you do
with let's say code coverage and unit tests. Currently, you only get an XML file with
the report - if you are XSLT-savvy and want to contribute a HTML report transform,
let me know!</li>
        </ul>
        <p>
To get an overview what v2 looks like, how to configure it, etc you might be interested
in this <a href="/content/binary/CCCPv2Preview.wmv">demo screen recording</a>.
</p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=06b9d0b7-8913-4f95-82fc-70e5cf95425e" />
      </body>
      <title>TFS Code Comment Checking Policy v2.0 Preview</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,06b9d0b7-8913-4f95-82fc-70e5cf95425e.aspx</guid>
      <link>http://chrison.net/TFSCodeCommentCheckingPolicyV20Preview.aspx</link>
      <pubDate>Tue, 29 May 2007 14:19:28 GMT</pubDate>
      <description>&lt;p&gt;
Today, I &lt;a href="http://www.codeplex.com/TFSCCPolicy/Release/ProjectReleases.aspx?ReleaseId=4529"&gt;uploaded
a preview of version 2.0 to CodePlex&lt;/a&gt;. There are two big ticket new items in comparison
to version 1.3:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Plugin support&lt;/strong&gt; The TFS checkin policy only tests for existence of
code comments. For many applications, this is just fine. However, sometimes you also
want to test for completeness of comments (i.e. a refactoring "broke" the documented
parameter list). In this case you can use the new extensibility API, which comes with
two sample plugins in the cccplibcontrib project. The API allows you to select which
checking you want to override or complement, and you get full access to the parsed
source file just like the stock implementation ("abuse" for non-code commment checking
purposes obviously possible too). If you come up with a cool plugin, be sure to contact
me for inclusion into the contrib project! 
&lt;li&gt;
&lt;strong&gt;MSBuild task&lt;/strong&gt; This build task lives in cccplib, which is entirely
independent of TFS or VSTS (it was written by &lt;a href="http://community.sharpdevelop.net/blogs/mattward/default.aspx"&gt;Matt
Ward&lt;/a&gt;). Therefore, you can use it eg with CruiseControl.NET or simply as part of
the local .*proj files. What's the purpose of this build task anyways? Simple: as
part of the build, you get information on "code comment coverage", just like you do
with let's say code coverage and unit tests. Currently, you only get an XML file with
the report - if you are XSLT-savvy and want to contribute a HTML report transform,
let me know!&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
To get an overview what v2 looks like, how to configure it, etc you might be interested
in this &lt;a href="/content/binary/CCCPv2Preview.wmv"&gt;demo screen recording&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=06b9d0b7-8913-4f95-82fc-70e5cf95425e" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,06b9d0b7-8913-4f95-82fc-70e5cf95425e.aspx</comments>
      <category>Cool Download</category>
      <category>Team System</category>
      <category>this</category>
      <category>Use the source Luke</category>
      <category>Visual Studio</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=dc73ebd9-4171-45fc-b5cd-87b49aaa1d3a</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,dc73ebd9-4171-45fc-b5cd-87b49aaa1d3a.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,dc73ebd9-4171-45fc-b5cd-87b49aaa1d3a.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=dc73ebd9-4171-45fc-b5cd-87b49aaa1d3a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I have been doing some sprucing up of SharpDevelop's Web offerings today - namely
the <a href="http://codeconverter.sharpdevelop.net/">code converter</a>. Up until
today, you only could convert syntactically valid classes. Recently, Daniel implemented
the <a href="http://laputa.sharpdevelop.net/NRefactorySnippetParser.aspx">SnippetParser</a> class,
which is now in use for the <a href="http://codeconverter.sharpdevelop.net/SnippetConverter.aspx">snippet
converter</a> (C# to VB.NET, VB.NET to C#). Note: the <a href="http://codeconverter.sharpdevelop.net/ConvertService.asmx">Web
service for code conversion</a> does support both class and snippet conversion, a <a href="http://codeconverter.sharpdevelop.net/DotNetClientApplication.aspx">Windows
client sample</a> is available for the former.
</p>
        <p>
Also new (just completed a few minutes ago) is the <a href="http://codeconverter.sharpdevelop.net/FormatCode.aspx">code
formatter</a>: it uses the highlighting engine from SharpDevelop's text editor to
HTML-ize a bunch of formats: ASP/XHTML, BAT, Boo, Coco, C++.NET, C#, HTML, Java, JavaScript,
Patch, PHP, TeX, VBNET, XML. Again, there is a Web service available, as well as a <a href="http://codeconverter.sharpdevelop.net/CodeFormatClient.aspx">sample
using the service</a>. This offering is built upon the HtmlSyntaxColorizer sample
that can be found in SharpDevelop revisions &gt; 2522 (currently only on the <a href="http://build.sharpdevelop.net/BuildArtefacts/">build
server</a>)
</p>
        <p>
I am sure that both the snippet converter as well as the code formatter are welcome
additions. Spread the word! After all, it's free.
</p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=dc73ebd9-4171-45fc-b5cd-87b49aaa1d3a" />
      </body>
      <title>Code Conversion and Code Formatting News</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,dc73ebd9-4171-45fc-b5cd-87b49aaa1d3a.aspx</guid>
      <link>http://chrison.net/CodeConversionAndCodeFormattingNews.aspx</link>
      <pubDate>Thu, 24 May 2007 20:06:07 GMT</pubDate>
      <description>&lt;p&gt;
I have been doing some sprucing up of SharpDevelop's Web offerings today - namely
the &lt;a href="http://codeconverter.sharpdevelop.net/"&gt;code converter&lt;/a&gt;. Up until
today, you only could convert syntactically valid classes. Recently, Daniel implemented
the &lt;a href="http://laputa.sharpdevelop.net/NRefactorySnippetParser.aspx"&gt;SnippetParser&lt;/a&gt; class,
which is now in use for the &lt;a href="http://codeconverter.sharpdevelop.net/SnippetConverter.aspx"&gt;snippet
converter&lt;/a&gt; (C# to VB.NET, VB.NET to C#). Note: the &lt;a href="http://codeconverter.sharpdevelop.net/ConvertService.asmx"&gt;Web
service for code conversion&lt;/a&gt; does support both class and snippet conversion, a &lt;a href="http://codeconverter.sharpdevelop.net/DotNetClientApplication.aspx"&gt;Windows
client sample&lt;/a&gt; is available for the former.
&lt;/p&gt;
&lt;p&gt;
Also new (just completed a few minutes ago) is the &lt;a href="http://codeconverter.sharpdevelop.net/FormatCode.aspx"&gt;code
formatter&lt;/a&gt;: it uses the highlighting engine from SharpDevelop's text editor to
HTML-ize a bunch of formats: ASP/XHTML, BAT, Boo, Coco, C++.NET, C#, HTML, Java, JavaScript,
Patch, PHP, TeX, VBNET, XML. Again, there is a Web service available, as well as a &lt;a href="http://codeconverter.sharpdevelop.net/CodeFormatClient.aspx"&gt;sample
using the service&lt;/a&gt;. This offering is built upon the HtmlSyntaxColorizer sample
that can be found in SharpDevelop revisions &amp;gt; 2522 (currently only on the &lt;a href="http://build.sharpdevelop.net/BuildArtefacts/"&gt;build
server&lt;/a&gt;)
&lt;/p&gt;
&lt;p&gt;
I am sure that both the snippet converter as well as the code formatter are welcome
additions. Spread the word! After all, it's free.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=dc73ebd9-4171-45fc-b5cd-87b49aaa1d3a" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,dc73ebd9-4171-45fc-b5cd-87b49aaa1d3a.aspx</comments>
      <category>ASP.NET</category>
      <category>Cool Download</category>
      <category>this</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=44d78440-11f9-4676-90f6-be02bfc2d420</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,44d78440-11f9-4676-90f6-be02bfc2d420.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,44d78440-11f9-4676-90f6-be02bfc2d420.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=44d78440-11f9-4676-90f6-be02bfc2d420</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
In <a href="http://www.oreillynet.com/onlamp/blog/2007/04/the_virtues_of_monoculture.html">The
Virtues of Monoculture</a> James makes an excellent point: "We celebrate the
diversity of choices available to solve a problem and call it freedom. IT managers
and CIOs look at it and call it chaos, confusion and uncertainty." Touché.
</p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=44d78440-11f9-4676-90f6-be02bfc2d420" />
      </body>
      <title>Touché</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,44d78440-11f9-4676-90f6-be02bfc2d420.aspx</guid>
      <link>http://chrison.net/Touch%c3%a9.aspx</link>
      <pubDate>Wed, 25 Apr 2007 08:00:09 GMT</pubDate>
      <description>&lt;p&gt;
In &lt;a href="http://www.oreillynet.com/onlamp/blog/2007/04/the_virtues_of_monoculture.html"&gt;The
Virtues of Monoculture&lt;/a&gt; James makes an excellent&amp;nbsp;point: "We celebrate the
diversity of choices available to solve a problem and call it freedom. IT managers
and CIOs look at it and call it chaos, confusion and uncertainty." Touché.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=44d78440-11f9-4676-90f6-be02bfc2d420" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,44d78440-11f9-4676-90f6-be02bfc2d420.aspx</comments>
      <category>L-Word Stuff</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=07f52abe-5ebe-4f41-97b4-7d1aa32ec09c</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,07f52abe-5ebe-4f41-97b4-7d1aa32ec09c.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,07f52abe-5ebe-4f41-97b4-7d1aa32ec09c.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=07f52abe-5ebe-4f41-97b4-7d1aa32ec09c</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
In my last blog entry <a href="http://chrison.net/UACElevationInManagedCodeANETCOMComponentElevated.aspx">UAC
Elevation in Managed Code: A .NET COM Component Elevated</a> I showed how to get up
and running with an all-managed code solution for UAC and COM elevation. Today I want
close out my series on UAC with some information on how to properly organize
the project plus present a library you can reuse to get up and running quickly - without
many of the manual and tedious steps from the previous proof of concept example.
</p>
        <p>
Speaking of the previous sample: it is still the basis for this best practice, so
the following directory layout will look familiar to you:
</p>
        <p>
          <img src="http://chrison.net/content/binary/xplatformdirlayout.png" border="0" />
        </p>
        <p>
Before diving into code, I want to start out with the SampleSetup directory, which
contains the executables. As you can guess, the starting point is Step1Register. It
contains register.bat, which you have to execute:
</p>
        <p>
          <img src="http://chrison.net/content/binary/xplatformregistration.png" border="0" />
        </p>
        <p>
Note that on machines without the .NET Framework SDK, there is no gacutil.exe. In
that case, you have to drag &amp; drop ManagedElevator.dll to c:\windows\assembly. 
</p>
        <p>
And in case you have been wondering from this screenshot, yes, the application now
also plays nicely on Windows XP:
</p>
        <p>
          <img src="http://chrison.net/content/binary/xplatformrunxp.png" border="0" />
        </p>
        <p>
Of course, there is no consent UI popping up, nor is there a shield icon like there
is on Windows Vista:
</p>
        <p>
          <img src="http://chrison.net/content/binary/xplatformrunvista.png" border="0" />
        </p>
        <p>
The magic for this cross-platform functionality is hidden in the UACHelper project
- which brings us to the source section of this blog post:
</p>
        <p>
          <img src="http://chrison.net/content/binary/xplatformuachelpercd.png" border="0" />
        </p>
        <p>
All the necessary COM elevation magic is now moved to this neat little library - including
the adapted UAC bits of VistaBridgeLibrary (no longer necessary). The names already
give away the purpose of each class and where they are used:
</p>
        <ul>
          <li>
            <strong>COMRegistration</strong> Used by the elevated component to automatically register
the necessary registry keys. 
</li>
          <li>
            <strong>ShieldButton</strong> Used by the client to display a button with a shield
icon (on Vista). For XP, no shield is rendered. 
</li>
          <li>
            <strong>COMElevation</strong> Starts the requested component with admin privileges. 
</li>
          <li>
            <strong>ElevatedProcess</strong>
            <a href="http://chrison.net/UACElevationInManagedCodeStartingElevatedProcesses.aspx">If
you want to start a simple process elevated</a>. Not used in this guidance.</li>
        </ul>
        <p>
The first customer of this library is the elevated component, so we start discussing
this guy next:
</p>
        <p>
          <img src="http://chrison.net/content/binary/xplatformmanagedelevatorcd.png" border="0" />
        </p>
        <p>
At first glance, this is similar to the previous POC implementation. The main difference
now is that I have broken down the functionality by feature area into namespaces:
</p>
        <ul>
          <li>
The "main" namespace 
</li>
          <li>
The .Components namespace 
</li>
          <li>
The .Guids namespace 
</li>
          <li>
The .InterOp namespace</li>
        </ul>
        <p>
Let's look at these one by one.
</p>
        <p>
          <strong>The "main" namespace</strong>
        </p>
        <p>
Here, we have one class only:
</p>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">class</span> RegisterFunctions<br />
{<br />
  [ComRegisterFunction]<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> 
public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">static</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> CustomRegister(Type
t)<br />
  {<br />
    COMRegistration.RegisterForElevation(Assembly.GetExecutingAssembly().Location,<br />
       SampleComponent.ClassToElevate,<br />
       Global.AppId,<br />
       100);<br /><br /><span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">    //
add additional "for elevation" components here by duplicating the above</span><br />
  }<br /><br />
  [ComUnregisterFunction]<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> 
public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">static</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> CustomUnregister(Type
t)<br />
  {<br />
    COMRegistration.UnRegisterFromElevation(Assembly.GetExecutingAssembly().Location, 
<br />
        Global.AppId);<br />
  }<br />
}</span>
        </p>
        <p>
It is called when the assembly is regasm'ed, and it is here where you call into COMRegistration.RegisterForElevation
to add all the necessary registry keys for elevation:
</p>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span>
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">static</span>
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> RegisterForElevation(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">string</span> assemblyLocation,<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   
string</span> classToElevate,<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   
string</span> appId,<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   
int</span> localizedStringId)<br />
{<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> if</span> (!UACHelperFunctions.IsUACEnabledOS()) <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span>;<br /><br /><span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> //
[HKEY_CLASSES_ROOT\CLSID\{71E050A7-AF7F-42dd-BE00-BF955DDD13D4}]</span><br /><span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> //
"AppID"="{75AB90B0-8B9C-45c9-AC55-C53A9D718E1A}"</span><br /><span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> //
"LocalizedString"="@E:\\Daten\\Firma\\Konferenzen und Talks\\..."</span><br />
 RegistryKey classKey <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> Registry.ClassesRoot.OpenSubKey(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">@"CLSID\{"</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> classToElevate <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"}"</span>, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">true</span>);<br />
 classKey.SetValue(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"AppId"</span>, <span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"{"</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> appId <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"}"</span>,
RegistryValueKind.String);<br />
 classKey.SetValue(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"LocalizedString"</span>, <span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"@"</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> assemblyLocation <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">",-"</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> localizedStringId.ToString(),
RegistryValueKind.String);<br /><br /><span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> //
[HKEY_CLASSES_ROOT\CLSID\{71E050A7-AF7F-42dd-BE00-BF955DDD13D4}\Elevation]</span><br /><span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> //
"Enabled"=dword:00000001</span><br />
 RegistryKey elevationKey <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> classKey.CreateSubKey(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Elevation"</span>);<br />
 elevationKey.SetValue(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Enabled"</span>,
1, RegistryValueKind.DWord);<br />
 elevationKey.Close();<br /><br />
 classKey.Close();<br /><br /><span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> //
[HKEY_CLASSES_ROOT\AppID\{75AB90B0-8B9C-45c9-AC55-C53A9D718E1A}]</span><br /><span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> //
@="ManagedElevator"</span><br /><span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> //
"DllSurrogate"=""</span><br />
 RegistryKey hkcrappId <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> Registry.ClassesRoot.OpenSubKey(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"AppID"</span>, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">true</span>);<br />
 RegistryKey appIdKey <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> hkcrappId.CreateSubKey(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"{"</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> appId <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"}"</span>);<br />
 appIdKey.SetValue(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">null</span>,
Path.GetFileNameWithoutExtension(assemblyLocation));<br />
 appIdKey.SetValue(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"DllSurrogate"</span>, <span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">""</span>,
RegistryValueKind.String);<br />
 appIdKey.Close();<br /><br /><span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> //
[HKEY_CLASSES_ROOT\AppID\ManagedElevator.dll]</span><br /><span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> //
"AppID"="{75AB90B0-8B9C-45c9-AC55-C53A9D718E1A}"</span><br />
 RegistryKey asmKey <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> hkcrappId.CreateSubKey(Path.GetFileName(assemblyLocation));<br />
 asmKey.SetValue(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"AppID"</span>, <span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"{"</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> appId <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"}"</span>,
RegistryValueKind.String);<br />
 asmKey.Close();<br /><br />
 hkcrappId.Close();<br />
}</span>
        </p>
        <p>
Please take note that when the component is registered on eg Windows XP, no registry
entries are written. After all, they are not needed.
</p>
        <p>
          <strong>The .Components namespace</strong>
        </p>
        <p>
Not much of a change - it contains the administrative component(s).
</p>
        <p>
          <strong>The .Guids namespace</strong>
        </p>
        <p>
The guids have been moved to a separate namespace. The reason? That way you can reference
the assembly in the client project and use the guids directly - no magic strings anywhere
any more.
</p>
        <p>
          <strong>The .InterOp namespace</strong>
        </p>
        <p>
This is the most important change with regards to the POC project - defining the correct
ComImport'ed interface is now the responsibility of the implementer of the elevated
component. That way, anyone needing access to this component only needs to reference
the assembly and they are good to go. It is a bad idea to have this interface part
of the client codebase!
</p>
        <p>
Speaking of the client... here is the button code for DemoForm.cs:
</p>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">private</span>
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> cmdLaunch_Click(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> sender,
EventArgs e)<br />
{<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> if</span> (UACHelperFunctions.IsUACEnabledOS())<br />
 {<br />
   IHelloWorld ihw <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> COMElevation.Start&lt;IHelloWorld&gt;(<br />
        SampleComponent.ClassToElevate, SampleComponent.IHelloWorld);<br />
   ihw.SayHello();<br />
   COMElevation.Release(ihw);<br />
 }<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> else</span><br />
 { 
<br />
   ManagedElevator.Components.ClassToElevate c <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> ManagedElevator.Components.ClassToElevate();<br />
   c.SayHello();<br />
 }<br />
}</span>
        </p>
        <p>
What looks interesting at first is COMElevation.Start as well as Release:
</p>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span>
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">class</span> COMElevation<br />
{<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">static</span> TIFace
Start&lt;TIFace&gt;(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">string</span> IID_Class, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">string</span> IID_Interface)<br />
 {<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">  return</span> Start&lt;TIFace&gt;(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> Guid(IID_Class), <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> Guid(IID_Interface));<br />
 }<br /><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">static</span> TIFace
Start&lt;TIFace&gt;(Guid IID_Class, Guid IID_Interface)<br />
 {<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> 
object</span> o <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> UACManager.LaunchElevatedCOMObject(IID_Class,
IID_Interface);<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> 
return</span> (TIFace)o;<br />
 }<br /><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">static</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> Release(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> o)<br />
 {<br />
  Marshal.ReleaseComObject(o);<br />
 }<br />
}</span>
        </p>
        <p>
Actually all it does is encapsulate the necessary calls to UACManager and Marshal.
Why is there no if / else using IsUACEnabledOS here? Well, at first I thought I'd
build such a switch, but then I thought again: why would I use COM InterOp if I don't
have to? I already referenced the assembly for the component (for the guids and interop
interface), so why not use managed all the way and save time? That's what I did in
the cmdLaunch_Click event handler.
</p>
        <p>
That's it for the code folks, now a little discussion at the end on why in the world
would you even think about doing this in a cross-platform way, or why it is a stupid
idea all along:
</p>
        <p>
This approach is only sensible if your application runs as administrative user on
XP, otherwise all the calls in the administrative component will fail. However, the
cross-platform part is only there to make it a complete best practice, there is no
"you must use it cross-platform" - if you build applications for Windows Vista with
the eventual need to elevate a task, then UACHelper is definitely for you! (and forget
about that it would even work on XP)
</p>
        <p>
Oh, and I almost forgot - here is the complete download, source code included of course
(my code is BSD licensed):
</p>
        <p>
          <a href="http://chrison.net/content/binary/AutomaticRegistration.zip">AutomaticRegistration.zip
(91.92 KB)</a>
        </p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=07f52abe-5ebe-4f41-97b4-7d1aa32ec09c" />
      </body>
      <title>UAC Elevation in Managed Code: Guidance for Implementing COM Elevation</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,07f52abe-5ebe-4f41-97b4-7d1aa32ec09c.aspx</guid>
      <link>http://chrison.net/UACElevationInManagedCodeGuidanceForImplementingCOMElevation.aspx</link>
      <pubDate>Fri, 16 Feb 2007 07:02:29 GMT</pubDate>
      <description>&lt;p&gt;
In my last blog entry &lt;a href="http://chrison.net/UACElevationInManagedCodeANETCOMComponentElevated.aspx"&gt;UAC
Elevation in Managed Code: A .NET COM Component Elevated&lt;/a&gt; I showed how to get up
and running with an all-managed code solution for UAC and COM elevation. Today I want
close out my series on UAC with&amp;nbsp;some information on how to properly organize
the project plus present a library you can reuse to get up and running quickly - without
many of the manual and tedious steps from the previous proof of concept&amp;nbsp;example.
&lt;/p&gt;
&lt;p&gt;
Speaking of the previous sample: it is still the basis for this best practice, so
the following directory layout will look familiar to you:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://chrison.net/content/binary/xplatformdirlayout.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
Before diving into code, I want to start out with the SampleSetup directory, which
contains the executables. As you can guess, the starting point is Step1Register. It
contains register.bat, which you have to execute:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://chrison.net/content/binary/xplatformregistration.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
Note that on machines without the .NET Framework SDK, there is no gacutil.exe. In
that case, you have to drag &amp;amp; drop ManagedElevator.dll to c:\windows\assembly. 
&lt;/p&gt;
&lt;p&gt;
And in case you have been wondering from this screenshot, yes, the application now
also plays nicely on Windows XP:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://chrison.net/content/binary/xplatformrunxp.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
Of course, there is no consent UI popping up, nor is there a shield icon like there
is on Windows Vista:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://chrison.net/content/binary/xplatformrunvista.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
The magic for this cross-platform functionality is hidden in the UACHelper project
- which brings us to the source section of this blog post:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://chrison.net/content/binary/xplatformuachelpercd.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
All the necessary COM elevation magic is now moved to this neat little library - including
the adapted UAC bits of VistaBridgeLibrary (no longer necessary). The names already
give away the purpose of each class and where they are used:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;COMRegistration&lt;/strong&gt; Used by the elevated component to automatically register
the necessary registry keys. 
&lt;li&gt;
&lt;strong&gt;ShieldButton&lt;/strong&gt; Used by the client to display a button with a shield
icon (on Vista). For XP, no shield is rendered. 
&lt;li&gt;
&lt;strong&gt;COMElevation&lt;/strong&gt; Starts the requested component with admin privileges. 
&lt;li&gt;
&lt;strong&gt;ElevatedProcess&lt;/strong&gt; &lt;a href="http://chrison.net/UACElevationInManagedCodeStartingElevatedProcesses.aspx"&gt;If
you want to start a simple process elevated&lt;/a&gt;. Not used in this guidance.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
The first customer of this library is the elevated component, so we start discussing
this guy next:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://chrison.net/content/binary/xplatformmanagedelevatorcd.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
At first glance, this is similar to the previous POC implementation. The main difference
now is that I have broken down the functionality by feature area into namespaces:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
The "main" namespace 
&lt;li&gt;
The .Components namespace 
&lt;li&gt;
The .Guids namespace 
&lt;li&gt;
The .InterOp namespace&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Let's look at these one by one.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;The "main" namespace&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Here, we have one class only:
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;class&lt;/span&gt; RegisterFunctions&lt;br&gt;
{&lt;br&gt;
&amp;nbsp; [ComRegisterFunction]&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;
public&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;static&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;void&lt;/span&gt; CustomRegister(Type
t)&lt;br&gt;
&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; COMRegistration.RegisterForElevation(Assembly.GetExecutingAssembly().Location,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SampleComponent.ClassToElevate,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Global.AppId,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100);&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//
add additional "for elevation" components here by duplicating the above&lt;/span&gt;
&lt;br&gt;
&amp;nbsp; }&lt;br&gt;
&lt;br&gt;
&amp;nbsp; [ComUnregisterFunction]&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;
public&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;static&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;void&lt;/span&gt; CustomUnregister(Type
t)&lt;br&gt;
&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; COMRegistration.UnRegisterFromElevation(Assembly.GetExecutingAssembly().Location, 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Global.AppId);&lt;br&gt;
&amp;nbsp; }&lt;br&gt;
}&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
It is called when the assembly is regasm'ed, and it is here where you call into COMRegistration.RegisterForElevation
to add all the necessary registry keys for elevation:
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;public&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;static&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;void&lt;/span&gt; RegisterForElevation(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;string&lt;/span&gt; assemblyLocation,&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
string&lt;/span&gt; classToElevate,&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
string&lt;/span&gt; appId,&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
int&lt;/span&gt; localizedStringId)&lt;br&gt;
{&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;if&lt;/span&gt; (!UACHelperFunctions.IsUACEnabledOS()) &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;return&lt;/span&gt;;&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;//
[HKEY_CLASSES_ROOT\CLSID\{71E050A7-AF7F-42dd-BE00-BF955DDD13D4}]&lt;/span&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;//
"AppID"="{75AB90B0-8B9C-45c9-AC55-C53A9D718E1A}"&lt;/span&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;//
"LocalizedString"="@E:\\Daten\\Firma\\Konferenzen und Talks\\..."&lt;/span&gt;
&lt;br&gt;
&amp;nbsp;RegistryKey classKey &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; Registry.ClassesRoot.OpenSubKey(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;@"CLSID\{"&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt; classToElevate &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"}"&lt;/span&gt;, &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;true&lt;/span&gt;);&lt;br&gt;
&amp;nbsp;classKey.SetValue(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"AppId"&lt;/span&gt;, &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"{"&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt; appId &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"}"&lt;/span&gt;,
RegistryValueKind.String);&lt;br&gt;
&amp;nbsp;classKey.SetValue(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"LocalizedString"&lt;/span&gt;, &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"@"&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt; assemblyLocation &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;",-"&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt; localizedStringId.ToString(),
RegistryValueKind.String);&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;//
[HKEY_CLASSES_ROOT\CLSID\{71E050A7-AF7F-42dd-BE00-BF955DDD13D4}\Elevation]&lt;/span&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;//
"Enabled"=dword:00000001&lt;/span&gt;
&lt;br&gt;
&amp;nbsp;RegistryKey elevationKey &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; classKey.CreateSubKey(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Elevation"&lt;/span&gt;);&lt;br&gt;
&amp;nbsp;elevationKey.SetValue(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Enabled"&lt;/span&gt;,
1, RegistryValueKind.DWord);&lt;br&gt;
&amp;nbsp;elevationKey.Close();&lt;br&gt;
&lt;br&gt;
&amp;nbsp;classKey.Close();&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;//
[HKEY_CLASSES_ROOT\AppID\{75AB90B0-8B9C-45c9-AC55-C53A9D718E1A}]&lt;/span&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;//
@="ManagedElevator"&lt;/span&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;//
"DllSurrogate"=""&lt;/span&gt;
&lt;br&gt;
&amp;nbsp;RegistryKey hkcrappId &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; Registry.ClassesRoot.OpenSubKey(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"AppID"&lt;/span&gt;, &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;true&lt;/span&gt;);&lt;br&gt;
&amp;nbsp;RegistryKey appIdKey &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; hkcrappId.CreateSubKey(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"{"&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt; appId &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"}"&lt;/span&gt;);&lt;br&gt;
&amp;nbsp;appIdKey.SetValue(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;null&lt;/span&gt;,
Path.GetFileNameWithoutExtension(assemblyLocation));&lt;br&gt;
&amp;nbsp;appIdKey.SetValue(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"DllSurrogate"&lt;/span&gt;, &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;""&lt;/span&gt;,
RegistryValueKind.String);&lt;br&gt;
&amp;nbsp;appIdKey.Close();&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;//
[HKEY_CLASSES_ROOT\AppID\ManagedElevator.dll]&lt;/span&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;//
"AppID"="{75AB90B0-8B9C-45c9-AC55-C53A9D718E1A}"&lt;/span&gt;
&lt;br&gt;
&amp;nbsp;RegistryKey asmKey &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; hkcrappId.CreateSubKey(Path.GetFileName(assemblyLocation));&lt;br&gt;
&amp;nbsp;asmKey.SetValue(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"AppID"&lt;/span&gt;, &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"{"&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt; appId &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"}"&lt;/span&gt;,
RegistryValueKind.String);&lt;br&gt;
&amp;nbsp;asmKey.Close();&lt;br&gt;
&lt;br&gt;
&amp;nbsp;hkcrappId.Close();&lt;br&gt;
}&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
Please take note that when the component is registered on eg Windows XP, no registry
entries are written. After all, they are not needed.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;The .Components namespace&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Not much of a change - it contains the administrative component(s).
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;The .Guids namespace&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
The guids have been moved to a separate namespace. The reason? That way you can reference
the assembly in the client project and use the guids directly - no magic strings anywhere
any more.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;The .InterOp namespace&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
This is the most important change with regards to the POC project - defining the correct
ComImport'ed interface is now the responsibility of the implementer of the elevated
component. That way, anyone needing access to this component only needs to reference
the assembly and they are good to go. It is a bad idea to have this interface part
of the client codebase!
&lt;/p&gt;
&lt;p&gt;
Speaking of the client... here is the button code for DemoForm.cs:
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;private&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;void&lt;/span&gt; cmdLaunch_Click(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;object&lt;/span&gt; sender,
EventArgs e)&lt;br&gt;
{&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;if&lt;/span&gt; (UACHelperFunctions.IsUACEnabledOS())&lt;br&gt;
&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp; IHelloWorld ihw &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; COMElevation.Start&amp;lt;IHelloWorld&amp;gt;(&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SampleComponent.ClassToElevate, SampleComponent.IHelloWorld);&lt;br&gt;
&amp;nbsp;&amp;nbsp; ihw.SayHello();&lt;br&gt;
&amp;nbsp;&amp;nbsp; COMElevation.Release(ihw);&lt;br&gt;
&amp;nbsp;}&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;else&lt;/span&gt;
&lt;br&gt;
&amp;nbsp;{ 
&lt;br&gt;
&amp;nbsp;&amp;nbsp; ManagedElevator.Components.ClassToElevate c &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;new&lt;/span&gt; ManagedElevator.Components.ClassToElevate();&lt;br&gt;
&amp;nbsp;&amp;nbsp; c.SayHello();&lt;br&gt;
&amp;nbsp;}&lt;br&gt;
}&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
What looks interesting at first is COMElevation.Start as well as Release:
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;public&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;class&lt;/span&gt; COMElevation&lt;br&gt;
{&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;public&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;static&lt;/span&gt; TIFace
Start&amp;lt;TIFace&amp;gt;(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;string&lt;/span&gt; IID_Class, &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;string&lt;/span&gt; IID_Interface)&lt;br&gt;
&amp;nbsp;{&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;return&lt;/span&gt; Start&amp;lt;TIFace&amp;gt;(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;new&lt;/span&gt; Guid(IID_Class), &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;new&lt;/span&gt; Guid(IID_Interface));&lt;br&gt;
&amp;nbsp;}&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;public&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;static&lt;/span&gt; TIFace
Start&amp;lt;TIFace&amp;gt;(Guid IID_Class, Guid IID_Interface)&lt;br&gt;
&amp;nbsp;{&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;
object&lt;/span&gt; o &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; UACManager.LaunchElevatedCOMObject(IID_Class,
IID_Interface);&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;
return&lt;/span&gt; (TIFace)o;&lt;br&gt;
&amp;nbsp;}&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;public&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;static&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;void&lt;/span&gt; Release(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;object&lt;/span&gt; o)&lt;br&gt;
&amp;nbsp;{&lt;br&gt;
&amp;nbsp; Marshal.ReleaseComObject(o);&lt;br&gt;
&amp;nbsp;}&lt;br&gt;
}&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
Actually all it does is encapsulate the necessary calls to UACManager and Marshal.
Why is there no if / else using IsUACEnabledOS here? Well, at first I thought I'd
build such a switch, but then I thought again: why would I use COM InterOp if I don't
have to? I already referenced the assembly for the component (for the guids and interop
interface), so why not use managed all the way and save time? That's what I did in
the cmdLaunch_Click event handler.
&lt;/p&gt;
&lt;p&gt;
That's it for the code folks, now a little discussion at the end on why in the world
would you even think about doing this in a cross-platform way, or why it is a stupid
idea all along:
&lt;/p&gt;
&lt;p&gt;
This approach is only sensible if your application runs as administrative user on
XP, otherwise all the calls in the administrative component will fail. However, the
cross-platform part is only there to make it a complete best practice, there is no
"you must use it cross-platform" - if you build applications for Windows Vista with
the eventual need to elevate a task, then UACHelper is definitely for you! (and forget
about that it would even work on XP)
&lt;/p&gt;
&lt;p&gt;
Oh, and I almost forgot - here is the complete download, source code included of course
(my code is BSD licensed):
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://chrison.net/content/binary/AutomaticRegistration.zip"&gt;AutomaticRegistration.zip
(91.92 KB)&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=07f52abe-5ebe-4f41-97b4-7d1aa32ec09c" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,07f52abe-5ebe-4f41-97b4-7d1aa32ec09c.aspx</comments>
      <category>Security</category>
      <category>UAC</category>
      <category>Use the source Luke</category>
      <category>Vista</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=0b4c5137-0b5c-475b-9f6b-e013dc9c7d5f</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,0b4c5137-0b5c-475b-9f6b-e013dc9c7d5f.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,0b4c5137-0b5c-475b-9f6b-e013dc9c7d5f.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=0b4c5137-0b5c-475b-9f6b-e013dc9c7d5f</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The previous installment <a href="http://chrison.net/UACElevationInManagedCodeStartingElevatedProcesses.aspx">UAC
Elevation in Managed Code: Starting Elevated Processes</a> dealt with starting executables
with the "real" administrative token. In this blog post, we deal with starting a COM
component with elevated privileges. For in-depth background information, please consult
Kenny Kerr's absolutely excellent post on <a href="http://weblogs.asp.net/kennykerr/archive/2006/09/29/Windows-Vista-for-Developers-_1320_-Part-4-_1320_-User-Account-Control.aspx">Windows
Vista for Developers – Part 4 – User Account Control</a>.
</p>
        <p>
To start with, we need a COM component. Instead of writing an ATL C++ COM component
from scratch, I took the MyElevateCom sample from <a href="http://blogs.msdn.com/vistacompatteam/archive/2006/09/28/CoCreateInstanceAsAdmin-or-CreateElevatedComObject-sample.aspx">CoCreateInstanceAsAdmin
or CreateElevatedComObject sample</a> from the <a href="http://blogs.msdn.com/vistacompatteam/">Vista
Compatibility Team Blog</a>. Note that for building it, check out my post <a href="http://chrison.net/VisualStudioOnVistaNotSoFast.aspx">Visual
Studio on Vista: Not so Fast!</a></p>
        <p>
Assuming that you built and successfully registered the COM component (it is built
to the instuctions from Kenny's post), you can go about and write the managed caller.
First, we need a reference to the component:
</p>
        <p>
          <img src="http://chrison.net/content/binary/atladdcomreference.png" border="0" />
        </p>
        <p>
Then comes the tricky part - actually instantiating the COM component. When you take
a look at the C++ example, you see that quite some "moniker magic" is involved that
cannot be replicated by simply newing up the component. So how to mimic this behavior
in managed code? The <a href="http://www.microsoft.com/downloads/details.aspx?familyid=c2b1e300-f358-4523-b479-f53d234cdccf&amp;displaylang=en">Microsoft®
Windows® Software Development Kit for Windows Vista™ and .NET Framework 3.0 Runtime
Components</a> comes to the rescue: inside, you find C:\Program Files\Microsoft SDKs\Windows\v6.0\Samples\CrossTechnologySamples.zip,
which contains the VistaBridge sample. 
</p>
        <p>
From that, I took the VistaBridgeLibary, and modified the static UACManager.LaunchElevatedCOMObject
method a bit:
</p>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">[<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span>:
MarshalAs(UnmanagedType.Interface)]<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">static</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> LaunchElevatedCOMObject(Guid
Clsid, Guid InterfaceID)<br />
{<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> 
string</span> CLSID <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> Clsid.ToString(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"B"</span>); 
<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> 
string</span> monikerName <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Elevation:Administrator!new:"</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> CLSID;<br /><br />
  NativeMethods.BIND_OPTS3 bo <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> NativeMethods.BIND_OPTS3();<br />
  bo.cbStruct <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> (<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">uint</span>)Marshal.SizeOf(bo);<br />
  bo.hwnd <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> IntPtr.Zero;<br />
  bo.dwClassContext <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> (<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">int</span>)NativeMethods.CLSCTX.CLSCTX_LOCAL_SERVER;<br /><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> 
object</span> retVal <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> UnsafeNativeMethods.CoGetObject(monikerName, <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">ref</span> bo,
InterfaceID);<br /><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">  return</span> (retVal);<br />
}</span>
        </p>
        <p>
Modifications: the method is now public instead of internal, and CLSCTX changed to
local server (otherwise it wouldn't work).
</p>
        <p>
Next, we need a UI:
</p>
        <p>
          <img src="http://chrison.net/content/binary/uacstartatlcomponent.png" border="0" />
        </p>
        <p>
This button is the CommandLinkWinForms control from VistaBridgeLibary, with the ShieldIcon
property set to true. 
</p>
        <p>
Let's hook up the event code:
</p>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">private</span>
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> tryItButton_Click(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> sender,
EventArgs e)<br />
{<br />
 Guid IID_ITheElevated <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> 
new</span> Guid(0x5EFC3EFB, 0xC7D3, 0x4D00, 0xB7, 0x2E, 0x2F, 0x86, 0x4A, 0x1E, 0xAD,
0x06);<br /><br />
 Guid CLSID_TheElevated <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> 
new</span> Guid(0x253E7696, 0xA524, 0x4E49, 0x9E, 0x50, 0xBF, 0xCC, 0x29, 0x91, 0x31,
0x23);<br /><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> object</span> o <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> UACManager.LaunchElevatedCOMObject(CLSID_TheElevated,
IID_ITheElevated);<br /><br />
 ITheElevated iface <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> (ITheElevated)o;<br /><br /><span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> //
Call the method on the interface just like in the C++ example</span><br />
 iface.ShowMe();<br /><br /><span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> //
Release the object</span><br />
 Marshal.ReleaseComObject(o);<br />
}</span>
        </p>
        <p>
The interface ID as well as class ID guids come directly from the C++ project (it
is always a good idea to "speak" more than one language), but you could obtain those
from the type library or registry as well if you don't have the source code of the
component handy.
</p>
        <p>
Object creation is handled via LaunchElevatedCOMObject, and the resultant object is
cast to the interface from the imported type library. Noteable (and important) is
the last line: because the object wasn't created by the runtime, we have to take care
of its destruction (the created interface doesn't have a Release() method, so we use
Marshal.ReleaseComObject).
</p>
        <p>
That's it - your managed code is now instantiating an elevated COM object that has
full reign over the system.
</p>
        <p>
          <a href="http://chrison.net/content/binary/ElevateCOMComponentSample.zip">ElevateCOMComponentSample.zip
(117.07 KB)</a>
        </p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=0b4c5137-0b5c-475b-9f6b-e013dc9c7d5f" />
      </body>
      <title>UAC Elevation in Managed Code: Starting Elevated COM Components</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,0b4c5137-0b5c-475b-9f6b-e013dc9c7d5f.aspx</guid>
      <link>http://chrison.net/UACElevationInManagedCodeStartingElevatedCOMComponents.aspx</link>
      <pubDate>Tue, 30 Jan 2007 09:14:50 GMT</pubDate>
      <description>&lt;p&gt;
The previous installment &lt;a href="http://chrison.net/UACElevationInManagedCodeStartingElevatedProcesses.aspx"&gt;UAC
Elevation in Managed Code: Starting Elevated Processes&lt;/a&gt; dealt with starting executables
with the "real" administrative token. In this blog post, we deal with starting a COM
component with elevated privileges. For in-depth background information, please consult
Kenny Kerr's absolutely excellent post on &lt;a href="http://weblogs.asp.net/kennykerr/archive/2006/09/29/Windows-Vista-for-Developers-_1320_-Part-4-_1320_-User-Account-Control.aspx"&gt;Windows
Vista for Developers – Part 4 – User Account Control&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
To start with, we need a COM component. Instead of writing an ATL C++ COM component
from scratch, I took the MyElevateCom sample from &lt;a href="http://blogs.msdn.com/vistacompatteam/archive/2006/09/28/CoCreateInstanceAsAdmin-or-CreateElevatedComObject-sample.aspx"&gt;CoCreateInstanceAsAdmin
or CreateElevatedComObject sample&lt;/a&gt; from the &lt;a href="http://blogs.msdn.com/vistacompatteam/"&gt;Vista
Compatibility Team Blog&lt;/a&gt;. Note that for building it, check out my post &lt;a href="http://chrison.net/VisualStudioOnVistaNotSoFast.aspx"&gt;Visual
Studio on Vista: Not so Fast!&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Assuming that you built and successfully registered the COM component (it is built
to the instuctions from Kenny's post), you can go about and write the managed caller.
First, we need a reference to the component:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://chrison.net/content/binary/atladdcomreference.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
Then comes the tricky part - actually instantiating the COM component. When you take
a look at the C++ example, you see that quite some "moniker magic" is involved that
cannot be replicated by simply newing up the component. So how to mimic this behavior
in managed code? The &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=c2b1e300-f358-4523-b479-f53d234cdccf&amp;amp;displaylang=en"&gt;Microsoft®
Windows® Software Development Kit for Windows Vista™ and .NET Framework 3.0 Runtime
Components&lt;/a&gt; comes to the rescue: inside, you find C:\Program Files\Microsoft SDKs\Windows\v6.0\Samples\CrossTechnologySamples.zip,
which contains the VistaBridge sample. 
&lt;/p&gt;
&lt;p&gt;
From that, I took the VistaBridgeLibary, and modified the static UACManager.LaunchElevatedCOMObject
method a bit:
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;[&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;return&lt;/span&gt;:
MarshalAs(UnmanagedType.Interface)]&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;public&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;static&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;object&lt;/span&gt; LaunchElevatedCOMObject(Guid
Clsid, Guid InterfaceID)&lt;br&gt;
{&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;
string&lt;/span&gt; CLSID &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; Clsid.ToString(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"B"&lt;/span&gt;); 
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;
string&lt;/span&gt; monikerName &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Elevation:Administrator!new:"&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt; CLSID;&lt;br&gt;
&lt;br&gt;
&amp;nbsp; NativeMethods.BIND_OPTS3 bo &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;new&lt;/span&gt; NativeMethods.BIND_OPTS3();&lt;br&gt;
&amp;nbsp; bo.cbStruct &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; (&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;uint&lt;/span&gt;)Marshal.SizeOf(bo);&lt;br&gt;
&amp;nbsp; bo.hwnd &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; IntPtr.Zero;&lt;br&gt;
&amp;nbsp; bo.dwClassContext &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; (&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;int&lt;/span&gt;)NativeMethods.CLSCTX.CLSCTX_LOCAL_SERVER;&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;
object&lt;/span&gt; retVal &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; UnsafeNativeMethods.CoGetObject(monikerName, &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;ref&lt;/span&gt; bo,
InterfaceID);&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;return&lt;/span&gt; (retVal);&lt;br&gt;
}&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
Modifications: the method is now public instead of internal, and CLSCTX changed to
local server (otherwise it wouldn't work).
&lt;/p&gt;
&lt;p&gt;
Next, we need a UI:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://chrison.net/content/binary/uacstartatlcomponent.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
This button is the CommandLinkWinForms control from VistaBridgeLibary, with the ShieldIcon
property set to true. 
&lt;/p&gt;
&lt;p&gt;
Let's hook up the event code:
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;private&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;void&lt;/span&gt; tryItButton_Click(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;object&lt;/span&gt; sender,
EventArgs e)&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;Guid IID_ITheElevated &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;
new&lt;/span&gt; Guid(0x5EFC3EFB, 0xC7D3, 0x4D00, 0xB7, 0x2E, 0x2F, 0x86, 0x4A, 0x1E, 0xAD,
0x06);&lt;br&gt;
&lt;br&gt;
&amp;nbsp;Guid CLSID_TheElevated &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; 
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;
new&lt;/span&gt; Guid(0x253E7696, 0xA524, 0x4E49, 0x9E, 0x50, 0xBF, 0xCC, 0x29, 0x91, 0x31,
0x23);&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;object&lt;/span&gt; o &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; UACManager.LaunchElevatedCOMObject(CLSID_TheElevated,
IID_ITheElevated);&lt;br&gt;
&lt;br&gt;
&amp;nbsp;ITheElevated iface &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; (ITheElevated)o;&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;//
Call the method on the interface just like in the C++ example&lt;/span&gt;
&lt;br&gt;
&amp;nbsp;iface.ShowMe();&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;//
Release the object&lt;/span&gt;
&lt;br&gt;
&amp;nbsp;Marshal.ReleaseComObject(o);&lt;br&gt;
}&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
The interface ID as well as class ID guids come directly from the C++ project (it
is always a good idea to "speak" more than one language), but you could obtain those
from the type library or registry as well if you don't have the source code of the
component handy.
&lt;/p&gt;
&lt;p&gt;
Object creation is handled via LaunchElevatedCOMObject, and the resultant object is
cast to the interface from the imported type library. Noteable (and important) is
the last line: because the object wasn't created by the runtime, we have to take care
of its destruction (the created interface doesn't have a Release() method, so we use
Marshal.ReleaseComObject).
&lt;/p&gt;
&lt;p&gt;
That's it - your managed code is now instantiating an elevated COM object that has
full reign over the system.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://chrison.net/content/binary/ElevateCOMComponentSample.zip"&gt;ElevateCOMComponentSample.zip
(117.07 KB)&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=0b4c5137-0b5c-475b-9f6b-e013dc9c7d5f" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,0b4c5137-0b5c-475b-9f6b-e013dc9c7d5f.aspx</comments>
      <category>.NET</category>
      <category>Security</category>
      <category>UAC</category>
      <category>Use the source Luke</category>
      <category>Vista</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=8f54c1c4-56df-4965-a1fd-20c1bd9932ae</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,8f54c1c4-56df-4965-a1fd-20c1bd9932ae.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,8f54c1c4-56df-4965-a1fd-20c1bd9932ae.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=8f54c1c4-56df-4965-a1fd-20c1bd9932ae</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
When you are working with Windows Vista, you know that even the administrative users
are stripped ("filtered") of their privileges for normal operations, and that when
you have to perform tasks requiring administrative privileges, you are presented with
an UAC elevation prompt. The idea of this blog post series is to provide you with
working samples on how to work with elevation from inside managed applications (you
might also want to read <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=ba73b169-a648-49af-bc5e-a2eebb74c16b&amp;DisplayLang=en">Windows
Vista Application Development Requirements for User Account Control Compatibility</a>).
</p>
        <p>
I want to side-step the really easy part - providing a manifest to start the entire
application elevated (a good idea if the application makes no sense at all unless
it has administrative rights, like regedit.exe). You can find information on those
topics in <a href="http://blogs.msdn.com/shawnfa/archive/2006/04/06/568563.aspx">Adding
a UAC Manifest to Managed Code</a> and <a href="http://www.danielmoth.com/Blog/2006/07/vista-user-account-control.html">Vista:
User Account Control</a>.
</p>
        <p>
Now back to the topic of this post: App A needs to start App B with administrative
rights (because App B e.g. needs to write to HKLM or Program Files). Therefore, we
somehow must run App B as an administrative user (or with the non-filtered token of
the current user). So how do we go about it?
</p>
        <p>
First, some eye candy. You definitely already saw those nice shield icons before:
</p>
        <p>
          <img src="http://chrison.net/content/binary/uacstartprocess.png" border="0" />
        </p>
        <p>
Those shield icons are stock on Windows Vista and indicate to the user that the action
that hides behind the button requires elevation. I didn't create a button control
myself - instead, I reused one that is readily available on the Web: <a href="http://www.brethorsting.com/uidesign/2006/11/add_a_uac_shield_to_your_winfo.html">Add
a UAC Shield to your Winforms buttons in C#</a>.
</p>
        <p>
All I had to do myself was to start the Process ("App B"):
</p>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">private</span>
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> startProcess_Click(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> sender,
EventArgs e)<br />
{<br />
  ProcessStartInfo psi <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> ProcessStartInfo();<br />
  psi.FileName <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> theProcess;<br />
  psi.Verb <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"runas"</span>;<br />
  Process.Start(psi);<br />
}</span>
        </p>
        <p>
The ticket (so to speak) for the elevation prompt is setting the Verb to "runas"
in the ProcessStartInfo instance - this will pop up the elevation prompt if necessary
when Process.Start is called.
</p>
        <p>
This simplistic approach has a problem though - once App B is started, users can switch
back to App A, because it App B isn't "modal" for App A. To solve this problem, I
incorporated the approach from Daniel Moth outlined in his post <a href="http://www.danielmoth.com/Blog/2006/12/launch-elevated-and-modal-too.html">Launch
elevated and modal too</a>:
</p>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">private</span>
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> launchModal_Click(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> sender,
EventArgs e)<br />
{<br />
  ProcessStartInfo psi <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> ProcessStartInfo();<br />
  psi.FileName <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> theProcess;<br />
  psi.Verb <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"runas"</span>;<br /><br />
  psi.ErrorDialog <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">true</span>;<br />
  psi.ErrorDialogParentHandle <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">this</span>.Handle;<br /><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> 
try</span><br />
  {<br />
    Process p <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> Process.Start(psi);<br />
    p.WaitForExit();<br />
  }<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"> 
catch</span> (Exception ex)<br />
  {<br />
    MessageBox.Show(ex.ToString());<br />
  }<br />
}</span>
        </p>
        <p>
And that's it - App B is now modal. Once App B quits, control is relinquished to App
A (which still doesn't run with administrative rights). 
</p>
        <p>
          <a href="http://chrison.net/content/binary/ElevateProcessSample.zip">ElevateProcessSample.zip
(21.1 KB)</a>
        </p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=8f54c1c4-56df-4965-a1fd-20c1bd9932ae" />
      </body>
      <title>UAC Elevation in Managed Code: Starting Elevated Processes</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,8f54c1c4-56df-4965-a1fd-20c1bd9932ae.aspx</guid>
      <link>http://chrison.net/UACElevationInManagedCodeStartingElevatedProcesses.aspx</link>
      <pubDate>Tue, 30 Jan 2007 07:14:31 GMT</pubDate>
      <description>&lt;p&gt;
When you are working with Windows Vista, you know that even the administrative users
are stripped ("filtered") of their privileges for normal operations, and that when
you have to perform tasks requiring administrative privileges, you are presented with
an UAC elevation prompt. The idea of this blog post series is to provide you with
working samples on how to work with elevation from inside managed applications (you
might also want to read &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=ba73b169-a648-49af-bc5e-a2eebb74c16b&amp;amp;DisplayLang=en"&gt;Windows
Vista Application Development Requirements for User Account Control Compatibility&lt;/a&gt;).
&lt;/p&gt;
&lt;p&gt;
I want to side-step the really easy part - providing a manifest to start the entire
application elevated (a good idea if the application makes no sense at all unless
it has administrative rights, like regedit.exe). You can find information on those
topics in &lt;a href="http://blogs.msdn.com/shawnfa/archive/2006/04/06/568563.aspx"&gt;Adding
a UAC Manifest to Managed Code&lt;/a&gt; and &lt;a href="http://www.danielmoth.com/Blog/2006/07/vista-user-account-control.html"&gt;Vista:
User Account Control&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Now back to the topic of this post: App A needs to start App B with administrative
rights (because App B e.g. needs to write to HKLM or Program Files). Therefore, we
somehow must run App B as an administrative user (or with the non-filtered token of
the current user). So how do we go about it?
&lt;/p&gt;
&lt;p&gt;
First, some eye candy. You definitely already saw those nice shield icons before:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://chrison.net/content/binary/uacstartprocess.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
Those shield icons are stock on Windows Vista and indicate to the user that the action
that hides behind the button requires elevation. I didn't create a button control
myself - instead, I reused one that is readily available on the Web: &lt;a href="http://www.brethorsting.com/uidesign/2006/11/add_a_uac_shield_to_your_winfo.html"&gt;Add
a UAC Shield to your Winforms buttons in C#&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
All I had to do myself was to start the Process ("App B"):
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;private&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;void&lt;/span&gt; startProcess_Click(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;object&lt;/span&gt; sender,
EventArgs e)&lt;br&gt;
{&lt;br&gt;
&amp;nbsp; ProcessStartInfo psi &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;new&lt;/span&gt; ProcessStartInfo();&lt;br&gt;
&amp;nbsp; psi.FileName &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; theProcess;&lt;br&gt;
&amp;nbsp; psi.Verb &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"runas"&lt;/span&gt;;&lt;br&gt;
&amp;nbsp; Process.Start(psi);&lt;br&gt;
}&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
The ticket (so to speak)&amp;nbsp;for the elevation prompt is setting the Verb to "runas"
in the ProcessStartInfo instance - this will pop up the elevation prompt if necessary
when Process.Start is called.
&lt;/p&gt;
&lt;p&gt;
This simplistic approach has a problem though - once App B is started, users can switch
back to App A, because it App B isn't "modal" for App A. To solve this problem, I
incorporated the approach from Daniel Moth outlined in his post &lt;a href="http://www.danielmoth.com/Blog/2006/12/launch-elevated-and-modal-too.html"&gt;Launch
elevated and modal too&lt;/a&gt;:
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;private&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;void&lt;/span&gt; launchModal_Click(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;object&lt;/span&gt; sender,
EventArgs e)&lt;br&gt;
{&lt;br&gt;
&amp;nbsp; ProcessStartInfo psi &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;new&lt;/span&gt; ProcessStartInfo();&lt;br&gt;
&amp;nbsp; psi.FileName &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; theProcess;&lt;br&gt;
&amp;nbsp; psi.Verb &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"runas"&lt;/span&gt;;&lt;br&gt;
&lt;br&gt;
&amp;nbsp; psi.ErrorDialog &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;true&lt;/span&gt;;&lt;br&gt;
&amp;nbsp; psi.ErrorDialogParentHandle &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;this&lt;/span&gt;.Handle;&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;
try&lt;/span&gt;
&lt;br&gt;
&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Process p &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; Process.Start(psi);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; p.WaitForExit();&lt;br&gt;
&amp;nbsp; }&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;
catch&lt;/span&gt; (Exception ex)&lt;br&gt;
&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show(ex.ToString());&lt;br&gt;
&amp;nbsp; }&lt;br&gt;
}&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
And that's it - App B is now modal. Once App B quits, control is relinquished to App
A (which still doesn't run with administrative rights). 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://chrison.net/content/binary/ElevateProcessSample.zip"&gt;ElevateProcessSample.zip
(21.1 KB)&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=8f54c1c4-56df-4965-a1fd-20c1bd9932ae" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,8f54c1c4-56df-4965-a1fd-20c1bd9932ae.aspx</comments>
      <category>Security</category>
      <category>UAC</category>
      <category>Use the source Luke</category>
      <category>Vista</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=00335d90-2e81-446f-9a1d-a7ad39ddb44e</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,00335d90-2e81-446f-9a1d-a7ad39ddb44e.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,00335d90-2e81-446f-9a1d-a7ad39ddb44e.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=00335d90-2e81-446f-9a1d-a7ad39ddb44e</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Shortly after Christmas last year, I started with the Code Comment Checking Policy
(read about it <a href="http://chrison.net/CCCPCodeCommentCheckingPolicyAkaPolicyTripleSlashForVSTSTFS.aspx">here</a>, <a href="http://chrison.net/CodeCommentCheckingPolicyTakeTwo.aspx">here</a> and <a href="http://chrison.net/CCCP12AvailableWithSetup.aspx">here</a>)
for Team Foundation Server. The idea for it was based on <a href="http://blogs.developpeur.org/azra/">Florent
Santin</a>'s <a href="http://www.codeplex.com/TFSCCPolicy">TFSCCPolicy</a>, but it
used an entirely different approach (full-blown parser instead of RegEx).
</p>
        <p>
As I never intended to compete with him (after all, we are both MVPs), I contacted
him informing him of my endeavours. He liked the approach I took, and offered me take
over on CodePlex because he had little time to spend on it anyways. So, at long last,
today I set up shop as project coordinator at <a href="http://www.codeplex.com/TFSCCPolicy">TFS
Code Comment Checking Policy, Formerly Known as TFSCCPolicy</a>. 
</p>
        <p>
The latest binaries are available, as well as the source code checked into the repository.
If you have ideas on how to improve the feature set, let us know in the <a href="http://www.codeplex.com/TFSCCPolicy/Project/ListThreads.aspx?ForumId=1449">User
Forum</a>. Same goes for joining the team or letting us know about blog posts or tutorials
you wrote.
</p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=00335d90-2e81-446f-9a1d-a7ad39ddb44e" />
      </body>
      <title>TFSCCPolicy and CCCP Merge</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,00335d90-2e81-446f-9a1d-a7ad39ddb44e.aspx</guid>
      <link>http://chrison.net/TFSCCPolicyAndCCCPMerge.aspx</link>
      <pubDate>Sun, 21 Jan 2007 11:18:17 GMT</pubDate>
      <description>&lt;p&gt;
Shortly after Christmas last year, I started with the Code Comment Checking Policy
(read about it &lt;a href="http://chrison.net/CCCPCodeCommentCheckingPolicyAkaPolicyTripleSlashForVSTSTFS.aspx"&gt;here&lt;/a&gt;, &lt;a href="http://chrison.net/CodeCommentCheckingPolicyTakeTwo.aspx"&gt;here&lt;/a&gt; and &lt;a href="http://chrison.net/CCCP12AvailableWithSetup.aspx"&gt;here&lt;/a&gt;)
for Team Foundation Server. The idea for it was based on &lt;a href="http://blogs.developpeur.org/azra/"&gt;Florent
Santin&lt;/a&gt;'s &lt;a href="http://www.codeplex.com/TFSCCPolicy"&gt;TFSCCPolicy&lt;/a&gt;, but it
used an entirely different approach (full-blown parser instead of RegEx).
&lt;/p&gt;
&lt;p&gt;
As I never intended to compete with him (after all, we are both MVPs), I contacted
him informing him of my endeavours. He liked the approach I took, and offered me take
over on CodePlex because he had little time to spend on it anyways. So, at long last,
today I set up shop as project coordinator at &lt;a href="http://www.codeplex.com/TFSCCPolicy"&gt;TFS
Code Comment Checking Policy, Formerly Known as TFSCCPolicy&lt;/a&gt;. 
&lt;/p&gt;
&lt;p&gt;
The latest binaries are available, as well as the source code checked into the repository.
If you have ideas on how to improve the feature set, let us know in the &lt;a href="http://www.codeplex.com/TFSCCPolicy/Project/ListThreads.aspx?ForumId=1449"&gt;User
Forum&lt;/a&gt;. Same goes for joining the team or letting us know about blog posts or tutorials
you wrote.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=00335d90-2e81-446f-9a1d-a7ad39ddb44e" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,00335d90-2e81-446f-9a1d-a7ad39ddb44e.aspx</comments>
      <category>Team System</category>
      <category>Use the source Luke</category>
      <category>Visual Studio</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=7b55ef8d-62f7-4688-9dde-1c264c4f5001</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,7b55ef8d-62f7-4688-9dde-1c264c4f5001.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,7b55ef8d-62f7-4688-9dde-1c264c4f5001.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=7b55ef8d-62f7-4688-9dde-1c264c4f5001</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I just gave <a href="http://www.statsvn.org">StatSVN</a> a try, which compiles statistics
for <a href="http://subversion.tigris.org/">Subversion</a> repositories. For my trial,
I used the 2.1 branch of <a href="http://www.icsharpcode.net/opensource/sd/">SharpDevelop</a> -
which, because only created a month ago - should create a small and manageable statistic
to start out with.
</p>
        <p>
What do you need to get up and running with StatSVN (except, of course, StatSVN itself)?
Well, the Subversion command line client (<a href="http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91">get
it here</a>), as well as <a href="http://java.sun.com/javase/downloads/index.jsp">Java</a>.
Working with StatSVN is really easy - simply follow the steps outlined in the readme
and you can't go wrong - it even works nicely on Windows Vista.
</p>
        <p>
If you don't want to install StatSVN on your box just to see how a report might look
like for a real-world project, I have packaged the report generated for our SharpDevelop
2.1 branch:
</p>
        <p>
          <a href="http://chrison.net/content/binary/DemoReport.zip">DemoReport.zip (1.27 MB)</a>
        </p>
        <p>
Before looking at the report, check out the LOC and churn rate I have posted below:
</p>
        <p>
          <img src="http://chrison.net/content/binary/locandchurn.png" border="0" />
        </p>
        <p>
This branch was created from /trunk to only contain bug fixes from Beta 2 to release
candidates and RTW. That's why there are spikes of activity, with no activity at other
days. Also, not all developers are working on the branch, many are concentrating on
developing features for the new version which lives in /trunk.
</p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=7b55ef8d-62f7-4688-9dde-1c264c4f5001" />
      </body>
      <title>StatSVN - Statistics for Subversion</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,7b55ef8d-62f7-4688-9dde-1c264c4f5001.aspx</guid>
      <link>http://chrison.net/StatSVNStatisticsForSubversion.aspx</link>
      <pubDate>Fri, 19 Jan 2007 10:46:42 GMT</pubDate>
      <description>&lt;p&gt;
I just gave &lt;a href="http://www.statsvn.org"&gt;StatSVN&lt;/a&gt; a try, which compiles statistics
for &lt;a href="http://subversion.tigris.org/"&gt;Subversion&lt;/a&gt; repositories. For my trial,
I used the 2.1 branch of &lt;a href="http://www.icsharpcode.net/opensource/sd/"&gt;SharpDevelop&lt;/a&gt; -
which, because only created a month ago - should create a small and manageable statistic
to start out with.
&lt;/p&gt;
&lt;p&gt;
What do you need to get up and running with StatSVN (except, of course, StatSVN itself)?
Well, the Subversion command line client (&lt;a href="http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91"&gt;get
it here&lt;/a&gt;), as well as &lt;a href="http://java.sun.com/javase/downloads/index.jsp"&gt;Java&lt;/a&gt;.
Working with StatSVN is really easy - simply follow the steps outlined in the readme
and you can't go wrong - it even works nicely on Windows Vista.
&lt;/p&gt;
&lt;p&gt;
If you don't want to install StatSVN on your box just to see how a report might look
like for a real-world project, I have packaged the report generated for our SharpDevelop
2.1 branch:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://chrison.net/content/binary/DemoReport.zip"&gt;DemoReport.zip (1.27 MB)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Before looking at the report, check out the LOC and churn rate I have posted below:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://chrison.net/content/binary/locandchurn.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
This branch was created from /trunk to only contain bug fixes from Beta 2 to release
candidates and RTW. That's why there are spikes of activity, with no activity at other
days. Also, not all developers are working on the branch, many are concentrating on
developing features for the new version which lives in /trunk.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=7b55ef8d-62f7-4688-9dde-1c264c4f5001" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,7b55ef8d-62f7-4688-9dde-1c264c4f5001.aspx</comments>
      <category>Cool Download</category>
      <category>Project Management</category>
      <category>Subversion</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=b9fcfe7a-a1fd-4c03-9213-f60fccc89241</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,b9fcfe7a-a1fd-4c03-9213-f60fccc89241.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,b9fcfe7a-a1fd-4c03-9213-f60fccc89241.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=b9fcfe7a-a1fd-4c03-9213-f60fccc89241</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.MattWard">Matt</a> followed
through with his promise (see <a href="http://chrison.net/CCCP12AvailableWithSetup.aspx">CCCP
1.2 Available With Setup</a>) to write a tutorial on how to create a WiX-based installer
with SharpDevelop: <a href="http://community.sharpdevelop.net/blogs/mattward/archive/2007/01/08/CreatingAnInstallerWithSharpDevelop.aspx">Creating
an Installer with SharpDevelop</a></p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=b9fcfe7a-a1fd-4c03-9213-f60fccc89241" />
      </body>
      <title>Creating a WiX-Based Installer with SharpDevelop</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,b9fcfe7a-a1fd-4c03-9213-f60fccc89241.aspx</guid>
      <link>http://chrison.net/CreatingAWiXBasedInstallerWithSharpDevelop.aspx</link>
      <pubDate>Tue, 09 Jan 2007 07:16:16 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.MattWard"&gt;Matt&lt;/a&gt; followed
through with his promise (see &lt;a href="http://chrison.net/CCCP12AvailableWithSetup.aspx"&gt;CCCP
1.2 Available With Setup&lt;/a&gt;) to write a tutorial on how to create a WiX-based installer
with SharpDevelop: &lt;a href="http://community.sharpdevelop.net/blogs/mattward/archive/2007/01/08/CreatingAnInstallerWithSharpDevelop.aspx"&gt;Creating
an Installer with SharpDevelop&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=b9fcfe7a-a1fd-4c03-9213-f60fccc89241" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,b9fcfe7a-a1fd-4c03-9213-f60fccc89241.aspx</comments>
      <category>.NET</category>
      <category>Cool Download</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=b7fa0351-93e7-45f0-8541-f6d8d9551318</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,b7fa0351-93e7-45f0-8541-f6d8d9551318.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,b7fa0351-93e7-45f0-8541-f6d8d9551318.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=b7fa0351-93e7-45f0-8541-f6d8d9551318</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <strong>Updates</strong>
        </p>
        <ul>
          <li>
            <a href="http://chrison.net/TFSCCPolicyAndCCCPMerge.aspx">TFSCCPolicy and CCCP Merge</a>
          </li>
        </ul>
        <p>
As promised, the latest version of CCCP now sports a setup program. Setup is based
on <a href="http://wix.sourceforge.net/">WiX</a>, and has been created using <a href="http://www.icsharpcode.net/opensource/sd/">SharpDevelop</a>'s
WiX support. A special thanks flies out to <a href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.MattWard">Matt
Ward</a>, who provided me with the initial skeleton of this setup project. Please
note, however, that you must use the bits from our <a href="http://build.sharpdevelop.net/buildartefacts/">build
server</a> because Beta 3 of SharpDevelop 2.1 doesn't work correctly with this
setup project (\Source\Setup\Cccp.Setup.sln). 
</p>
        <p>
To give you an idea of the WiX project editing experience inside SharpDevelop I
have included two screenshots for you (Matt promised a tutorial for <a href="http://community.sharpdevelop.net/blogs/mattward/default.aspx">his
blog</a>):
</p>
        <p>
          <img src="http://chrison.net/content/binary/cccpsetup1.png" border="0" />
        </p>
        <p>
Above you can see the project tree plus the main WiX file, below the editing experience
for the files included in the setup project:
</p>
        <p>
          <img src="http://chrison.net/content/binary/cccpsetup2.png" border="0" />
        </p>
        <p>
There are four assemblies included in this setup project, with three being installed
to the GAC - only cccppol.dll is copied to the target directory, and it has a registry
key associated that enables the policy within VSTS. This is a change to previous versions
of the policy that used ILMerge to pack those four assemblies into one.
</p>
        <p>
The only other main change over previous versions is configuration:
</p>
        <p>
          <img height="317" alt="cccppolsneakpeek3.png" src="http://chrison.net/content/binary/cccppolsneakpeek3.png" width="378" border="0" />
        </p>
        <p>
The new options make hard-coded values from previous versions accessible to the administrator.
Please note that this will force you to remove &amp; then add the policy back to your
team project if you used previous versions of CCCP (serialization changed).
</p>
        <p>
I also put together a short screen recording on getting up and running with CCCP (sorry
for the low audio quality, but I didn't manage to get Vista &amp; my headset to cooperate
nicely):
</p>
        <p>
          <a href="http://chrison.net/content/binary/CCCP12InAction.wmv">CCCP12InAction.wmv
(1.58 MB)</a>
        </p>
        <p>
Finally, here are the downloads:
</p>
        <p>
          <a href="http://chrison.net/content/binary/CCCP12.msi">CCCP12.msi (626.5 KB)</a> [Windows
Installer as demonstrated in the video]
</p>
        <p>
          <a href="http://chrison.net/content/binary/CCCP12_Source.zip">CCCP12_Source.zip (1.06
MB)</a> [Source code, BSD-licensed]
</p>
        <p>
With this release I declare the CCCP feature-complete, at least when it comes to the
features that I need. If you have further ideas for improvement, let me know by adding
a comment to this post. If you find bugs, please let me know too. Oh, and if you like
it, let others know!
</p>
        <p>
Post Scriptum: yes, the MSBuild task hasn't been implemented yet. But the policy is
done.
</p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=b7fa0351-93e7-45f0-8541-f6d8d9551318" />
      </body>
      <title>CCCP 1.2 Available With Setup</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,b7fa0351-93e7-45f0-8541-f6d8d9551318.aspx</guid>
      <link>http://chrison.net/CCCP12AvailableWithSetup.aspx</link>
      <pubDate>Mon, 01 Jan 2007 18:02:43 GMT</pubDate>
      <description>&lt;p&gt;
&lt;strong&gt;Updates&lt;/strong&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://chrison.net/TFSCCPolicyAndCCCPMerge.aspx"&gt;TFSCCPolicy and CCCP Merge&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
As promised, the latest version of CCCP now sports a setup program. Setup is based
on &lt;a href="http://wix.sourceforge.net/"&gt;WiX&lt;/a&gt;, and has been created using &lt;a href="http://www.icsharpcode.net/opensource/sd/"&gt;SharpDevelop&lt;/a&gt;'s
WiX support. A special thanks flies out to &lt;a href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.MattWard"&gt;Matt
Ward&lt;/a&gt;, who provided me with the initial skeleton of this setup project. Please
note, however, that you must use the bits from our &lt;a href="http://build.sharpdevelop.net/buildartefacts/"&gt;build
server&lt;/a&gt; because Beta 3 of SharpDevelop 2.1&amp;nbsp;doesn't work correctly with this
setup project (\Source\Setup\Cccp.Setup.sln). 
&lt;/p&gt;
&lt;p&gt;
To give you an idea of the WiX project editing experience inside SharpDevelop&amp;nbsp;I
have included two screenshots for you (Matt promised a tutorial for &lt;a href="http://community.sharpdevelop.net/blogs/mattward/default.aspx"&gt;his
blog&lt;/a&gt;):
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://chrison.net/content/binary/cccpsetup1.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
Above you can see the project tree plus the main WiX file, below the editing experience
for the files included in the setup project:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://chrison.net/content/binary/cccpsetup2.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
There are four assemblies included in this setup project, with three being installed
to the GAC - only cccppol.dll is copied to the target directory, and it has a registry
key associated that enables the policy within VSTS. This is a change to previous versions
of the policy that used ILMerge to pack those four assemblies into one.
&lt;/p&gt;
&lt;p&gt;
The only other main change over previous versions is configuration:
&lt;/p&gt;
&lt;p&gt;
&lt;img height=317 alt=cccppolsneakpeek3.png src="http://chrison.net/content/binary/cccppolsneakpeek3.png" width=378 border=0&gt;
&lt;/p&gt;
&lt;p&gt;
The new options make hard-coded values from previous versions accessible to the administrator.
Please note that this will force you to remove &amp;amp; then add the policy back to your
team project if you used previous versions of CCCP (serialization changed).
&lt;/p&gt;
&lt;p&gt;
I also put together a short screen recording on getting up and running with CCCP (sorry
for the low audio quality, but I didn't manage to get Vista &amp;amp; my headset to cooperate
nicely):
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://chrison.net/content/binary/CCCP12InAction.wmv"&gt;CCCP12InAction.wmv
(1.58 MB)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Finally, here are the downloads:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://chrison.net/content/binary/CCCP12.msi"&gt;CCCP12.msi (626.5 KB)&lt;/a&gt;&amp;nbsp;[Windows
Installer as demonstrated in the video]
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://chrison.net/content/binary/CCCP12_Source.zip"&gt;CCCP12_Source.zip (1.06
MB)&lt;/a&gt;&amp;nbsp;[Source code, BSD-licensed]
&lt;/p&gt;
&lt;p&gt;
With this release I declare the CCCP feature-complete, at least when it comes to the
features that I need. If you have further ideas for improvement, let me know by adding
a comment to this post. If you find bugs, please let me know too. Oh, and if you like
it, let others know!
&lt;/p&gt;
&lt;p&gt;
Post Scriptum: yes, the MSBuild task hasn't been implemented yet. But the policy is
done.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=b7fa0351-93e7-45f0-8541-f6d8d9551318" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,b7fa0351-93e7-45f0-8541-f6d8d9551318.aspx</comments>
      <category>Cool Download</category>
      <category>Team System</category>
      <category>Use the source Luke</category>
      <category>Visual Studio</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=bf4dd6ab-17f9-42ab-a3a8-a3eb2251f670</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,bf4dd6ab-17f9-42ab-a3a8-a3eb2251f670.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,bf4dd6ab-17f9-42ab-a3a8-a3eb2251f670.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=bf4dd6ab-17f9-42ab-a3a8-a3eb2251f670</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I wrote about <a href="http://svk.elixus.org/view/HomePage">SVK</a> in <a href="http://chrison.net/MirrorMirrorOnTheWall.aspx">Mirror,
mirror on the wall</a> and <a href="http://chrison.net/GoingLocalWithSVK.aspx">Going
local with SVK</a>. Now the <a href="http://lists.bestpractical.com/pipermail/svk-devel/2006-December/000412.html">release
of version 2 has been announced</a>. Note: <a href="http://svk.elixus.org/view/SVKWin32">WIN32
binaries</a> are not yet available.
</p>
        <p>
What is SVK? A quote from the homepage: <em><a href="http://svk.elixus.org/view/HomePage">svk</a> is
a decentralized version control system built with the robust Subversion filesystem.
It supports repository mirroring, disconnected operation, history-sensitive merging,
and integrates with other version control systems, as well as popular visual merge
tools.</em></p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=bf4dd6ab-17f9-42ab-a3a8-a3eb2251f670" />
      </body>
      <title>SVK 2.0.0 Available</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,bf4dd6ab-17f9-42ab-a3a8-a3eb2251f670.aspx</guid>
      <link>http://chrison.net/SVK200Available.aspx</link>
      <pubDate>Thu, 28 Dec 2006 16:20:56 GMT</pubDate>
      <description>&lt;p&gt;
I wrote about &lt;a href="http://svk.elixus.org/view/HomePage"&gt;SVK&lt;/a&gt; in &lt;a href="http://chrison.net/MirrorMirrorOnTheWall.aspx"&gt;Mirror,
mirror on the wall&lt;/a&gt; and &lt;a href="http://chrison.net/GoingLocalWithSVK.aspx"&gt;Going
local with SVK&lt;/a&gt;. Now the &lt;a href="http://lists.bestpractical.com/pipermail/svk-devel/2006-December/000412.html"&gt;release
of version 2 has been announced&lt;/a&gt;. Note: &lt;a href="http://svk.elixus.org/view/SVKWin32"&gt;WIN32
binaries&lt;/a&gt; are not yet available.
&lt;/p&gt;
&lt;p&gt;
What is SVK? A quote from the homepage: &lt;em&gt;&lt;a href="http://svk.elixus.org/view/HomePage"&gt;svk&lt;/a&gt; is
a decentralized version control system built with the robust Subversion filesystem.
It supports repository mirroring, disconnected operation, history-sensitive merging,
and integrates with other version control systems, as well as popular visual merge
tools.&lt;/em&gt; 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=bf4dd6ab-17f9-42ab-a3a8-a3eb2251f670" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,bf4dd6ab-17f9-42ab-a3a8-a3eb2251f670.aspx</comments>
      <category>Cool Download</category>
      <category>Subversion</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=a30cb88a-911e-43e4-86a5-3ba237bb224e</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,a30cb88a-911e-43e4-86a5-3ba237bb224e.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,a30cb88a-911e-43e4-86a5-3ba237bb224e.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=a30cb88a-911e-43e4-86a5-3ba237bb224e</wfw:commentRss>
      <slash:comments>5</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Work progressed much faster than I thought, so I can present you today with the next
iteration of CCCP, the Code Comment Checking Policy for VSTS / TFS. What is new and
improved over yesterday's release:
</p>
        <ul>
          <li>
VB.NET code comment verification enabled 
</li>
          <li>
Code comment statistics tracking implemented, off by default 
</li>
          <li>
Reference.* excluded (Web Services auto-generated files) 
</li>
          <li>
Visibility special-casing of class type removed, CodeCommentCheckingVisibility honored 
</li>
          <li>
Refactoring of CheckCodeComments, CreateInstance added for cleaner construction 
</li>
          <li>
Unit testing automated and initial tests added 
</li>
          <li>
Use String.Compare instead of == where potentially case sensitive or culture dependent</li>
        </ul>
        <p>
This equates to: the policy itself is feature-complete! It now sports the following
functionality:
</p>
        <ul>
          <li>
Code comment verification for C# and VB.NET using a real parser engine 
</li>
          <li>
Options to enable verification based on elements (methods, ...) and visibility (public,
...) - note that C# and VB.NET is auto-detected, no need to enable or configure this</li>
        </ul>
        <p>
Not included is "double-clicking policy violation automatically positions cursor on
offending element" (I'd need to take a dependency on VS, and quite frankly have no
idea how to implement this using VS' object model). Remaining on the todo list is
the MSBuild task for calculating code comment coverage, but this will take a while
because firstly I am not really that firm with writing MSBuild tasks, and secondly
I will have to spend more quality time with IIS7 in the near future.
</p>
        <p>
Without further ado, here are the goods:
</p>
        <ul>
          <li>
            <a href="http://chrison.net/content/binary/CCCP11_20061228_SetupOnly.zip">CCCP11_20061228_SetupOnly.zip
(238 KB)</a>: Contains cccppol.dll, a .reg file and ReadMe.txt. Follow the instructions
in the latter to modify the .reg file, and then double-click the .reg file to register
the version control checkin policy.</li>
          <li>
            <a href="http://chrison.net/content/binary/CCCP11_20061228_SourceSetup.zip">CCCP11_20061228_SourceSetup.zip
(1.49 MB)</a>: Includes the above plus all the source code (BSD-licensed). This is
a complete build tree minus only one tool: <a href="http://research.microsoft.com/~mbarnett/ILMerge.aspx">ILMerge</a>.
This <a href="http://www.microsoft.com/downloads/details.aspx?familyid=22914587-b4ad-4eae-87cf-b14ae6a939b0&amp;displaylang=en">must
be downloaded separately</a>. Please see the Source folder for the solution file,
and PostBuild for instructions on how to build the final cccppol.dll assembly.</li>
        </ul>
        <p>
Further information:
</p>
        <ul>
          <li>
            <a href="http://chrison.net/CCCPCodeCommentCheckingPolicyAkaPolicyTripleSlashForVSTSTFS.aspx">CCCP
- Code Comment Checking Policy aka "Policy Triple-Slash" for VSTS / TFS</a>, the initial
post about the making of the checkin policy.</li>
        </ul>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=a30cb88a-911e-43e4-86a5-3ba237bb224e" />
      </body>
      <title>Code Comment Checking Policy - Take Two</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,a30cb88a-911e-43e4-86a5-3ba237bb224e.aspx</guid>
      <link>http://chrison.net/CodeCommentCheckingPolicyTakeTwo.aspx</link>
      <pubDate>Thu, 28 Dec 2006 09:48:48 GMT</pubDate>
      <description>&lt;p&gt;
Work progressed much faster than I thought, so I can present you today with the next
iteration of CCCP, the Code Comment Checking Policy for VSTS / TFS. What is new and
improved over yesterday's release:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
VB.NET code comment verification enabled 
&lt;li&gt;
Code comment statistics tracking implemented, off by default 
&lt;li&gt;
Reference.* excluded (Web Services auto-generated files) 
&lt;li&gt;
Visibility special-casing of class type removed, CodeCommentCheckingVisibility honored 
&lt;li&gt;
Refactoring of CheckCodeComments, CreateInstance added for cleaner construction 
&lt;li&gt;
Unit testing automated and initial tests added 
&lt;li&gt;
Use String.Compare instead of == where potentially case sensitive or culture dependent&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
This equates to: the policy itself is feature-complete! It now sports the following
functionality:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Code comment verification for C# and VB.NET using a&amp;nbsp;real parser engine 
&lt;li&gt;
Options to enable verification based on elements (methods, ...) and visibility (public,
...) - note that C# and VB.NET is auto-detected, no need to enable or configure this&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Not included is "double-clicking policy violation automatically positions cursor on
offending element" (I'd need to take a dependency on VS, and quite frankly have no
idea how to implement this using VS' object model). Remaining on the todo list is
the MSBuild task for calculating code comment coverage, but this will take a while
because firstly I am not really that firm with writing MSBuild tasks, and secondly
I will have to spend more quality time with IIS7 in the near future.
&lt;/p&gt;
&lt;p&gt;
Without further ado, here are the goods:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://chrison.net/content/binary/CCCP11_20061228_SetupOnly.zip"&gt;CCCP11_20061228_SetupOnly.zip
(238 KB)&lt;/a&gt;: Contains cccppol.dll, a .reg file and ReadMe.txt. Follow the instructions
in the latter to modify the .reg file, and then double-click the .reg file to register
the version control checkin policy.&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://chrison.net/content/binary/CCCP11_20061228_SourceSetup.zip"&gt;CCCP11_20061228_SourceSetup.zip
(1.49 MB)&lt;/a&gt;: Includes the above plus all the source code (BSD-licensed). This is
a complete build tree minus only one tool: &lt;a href="http://research.microsoft.com/~mbarnett/ILMerge.aspx"&gt;ILMerge&lt;/a&gt;.
This &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=22914587-b4ad-4eae-87cf-b14ae6a939b0&amp;amp;displaylang=en"&gt;must
be downloaded separately&lt;/a&gt;. Please see the Source folder for the solution file,
and PostBuild for instructions on how to build the final cccppol.dll assembly.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Further information:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://chrison.net/CCCPCodeCommentCheckingPolicyAkaPolicyTripleSlashForVSTSTFS.aspx"&gt;CCCP
- Code Comment Checking Policy aka "Policy Triple-Slash" for VSTS / TFS&lt;/a&gt;, the initial
post about the making of the checkin policy.&lt;/li&gt;
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=a30cb88a-911e-43e4-86a5-3ba237bb224e" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,a30cb88a-911e-43e4-86a5-3ba237bb224e.aspx</comments>
      <category>Cool Download</category>
      <category>Team System</category>
      <category>Use the source Luke</category>
      <category>Visual Studio</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=564196c2-026b-4984-af49-742502b2ae0d</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,564196c2-026b-4984-af49-742502b2ae0d.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,564196c2-026b-4984-af49-742502b2ae0d.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=564196c2-026b-4984-af49-742502b2ae0d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <strong>Updates</strong>
        </p>
        <ul>
          <li>
2007/1/21: <a href="http://chrison.net/TFSCCPolicyAndCCCPMerge.aspx">TFSCCPolicy and
CCCP Merge</a></li>
          <li>
2007/1/1: <a href="http://chrison.net/CCCP12AvailableWithSetup.aspx">CCCP 1.2 Available
With Setup</a> (this is the latest released version) 
</li>
          <li>
2006/12/28: <a href="http://chrison.net/CodeCommentCheckingPolicyTakeTwo.aspx">A newer
version supporting VB.NET is available</a></li>
        </ul>
        <p>
The idea for this VS Team System version control checkin policy came up in the week
before Christmas when I was pointed to one of the shortcomings of <a href="http://www.codeplex.com/TFSCCPolicy">TFSCCPolicy</a>,
namely that it would flag commented-out methods as missing code comments. That triggered
me looking at the source code and I saw that it was using regular expressions.
</p>
        <p>
Why use RegEx when you can use a full-blown parser engine with a DOM? Well, that's
what I thought and therefore got in touch with <a href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.DanielGrunwald">Daniel</a>,
technical lead of <a href="http://www.icsharpcode.net/opensource/sd/">SharpDevelop</a>.
We discussed two potential ways: either going to the metal using NRefactory alone,
or go it easy using the DOM and visitors. He even supplied me with a few lines of
code to get started - of course for the latter option because I am a lazy coder.
</p>
        <p>
So I set out yesterday to write that checkin policy. To make it really useful, I set
up a library project which would contain all the logic, a unit test project for it,
plus the actual policy project. The advantage? Well, the logic library can be reused
in an MSBuild task, the idea is as follows: calculate the "comment coverage" just
like you can do with code coverage and unit testing. (Sorry, but this isn't part of
the package just yet)
</p>
        <p>
Given that plan, I of course got around to the policy project as the last one today.
When I was pretty much done, I set out to test it for the first time inside VSTS -
whoa, what a surprise. It balked almost immediately. You can read <a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1054739&amp;SiteID=1">my
quest for enlightenment</a> here, the main takeaway: don't outsmart yourself when
you create a checkin policy which consists of multiple assemblies that don't live
in the GAC.
</p>
        <p>
That way I at least got around to deploy my first project using <a href="http://research.microsoft.com/~mbarnett/ILMerge.aspx">ILMerge</a>.
There is only one downside to using ILMerge - the merged assemblies don't retain their
version numbers, which can be seen in this screenshot of the configuration dialog
(NRefactory should be 2.1):
</p>
        <p>
          <img src="http://chrison.net/content/binary/settinguppolicy.png" border="0" />
        </p>
        <p>
Aside from this minor glitch, the checkin policy is working fine. What can it do /
what can't it do at the moment:
</p>
        <ul>
          <li>
It is currently limited to C#. VB.NET will be added later, all I need to do is instantiate
the parser. It is as easy as that. 
</li>
          <li>
Auto-update when files are saved. Someone please hit me with the clue stick. 
</li>
          <li>
It doesn't exclude all auto-generated files, just the .designer files like TFSCCPolicy.
I need to sit down and make a list. 
</li>
          <li>
Not all elements correctly report the line number. 
</li>
          <li>
Unit tests - well, only one at the moment. More to follow of course, including the
full build automation. 
</li>
          <li>
Cleanup in the logic library.</li>
        </ul>
        <p>
Other than that I would love to get feedback from you on this initial version! Simply
post feedback on this blog entry.
</p>
        <p>
Finally, the source code (BSD-licensed by the way) and the binaries:
</p>
        <p>
          <a href="http://chrison.net/content/binary/CCCP10_20061227.zip">CCCP10_20061227.zip
(964.34 KB)</a>
        </p>
        <p>
If you are interested in using it only, then please go to the Drop directory. For
those interested in the code: start with the solution file in the Source folder (and
then go to Setup).
</p>
        <p>
Updates to the code / checkin policy will be linked to at the end of this post, so
feel free to bookmark this blog post for your reference on CCCP.
</p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=564196c2-026b-4984-af49-742502b2ae0d" />
      </body>
      <title>CCCP - Code Comment Checking Policy aka "Policy Triple-Slash" for VSTS / TFS</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,564196c2-026b-4984-af49-742502b2ae0d.aspx</guid>
      <link>http://chrison.net/CCCPCodeCommentCheckingPolicyAkaPolicyTripleSlashForVSTSTFS.aspx</link>
      <pubDate>Wed, 27 Dec 2006 14:17:45 GMT</pubDate>
      <description>&lt;p&gt;
&lt;strong&gt;Updates&lt;/strong&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
2007/1/21: &lt;a href="http://chrison.net/TFSCCPolicyAndCCCPMerge.aspx"&gt;TFSCCPolicy and
CCCP Merge&lt;/a&gt; 
&lt;li&gt;
2007/1/1: &lt;a href="http://chrison.net/CCCP12AvailableWithSetup.aspx"&gt;CCCP 1.2 Available
With Setup&lt;/a&gt;&amp;nbsp;(this is the latest released version) 
&lt;li&gt;
2006/12/28: &lt;a href="http://chrison.net/CodeCommentCheckingPolicyTakeTwo.aspx"&gt;A newer
version supporting VB.NET is available&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
The idea for this VS Team System version control checkin policy came up in the week
before Christmas when I was pointed to one of the shortcomings of &lt;a href="http://www.codeplex.com/TFSCCPolicy"&gt;TFSCCPolicy&lt;/a&gt;,
namely that it would flag commented-out methods as missing code comments. That triggered
me looking at the source code and I saw that it was using regular expressions.
&lt;/p&gt;
&lt;p&gt;
Why use RegEx when you can use a full-blown parser engine with a DOM? Well, that's
what I thought and therefore got in touch with &lt;a href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.DanielGrunwald"&gt;Daniel&lt;/a&gt;,
technical lead of &lt;a href="http://www.icsharpcode.net/opensource/sd/"&gt;SharpDevelop&lt;/a&gt;.
We discussed two potential ways: either going to the metal using NRefactory alone,
or go it easy using the DOM and visitors. He even supplied me with a few lines of
code to get started - of course for the latter option because I am a lazy coder.
&lt;/p&gt;
&lt;p&gt;
So I set out yesterday to write that checkin policy. To make it really useful, I set
up a library project which would contain all the logic, a unit test project for it,
plus the actual policy project. The advantage? Well, the logic library can be reused
in an MSBuild task, the idea is as follows: calculate the "comment coverage" just
like you can do with code coverage and unit testing. (Sorry, but this isn't part of
the package just yet)
&lt;/p&gt;
&lt;p&gt;
Given that plan, I of course got around to the policy project as the last one today.
When I was pretty much done, I set out to test it for the first time inside VSTS -
whoa, what a surprise. It balked almost immediately. You can read &lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1054739&amp;amp;SiteID=1"&gt;my
quest for enlightenment&lt;/a&gt; here, the main takeaway: don't outsmart yourself when
you create a checkin policy which consists of multiple assemblies that don't live
in the GAC.
&lt;/p&gt;
&lt;p&gt;
That way I at least got around to deploy my first project using &lt;a href="http://research.microsoft.com/~mbarnett/ILMerge.aspx"&gt;ILMerge&lt;/a&gt;.
There is only one downside to using ILMerge - the merged assemblies don't retain their
version numbers, which can be seen in this screenshot of the configuration dialog
(NRefactory&amp;nbsp;should be&amp;nbsp;2.1):
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://chrison.net/content/binary/settinguppolicy.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
Aside from this minor glitch, the checkin policy is working fine. What can it do /
what can't it do at the moment:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
It is currently limited to C#. VB.NET will be added later, all I need to do is instantiate
the parser. It is as easy as that. 
&lt;li&gt;
Auto-update when files are saved. Someone please hit me with the clue stick. 
&lt;li&gt;
It doesn't exclude all auto-generated files, just the .designer files like TFSCCPolicy.
I need to sit down and make a list. 
&lt;li&gt;
Not all elements correctly report the line number. 
&lt;li&gt;
Unit tests - well, only one at the moment. More to follow of course, including the
full build automation. 
&lt;li&gt;
Cleanup in the logic library.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Other than that I would love to get feedback from you on this initial version! Simply
post feedback on this blog entry.
&lt;/p&gt;
&lt;p&gt;
Finally, the source code (BSD-licensed by the way) and the binaries:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://chrison.net/content/binary/CCCP10_20061227.zip"&gt;CCCP10_20061227.zip
(964.34 KB)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
If you are interested in using it only, then please go to the Drop directory. For
those interested in the code: start with the solution file in the Source folder (and
then go to Setup).
&lt;/p&gt;
&lt;p&gt;
Updates to the code / checkin policy will be linked to at the end of this post, so
feel free to bookmark this blog post for your reference on CCCP.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=564196c2-026b-4984-af49-742502b2ae0d" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,564196c2-026b-4984-af49-742502b2ae0d.aspx</comments>
      <category>Cool Download</category>
      <category>Team System</category>
      <category>Use the source Luke</category>
      <category>Visual Studio</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=6b9ff465-cd0b-4140-8bc7-acc89a13aace</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,6b9ff465-cd0b-4140-8bc7-acc89a13aace.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,6b9ff465-cd0b-4140-8bc7-acc89a13aace.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=6b9ff465-cd0b-4140-8bc7-acc89a13aace</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Today I got around to trying <a href="http://www.codeplex.com/ccnetconfig">CCNetConfig</a>,
which provides a UI for editing <a href="http://ccnet.thoughtworks.com/">CruiseControl.NET</a>'s
ccnet.config file. Thanks to the <a href="http://www.icsharpcode.net/opensource/sd/">SharpDevelop</a> project,
I have a rather good test case with a couple of continuous integration plus nightly
builds:
</p>
        <p>
          <img src="http://chrison.net/content/binary/ccnetconfig0251.png" border="0" />
        </p>
        <p>
Our ccnet.config file is maintained by using Notepad (yes, you read that right). As
such, I added a few &lt;!-- --&gt; comments here and there, mostly for pointing me
to documentation, blog articles or just disabling a feature temporarily. Therefore,
you can already guess my biggest gripe: on saving the file, it is auto-reformatted
and all my comments are gone. 
</p>
        <p>
Other than that, it is a really good way of editing ccnet.config especially because
all properties are easy to edit and you are presented the documentation automatically,
no more searching around for tag / attribute help on the Web.  Overall: very
useful if you don't spend all day being release manager.
</p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=6b9ff465-cd0b-4140-8bc7-acc89a13aace" />
      </body>
      <title>CCNetConfig - A GUI for Editing CruiseControl.NET Configuration</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,6b9ff465-cd0b-4140-8bc7-acc89a13aace.aspx</guid>
      <link>http://chrison.net/CCNetConfigAGUIForEditingCruiseControlNETConfiguration.aspx</link>
      <pubDate>Fri, 22 Dec 2006 17:00:24 GMT</pubDate>
      <description>&lt;p&gt;
Today I got around to trying &lt;a href="http://www.codeplex.com/ccnetconfig"&gt;CCNetConfig&lt;/a&gt;,
which provides a UI for editing &lt;a href="http://ccnet.thoughtworks.com/"&gt;CruiseControl.NET&lt;/a&gt;'s
ccnet.config file. Thanks to the &lt;a href="http://www.icsharpcode.net/opensource/sd/"&gt;SharpDevelop&lt;/a&gt; project,
I have a rather good test case with a couple of continuous integration plus nightly
builds:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://chrison.net/content/binary/ccnetconfig0251.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
Our ccnet.config file is maintained by using Notepad (yes, you read that right). As
such, I added a few &amp;lt;!-- --&amp;gt; comments here and there, mostly for pointing me
to documentation, blog articles or just disabling a feature temporarily. Therefore,
you can already guess my biggest gripe: on saving the file, it is auto-reformatted
and all my comments are gone. 
&lt;/p&gt;
&lt;p&gt;
Other than that, it is a really good way of editing ccnet.config especially because
all properties are easy to edit and you are presented the documentation automatically,
no more searching around for tag / attribute help on the Web.&amp;nbsp; Overall: very
useful if you don't spend all day being release manager.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=6b9ff465-cd0b-4140-8bc7-acc89a13aace" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,6b9ff465-cd0b-4140-8bc7-acc89a13aace.aspx</comments>
      <category>.NET</category>
      <category>Cool Download</category>
      <category>Project Management</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=928122fb-5683-4a1d-96d3-7670e05cb46e</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,928122fb-5683-4a1d-96d3-7670e05cb46e.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,928122fb-5683-4a1d-96d3-7670e05cb46e.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=928122fb-5683-4a1d-96d3-7670e05cb46e</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Read the post from Miguel <a href="http://tirania.org/blog/archive/2006/Nov-02.html">Microsoft
and Novell Collaborate</a>. Good news for Mono, OpenOffice and Samba.
</p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=928122fb-5683-4a1d-96d3-7670e05cb46e" />
      </body>
      <title>Open Source (.NET) News</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,928122fb-5683-4a1d-96d3-7670e05cb46e.aspx</guid>
      <link>http://chrison.net/OpenSourceNETNews.aspx</link>
      <pubDate>Fri, 03 Nov 2006 09:56:43 GMT</pubDate>
      <description>&lt;p&gt;
Read the post from Miguel &lt;a href="http://tirania.org/blog/archive/2006/Nov-02.html"&gt;Microsoft
and Novell Collaborate&lt;/a&gt;. Good news for Mono, OpenOffice and Samba.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=928122fb-5683-4a1d-96d3-7670e05cb46e" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,928122fb-5683-4a1d-96d3-7670e05cb46e.aspx</comments>
      <category>.NET</category>
      <category>Newsbites</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=0217cbb0-cdcc-4afa-b055-c4d99112d907</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,0217cbb0-cdcc-4afa-b055-c4d99112d907.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,0217cbb0-cdcc-4afa-b055-c4d99112d907.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=0217cbb0-cdcc-4afa-b055-c4d99112d907</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Today, we shipped Beta 2 of SharpDevelop 2.1 (<a href="http://community.sharpdevelop.net/forums/thread/11710.aspx">release
information</a>). Usually, we only ship two betas (followed by release candidates),
but last weekend we decided to add a third one to this release cycle - to build a
rock-solid foundation for the releases coming after version 2.1.
</p>
        <p>
Speaking of last weekend: three of us met for the annual #develop developer days (#d^3
2006, a four day event) - way short of the original invitation list. But this turned
out to be an advantage for discussing architecture and componentization. A lot of
improvements already made it into Beta 2, a few more are yet to come in Beta 3. 
<br /></p>
        <p>
Part of this effort was the creation of a <a href="http://laputa.sharpdevelop.net/SharpDevelopPresentation.aspx">presentation
on SharpDevelop</a>, which includes an area of interest to all .NET developers out
there: a list of our components that can be reused outside the context of SharpDevelop
plus the documentation and samples for those components. Remember: SharpDevelop is
LGPL, so feel free to use our components!
</p>
        <p>
In addition to this "general" slide deck, Daniel (SharpDevelop technical lead) also
created a "Level 600" introduction to NRefactory, which can be found <a href="http://laputa.sharpdevelop.net/NRefactoryInternalsPresentation.aspx">here</a>.
Definitely interesting for those of you that want to <a href="http://laputa.sharpdevelop.net/CompletionDemo.aspx">use
code completion in our text editor control</a>.
</p>
        <p>
Finally, <a href="http://laputa.sharpdevelop.net/SharpReportStandalone.aspx">SharpReport
now is a project in its own respect</a>. The reason(s)? Well, SharpDevelop and SharpReport
are developed on different schedules, so now we are customers of each other and no
longer intertwined. Cool stuff coming on this front: export to various formats, allowing
you to use SharpReport - yes - for generating reports in ASP.NET sites!<br /></p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=0217cbb0-cdcc-4afa-b055-c4d99112d907" />
      </body>
      <title>Another Beta of SharpDevelop 2.1 Has Arrived</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,0217cbb0-cdcc-4afa-b055-c4d99112d907.aspx</guid>
      <link>http://chrison.net/AnotherBetaOfSharpDevelop21HasArrived.aspx</link>
      <pubDate>Thu, 02 Nov 2006 16:15:38 GMT</pubDate>
      <description>&lt;p&gt;
Today, we shipped Beta 2 of SharpDevelop 2.1 (&lt;a href="http://community.sharpdevelop.net/forums/thread/11710.aspx"&gt;release
information&lt;/a&gt;). Usually, we only ship two betas (followed by release candidates),
but last weekend we decided to add a third one to this release cycle - to build a
rock-solid foundation for the releases coming after version 2.1.
&lt;/p&gt;
&lt;p&gt;
Speaking of last weekend: three of us met for the annual #develop developer days (#d^3
2006, a four day event) - way short of the original invitation list. But this turned
out to be an advantage for discussing architecture and componentization. A lot of
improvements already made it into Beta 2, a few more are yet to come in Beta 3. 
&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;
Part of this effort was the creation of a &lt;a href="http://laputa.sharpdevelop.net/SharpDevelopPresentation.aspx"&gt;presentation
on SharpDevelop&lt;/a&gt;, which includes an area of interest to all .NET developers out
there: a list of our components that can be reused outside the context of SharpDevelop
plus the documentation and samples for those components. Remember: SharpDevelop is
LGPL, so feel free to use our components!
&lt;/p&gt;
&lt;p&gt;
In addition to this "general" slide deck, Daniel (SharpDevelop technical lead) also
created a "Level 600" introduction to NRefactory, which can be found &lt;a href="http://laputa.sharpdevelop.net/NRefactoryInternalsPresentation.aspx"&gt;here&lt;/a&gt;.
Definitely interesting for those of you that want to &lt;a href="http://laputa.sharpdevelop.net/CompletionDemo.aspx"&gt;use
code completion in our text editor control&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Finally, &lt;a href="http://laputa.sharpdevelop.net/SharpReportStandalone.aspx"&gt;SharpReport
now is a project in its own respect&lt;/a&gt;. The reason(s)? Well, SharpDevelop and SharpReport
are developed on different schedules, so now we are customers of each other and no
longer intertwined. Cool stuff coming on this front: export to various formats, allowing
you to use SharpReport - yes - for generating reports in ASP.NET sites!&lt;br&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=0217cbb0-cdcc-4afa-b055-c4d99112d907" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,0217cbb0-cdcc-4afa-b055-c4d99112d907.aspx</comments>
      <category>.NET</category>
      <category>Cool Download</category>
      <category>this</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=964f5235-28ee-444f-b61e-17ac54251529</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,964f5235-28ee-444f-b61e-17ac54251529.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,964f5235-28ee-444f-b61e-17ac54251529.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=964f5235-28ee-444f-b61e-17ac54251529</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Beta 1 of SharpDevelop2 2.1 is <a href="http://www.icsharpcode.net/OpenSource/SD/Download/#SharpDevelop221">available
for download</a>. While I was putting together the <a href="http://community.sharpdevelop.net/forums/thread/11710.aspx">annoucement
for v2.1</a> yesterday, I realized that for a point release, we really managed to
put in a lot of new cool features:
</p>
        <ul>
          <li>
            <a href="http://laputa.sharpdevelop.net/FxCopSupportInSharpDevelop221Serralongue.aspx">FxCop
Support</a>
          </li>
          <li>
            <a href="http://community.sharpdevelop.net/blogs/mattward/archive/2006/06/20/UsingTheComponentInspector.aspx">Component
Inspector</a>
          </li>
          <li>
            <a href="http://community.sharpdevelop.net/blogs/mattward/archive/2006/09/17/WixIntegration.aspx">WiX
Support</a>
          </li>
          <li>
            <a href="http://community.sharpdevelop.net/blogs/mattward/archive/2006/09/09/IncrementalSearchInSharpDevelop21.aspx">Incremental
Search</a>
          </li>
          <li>
            <a href="http://community.sharpdevelop.net/blogs/davidalpert/archive/2006/09/18/Code-Navigation-History.aspx">Code
Navigation History</a>
          </li>
          <li>
            <a href="http://laputa.sharpdevelop.net/AnnouncingSupportForListDataSourcesInSharpReport.aspx">List
Data Sources in SharpReport</a>
          </li>
          <li>
            <a href="http://community.sharpdevelop.net/blogs/mattward/archive/2006/08/05/TestingXPathQueriesInSharpDevelop.aspx">XPath
Queries</a>
          </li>
          <li>
            <a href="http://laputa.sharpdevelop.net/CodeCompletionSupportForNET1011AndCompactFramework20.aspx">Code
Completion for Different Frameworks</a>
          </li>
          <li>
            <a href="http://community.sharpdevelop.net/blogs/mattward/archive/2006/08/09/GoToXmlSchemaDefinition.aspx">GoTo
XML Schema Definition</a>
          </li>
          <li>
            <a href="http://community.sharpdevelop.net/blogs/mattward/archive/2006/02/18/TargetingDifferentFrameworksWithVBNet.aspx">Targeting
Different Frameworks</a>
          </li>
          <li>
            <a href="http://laputa.sharpdevelop.net/AnnouncingSharpDevelopForApplicationsSDA.aspx">Hosting
of SharpDevelop in 3rd Party Applications</a>
          </li>
        </ul>
        <p>
A couple of WOW features (for me, at least): Not only can you compile an application
for different versions of .NET, you also get version-specific code completion support.
Another cool one is that you can host SharpDevelop in your application, providing
your application a "macro editor" (on steroids I might add) with full .NET support.
And to pick a third, code analysis rounds out our professional offering in addition
to code coverage as well as unit testing.
</p>
        <p>
Two features did not make it for the Beta 1 announcement as they don't yet cover all
the scenarios we are hoping for: integrated Subversion support (yeah!) and targetting
the Compact Framework for Windows CE devices. Those slipped silently into this release.
</p>
        <p>
As you can see, SharpDevelop is ever growing and the developers working on it can
be rightly proud of their achievements!
</p>
        <p>
Finally, a kind of "call to action": let us know what you think! Not only in <a href="http://community.sharpdevelop.net/forums/">our
forums</a>, but also in your blogs, communities, et cetera. We need your feedback
regarding feature set, stability, and much more.
</p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=964f5235-28ee-444f-b61e-17ac54251529" />
      </body>
      <title>SharpDevelop2 2.1 Beta 1</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,964f5235-28ee-444f-b61e-17ac54251529.aspx</guid>
      <link>http://chrison.net/SharpDevelop221Beta1.aspx</link>
      <pubDate>Tue, 19 Sep 2006 10:10:55 GMT</pubDate>
      <description>&lt;p&gt;
Beta 1 of SharpDevelop2 2.1 is &lt;a href="http://www.icsharpcode.net/OpenSource/SD/Download/#SharpDevelop221"&gt;available
for download&lt;/a&gt;. While I was putting together the &lt;a href="http://community.sharpdevelop.net/forums/thread/11710.aspx"&gt;annoucement
for v2.1&lt;/a&gt; yesterday, I realized that for a point release, we really managed to
put in a lot of new cool features:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://laputa.sharpdevelop.net/FxCopSupportInSharpDevelop221Serralongue.aspx"&gt;FxCop
Support&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://community.sharpdevelop.net/blogs/mattward/archive/2006/06/20/UsingTheComponentInspector.aspx"&gt;Component
Inspector&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://community.sharpdevelop.net/blogs/mattward/archive/2006/09/17/WixIntegration.aspx"&gt;WiX
Support&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://community.sharpdevelop.net/blogs/mattward/archive/2006/09/09/IncrementalSearchInSharpDevelop21.aspx"&gt;Incremental
Search&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://community.sharpdevelop.net/blogs/davidalpert/archive/2006/09/18/Code-Navigation-History.aspx"&gt;Code
Navigation History&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://laputa.sharpdevelop.net/AnnouncingSupportForListDataSourcesInSharpReport.aspx"&gt;List
Data Sources in SharpReport&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://community.sharpdevelop.net/blogs/mattward/archive/2006/08/05/TestingXPathQueriesInSharpDevelop.aspx"&gt;XPath
Queries&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://laputa.sharpdevelop.net/CodeCompletionSupportForNET1011AndCompactFramework20.aspx"&gt;Code
Completion for Different Frameworks&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://community.sharpdevelop.net/blogs/mattward/archive/2006/08/09/GoToXmlSchemaDefinition.aspx"&gt;GoTo
XML Schema Definition&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://community.sharpdevelop.net/blogs/mattward/archive/2006/02/18/TargetingDifferentFrameworksWithVBNet.aspx"&gt;Targeting
Different Frameworks&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://laputa.sharpdevelop.net/AnnouncingSharpDevelopForApplicationsSDA.aspx"&gt;Hosting
of SharpDevelop in 3rd Party Applications&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
A couple of WOW features (for me, at least): Not only can you compile an application
for different versions of .NET, you also get version-specific code completion support.
Another cool one is that you can host SharpDevelop in your application, providing
your application a "macro editor" (on steroids I might add)&amp;nbsp;with full .NET support.
And to pick a third, code analysis rounds out our professional offering in addition
to code coverage as well as unit testing.
&lt;/p&gt;
&lt;p&gt;
Two features did not make it for the Beta 1 announcement as they don't yet cover all
the scenarios we are hoping for: integrated Subversion support (yeah!) and targetting
the Compact Framework for Windows CE devices. Those slipped silently into this release.
&lt;/p&gt;
&lt;p&gt;
As you can see, SharpDevelop is ever growing and the developers working on it can
be rightly proud of their achievements!
&lt;/p&gt;
&lt;p&gt;
Finally,&amp;nbsp;a kind of "call to action": let us know what you think! Not only in &lt;a href="http://community.sharpdevelop.net/forums/"&gt;our
forums&lt;/a&gt;, but also in your blogs, communities, et cetera. We need your feedback
regarding feature set, stability, and much more.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=964f5235-28ee-444f-b61e-17ac54251529" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,964f5235-28ee-444f-b61e-17ac54251529.aspx</comments>
      <category>.NET</category>
      <category>2 Ohhhh</category>
      <category>C#</category>
      <category>Cool Download</category>
      <category>Subversion</category>
      <category>this</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=0221444a-3391-4d88-b356-62ce7b196be7</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,0221444a-3391-4d88-b356-62ce7b196be7.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,0221444a-3391-4d88-b356-62ce7b196be7.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=0221444a-3391-4d88-b356-62ce7b196be7</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Disclaimer: I am the PM for the #develop project.
</p>
        <p>
After almost two years in development, the #develop team has shipped version 2.0 of
its open source integrated development environment (IDE) <a href="http://www.icsharpcode.net/OpenSource/SD/Default.aspx">SharpDevelop2</a>.
The new version supports the .sln / .*proj project file formats of Visual Studio 2005,
therefore you can open and edit existing projects inside SharpDevelop2. The team however
does not view SharpDevelop2 as a competitor for the Express line of products (<a href="http://community.sharpdevelop.net/blogs/mattward/articles/VisualStudioExpressComparison.aspx">comparison</a>) from
Microsoft, but it aims at software developers that need best of breed tools for
their software development process - like unit testing, code coverage, documentation
generation and more. In the same vein, <a href="http://wiki.icsharpcode.net/default.aspx/SharpDevelop.SharpDevelop21Features">version
2.1</a> will complement those existing features with integrated source code control,
code analysis tools as well component testing.
</p>
        <p>
SharpDevelop2 is especially well-suited for <a href="http://community.sharpdevelop.net/blogs/mattward/articles/FeatureTourCreatingBooApplications.aspx">developers
that chose the Boo</a> language, because SharpDevelop2 offers first-class support
for code completion as well as the Windows Forms designer. Aside from this unique
selling point there a couple of smaller but nonetheless <a href="http://community.sharpdevelop.net/blogs/mattward/articles/FeatureTour.aspx">productivity-enhancing
features in version 2.0</a>: code conversion (eg VB.NET to C#, <a href="http://developer.sharpdevelop.net/codeconvert.net/">but
see for yourself</a>), support for Mono, documentation preview, RegEx compilation
und quite a few more.
</p>
        <p>
A lot of the features are owed to the ease of integration and extensibility provided
by the addin system found in SharpDevelop2. This <a href="http://www.codeproject.com/csharp/ICSharpCodeCore.asp">addin
system can be used by developers in their own application</a> - this being the reason
for the rather unconventional license choice for SharpDevelop2: <a href="http://laputa.sharpdevelop.net/SharpDevelop2LicenseChangedToLGPL.aspx">LGPL
instead of GPL</a>, which is much more common for development tools such as #develop.
Re-use by third parties has been the driving factor to change the license.
</p>
        <p>
Thanks to <a href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.Contributors">all
the contributors</a> that made SharpDevelop2 a reality, especially the technical lead
on the 2.x effort, Daniel Grunwald.
</p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=0221444a-3391-4d88-b356-62ce7b196be7" />
      </body>
      <title>SharpDevelop2 2.0 Final Hits the (Virtual) Streets</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,0221444a-3391-4d88-b356-62ce7b196be7.aspx</guid>
      <link>http://chrison.net/SharpDevelop220FinalHitsTheVirtualStreets.aspx</link>
      <pubDate>Mon, 17 Jul 2006 13:07:33 GMT</pubDate>
      <description>&lt;p&gt;
Disclaimer: I am the PM for the #develop project.
&lt;/p&gt;
&lt;p&gt;
After almost two years in development, the #develop team has shipped version 2.0 of
its open source integrated development environment (IDE)&amp;nbsp;&lt;a href="http://www.icsharpcode.net/OpenSource/SD/Default.aspx"&gt;SharpDevelop2&lt;/a&gt;.
The new version supports the .sln / .*proj project file formats of Visual Studio 2005,
therefore you can open and edit existing projects inside SharpDevelop2. The team however
does not view SharpDevelop2 as a competitor for the Express line of products (&lt;a href="http://community.sharpdevelop.net/blogs/mattward/articles/VisualStudioExpressComparison.aspx"&gt;comparison&lt;/a&gt;)&amp;nbsp;from
Microsoft, but it aims at software developers that need best&amp;nbsp;of breed tools for
their software development process - like unit testing, code coverage, documentation
generation and more. In the same vein, &lt;a href="http://wiki.icsharpcode.net/default.aspx/SharpDevelop.SharpDevelop21Features"&gt;version
2.1&lt;/a&gt; will complement those existing features with integrated source code control,
code analysis tools as well component testing.
&lt;/p&gt;
&lt;p&gt;
SharpDevelop2 is especially well-suited for &lt;a href="http://community.sharpdevelop.net/blogs/mattward/articles/FeatureTourCreatingBooApplications.aspx"&gt;developers
that chose the Boo&lt;/a&gt; language, because SharpDevelop2 offers first-class support
for code completion as well as the Windows Forms designer. Aside from this unique
selling point there a couple of smaller but nonetheless &lt;a href="http://community.sharpdevelop.net/blogs/mattward/articles/FeatureTour.aspx"&gt;productivity-enhancing
features in version 2.0&lt;/a&gt;: code conversion (eg VB.NET to C#, &lt;a href="http://developer.sharpdevelop.net/codeconvert.net/"&gt;but
see for yourself&lt;/a&gt;), support for Mono, documentation preview, RegEx compilation
und quite a few more.
&lt;/p&gt;
&lt;p&gt;
A lot of the features are owed to the ease of integration and extensibility provided
by the addin system found in SharpDevelop2. This &lt;a href="http://www.codeproject.com/csharp/ICSharpCodeCore.asp"&gt;addin
system can be used by developers in their own application&lt;/a&gt; - this being the reason
for the rather unconventional license choice for SharpDevelop2: &lt;a href="http://laputa.sharpdevelop.net/SharpDevelop2LicenseChangedToLGPL.aspx"&gt;LGPL
instead of GPL&lt;/a&gt;, which is much more common for development tools such as #develop.
Re-use by third parties has been the driving factor to change the license.
&lt;/p&gt;
&lt;p&gt;
Thanks to &lt;a href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.Contributors"&gt;all
the contributors&lt;/a&gt; that made SharpDevelop2 a reality, especially the technical lead
on the 2.x effort, Daniel Grunwald.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=0221444a-3391-4d88-b356-62ce7b196be7" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,0221444a-3391-4d88-b356-62ce7b196be7.aspx</comments>
      <category>.NET</category>
      <category>2 Ohhhh</category>
      <category>Cool Download</category>
      <category>Newsbites</category>
      <category>this</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=cd0e4362-88f8-4e89-b5ff-edc25bb06fbf</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,cd0e4362-88f8-4e89-b5ff-edc25bb06fbf.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,cd0e4362-88f8-4e89-b5ff-edc25bb06fbf.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=cd0e4362-88f8-4e89-b5ff-edc25bb06fbf</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Disclaimer: I am the Senior Project Wrangler for <a href="http://www.icsharpcode.net/OpenSource/SD/Default.aspx">#develop</a>.
Therefore I am biased as well as knowledgeable.
</p>
        <p>
Today, we shipped RC2 of SharpDevelop2. For those of you who haven't heard of it before,
it is an Integrated Development Environment (IDE) for .NET. I will get to the features
in just a second. First, I want to thank all developers that spent time on making
v2 a reality. <a href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.DanielGrunwald">Daniel</a>,
the lead developer on v2, actually implemented a nice little tool for showing the
project statistics, you can read more and download the utility in his blog <a href="http://laputa.sharpdevelop.net/AnalyzingTheCodeInSharpDevelop.aspx">Analyzing
the code in SharpDevelop</a>. Wow, we started quite a long ago on this baby.
</p>
        <p>
I promised to get back to the feature set. Let's tackle it with more than a grain
of blog posts and feature videos:
</p>
        <p>
          <strong>Supported Programming Languages</strong>
        </p>
        <p>
My definition of support is as follows: full code completion (aka IntelliSense) and
a working Windows forms designer. Therefore, three languages qualify: C#, VB.NET and <a href="http://boo.codehaus.org/">Boo</a>.
Aside from those fully supported languages, you get syntax highlighting for many more.
</p>
        <p>
Speaking of syntax highlighting and code completion: both features are supported for
XML files. You can check it out in the <a href="http://laputa.sharpdevelop.net/DemoXMLEditingFeaturesOfDevelop11.aspx">xml
editing experience feature video</a> (yes, this is available since v1.1!) You get
this <a href="http://laputa.sharpdevelop.net/VideoCodeCompletionForMSBuild.aspx">for
MSBuild files</a> too!
</p>
        <p>
          <strong>Features You Would Expect</strong>
        </p>
        <p>
Let's start with the integrated debugger. This has been our achilles heel since the
very beginning, as implementing a debugger isn't exactly a piece of cake. However,
thanks to <a href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.DavidSrbecky">David</a>,
v2 sports a debugger and you can <a href="http://laputa.sharpdevelop.net/VideoIntegratedDebugger.aspx">watch
a demo</a>.
</p>
        <p>
Let's continue with a simple list: Search &amp; Replace, code folding, code templates
(just try Ctrl+J in the editor), a toolbox and more.
</p>
        <p>
          <strong>Cool Features</strong>
        </p>
        <p>
Ahhh. At last. Let's see what we got: 
</p>
        <ul>
          <li>
Unit testing (since 1.1, NUnit-based) 
</li>
          <li>
Code Coverage (2.0, based on NCover - <a href="http://community.sharpdevelop.net/blogs/mattward/archive/2006/01/31/CodeCoverageWithNCover.aspx">read
more in Matt's blog post</a>) 
</li>
          <li>
Documentation generation (since 1.1, based on NDoc) 
</li>
          <li>
Quick XML Doc (since 1.1, just try Ctrl+Q to get a preview of the HTML help that will
be generated for your XML comments) 
</li>
          <li>
Auto code generation (since 1.1, just try Alt+Ins) 
</li>
          <li>
Code converter - convert your projects from C# to VB.NET and vice versa (since 1.1).
New in 2.0: three way with Boo. 
</li>
          <li>
Reports. Yes, SharpDevelop ships with a free-to-use report engine, #report. It was
added late in 1.x, now improved for 2.0. <a href="http://laputa.sharpdevelop.net/DemoReport.aspx">Watch
the demo</a></li>
          <li>
            <a href="http://community.sharpdevelop.net/blogs/mattward/archive/2005/10/15/TargetingDifferentFrameworksWithSharpDevelop.aspx">Support
for multiple frameworks</a> - although 2.0 is the default, SharpDevelop can target
1.1 as well as Mono. Even <a href="http://community.sharpdevelop.net/blogs/mattward/archive/2005/10/20/CreatingAGtkSharpAppWithSharpDevelop.aspx">Gtk#
is supported</a>. 
</li>
          <li>
Ctrl+Mousewheel zooming. You will like it. I do.</li>
        </ul>
        <p>
          <strong>What's Not There</strong>
        </p>
        <p>
We ain't a big software company, so we have to tackle features in order. Therefore,
you won't find <a href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.ASPNetSupport">ASP.NET
support in SharpDevelop</a>, as well as others: CF support (planned for 2.1), version
control (planned for 2.1), ClickOnce (planned for 2.1)... 
</p>
        <p>
Even if you don't plan on using SharpDevelop for your daily work, give it a try and
let us know what you like and what not on <a href="http://community.sharpdevelop.net/forums/">our
forums</a>. You might even learn about a cool new feature like <a href="http://community.sharpdevelop.net/blogs/mattward/archive/2006/05/21/ComponentInspector.aspx">Component
Inspector</a> that is coming with 2.1, code-named Serralongue. And we'd be more than
happy to <a href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.HowCanIHelp">welcome
additional developers, testers, writers and translators</a>.
</p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=cd0e4362-88f8-4e89-b5ff-edc25bb06fbf" />
      </body>
      <title>SharpDevelop2 Release Candidate 2 Available</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,cd0e4362-88f8-4e89-b5ff-edc25bb06fbf.aspx</guid>
      <link>http://chrison.net/SharpDevelop2ReleaseCandidate2Available.aspx</link>
      <pubDate>Mon, 05 Jun 2006 21:29:57 GMT</pubDate>
      <description>&lt;p&gt;
Disclaimer: I am the Senior Project Wrangler for &lt;a href="http://www.icsharpcode.net/OpenSource/SD/Default.aspx"&gt;#develop&lt;/a&gt;.
Therefore I am biased as well as knowledgeable.
&lt;/p&gt;
&lt;p&gt;
Today, we shipped RC2 of SharpDevelop2. For those of you who haven't heard of it before,
it is an Integrated Development Environment (IDE) for .NET. I will get to the features
in just a second. First, I want to thank all developers that spent time on making
v2 a reality. &lt;a href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.DanielGrunwald"&gt;Daniel&lt;/a&gt;,
the lead developer on v2, actually implemented a nice little tool for showing the
project statistics, you can read more and download the utility in his blog&amp;nbsp;&lt;a href="http://laputa.sharpdevelop.net/AnalyzingTheCodeInSharpDevelop.aspx"&gt;Analyzing
the code in SharpDevelop&lt;/a&gt;. Wow, we started quite a long ago on this baby.
&lt;/p&gt;
&lt;p&gt;
I promised to get back to the feature set. Let's tackle it with more than a grain
of blog posts and feature videos:
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Supported Programming Languages&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
My definition of support is as follows: full code completion (aka IntelliSense) and
a working Windows forms designer. Therefore, three languages qualify: C#, VB.NET and &lt;a href="http://boo.codehaus.org/"&gt;Boo&lt;/a&gt;.
Aside from those fully supported languages, you get syntax highlighting for many more.
&lt;/p&gt;
&lt;p&gt;
Speaking of syntax highlighting and code completion: both features are supported for
XML files. You can check it out in the &lt;a href="http://laputa.sharpdevelop.net/DemoXMLEditingFeaturesOfDevelop11.aspx"&gt;xml
editing experience feature video&lt;/a&gt; (yes, this is available since v1.1!) You get
this &lt;a href="http://laputa.sharpdevelop.net/VideoCodeCompletionForMSBuild.aspx"&gt;for
MSBuild files&lt;/a&gt; too!
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Features You Would Expect&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Let's start with the integrated debugger. This has been our achilles heel since the
very beginning, as implementing a debugger isn't exactly a piece of cake. However,
thanks to &lt;a href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.DavidSrbecky"&gt;David&lt;/a&gt;,
v2 sports a debugger and you can &lt;a href="http://laputa.sharpdevelop.net/VideoIntegratedDebugger.aspx"&gt;watch
a demo&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Let's continue with a simple list: Search &amp;amp; Replace, code folding, code templates
(just try Ctrl+J in the editor), a toolbox and more.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Cool Features&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Ahhh. At last. Let's see what we got: 
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Unit testing (since 1.1, NUnit-based) 
&lt;li&gt;
Code Coverage (2.0, based on NCover - &lt;a href="http://community.sharpdevelop.net/blogs/mattward/archive/2006/01/31/CodeCoverageWithNCover.aspx"&gt;read
more in Matt's blog post&lt;/a&gt;) 
&lt;li&gt;
Documentation generation (since 1.1, based on NDoc) 
&lt;li&gt;
Quick XML Doc (since 1.1, just try Ctrl+Q to get a preview of the HTML help that will
be generated for your XML comments) 
&lt;li&gt;
Auto code generation (since 1.1, just try Alt+Ins) 
&lt;li&gt;
Code converter - convert your projects from C# to VB.NET and vice versa (since 1.1).
New in 2.0: three way with Boo. 
&lt;li&gt;
Reports. Yes, SharpDevelop ships with a free-to-use report engine, #report. It was
added late in 1.x, now improved for 2.0. &lt;a href="http://laputa.sharpdevelop.net/DemoReport.aspx"&gt;Watch
the demo&lt;/a&gt; 
&lt;li&gt;
&lt;a href="http://community.sharpdevelop.net/blogs/mattward/archive/2005/10/15/TargetingDifferentFrameworksWithSharpDevelop.aspx"&gt;Support
for multiple frameworks&lt;/a&gt; - although 2.0 is the default, SharpDevelop can target
1.1 as well as Mono. Even &lt;a href="http://community.sharpdevelop.net/blogs/mattward/archive/2005/10/20/CreatingAGtkSharpAppWithSharpDevelop.aspx"&gt;Gtk#
is supported&lt;/a&gt;. 
&lt;li&gt;
Ctrl+Mousewheel zooming. You will like it. I do.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;strong&gt;What's Not There&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
We ain't a big software company, so we have to tackle features in order. Therefore,
you won't find &lt;a href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.ASPNetSupport"&gt;ASP.NET
support in SharpDevelop&lt;/a&gt;, as well as others: CF support (planned for 2.1), version
control (planned for 2.1), ClickOnce (planned for 2.1)... 
&lt;/p&gt;
&lt;p&gt;
Even if you don't plan on using SharpDevelop for your daily work, give it a try and
let us know what you like and what not on &lt;a href="http://community.sharpdevelop.net/forums/"&gt;our
forums&lt;/a&gt;. You might even learn about a cool new feature like &lt;a href="http://community.sharpdevelop.net/blogs/mattward/archive/2006/05/21/ComponentInspector.aspx"&gt;Component
Inspector&lt;/a&gt; that is coming with 2.1, code-named Serralongue. And we'd be more than
happy to &lt;a href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.HowCanIHelp"&gt;welcome
additional developers, testers, writers and translators&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=cd0e4362-88f8-4e89-b5ff-edc25bb06fbf" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,cd0e4362-88f8-4e89-b5ff-edc25bb06fbf.aspx</comments>
      <category>.NET</category>
      <category>Cool Download</category>
      <category>this</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=b6f33c00-3cc2-41e3-a761-45ce46a93d3a</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,b6f33c00-3cc2-41e3-a761-45ce46a93d3a.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,b6f33c00-3cc2-41e3-a761-45ce46a93d3a.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=b6f33c00-3cc2-41e3-a761-45ce46a93d3a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Yesterday, I picked up on an old code piece of mine - sending images to the client
via an HttpHandler. Why in the world would you implement that with a handler when
there is http.sys kernel mode caching? Well, I had a few unique constraints:
</p>
        <ul>
          <li>
the images had to live outside the Web root and any of its vroots 
</li>
          <li>
the image names had to be concealed because the naming would give away information,
and renaming the images prior to publishing on the Web was out of the question</li>
        </ul>
        <p>
Now, a common approach to sending images from a certain directory (leaving requirement
#2 by the wayside for the moment) would be this:
</p>
        <pre>image.aspx?image=iamthebest.jpg</pre>
        <p>
So what is wrong with this approach? First and foremost using an ASP.NET page. The
page lifecycle is a drain on performance and throughput, because you simply don't
need it. That sorts out why I chose to go with an HTTP handler.
</p>
        <p>
Secondly, somebody could DOS your server. You heard me right. For the background,
check the article <a href="http://www.aspheute.com/english/20020131.asp">Trap Alert:
Files that aren't</a>. A .NET version (managed C++) of this checker can be found
in <a href="http://www.aspheute.com/Code/20020201.zip">this download</a> (the
article <a href="http://www.aspheute.com/artikel/20020201.htm">Dateityp-Ermittlung
in Managed C++</a> is only available in German). 
</p>
        <p>
How do you get around this issue? Well, how about reading the directory up front,
and instead of having the filename in the URL, send the hash! When the image is requested,
take the hash and look up the corresponding file, presto. In addition you get one
security feature for free: no directory traversals can be hidden in your code.
</p>
        <p>
When I uncovered the code yesterday, I decided to rewrite it for more general use.
So what do you get? 
</p>
        <ul>
          <li>
The ImageCacheControls project: it contains the ImageCache class, which does most
of the heavy lifting. In addition, you get an ImageCacheControl server control, as
well as the implementation of the HTTP handler. (Don't forget to check out the Readme.txt
for the latest on feature set and known issues) 
</li>
          <li>
The Web project: a rather simple Web site with demo files in it. The file I want to
direct your attention to is Image.ashx. This is the one file - aside from the control
project binaries - that needs to be copied to your projects to get started with ImageCache.
Note that I made it easy to work with C# (default) or VB.NET.</li>
        </ul>
        <p>
Usage of ImageCache is demonstrated in default.aspx.cs plus the source code of default.aspx
(design time of the control does not work, known issue). 
</p>
        <p>
The code behind looks like this (<em>CreateMapping</em> loads the directory contents,
initializes the hash to file name map, stores it into the cache):
</p>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> ChrisOnNET.ImageCache;<br /><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span> partial <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">class</span> _Default
: System.Web.UI.Page 
<br />
{<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">  
protected</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> Page_Load(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> sender,
EventArgs e)<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   </span>{<br /><span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   </span></span>//
normally, this would be done in global.asax</span><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   </span></span>ImageCache.CreateMapping(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"demo"</span>,
Server.MapPath(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"~/TestImages/"</span>));<br /><br /><span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   </span></span>//
the DIY approach to rendering the image tag</span><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   </span></span>string</span> testHash <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> ImageCache.GetHashForFile(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"026.jpg"</span>, <span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"demo"</span>);<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   </span></span>Response.Write(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"&lt;image
src=\"Image.ashx?bucket="</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span><br /><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   </span></span></span>"demo"</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span><br /><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   </span></span></span>"&amp;image="</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   </span></span></span>Server.UrlEncode(testHash) <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span><br /><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   </span></span></span>"\"
/&gt;"</span>);<br /><br /><span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   </span></span>//
the elegant approach to rendering the image tag</span><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   </span></span>Response.Write(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"&lt;image
src=\""</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> ImageCache.GenerateUrl(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"036.jpg"</span>, <span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"demo"</span>) <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span><br /><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   </span></span>"\"
/&gt;"</span>);<br /><br /><span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   </span></span>//
see HTML source for server control approach (Design time not working, known issue)</span><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">   </span>}<br />
}</span>
        </p>
        <p>
Rendering Image tags in Page_Load isn't nice, but after all it is only intended to
show the functionality. Most likely you are going to use the declarative <em>ImageCacheControl</em> anyways:
</p>
        <pre>&lt;%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %&gt;<br />
&lt;%@ Register Assembly="ImageCacheControls" Namespace="ChrisOnNET.ImageCache" TagPrefix="cc1"
%&gt;</pre>
        <pre>&lt;html xmlns="<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>"
&gt;<br />
&lt;head runat="server"&gt;<br />
    &lt;title&gt;Untitled Page&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
    &lt;form id="form1" runat="server"&gt;<br />
    &lt;div&gt;<br />
        &lt;br /&gt;Using the ImageCacheControl:&amp;nbsp;<br />
        &lt;cc1:ImageCacheControl ID="ImageCacheControl1" 
<br />
            Bucket="demo"<br />
            FileName="026.jpg"<br />
            runat="server"
/&gt;<br />
    &lt;/div&gt;<br />
    &lt;/form&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</pre>
        <p>
That's basically it. Let me know what you think.
</p>
        <p>
          <a href="http://chrison.net/content/binary/ImageCacheTakeOne.zip">ImageCacheTakeOne.zip
(59.55 KB)</a>
        </p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=b6f33c00-3cc2-41e3-a761-45ce46a93d3a" />
      </body>
      <title>ImageCache, Take One</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,b6f33c00-3cc2-41e3-a761-45ce46a93d3a.aspx</guid>
      <link>http://chrison.net/ImageCacheTakeOne.aspx</link>
      <pubDate>Wed, 18 Jan 2006 10:21:05 GMT</pubDate>
      <description>&lt;p&gt;
Yesterday, I picked up on an old code piece of mine - sending images to the client
via an HttpHandler. Why in the world would you implement that with a handler when
there is http.sys kernel mode caching? Well, I had a few unique constraints:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
the images had to live outside the Web root and any of its vroots 
&lt;li&gt;
the image names had to be concealed because the naming would give away information,
and renaming the images prior to publishing on the Web was out of the question&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Now, a common approach to sending images from a certain directory (leaving requirement
#2 by the wayside for the moment) would be this:
&lt;/p&gt;
&lt;pre&gt;image.aspx?image=iamthebest.jpg&lt;/pre&gt;
&lt;p&gt;
So what is wrong with this approach? First and foremost using an ASP.NET page. The
page lifecycle is a drain on performance and throughput, because you simply don't
need it. That sorts out why I chose to go with an HTTP handler.
&lt;/p&gt;
&lt;p&gt;
Secondly, somebody could DOS your server. You heard me right. For the background,
check the article &lt;a href="http://www.aspheute.com/english/20020131.asp"&gt;Trap Alert:
Files that aren't&lt;/a&gt;. A .NET version (managed C++)&amp;nbsp;of this checker can be found
in &lt;a href="http://www.aspheute.com/Code/20020201.zip"&gt;this download&lt;/a&gt;&amp;nbsp;(the
article &lt;a href="http://www.aspheute.com/artikel/20020201.htm"&gt;Dateityp-Ermittlung
in Managed C++&lt;/a&gt; is only available in German). 
&lt;/p&gt;
&lt;p&gt;
How do you get around this issue? Well, how about reading the directory up front,
and instead of having the filename in the URL, send the hash! When the image is requested,
take the hash and look up the corresponding file, presto. In addition you get one
security feature for free: no directory traversals can be hidden in your code.
&lt;/p&gt;
&lt;p&gt;
When I uncovered the code yesterday, I decided to rewrite it for more general use.
So what do you get? 
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
The ImageCacheControls project: it contains the ImageCache class, which does most
of the heavy lifting. In addition, you get an ImageCacheControl server control, as
well as the implementation of the HTTP handler. (Don't forget to check out the Readme.txt
for the latest on feature set and known issues) 
&lt;li&gt;
The Web project: a rather simple Web site with demo files in it. The file I want to
direct your attention to is Image.ashx. This is the one file - aside from the control
project binaries - that needs to be copied to your projects to get started with ImageCache.
Note that I made it easy to work with C# (default) or VB.NET.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Usage of ImageCache is demonstrated in default.aspx.cs plus the source code of default.aspx
(design time of the control does not work, known issue). 
&lt;/p&gt;
&lt;p&gt;
The code behind looks like this (&lt;em&gt;CreateMapping&lt;/em&gt; loads the directory contents,
initializes the hash to file name map, stores it into the cache):
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;using&lt;/span&gt; ChrisOnNET.ImageCache;&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;public&lt;/span&gt; partial &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;class&lt;/span&gt; _Default
: System.Web.UI.Page 
&lt;br&gt;
{&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;
protected&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;void&lt;/span&gt; Page_Load(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;object&lt;/span&gt; sender,
EventArgs e)&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;//
normally, this would be done in global.asax&lt;/span&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;ImageCache.CreateMapping(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"demo"&lt;/span&gt;,
Server.MapPath(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"~/TestImages/"&lt;/span&gt;));&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;//
the DIY approach to rendering the image tag&lt;/span&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;string&lt;/span&gt; testHash &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; ImageCache.GetHashForFile(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"026.jpg"&lt;/span&gt;, &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"demo"&lt;/span&gt;);&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;Response.Write(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"&amp;lt;image
src=\"Image.ashx?bucket="&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;"demo"&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;"&amp;amp;image="&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Server.UrlEncode(testHash) &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;"\"
/&amp;gt;"&lt;/span&gt;);&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;//
the elegant approach to rendering the image tag&lt;/span&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;Response.Write(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"&amp;lt;image
src=\""&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt; ImageCache.GenerateUrl(&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"036.jpg"&lt;/span&gt;, &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"demo"&lt;/span&gt;) &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;"\"
/&amp;gt;"&lt;/span&gt;);&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;//
see HTML source for server control approach (Design time not working, known issue)&lt;/span&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;br&gt;
}&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
Rendering Image tags in Page_Load isn't nice, but after all it is only intended to
show the functionality. Most likely you are going to use the declarative &lt;em&gt;ImageCacheControl&lt;/em&gt; anyways:
&lt;/p&gt;
&lt;pre&gt;&amp;lt;%@ Page Language="C#" AutoEventWireup="true"&amp;nbsp; CodeFile="Default.aspx.cs" Inherits="_Default" %&amp;gt;&lt;br&gt;
&amp;lt;%@ Register Assembly="ImageCacheControls" Namespace="ChrisOnNET.ImageCache" TagPrefix="cc1"
%&amp;gt;&lt;/pre&gt;&lt;pre&gt;&amp;lt;html xmlns="&lt;a href="http://www.w3.org/1999/xhtml"&gt;http://www.w3.org/1999/xhtml&lt;/a&gt;"
&amp;gt;&lt;br&gt;
&amp;lt;head runat="server"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;title&amp;gt;Untitled Page&amp;lt;/title&amp;gt;&lt;br&gt;
&amp;lt;/head&amp;gt;&lt;br&gt;
&amp;lt;body&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;form id="form1" runat="server"&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;br /&amp;gt;Using the ImageCacheControl:&amp;amp;nbsp;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;cc1:ImageCacheControl ID="ImageCacheControl1" 
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Bucket="demo"&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FileName="026.jpg"&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; runat="server"
/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/form&amp;gt;&lt;br&gt;
&amp;lt;/body&amp;gt;&lt;br&gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
&lt;p&gt;
That's basically it. Let me know what you think.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://chrison.net/content/binary/ImageCacheTakeOne.zip"&gt;ImageCacheTakeOne.zip
(59.55 KB)&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=b6f33c00-3cc2-41e3-a761-45ce46a93d3a" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,b6f33c00-3cc2-41e3-a761-45ce46a93d3a.aspx</comments>
      <category>.NET</category>
      <category>2 Ohhhh</category>
      <category>ASP.NET</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=57c46100-da3c-4394-87eb-eb6134d35afe</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,57c46100-da3c-4394-87eb-eb6134d35afe.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,57c46100-da3c-4394-87eb-eb6134d35afe.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=57c46100-da3c-4394-87eb-eb6134d35afe</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
When I saw the MSDN Magazine article <a href="http://msdn.microsoft.com/msdnmag/issues/06/02/PasteAs/default.aspx">A
Visual Studio Add-In That Converts C# Code To Visual Basic</a> I simply had to extend
this addin with our parser-based converter. Basically, I took the code I wrote
for <a href="http://chrison.net/CodeConverterForNET20OnlineAsWellAsOffline.aspx">Code
Converter for .NET 2.0 - Online, as well as Offline</a> and put it into the addin,
which has now an additonal conversion service in its list (conveniently the first
one):
</p>
        <p>
          <img src="http://chrison.net/content/binary/PasteAsVisualBasicExtended.png" border="0" />
        </p>
        <p>
I have also updated the installer (which is now a release build, why was that provided
as a debug build in the first place?), to be found in the <em>PasteAsVBSetup\Release</em> directory.
</p>
        <p>
          <a href="http://chrison.net/content/binary/PasteAsExtended.zip">PasteAsExtended.zip
(721.36 KB)</a>
        </p>
        <p>
Enjoy!
</p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=57c46100-da3c-4394-87eb-eb6134d35afe" />
      </body>
      <title>Paste as Visual Basic - Extended</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,57c46100-da3c-4394-87eb-eb6134d35afe.aspx</guid>
      <link>http://chrison.net/PasteAsVisualBasicExtended.aspx</link>
      <pubDate>Thu, 12 Jan 2006 14:24:54 GMT</pubDate>
      <description>&lt;p&gt;
When I saw the MSDN Magazine article &lt;a href="http://msdn.microsoft.com/msdnmag/issues/06/02/PasteAs/default.aspx"&gt;A
Visual Studio Add-In That Converts C# Code To Visual Basic&lt;/a&gt; I simply had to extend
this&amp;nbsp;addin with our parser-based converter. Basically, I took the code I wrote
for &lt;a href="http://chrison.net/CodeConverterForNET20OnlineAsWellAsOffline.aspx"&gt;Code
Converter for .NET 2.0 - Online, as well as Offline&lt;/a&gt; and put it into the addin,
which has now an additonal conversion service in its list (conveniently the first
one):
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://chrison.net/content/binary/PasteAsVisualBasicExtended.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
I have also updated the installer (which is now a release build, why was that provided
as a debug build in the first place?), to be found in the &lt;em&gt;PasteAsVBSetup\Release&lt;/em&gt; directory.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://chrison.net/content/binary/PasteAsExtended.zip"&gt;PasteAsExtended.zip
(721.36 KB)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Enjoy!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=57c46100-da3c-4394-87eb-eb6134d35afe" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,57c46100-da3c-4394-87eb-eb6134d35afe.aspx</comments>
      <category>Cool Download</category>
      <category>Use the source Luke</category>
      <category>Visual Studio</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=161538e8-a8fc-4d5f-a0ff-d883133e7a75</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,161538e8-a8fc-4d5f-a0ff-d883133e7a75.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,161538e8-a8fc-4d5f-a0ff-d883133e7a75.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=161538e8-a8fc-4d5f-a0ff-d883133e7a75</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.DanielGrunwald">Daniel</a> published
the <a href="http://www.codeproject.com/csharp/ICSharpCodeCore.asp">first article</a> in
a series about using the <a href="http://www.icsharpcode.net/OpenSource/SD/">SharpDevelop</a> core
to build your applications. Those of you tracking the progress of SharpDevelop through
the years might be wondering "Aren't there restrictions because SharpDevelop is released
under the GPL?" Well, version 1.x is GPL-licensed. But for version 2.0, we <a href="http://laputa.sharpdevelop.net/SharpDevelop2LicenseChangedToLGPL.aspx">changed
the license to LGPL</a>. Thus, you can use all of the SharpDevelop2 assemblies in
your applications regardless of license.
</p>
        <p>
Aside from the articles, there are videos showing <a href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.AddInWritingTutorials">how
to write addins for SharpDevelop2</a>. This will get you started with plugging in
functionality with SharpDevelop2 via addins (again, your choice of license now!).
Be sure to always get the latest bits either <a href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.UsingTheRepository">via
our source control server</a>, or if you prefer from our <a href="http://build.sharpdevelop.net/">build
server</a>.
</p>
        <p>
Please note that SharpDevelop2 requires .NET Framework 2.0, and, the usual disclaimer,
that it is a work in progress. This, however, does not apply to the core - it has
been in development for four years+, and as such is very stable and proven. After
all, it is the basis for a 300 kLOC C# application!
</p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=161538e8-a8fc-4d5f-a0ff-d883133e7a75" />
      </body>
      <title>Article: Building Applications with the SharpDevelop Core</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,161538e8-a8fc-4d5f-a0ff-d883133e7a75.aspx</guid>
      <link>http://chrison.net/ArticleBuildingApplicationsWithTheSharpDevelopCore.aspx</link>
      <pubDate>Wed, 04 Jan 2006 10:41:41 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.DanielGrunwald"&gt;Daniel&lt;/a&gt; published
the &lt;a href="http://www.codeproject.com/csharp/ICSharpCodeCore.asp"&gt;first article&lt;/a&gt; in
a series about using the &lt;a href="http://www.icsharpcode.net/OpenSource/SD/"&gt;SharpDevelop&lt;/a&gt; core
to build your applications. Those of you tracking the progress of SharpDevelop through
the years might be wondering "Aren't there restrictions because SharpDevelop is released
under the GPL?" Well, version 1.x is GPL-licensed. But for version 2.0, we &lt;a href="http://laputa.sharpdevelop.net/SharpDevelop2LicenseChangedToLGPL.aspx"&gt;changed
the license to LGPL&lt;/a&gt;. Thus, you can use all of the SharpDevelop2 assemblies in
your applications regardless of license.
&lt;/p&gt;
&lt;p&gt;
Aside from the articles, there are videos showing &lt;a href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.AddInWritingTutorials"&gt;how
to write addins for SharpDevelop2&lt;/a&gt;. This will get you started with plugging in
functionality with SharpDevelop2 via addins (again, your choice of license now!).
Be sure to always get the latest bits either &lt;a href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.UsingTheRepository"&gt;via
our source control server&lt;/a&gt;, or if you prefer from our &lt;a href="http://build.sharpdevelop.net/"&gt;build
server&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Please note that SharpDevelop2 requires .NET Framework 2.0, and, the usual disclaimer,
that it is a work in progress. This, however, does not apply to the core - it has
been in development for four years+, and as such is very stable and proven. After
all, it is the basis for a 300 kLOC C# application!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=161538e8-a8fc-4d5f-a0ff-d883133e7a75" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,161538e8-a8fc-4d5f-a0ff-d883133e7a75.aspx</comments>
      <category>.NET</category>
      <category>C#</category>
      <category>this</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=ef3e6b4b-9ac4-455b-b784-837646d5e8b4</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,ef3e6b4b-9ac4-455b-b784-837646d5e8b4.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,ef3e6b4b-9ac4-455b-b784-837646d5e8b4.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=ef3e6b4b-9ac4-455b-b784-837646d5e8b4</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Today, a member of our <a href="http://www.dotnetgerman.com/">German .NET community</a> asked
if it is possible to programmatically query the Google page rank. He had seen it done
in PHP (<a href="http://www.googlecommunity.com/scripts/pagerank-source.phps">here</a> on
the <a href="http://www.googlecommunity.com/">Google Community</a> site), but didn't
have time / PHP skills to translate it. All I found on a rather shallow search was <a href="http://www.bolinfest.com/pullrank/">PullRank</a>,
which I'd describe as non-fit for server use.
</p>
        <p>
So I decided to set out to convert the PHP sample. Being PHP-challenged myself, I
decided to give the <a href="http://msdn.microsoft.com/asp.net/using/migrating/phpmig/phpmigasst.aspx">PHP
to ASP.NET Migration Assistant</a> a shot. Whoha! That converted code is the most
convoluted contraption to be called code I have seen - ever. I tried to get it to
run, but failed because the conversion left me with some loose ends.
</p>
        <p>
Instead of giving in, I contacted <a href="http://www.hauser-wenz.de/s9y/">Christian
Wenz</a> to lend me a hand because he has some PHP experience. He thankfully hosted
an "annotated" version of the PHP script so I could look at the output of
various stages to test my solution with known-good values. That was most helpful.
</p>
        <p>
Instead of doing a Web site demo application with everything intertwined, I split
up the project into two - <strong>GPRDotNet</strong> being a DLL assembly project
you can reference in any type of .NET application (Windows Forms, Web Forms, you name
it), as well as a simple Web frontend to demo the usage: <strong>DemoSite</strong>.
</p>
        <p>
          <img src="http://chrison.net/content/binary/GooglePageRankInDotNet20.png" border="0" />
        </p>
        <p>
Querying the page rank is really simple - the following snippet is the code
from the "Check PageRank" button event handler:
</p>
        <p>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">protected</span>
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> doCheckPageRank_Click(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> sender,
EventArgs e)<br />
{<br />
  GooglePageRank pr <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">new</span> GooglePageRank();<br /><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><font color="#000000">  </font>string</span> url <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> webSiteUrl.Text;<br /><br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><font color="#000000">  </font>try</span><br />
  {<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><font color="#000000">    </font>string</span> rank <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> pr.GetRank(url);<br />
    thePageRank.Text <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> rank;<br />
  }<br /><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><font color="#000000">  </font>catch</span> (Exception
ex)<br />
  {<br /><span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><font color="#000000">    </font>//
this is rather chatty (telling the end user everything *IS* a bad idea)</span><br />
    thePageRank.Text <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Requesting
the page rank failed. Reason: "</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> ex.ToString();<br />
  }<br />
}</span>
        </p>
        <p>
I want to emphasize that the code for the GooglePageRank class is a rather quick &amp;
dirty port of the PHP code and that it does not contain the necessary error handling
you would expect for a server-side library. After all, it is just a proof of concept
for our community.
</p>
        <p>
Finally, here is the source code: <a href="http://chrison.net/content/binary/PageRank.zip">PageRank.zip
(26.89 KB)</a></p>
        <p>
If you find errors, please leave a blog comment so others know about improvements.
Thanks!
</p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=ef3e6b4b-9ac4-455b-b784-837646d5e8b4" />
      </body>
      <title>Google PageRank as a .NET Assembly</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,ef3e6b4b-9ac4-455b-b784-837646d5e8b4.aspx</guid>
      <link>http://chrison.net/GooglePageRankAsANETAssembly.aspx</link>
      <pubDate>Mon, 05 Dec 2005 18:03:00 GMT</pubDate>
      <description>&lt;p&gt;
Today, a member of our &lt;a href="http://www.dotnetgerman.com/"&gt;German .NET community&lt;/a&gt; asked
if it is possible to programmatically query the Google page rank. He had seen it done
in PHP (&lt;a href="http://www.googlecommunity.com/scripts/pagerank-source.phps"&gt;here&lt;/a&gt;&amp;nbsp;on
the &lt;a href="http://www.googlecommunity.com/"&gt;Google Community&lt;/a&gt; site), but didn't
have time / PHP skills to translate it. All I found on a rather shallow search was &lt;a href="http://www.bolinfest.com/pullrank/"&gt;PullRank&lt;/a&gt;,
which I'd describe as&amp;nbsp;non-fit for server use.
&lt;/p&gt;
&lt;p&gt;
So I decided to set out to convert the PHP sample. Being PHP-challenged myself, I
decided to give the &lt;a href="http://msdn.microsoft.com/asp.net/using/migrating/phpmig/phpmigasst.aspx"&gt;PHP
to ASP.NET Migration Assistant&lt;/a&gt; a shot. Whoha! That converted code is the most
convoluted contraption to be called code I have seen - ever. I tried to get it to
run, but failed because the conversion left me with some loose ends.
&lt;/p&gt;
&lt;p&gt;
Instead of giving in, I contacted &lt;a href="http://www.hauser-wenz.de/s9y/"&gt;Christian
Wenz&lt;/a&gt; to lend me a hand because he has some PHP experience. He thankfully hosted
an "annotated"&amp;nbsp;version of the PHP script so I could look at the output&amp;nbsp;of
various stages to test my solution with known-good values. That was most helpful.
&lt;/p&gt;
&lt;p&gt;
Instead of doing a Web site demo application with everything intertwined, I split
up the project into two - &lt;strong&gt;GPRDotNet&lt;/strong&gt; being a DLL assembly project
you can reference in any type of .NET application (Windows Forms, Web Forms, you name
it), as well as a simple Web frontend to demo the usage: &lt;strong&gt;DemoSite&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://chrison.net/content/binary/GooglePageRankInDotNet20.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
Querying the page rank is really simple -&amp;nbsp;the following snippet&amp;nbsp;is the code
from the "Check PageRank" button event handler:
&lt;/p&gt;
&lt;p&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;protected&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;void&lt;/span&gt; doCheckPageRank_Click(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;object&lt;/span&gt; sender,
EventArgs e)&lt;br&gt;
{&lt;br&gt;
&amp;nbsp; GooglePageRank pr &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;new&lt;/span&gt; GooglePageRank();&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;font color=#000000&gt;&amp;nbsp; &lt;/font&gt;string&lt;/span&gt; url &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; webSiteUrl.Text;&lt;br&gt;
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;font color=#000000&gt;&amp;nbsp; &lt;/font&gt;try&lt;/span&gt;
&lt;br&gt;
&amp;nbsp; {&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;string&lt;/span&gt; rank &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; pr.GetRank(url);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; thePageRank.Text &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; rank;&lt;br&gt;
&amp;nbsp; }&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;font color=#000000&gt;&amp;nbsp; &lt;/font&gt;catch&lt;/span&gt; (Exception
ex)&lt;br&gt;
&amp;nbsp; {&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: green; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;//
this is rather chatty (telling the end user everything *IS* a bad idea)&lt;/span&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; thePageRank.Text &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Requesting
the page rank failed. Reason: "&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;+&lt;/span&gt; ex.ToString();&lt;br&gt;
&amp;nbsp; }&lt;br&gt;
}&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
I want to emphasize that the code for the GooglePageRank class is a rather quick &amp;amp;
dirty port of the PHP code and&amp;nbsp;that it does not contain the necessary error handling
you would expect for a server-side library. After all, it is just a proof of concept
for our community.
&lt;/p&gt;
&lt;p&gt;
Finally, here is the source code: &lt;a href="http://chrison.net/content/binary/PageRank.zip"&gt;PageRank.zip
(26.89 KB)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
If you find errors, please leave a blog comment so others know about improvements.
Thanks!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=ef3e6b4b-9ac4-455b-b784-837646d5e8b4" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,ef3e6b4b-9ac4-455b-b784-837646d5e8b4.aspx</comments>
      <category>.NET</category>
      <category>2 Ohhhh</category>
      <category>ASP.NET</category>
      <category>C#</category>
      <category>Community</category>
      <category>this</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=93601f8b-3029-449b-b5a6-39048758be9b</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,93601f8b-3029-449b-b5a6-39048758be9b.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,93601f8b-3029-449b-b5a6-39048758be9b.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=93601f8b-3029-449b-b5a6-39048758be9b</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This week I got started and I implemented a <a href="http://chrison.net/ConvertC20CodeToVBNET80.aspx">C#
to VB.NET conversion</a>. Today, I added VB.NET to C#, as well as C# / VB.NET to Boo.
You can find the new converter at this URL:
</p>
        <p>
          <a href="http://developer.sharpdevelop.net/codeconvert.net/">http://developer.sharpdevelop.net/codeconvert.net/</a>
        </p>
        <p>
In addition to the "usual" Web interface, I also added a Web Service. This enables
you to remotely exploit the code conversion features of <a href="http://www.icsharpcode.net/opensource/sd/">#develop</a>.
For example, in a Windows Forms application:
</p>
        <p>
          <img src="http://chrison.net/content/binary/CodeConverter.png" border="0" />
        </p>
        <p>
It behaves exactly the same way as the <a href="http://developer.sharpdevelop.net/codeconvert.net/Convert.aspx">online
converter</a>. To get you started, the following download contains both the executable
(in the bin/release folder) as well as the source code for the application shown in
this screenshot. Have fun, and please don't forget to <a href="http://community.sharpdevelop.net/forums/19/ShowForum.aspx">report
conversion errors</a> so we can improve the underlying <a href="http://laputa.sharpdevelop.net/NRefactoryTutorialVideo.aspx">NRefactory</a>!
</p>
        <p>
          <a href="http://chrison.net/content/binary/CodeConvertServiceClient.zip">CodeConvertServiceClient.zip
(38.57 KB)</a>
        </p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=93601f8b-3029-449b-b5a6-39048758be9b" />
      </body>
      <title>Code Converter for .NET 2.0 - Online, as well as Offline</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,93601f8b-3029-449b-b5a6-39048758be9b.aspx</guid>
      <link>http://chrison.net/CodeConverterForNET20OnlineAsWellAsOffline.aspx</link>
      <pubDate>Sun, 13 Nov 2005 20:11:00 GMT</pubDate>
      <description>&lt;p&gt;
This week I got started and I implemented a&amp;nbsp;&lt;a href="http://chrison.net/ConvertC20CodeToVBNET80.aspx"&gt;C#
to VB.NET conversion&lt;/a&gt;. Today, I added VB.NET to C#, as well as C# / VB.NET to Boo.
You can find the new converter at this URL:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://developer.sharpdevelop.net/codeconvert.net/"&gt;http://developer.sharpdevelop.net/codeconvert.net/&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
In addition to the "usual" Web interface, I also added a Web Service. This enables
you to remotely exploit the code conversion features of &lt;a href="http://www.icsharpcode.net/opensource/sd/"&gt;#develop&lt;/a&gt;.
For example, in a Windows Forms application:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://chrison.net/content/binary/CodeConverter.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
It behaves exactly the same way as the &lt;a href="http://developer.sharpdevelop.net/codeconvert.net/Convert.aspx"&gt;online
converter&lt;/a&gt;. To get you started, the following download contains both the executable
(in the bin/release folder) as well as the source code for the application shown in
this screenshot. Have fun, and please don't forget to &lt;a href="http://community.sharpdevelop.net/forums/19/ShowForum.aspx"&gt;report
conversion errors&lt;/a&gt; so we can improve the underlying &lt;a href="http://laputa.sharpdevelop.net/NRefactoryTutorialVideo.aspx"&gt;NRefactory&lt;/a&gt;!
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://chrison.net/content/binary/CodeConvertServiceClient.zip"&gt;CodeConvertServiceClient.zip
(38.57 KB)&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=93601f8b-3029-449b-b5a6-39048758be9b" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,93601f8b-3029-449b-b5a6-39048758be9b.aspx</comments>
      <category>2 Ohhhh</category>
      <category>ASP.NET</category>
      <category>Cool Download</category>
      <category>Use the source Luke</category>
      <category>Web Services</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=95c4cb37-fbde-490b-ba86-797d7b1aea50</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,95c4cb37-fbde-490b-ba86-797d7b1aea50.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,95c4cb37-fbde-490b-ba86-797d7b1aea50.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=95c4cb37-fbde-490b-ba86-797d7b1aea50</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Remember my call to action in <a href="http://chrison.net/WebApplicationsAndSMTPProxiesDontMixWellItSeems.aspx">Web
applications and SMTP proxies don't mix well (it seems)</a>? I mentioned that I am
guilty as well - not only for Web applications as it turned out, but also for other
server-based software, such as the Subversion post-commit hook I wrote.
</p>
        <p>
You can already guess the contents of the change log (the last public version was <a href="http://chrison.net/SVNPostCommitHookV17.aspx">1.7</a>):
</p>
        <ul>
          <li>
SMTP authentication &amp; SMTP server port options added</li>
        </ul>
        <p>
If you are running the hook today, all you need to do is copy the new post-commit.exe
over your existing one (assuming you use 1.7), and add the following four lines to
your post-commit.exe.config's <em>&lt;appSettings&gt;</em> section:
</p>
        <pre>&lt;add key="SMTPAuthentication" value="" /&gt;<br />
&lt;add key="SMTPServerPort" value="25" /&gt;<br />
&lt;add key="SMTPUsername" value="username" /&gt;<br />
&lt;add key="SMTPPassword" value="password" /&gt;</pre>
        <p>
Those values default post-commit.exe to the 1.7 behavior. To use authentication, set <em>SMTPAuthentication</em> to
BASIC, and provide username and password. Most of the time, you will not need to play
with the server port.
</p>
        <p>
Finally, here is the usual binary &amp; source code archive:
</p>
        <p>
          <a href="http://chrison.net/content/binary/SvnPostCommitHook1.8.0.51014.zip">SvnPostCommitHook1.8.0.51014.zip
(424.24 KB)</a>
        </p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=95c4cb37-fbde-490b-ba86-797d7b1aea50" />
      </body>
      <title>SvnPostCommitHook 1.8</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,95c4cb37-fbde-490b-ba86-797d7b1aea50.aspx</guid>
      <link>http://chrison.net/SvnPostCommitHook18.aspx</link>
      <pubDate>Fri, 14 Oct 2005 09:23:35 GMT</pubDate>
      <description>&lt;p&gt;
Remember my call to action in &lt;a href="http://chrison.net/WebApplicationsAndSMTPProxiesDontMixWellItSeems.aspx"&gt;Web
applications and SMTP proxies don't mix well (it seems)&lt;/a&gt;? I mentioned that I am
guilty as well - not only for Web applications as it turned out, but also for other
server-based software, such as the Subversion post-commit hook I wrote.
&lt;/p&gt;
&lt;p&gt;
You can already guess the contents of the change log (the last public version was &lt;a href="http://chrison.net/SVNPostCommitHookV17.aspx"&gt;1.7&lt;/a&gt;):
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
SMTP authentication &amp;amp; SMTP server port options added&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
If you are running the hook today, all you need to do is copy the new post-commit.exe
over your existing one (assuming you use 1.7), and add the following four lines to
your post-commit.exe.config's &lt;em&gt;&amp;lt;appSettings&amp;gt;&lt;/em&gt; section:
&lt;/p&gt;
&lt;pre&gt;&amp;lt;add key="SMTPAuthentication" value="" /&amp;gt;&lt;br&gt;
&amp;lt;add key="SMTPServerPort" value="25" /&amp;gt;&lt;br&gt;
&amp;lt;add key="SMTPUsername" value="username" /&amp;gt;&lt;br&gt;
&amp;lt;add key="SMTPPassword" value="password" /&amp;gt;&lt;/pre&gt;
&lt;p&gt;
Those values default post-commit.exe to the 1.7 behavior. To use authentication, set &lt;em&gt;SMTPAuthentication&lt;/em&gt; to
BASIC, and provide username and password. Most of the time, you will not need to play
with the server port.
&lt;/p&gt;
&lt;p&gt;
Finally, here is the usual binary &amp;amp; source code archive:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://chrison.net/content/binary/SvnPostCommitHook1.8.0.51014.zip"&gt;SvnPostCommitHook1.8.0.51014.zip
(424.24 KB)&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=95c4cb37-fbde-490b-ba86-797d7b1aea50" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,95c4cb37-fbde-490b-ba86-797d7b1aea50.aspx</comments>
      <category>Subversion</category>
      <category>this</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=c8d67570-43e3-43bc-a89b-c5002318dcff</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,c8d67570-43e3-43bc-a89b-c5002318dcff.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,c8d67570-43e3-43bc-a89b-c5002318dcff.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=c8d67570-43e3-43bc-a89b-c5002318dcff</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The <a href="http://seattlepi.nwsource.com/">Seattle Post Intelligencer</a> has the
by far best analysis on the "Mono BOF" at the PDC - read it <a href="http://seattlepi.nwsource.com/business/240989_pdcmono16.html">here</a> (<a href="http://uk.builder.com/programming/windows/0,39026618,39265898,00.htm">Builder
UK article</a> for contrast). From the marketing aspect of the BOF refusal to the
impact Mono will have to shops that bought into Windows (zilch, that is), those two
articles cover all bases. 
</p>
        <p>
Especially the one I also like to point out: Mono will always play catch up with .NET
(unless the development pace at MS slows down, but there was no such sign at this
year's PDC). I had to laugh out loud when the Seattle PI quoted Somasegar as saying
that "it's [Mono] a good science experiment that is happening there". And a warning
that if it eats into their revenue, they will reconsider their current position. Given
that Mono not only implements the ECMA standard, this certainly is an option. Taking
further into consideration that MS sure as hell won't risk a class action suit from
shareholders growling about lost money because of Mono, this is a threat scenario
the Mono project better prepares for. 
</p>
        <p>
Before you flame me for the previous paragraph: I am project manager on the open source <a href="http://www.icsharpcode.net/opensource/sd/">#develop</a> project,
so spare me the FUD blames. Especially if you are IANAL.
</p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=c8d67570-43e3-43bc-a89b-c5002318dcff" />
      </body>
      <title>PDC05: Mono "BOF" in the Rearview Mirror</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,c8d67570-43e3-43bc-a89b-c5002318dcff.aspx</guid>
      <link>http://chrison.net/PDC05MonoBOFInTheRearviewMirror.aspx</link>
      <pubDate>Sun, 18 Sep 2005 15:27:00 GMT</pubDate>
      <description>&lt;p&gt;
The &lt;a href="http://seattlepi.nwsource.com/"&gt;Seattle Post Intelligencer&lt;/a&gt; has the
by far best analysis on the "Mono BOF" at the PDC - read it &lt;a href="http://seattlepi.nwsource.com/business/240989_pdcmono16.html"&gt;here&lt;/a&gt;&amp;nbsp;(&lt;a href="http://uk.builder.com/programming/windows/0,39026618,39265898,00.htm"&gt;Builder
UK article&lt;/a&gt; for contrast). From the marketing aspect of the BOF refusal to the
impact Mono will have to shops that bought into Windows (zilch, that is), those two
articles cover all bases. 
&lt;/p&gt;
&lt;p&gt;
Especially the one I also like to point out: Mono will always play catch up with .NET
(unless the development pace at MS slows down, but there was no such sign at this
year's PDC). I had to laugh out loud when the Seattle PI quoted Somasegar as saying
that "it's [Mono]&amp;nbsp;a good science experiment that is happening there". And a warning
that if it eats into their revenue, they will reconsider their current position. Given
that Mono not only implements the ECMA standard, this certainly is an option. Taking
further into consideration that MS sure as hell won't risk a class action suit from
shareholders growling about lost money because of Mono, this is a threat scenario
the Mono project better prepares for. 
&lt;/p&gt;
&lt;p&gt;
Before you flame me for the previous paragraph: I am project manager on the open source &lt;a href="http://www.icsharpcode.net/opensource/sd/"&gt;#develop&lt;/a&gt; project,
so spare me the FUD blames. Especially if you are IANAL.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=c8d67570-43e3-43bc-a89b-c5002318dcff" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,c8d67570-43e3-43bc-a89b-c5002318dcff.aspx</comments>
      <category>Newsbites</category>
      <category>this</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=fd1b33a4-578e-4e14-af5f-77076ddbd7e6</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,fd1b33a4-578e-4e14-af5f-77076ddbd7e6.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,fd1b33a4-578e-4e14-af5f-77076ddbd7e6.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=fd1b33a4-578e-4e14-af5f-77076ddbd7e6</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
As a long-time subscriber as well as regular reader of the <a href="http://www.securityfocus.com/archive/1">Bugtraq</a> mailing
list, I saw <a href="http://www.securityfocus.com/archive/1/408425/30/0/threaded">Gregory's
post on decrypting MSN Messenger passwords</a>. Because that one really piqued my
interest, I immediately headed over to <a href="http://www.infogreg.com/source-code/gpl/msn-messenger-password-decrypter-for-windows-xp-and-2003.html">infoGreG</a> and
grabbed the source code, put it into a VS.NET 2003 C++ project, fixed a couple of
compiler switches, and et voila - it works as advertised!
</p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=fd1b33a4-578e-4e14-af5f-77076ddbd7e6" />
      </body>
      <title>MSN Messenger Password Decrypter for Windows XP and 2003</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,fd1b33a4-578e-4e14-af5f-77076ddbd7e6.aspx</guid>
      <link>http://chrison.net/MSNMessengerPasswordDecrypterForWindowsXPAnd2003.aspx</link>
      <pubDate>Thu, 18 Aug 2005 06:06:45 GMT</pubDate>
      <description>&lt;p&gt;
As a long-time subscriber as well as regular reader of the &lt;a href="http://www.securityfocus.com/archive/1"&gt;Bugtraq&lt;/a&gt; mailing
list, I saw &lt;a href="http://www.securityfocus.com/archive/1/408425/30/0/threaded"&gt;Gregory's
post on decrypting MSN Messenger passwords&lt;/a&gt;. Because that one really piqued my
interest, I immediately headed over to &lt;a href="http://www.infogreg.com/source-code/gpl/msn-messenger-password-decrypter-for-windows-xp-and-2003.html"&gt;infoGreG&lt;/a&gt; and
grabbed the source code, put it into a VS.NET 2003 C++ project, fixed a couple of
compiler switches, and et voila - it works as advertised!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=fd1b33a4-578e-4e14-af5f-77076ddbd7e6" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,fd1b33a4-578e-4e14-af5f-77076ddbd7e6.aspx</comments>
      <category>Security</category>
      <category>this</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=7aac206b-1f0e-44b4-9631-cb2cc04ddef7</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,7aac206b-1f0e-44b4-9631-cb2cc04ddef7.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,7aac206b-1f0e-44b4-9631-cb2cc04ddef7.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=7aac206b-1f0e-44b4-9631-cb2cc04ddef7</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I finally got around to make a new version of SvnPostCommitHook. For one, it was about
time to include Ben's changes, and secondly I wanted to roll a new version onto our
Subversion box - it was still running on v1.3. So much for dogfooding...
</p>
        <p>
With that, here is the change log. Note that the last public version was <a href="http://chrison.net/SvnPostCommitHook15.aspx">1.5</a>:
</p>
        <p>
8/8/2005 - 1.7, Changes by Christoph Wille
</p>
        <ul>
          <li>
LookInfo getter logs when _lookinfo is null 
</li>
          <li>
MailTextOnly &amp; AppendDiffToMail properties added to .config file (text-only currently
does not send diffs anyways) 
</li>
          <li>
UU case added to svnlook parser 
</li>
          <li>
Change SvnLookOutputParser.SkipBlanks method to return bool if StringCollection hasMoreLines</li>
        </ul>
        <p>
5/14/2005 - 1.6, Changes by Ben Lowery, ben AT blowery DOT org
</p>
        <ul>
          <li>
&lt;pre&gt; blocks for code# 
</li>
          <li>
Updates CSS for new HTML 
</li>
          <li>
Logic for finding CSS updated 
</li>
          <li>
More logging</li>
        </ul>
        <p>
And here is the usual binary &amp; source code archive:
</p>
        <a href="http://chrison.net/content/binary/SvnPostCommitHook1.7.zip">SvnPostCommitHook1.7.zip
(420.75 KB)</a>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=7aac206b-1f0e-44b4-9631-cb2cc04ddef7" />
      </body>
      <title>SVN Post-Commit Hook v1.7</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,7aac206b-1f0e-44b4-9631-cb2cc04ddef7.aspx</guid>
      <link>http://chrison.net/SVNPostCommitHookV17.aspx</link>
      <pubDate>Mon, 08 Aug 2005 15:39:49 GMT</pubDate>
      <description>&lt;p&gt;
I finally got around to make a new version of SvnPostCommitHook. For one, it was about
time to include Ben's changes, and secondly I wanted to roll a new version onto our
Subversion box - it was still running on v1.3. So much for dogfooding...
&lt;/p&gt;
&lt;p&gt;
With that, here is the change log. Note that the last public version was &lt;a href="http://chrison.net/SvnPostCommitHook15.aspx"&gt;1.5&lt;/a&gt;:
&lt;/p&gt;
&lt;p&gt;
8/8/2005 - 1.7, Changes by Christoph Wille
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
LookInfo getter logs when _lookinfo is null 
&lt;li&gt;
MailTextOnly &amp;amp; AppendDiffToMail properties added to .config file (text-only currently
does not send diffs anyways) 
&lt;li&gt;
UU case added to svnlook parser 
&lt;li&gt;
Change SvnLookOutputParser.SkipBlanks method to return bool if StringCollection hasMoreLines&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
5/14/2005 - 1.6, Changes by Ben Lowery, ben AT blowery DOT org
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&amp;lt;pre&amp;gt; blocks for code# 
&lt;li&gt;
Updates CSS for new HTML 
&lt;li&gt;
Logic for finding CSS updated 
&lt;li&gt;
More logging&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
And here is the usual binary &amp;amp; source code archive:
&lt;/p&gt;
&lt;a href="http://chrison.net/content/binary/SvnPostCommitHook1.7.zip"&gt;SvnPostCommitHook1.7.zip
(420.75 KB)&lt;/a&gt;&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=7aac206b-1f0e-44b4-9631-cb2cc04ddef7" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,7aac206b-1f0e-44b4-9631-cb2cc04ddef7.aspx</comments>
      <category>Subversion</category>
      <category>this</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=9a03c7a7-aac7-46dd-881c-bda83b5afbe2</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,9a03c7a7-aac7-46dd-881c-bda83b5afbe2.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,9a03c7a7-aac7-46dd-881c-bda83b5afbe2.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=9a03c7a7-aac7-46dd-881c-bda83b5afbe2</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">The Microsoft ASP.NET Developer Center
has the <a href="http://msdn.microsoft.com/asp.net/beta2/providers/default.aspx">Provider
Toolkit</a> online. It sports the Access Provider as a C# class library project for
download!<img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=9a03c7a7-aac7-46dd-881c-bda83b5afbe2" /></body>
      <title>Provider Toolkit</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,9a03c7a7-aac7-46dd-881c-bda83b5afbe2.aspx</guid>
      <link>http://chrison.net/ProviderToolkit.aspx</link>
      <pubDate>Tue, 02 Aug 2005 09:46:18 GMT</pubDate>
      <description>The Microsoft ASP.NET Developer Center has the &lt;a href="http://msdn.microsoft.com/asp.net/beta2/providers/default.aspx"&gt;Provider
Toolkit&lt;/a&gt; online. It sports the Access Provider as a C# class library project for
download!&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=9a03c7a7-aac7-46dd-881c-bda83b5afbe2" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,9a03c7a7-aac7-46dd-881c-bda83b5afbe2.aspx</comments>
      <category>2 Ohhhh</category>
      <category>ASP.NET</category>
      <category>Cool Download</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=522aa669-0f84-4111-83c9-9a1158ff4d43</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,522aa669-0f84-4111-83c9-9a1158ff4d43.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,522aa669-0f84-4111-83c9-9a1158ff4d43.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=522aa669-0f84-4111-83c9-9a1158ff4d43</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I spent this weekend in Bad Ischl together with other members of the <a href="http://www.icsharpcode.net/opensource/sd/">#develop</a> open
source project. This was the first get-together under the "#develop developer days"
umbrella, and most of the core team was able to attend the two-and-a-half day event. 
</p>
        <p>
Our focus was to talk about #develop 2.0 "Corsavy", feature-set wise as well as hashing
out architectural issues not addressed yet. Aside from that, coding was the #1 priority:
to tackle a couple of outstanding issues, such as Forms Designer or Refactoring
support. Spending time in one room makes communication so much easier when you
have to solve tricky issues that span multiple modules in our infrastructure. It definitely
paid off to spend this weekend together.
</p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=522aa669-0f84-4111-83c9-9a1158ff4d43" />
      </body>
      <title>#d^3 coming to a close</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,522aa669-0f84-4111-83c9-9a1158ff4d43.aspx</guid>
      <link>http://chrison.net/d3ComingToAClose.aspx</link>
      <pubDate>Sun, 31 Jul 2005 14:45:03 GMT</pubDate>
      <description>&lt;p&gt;
I spent this weekend in Bad Ischl together with other members of the &lt;a href="http://www.icsharpcode.net/opensource/sd/"&gt;#develop&lt;/a&gt; open
source project. This was the first get-together under the "#develop developer days"
umbrella, and most of the core team was able to attend the two-and-a-half day event. 
&lt;/p&gt;
&lt;p&gt;
Our focus was to talk about #develop 2.0 "Corsavy", feature-set wise as well as hashing
out architectural issues not addressed yet. Aside from that, coding was the #1 priority:
to tackle a couple of outstanding issues, such as Forms Designer or&amp;nbsp;Refactoring
support. Spending time in one room makes communication so&amp;nbsp;much easier when you
have to solve tricky issues that span multiple modules in our infrastructure. It definitely
paid off to spend this weekend together.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=522aa669-0f84-4111-83c9-9a1158ff4d43" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,522aa669-0f84-4111-83c9-9a1158ff4d43.aspx</comments>
      <category>.NET</category>
      <category>2 Ohhhh</category>
      <category>this</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=bb4278c6-fb2c-440b-8067-627e41cce9a8</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,bb4278c6-fb2c-440b-8067-627e41cce9a8.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,bb4278c6-fb2c-440b-8067-627e41cce9a8.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=bb4278c6-fb2c-440b-8067-627e41cce9a8</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
After quite some struggle, I got the <a href="http://www.mono-live.com/">mono::live</a> CD
to boot &amp; actually work in Virtual PC. The first step to sucess is to create a
new VPC image, and capture the ISO of mono::live for startup of your VPC image:
</p>
        <p>
          <img src="http://chrison.net/content/binary/selectingisoimage.png" border="0" />
        </p>
        <p>
This thing will now ask you a couple of questions, such as country, keyboard layout,
and screen resolution you would like to use:
</p>
        <p>
          <img src="http://chrison.net/content/binary/selectresolution.png" border="0" />
        </p>
        <p>
Now for the stumbling block - mono::live (or <a href="http://www.ubuntulinux.org/">Ubuntu</a>,
the underlying distribution, to be more precise) detects the graphics card emulated
by VPC, however, uses the 24BPP mode with the VPC-emulated card only supporting 16BPP.
Looks weird at first and had me stumped too. But I got help on <a href="http://www.gotmono.com/">GotMono.com</a> (actual <a href="http://www.gotmono.com/cgi-bin/yabb/YaBB.pl?board=news;action=display;num=1117078624;start=0">post</a>,
interesting snippet provided here for reference):
</p>
        <p>
          <em>As far as I am aware, the easiest way to handle this is to just allow the machine
to boot up all the way, and then when you can see the fuzzy background image (i.e.,
the stretched Mono logo) so that it looks like booting is complete, hit CTRL+ALT+F3
to bring up a command prompt.<br />
 <br />
Then type (or rather, cut and paste), this command, all on one line:<br />
 <br />
Code:<br />
sudo sed 's/DefaultDepth\t24/DefaultDepth\t16/g' /etc/X11/xorg.conf &gt; /tmp/xorg.conf
&amp;&amp; sudo cp /tmp/xorg.conf /etc/X11/xorg.conf &amp;&amp; sudo killall Xorg</em>
        </p>
        <p>
          <em>to restart the X server at a color depth Virtual PC can handle.</em>
        </p>
        <p>
Because pasting didn't work the way I wanted it to, I ended up typing this stuff using
US keyboard settings on a German keyboard (don't ask). Anyways: this did the trick!
Now I can start exploring <a href="http://www.mono-live.com/">mono::live</a> without
having to reboot my machine.
</p>
        <p>
          <img src="http://chrison.net/content/binary/monoliveactuallyrunning.png" border="0" />
        </p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=bb4278c6-fb2c-440b-8067-627e41cce9a8" />
      </body>
      <title>mono::live</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,bb4278c6-fb2c-440b-8067-627e41cce9a8.aspx</guid>
      <link>http://chrison.net/monolive.aspx</link>
      <pubDate>Wed, 01 Jun 2005 17:24:11 GMT</pubDate>
      <description>&lt;p&gt;
After quite some struggle, I got the &lt;a href="http://www.mono-live.com/"&gt;mono::live&lt;/a&gt; CD
to boot &amp;amp; actually work in Virtual PC. The first step to sucess is to create a
new VPC image, and capture the ISO of mono::live for startup of your VPC image:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://chrison.net/content/binary/selectingisoimage.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
This thing will now ask you a couple of questions, such as country, keyboard layout,
and screen resolution you would like to use:
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://chrison.net/content/binary/selectresolution.png" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
Now for the stumbling block - mono::live (or &lt;a href="http://www.ubuntulinux.org/"&gt;Ubuntu&lt;/a&gt;,
the underlying distribution, to be more precise) detects the graphics card emulated
by VPC, however, uses the 24BPP mode with the VPC-emulated card only supporting 16BPP.
Looks weird at first and had me stumped too. But I got help on &lt;a href="http://www.gotmono.com/"&gt;GotMono.com&lt;/a&gt;&amp;nbsp;(actual &lt;a href="http://www.gotmono.com/cgi-bin/yabb/YaBB.pl?board=news;action=display;num=1117078624;start=0"&gt;post&lt;/a&gt;,
interesting snippet provided here for reference):
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;As far as I am aware, the easiest way to handle this is to just allow the machine
to boot up all the way, and then when you can see the fuzzy background image (i.e.,
the stretched Mono logo) so that it looks like booting is complete, hit CTRL+ALT+F3
to bring up a command prompt.&lt;br&gt;
&amp;nbsp;&lt;br&gt;
Then type (or rather, cut and paste), this command, all on one line:&lt;br&gt;
&amp;nbsp;&lt;br&gt;
Code:&lt;br&gt;
sudo sed 's/DefaultDepth\t24/DefaultDepth\t16/g' /etc/X11/xorg.conf &amp;gt; /tmp/xorg.conf
&amp;amp;&amp;amp; sudo cp /tmp/xorg.conf /etc/X11/xorg.conf &amp;amp;&amp;amp; sudo killall Xorg&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;to restart the X server at a color depth Virtual PC can handle.&lt;/em&gt; 
&lt;/p&gt;
&lt;p&gt;
Because pasting didn't work the way I wanted it to, I ended up typing this stuff using
US keyboard settings on a German keyboard (don't ask). Anyways: this did the trick!
Now I can start exploring &lt;a href="http://www.mono-live.com/"&gt;mono::live&lt;/a&gt; without
having to reboot my machine.
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://chrison.net/content/binary/monoliveactuallyrunning.png" border=0&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=bb4278c6-fb2c-440b-8067-627e41cce9a8" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,bb4278c6-fb2c-440b-8067-627e41cce9a8.aspx</comments>
      <category>.NET</category>
      <category>Cool Download</category>
      <category>L-Word Stuff</category>
      <category>Use the source Luke</category>
      <category>Virtual PC</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=8cc24c28-ae54-4333-aa35-20ead4ed6e22</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,8cc24c28-ae54-4333-aa35-20ead4ed6e22.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,8cc24c28-ae54-4333-aa35-20ead4ed6e22.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=8cc24c28-ae54-4333-aa35-20ead4ed6e22</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Ben Lowery sent me changes for the SvnPostCommitHook application. From his email: <em>Here's
my version of the code.  I updated it to be able to use DotNetOpenMail,
as I sometimes have problems using CDO through System.Web.Mail. I also updated it
to support a pluggable mail formatter, with a text and an HTML formatter in the current
code.  At the moment, it's up to the mailer to decide how mail is sent,
but that could be easily pulled out into a config file at some point, as could
the format of the html or the css that I'm using.</em></p>
        <p>
Change log details:
</p>
        <ul>
          <li>
Added abstract base for mailing 
</li>
          <li>
Moved System.Web.Mail based mailer to CdoMailer 
</li>
          <li>
Added option to send mail with DotNetOpenMail 
</li>
          <li>
Added MessageFormatter hierarchy for message formatting 
</li>
          <li>
Added HtmlMessageFormatter for html change messages 
</li>
          <li>
Moved text message formatting into TextMessageFormatter 
</li>
          <li>
Added package batch script to rename exe to post-commit.exe 
</li>
          <li>
Added Library directory for references 
</li>
          <li>
Added log4net to the Library directory 
</li>
          <li>
Made SilentCmdLineApplication::Execute simpler 
</li>
          <li>
Moved parsing logic into SvnLookOutputParser</li>
        </ul>
        <p>
          <a href="http://chrison.net/content/binary/SvnPostCommitHookv1.4.zip">SvnPostCommitHookv1.4.zip
(417.83 KB)</a>
        </p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=8cc24c28-ae54-4333-aa35-20ead4ed6e22" />
      </body>
      <title>New version of SvnPostCommitHook</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,8cc24c28-ae54-4333-aa35-20ead4ed6e22.aspx</guid>
      <link>http://chrison.net/NewVersionOfSvnPostCommitHook.aspx</link>
      <pubDate>Mon, 02 May 2005 17:09:01 GMT</pubDate>
      <description>&lt;p&gt;
Ben Lowery sent me changes for the SvnPostCommitHook application. From his email: &lt;em&gt;Here's
my version of the code.&amp;nbsp; I updated it to be able to use&amp;nbsp;DotNetOpenMail,
as I sometimes have problems using CDO through System.Web.Mail. I also updated it
to support a pluggable mail formatter, with a text and an HTML formatter in the current
code.&amp;nbsp; At&amp;nbsp;the moment, it's up to the mailer to decide how mail is sent,
but that&amp;nbsp;could be easily pulled out into a config file at some point, as could
the format of the html or the css that I'm using.&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
Change log details:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Added abstract base for mailing 
&lt;li&gt;
Moved System.Web.Mail based mailer to CdoMailer 
&lt;li&gt;
Added option to send mail with DotNetOpenMail 
&lt;li&gt;
Added MessageFormatter hierarchy for message formatting 
&lt;li&gt;
Added HtmlMessageFormatter for html change messages 
&lt;li&gt;
Moved text message formatting into TextMessageFormatter 
&lt;li&gt;
Added package batch script to rename exe to post-commit.exe 
&lt;li&gt;
Added Library directory for references 
&lt;li&gt;
Added log4net to the Library directory 
&lt;li&gt;
Made SilentCmdLineApplication::Execute simpler 
&lt;li&gt;
Moved parsing logic into SvnLookOutputParser&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;a href="http://chrison.net/content/binary/SvnPostCommitHookv1.4.zip"&gt;SvnPostCommitHookv1.4.zip
(417.83 KB)&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=8cc24c28-ae54-4333-aa35-20ead4ed6e22" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,8cc24c28-ae54-4333-aa35-20ead4ed6e22.aspx</comments>
      <category>Subversion</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=06335cab-3497-49ce-af46-355f289f97db</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,06335cab-3497-49ce-af46-355f289f97db.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,06335cab-3497-49ce-af46-355f289f97db.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=06335cab-3497-49ce-af46-355f289f97db</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">You can now <a href="http://www.icsharpcode.net/OpenSource/SD/Download/">download</a> the
latest and greatest release of <a href="http://www.icsharpcode.net/OpenSource/SD/">#develop</a>.
It features NAnt integration, Help 2.0 support, great XML editing experience, PInvoke
import lookup, #report, Web References and more. Some of the cool stuff can be watched
as <a href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.FeatureVideos">feature
videos</a>.<img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=06335cab-3497-49ce-af46-355f289f97db" /></body>
      <title>#develop 1.1 Beta</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,06335cab-3497-49ce-af46-355f289f97db.aspx</guid>
      <link>http://chrison.net/develop11Beta.aspx</link>
      <pubDate>Thu, 28 Apr 2005 17:45:29 GMT</pubDate>
      <description>You can now &lt;a href="http://www.icsharpcode.net/OpenSource/SD/Download/"&gt;download&lt;/a&gt; the
latest and greatest release of &lt;a href="http://www.icsharpcode.net/OpenSource/SD/"&gt;#develop&lt;/a&gt;.
It features NAnt integration, Help 2.0 support, great XML editing experience, PInvoke
import lookup, #report, Web References and more. Some of the cool stuff can be watched
as &lt;a href="http://wiki.sharpdevelop.net/default.aspx/SharpDevelop.FeatureVideos"&gt;feature
videos&lt;/a&gt;.&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=06335cab-3497-49ce-af46-355f289f97db" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,06335cab-3497-49ce-af46-355f289f97db.aspx</comments>
      <category>Cool Download</category>
      <category>this</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=19d14175-e9e8-48f7-8da6-9c9c08c89345</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,19d14175-e9e8-48f7-8da6-9c9c08c89345.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,19d14175-e9e8-48f7-8da6-9c9c08c89345.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=19d14175-e9e8-48f7-8da6-9c9c08c89345</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Saw this over at <a href="http://www.osnews.com/">OSNews.com</a>: <em>OpenMFG, the
makers of open source ERP software, have released <a href="http://www.openrpt.com/">OpenRPT</a>,
a report writer for ad-hoc Web-based reporting. It creates graphical, embeddable reports,
similar to the commercial software Crystal Reports or Microsoft Access report designer,
but runs on on Linux, Mac OS X, and Windows. It supports graphs, integrated barcodes,
label printing, and watermarks and report definitions can be stored in a PostgreSQL
database as XML, or exported to individual files.</em></p>
        <p>
Looks worth checking out.
</p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=19d14175-e9e8-48f7-8da6-9c9c08c89345" />
      </body>
      <title>OpenRPT</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,19d14175-e9e8-48f7-8da6-9c9c08c89345.aspx</guid>
      <link>http://chrison.net/OpenRPT.aspx</link>
      <pubDate>Wed, 27 Apr 2005 06:19:48 GMT</pubDate>
      <description>&lt;p&gt;
Saw this over at &lt;a href="http://www.osnews.com/"&gt;OSNews.com&lt;/a&gt;: &lt;em&gt;OpenMFG, the
makers of open source ERP software, have released &lt;a href="http://www.openrpt.com/"&gt;OpenRPT&lt;/a&gt;,
a report writer for ad-hoc Web-based reporting. It creates graphical, embeddable reports,
similar to the commercial software Crystal Reports or Microsoft Access report designer,
but runs on on Linux, Mac OS X, and Windows. It supports graphs, integrated barcodes,
label printing, and watermarks and report definitions can be stored in a PostgreSQL
database as XML, or exported to individual files.&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
Looks worth checking out.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=19d14175-e9e8-48f7-8da6-9c9c08c89345" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,19d14175-e9e8-48f7-8da6-9c9c08c89345.aspx</comments>
      <category>Cool Download</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=5c15fd14-5ff1-4995-92df-913ab124df8b</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,5c15fd14-5ff1-4995-92df-913ab124df8b.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,5c15fd14-5ff1-4995-92df-913ab124df8b.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=5c15fd14-5ff1-4995-92df-913ab124df8b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">From the "shameless self-promotion departement":
we just pushed 1.1PR out the door. You can read the detailed announcement <a href="http://www.glengamoi.com/pipermail/icsharpcode.announce-sharpdevelop/2005/000019.html">here</a>.
It has a bunch of cool new features, now we enter the stablization and polishing phase.
Shouldn't take too long to follow it up with a Beta. <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=5c15fd14-5ff1-4995-92df-913ab124df8b" /></body>
      <title>#develop 1.1 Preview Release</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,5c15fd14-5ff1-4995-92df-913ab124df8b.aspx</guid>
      <link>http://chrison.net/develop11PreviewRelease.aspx</link>
      <pubDate>Wed, 13 Apr 2005 22:03:16 GMT</pubDate>
      <description>From the "shameless self-promotion departement": we just pushed 1.1PR out the door. You can read the detailed announcement &lt;a href="http://www.glengamoi.com/pipermail/icsharpcode.announce-sharpdevelop/2005/000019.html"&gt;here&lt;/a&gt;.
It has a bunch of cool new features, now we enter the stablization and polishing phase.
Shouldn't take too long to follow it up with a Beta. &lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=5c15fd14-5ff1-4995-92df-913ab124df8b" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,5c15fd14-5ff1-4995-92df-913ab124df8b.aspx</comments>
      <category>Cool Download</category>
      <category>this</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=ad86e2de-73c9-41dc-8be0-d448130b2f06</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,ad86e2de-73c9-41dc-8be0-d448130b2f06.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,ad86e2de-73c9-41dc-8be0-d448130b2f06.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=ad86e2de-73c9-41dc-8be0-d448130b2f06</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The post commit hook for Subversion now has reached a stage where I consider it feature
complete. Newly added for this release:
</p>
        <ul>
          <li>
            <a href="http://logging.apache.org/log4net/">log4net</a> for logging important information
(ie exceptions) necessary for debugging a hook that is supposed to run automatically.
Note that it uses v1.2.9 of log4net, which is a Beta release. The log file name is
post-commit.log (you can change this in post-commit.exe.config) 
</li>
          <li>
Nicely formatted commit mail. The change log line items are parsed, the A, U &amp;
D information is used to build Added, Modified &amp; Deleted sections in the message.</li>
        </ul>
        <p>
Here is an example of the message format (from the <a href="http://www.glengamoi.com/mailman/listinfo/icsharpcode.sharpdevelop-svn-commit">#develop
commit mailing list</a>):
</p>
        <pre>Author: mattward<br />
Date: 2005-04-10 20:06:25 +0200 (So, 10 Apr 2005)<br />
New Revision: 1840<br />
Log Message:<br />
Added basic .manifest schema.  Schema annotation displayed alongside 
<br />
auto-completion list. Mixed namespaces and simple content types 
<br />
now supported.  Added attribute value auto-completion.<br /><br />
Added:<br />
trunk/SharpDevelop/data/schemas/manifest.xsd<br />
....<br />
trunk/SharpDevelop/src/AddIns/.../SimpleContentWithAttributeTestFixture.cs</pre>
        <pre>Modified:<br />
trunk/SharpDevelop/data/resources/StringResources.dk.resources<br />
...<br />
trunk/SharpDevelopResources/LanguageResources/LocalizeDb.mdb</pre>
        <pre>Deleted:<br />
trunk/SharpDevelop/src/AddIns/.../ActiveElementPathTestFixture.cs</pre>
        <pre>
          <br />
 -- SvnPostCommitHook 1.2.0.50410 -- </pre>
        <p>
          <strong>Installation</strong> Take all three files from \Hook and place them in your
repository's hooks directory. Open post-commit.exe.config and modify the entries in
the appSettings section to match your installation and needs.
</p>
        <p>
          <strong>Test it</strong> Run post-commit.exe once interactively from the command line
to see if your installation is ok. Potential errors are only logged to post-commit.log,
not to the Console. So be sure to check it!
</p>
        <p>
Finally, the download: 
</p>
        <a href="http://chrison.net/content/binary/SvnPostCommitHook1.3.0.50411.zip">SvnPostCommitHook1.3.0.50411.zip
(105.82 KB)</a>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=ad86e2de-73c9-41dc-8be0-d448130b2f06" />
      </body>
      <title>Subversion Post Commit Hook v1.3</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,ad86e2de-73c9-41dc-8be0-d448130b2f06.aspx</guid>
      <link>http://chrison.net/SubversionPostCommitHookV13.aspx</link>
      <pubDate>Mon, 11 Apr 2005 10:06:49 GMT</pubDate>
      <description>&lt;p&gt;
The post commit hook for Subversion now has reached a stage where I consider it feature
complete. Newly added for this release:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://logging.apache.org/log4net/"&gt;log4net&lt;/a&gt; for logging important information
(ie exceptions)&amp;nbsp;necessary for debugging a hook that is supposed to run automatically.
Note that it uses v1.2.9 of log4net, which is a Beta release. The log file name is
post-commit.log (you can change this in post-commit.exe.config) 
&lt;li&gt;
Nicely formatted commit mail. The change log line items are parsed, the A, U &amp;amp;
D information is used to build Added, Modified &amp;amp; Deleted sections in the message.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Here is an example of the message format (from the &lt;a href="http://www.glengamoi.com/mailman/listinfo/icsharpcode.sharpdevelop-svn-commit"&gt;#develop
commit mailing list&lt;/a&gt;):
&lt;/p&gt;
&lt;pre&gt;Author: mattward&lt;br&gt;
Date: 2005-04-10 20:06:25 +0200 (So, 10 Apr 2005)&lt;br&gt;
New Revision: 1840&lt;br&gt;
Log Message:&lt;br&gt;
Added basic .manifest schema.&amp;nbsp; Schema annotation displayed alongside 
&lt;br&gt;
auto-completion list. Mixed namespaces and simple content types 
&lt;br&gt;
now supported.&amp;nbsp; Added attribute value auto-completion.&lt;br&gt;
&lt;br&gt;
Added:&lt;br&gt;
trunk/SharpDevelop/data/schemas/manifest.xsd&lt;br&gt;
....&lt;br&gt;
trunk/SharpDevelop/src/AddIns/.../SimpleContentWithAttributeTestFixture.cs&lt;/pre&gt;&lt;pre&gt;Modified:&lt;br&gt;
trunk/SharpDevelop/data/resources/StringResources.dk.resources&lt;br&gt;
...&lt;br&gt;
trunk/SharpDevelopResources/LanguageResources/LocalizeDb.mdb&lt;/pre&gt;&lt;pre&gt;Deleted:&lt;br&gt;
trunk/SharpDevelop/src/AddIns/.../ActiveElementPathTestFixture.cs&lt;/pre&gt;&lt;pre&gt;
&lt;br&gt;
&amp;nbsp;-- SvnPostCommitHook 1.2.0.50410 -- &lt;/pre&gt;
&lt;p&gt;
&lt;strong&gt;Installation&lt;/strong&gt; Take all three files from \Hook and place them in your
repository's hooks directory. Open post-commit.exe.config and modify the entries in
the appSettings section to match your installation and needs.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Test it&lt;/strong&gt; Run post-commit.exe once interactively from the command line
to see if your installation is ok. Potential errors are only logged to post-commit.log,
not to the Console. So be sure to check it!
&lt;/p&gt;
&lt;p&gt;
Finally, the download: 
&lt;/p&gt;
&lt;a href="http://chrison.net/content/binary/SvnPostCommitHook1.3.0.50411.zip"&gt;SvnPostCommitHook1.3.0.50411.zip
(105.82 KB)&lt;/a&gt;&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=ad86e2de-73c9-41dc-8be0-d448130b2f06" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,ad86e2de-73c9-41dc-8be0-d448130b2f06.aspx</comments>
      <category>.NET</category>
      <category>Subversion</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=cf05942f-9674-42fa-bed8-c38c0f2154c5</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,cf05942f-9674-42fa-bed8-c38c0f2154c5.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,cf05942f-9674-42fa-bed8-c38c0f2154c5.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=cf05942f-9674-42fa-bed8-c38c0f2154c5</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I updated the post commit hook application, however, installation advice from the
original blog entry <a href="http://chrison.net/PostCommitHookForSubversionTheNETWay.aspx">Post
Commit Hook for Subversion, the .NET way</a> still applies. What's new? The revision
info is parsed and more nicely presented in the commit mail message. Because of info
parsing, one call to svnlook could be saved.
</p>
        <p>
          <a href="http://chrison.net/content/binary/SvnPostCommitHook1.1.0.50410.zip">SvnPostCommitHook1.1.0.50410.zip
(14.08 KB)</a>
        </p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=cf05942f-9674-42fa-bed8-c38c0f2154c5" />
      </body>
      <title>Update for the Post Commit Hook</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,cf05942f-9674-42fa-bed8-c38c0f2154c5.aspx</guid>
      <link>http://chrison.net/UpdateForThePostCommitHook.aspx</link>
      <pubDate>Sun, 10 Apr 2005 09:13:31 GMT</pubDate>
      <description>&lt;p&gt;
I updated the post commit hook application, however, installation advice from the
original blog entry &lt;a href="http://chrison.net/PostCommitHookForSubversionTheNETWay.aspx"&gt;Post
Commit Hook for Subversion, the .NET way&lt;/a&gt; still applies. What's new? The revision
info is parsed and more nicely presented in the commit mail message. Because of info
parsing, one call to svnlook could be saved.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://chrison.net/content/binary/SvnPostCommitHook1.1.0.50410.zip"&gt;SvnPostCommitHook1.1.0.50410.zip
(14.08 KB)&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=cf05942f-9674-42fa-bed8-c38c0f2154c5" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,cf05942f-9674-42fa-bed8-c38c0f2154c5.aspx</comments>
      <category>.NET</category>
      <category>Subversion</category>
      <category>Use the source Luke</category>
    </item>
    <item>
      <trackback:ping>http://chrison.net/Trackback.aspx?guid=aaa1a2c7-0b3b-4b96-8c7b-f9ddd8cf7e19</trackback:ping>
      <pingback:server>http://chrison.net/pingback.aspx</pingback:server>
      <pingback:target>http://chrison.net/PermaLink,guid,aaa1a2c7-0b3b-4b96-8c7b-f9ddd8cf7e19.aspx</pingback:target>
      <dc:creator>Christoph Wille</dc:creator>
      <wfw:comment>http://chrison.net/CommentView,guid,aaa1a2c7-0b3b-4b96-8c7b-f9ddd8cf7e19.aspx</wfw:comment>
      <wfw:commentRss>http://chrison.net/SyndicationService.asmx/GetEntryCommentsRss?guid=aaa1a2c7-0b3b-4b96-8c7b-f9ddd8cf7e19</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
In the entry <a href="http://chrison.net/SubversionOnWindowsAsAServicePlusCommitHookAndBackupScript.aspx">Subversion
on Windows as a Service, plus Commit Hook and Backup Script</a> I showed a batch file
for hooking into the post commit event of a repository. This batch file annoyed me
from the very beginning. During the Indigo Community Day on Thursday in Munich I decided
that it was about time to get rid of it, and after yesterday's party, I thought it
might be a nice pinky exercise to do the basic port to C# today.
</p>
        <p>
And yes, it is very basic at the moment. All you need to do is take post-commit.exe
and post-commit.exe.config from the \SvnPostCommitHook\Hook directory in the downloadable
zip file and drop those two into the hooks directory of your repository. The
.config file is your ticket to customization:
</p>
        <pre>&lt;?xml version="1.0" encoding="utf-8" ?&gt;<br />
&lt;configuration&gt;<br />
 &lt;appSettings&gt;<br />
  &lt;add key="SvnLookPath" value="C:\Program Files\Subversion\bin\svnlook"
/&gt;<br />
  &lt;add key="MailTo" value="<a href="mailto:commitlist@yourdomain.com">commitlist@yourdomain.com</a>"
/&gt;<br />
  &lt;add key="MailFrom" value="<a href="mailto:commithook@yourdomain.com">commithook@yourdomain.com</a>"
/&gt;<br />
  &lt;add key="MailSubject" value="Your project name rev {0}, {1}" /&gt;<br />
  &lt;add key="MailServer" value="localhost" /&gt;<br />
 &lt;/appSettings&gt;<br />
&lt;/configuration&gt;</pre>
        <p>
Just as the batch file, post-commit.exe's task is to read the change log and commit
message, and post it to a mailing list that distributes the information to the project
stakeholders. Therefore, you need to configure the four Mail* settings to match your
configuration and preferences. The SvnLookPath needs to point to your Subversion installation,
however, most installations should be fine with this default.
</p>
        <p>
How can you test the operation of post-commit.exe? This is the syntax:
</p>
        <pre>post-commit &lt;repository&gt; &lt;revision&gt;</pre>
        <p>
For example:
</p>
        <pre>post-commit e:\subversion\fidalgo 1830</pre>
        <p>
In the current version, testing is highly recommended as no logging or exception handling
is implemented.
</p>
        <p>
          <a href="http://chrison.net/content/binary/SvnPostCommitHook1.0.0.50409.zip">SvnPostCommitHook1.0.0.50409.zip
(12.07 KB)</a>
        </p>
        <p>
The source code is BSD-licensed. Future plans are to fully parse the svnlook output,
as well as add a logging infrastructure to easily find configuration problems during
normal operations of your Subversion server.
</p>
        <img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=aaa1a2c7-0b3b-4b96-8c7b-f9ddd8cf7e19" />
      </body>
      <title>Post Commit Hook for Subversion, the .NET way</title>
      <guid isPermaLink="false">http://chrison.net/PermaLink,guid,aaa1a2c7-0b3b-4b96-8c7b-f9ddd8cf7e19.aspx</guid>
      <link>http://chrison.net/PostCommitHookForSubversionTheNETWay.aspx</link>
      <pubDate>Sat, 09 Apr 2005 17:34:45 GMT</pubDate>
      <description>&lt;p&gt;
In the entry &lt;a href="http://chrison.net/SubversionOnWindowsAsAServicePlusCommitHookAndBackupScript.aspx"&gt;Subversion
on Windows as a Service, plus Commit Hook and Backup Script&lt;/a&gt; I showed a batch file
for hooking into the post commit event of a repository. This batch file annoyed me
from the very beginning. During the Indigo Community Day on Thursday in Munich I decided
that it was about time to get rid of it, and after yesterday's party, I thought it
might be&amp;nbsp;a nice pinky exercise to do the basic port to C# today.
&lt;/p&gt;
&lt;p&gt;
And yes, it is very basic at the moment. All you need to do is take post-commit.exe
and post-commit.exe.config from the \SvnPostCommitHook\Hook directory in the downloadable
zip file and drop those two&amp;nbsp;into the hooks directory of your repository. The
.config file is your ticket to customization:
&lt;/p&gt;
&lt;pre&gt;&amp;lt;?xml version="1.0" encoding="utf-8" ?&amp;gt;&lt;br&gt;
&amp;lt;configuration&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;lt;appSettings&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;lt;add key="SvnLookPath" value="C:\Program Files\Subversion\bin\svnlook"
/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;lt;add key="MailTo" value="&lt;a href="mailto:commitlist@yourdomain.com"&gt;commitlist@yourdomain.com&lt;/a&gt;"
/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;lt;add key="MailFrom" value="&lt;a href="mailto:commithook@yourdomain.com"&gt;commithook@yourdomain.com&lt;/a&gt;"
/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;lt;add key="MailSubject" value="Your project name rev {0}, {1}" /&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;lt;add key="MailServer" value="localhost" /&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;lt;/appSettings&amp;gt;&lt;br&gt;
&amp;lt;/configuration&amp;gt;&lt;/pre&gt;
&lt;p&gt;
Just as the batch file, post-commit.exe's task is to read the change log and commit
message, and post it to a mailing list that distributes the information to the project
stakeholders. Therefore, you need to configure the four Mail* settings to match your
configuration and preferences. The SvnLookPath needs to point to your Subversion installation,
however, most installations should be fine with this default.
&lt;/p&gt;
&lt;p&gt;
How can you test the operation of post-commit.exe? This is the syntax:
&lt;/p&gt;
&lt;pre&gt;post-commit &amp;lt;repository&amp;gt; &amp;lt;revision&amp;gt;&lt;/pre&gt;
&lt;p&gt;
For example:
&lt;/p&gt;
&lt;pre&gt;post-commit e:\subversion\fidalgo 1830&lt;/pre&gt;
&lt;p&gt;
In the current version, testing is highly recommended as no logging or exception handling
is implemented.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://chrison.net/content/binary/SvnPostCommitHook1.0.0.50409.zip"&gt;SvnPostCommitHook1.0.0.50409.zip
(12.07 KB)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
The source code is BSD-licensed. Future plans are to fully parse the svnlook output,
as well as add a logging infrastructure to easily find configuration problems during
normal operations of your Subversion server.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://chrison.net/aggbug.ashx?id=aaa1a2c7-0b3b-4b96-8c7b-f9ddd8cf7e19" /&gt;</description>
      <comments>http://chrison.net/CommentView,guid,aaa1a2c7-0b3b-4b96-8c7b-f9ddd8cf7e19.aspx</comments>
      <category>.NET</category>
      <category>Administration</category>
      <category>Use the source Luke</category>
      <category>Subversion</category>
    </item>
  </channel>
</rss>