<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>GeekTieGuy &#187; Software development</title>
	<atom:link href="http://www.geektieguy.com/category/software-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.geektieguy.com</link>
	<description>News and views from the geek tie guy.</description>
	<pubDate>Sat, 03 May 2008 23:07:35 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Going to SD West 2008 - a planning worksheet</title>
		<link>http://www.geektieguy.com/2008/03/01/going-to-sd-west-2008-a-planning-worksheet/</link>
		<comments>http://www.geektieguy.com/2008/03/01/going-to-sd-west-2008-a-planning-worksheet/#comments</comments>
		<pubDate>Sat, 01 Mar 2008 21:37:54 +0000</pubDate>
		<dc:creator>GeekTieGuy</dc:creator>
		
		<category><![CDATA[Personal]]></category>

		<category><![CDATA[Software development]]></category>

		<guid isPermaLink="false">http://www.geektieguy.com/2008/03/01/going-to-sd-west-2008-a-planning-worksheet/</guid>
		<description><![CDATA[I have the good fortune to be able to attend SD West this year. I&#8217;ve heard people at work rave about this conference right in my backyard, and was lucky to get approval to go this year.
Unfortunately I&#8217;ve been so swamped with work (really exciting new stuff, too) that I haven&#8217;t been able to prepare at [...]]]></description>
			<content:encoded><![CDATA[<p>I have the good fortune to be able to attend SD West this year. I&#8217;ve heard people at work rave about this conference right in my backyard, and was lucky to get approval to go this year.</p>
<p>Unfortunately I&#8217;ve been so swamped with work (really exciting new stuff, too) that I haven&#8217;t been able to prepare at all. In other words I still have no idea about what sessions to go to. Argh. To add to that frustration, the SD West website doesn&#8217;t make it really easy to plan your days for maximum efficiency. Double Argh.</p>
<p>Here&#8217;s how I like to plan my attendance: I have an idea at a high level about what kind of sessions I&#8217;d like to focus on (in my case .NET and People, Process &amp; Methods mostly). So I need to be able to filter all sessions by those high-level criteria. Next, I need to figure out which sessions in those high level tracks are available at what time and how they may conflict relative to how interesting they sound to me.</p>
<p>The information provided on the SD West website provides some ability to filter and search for sessions, but it doesn&#8217;t help you with detailed planning.</p>
<p>So I decided to spend a little time pulling down all sessions as an Excel sheet (which the site allows, thank goodness), and started to shape and mold the sheet to my needs. The result is available for you to use as well, in case you&#8217;re as late as I am: <a href="http://www.geektieguy.com/wp-content/uploads/2008/03/sdwest08_all.xlsx" title="sdwest08_all.xlsx">sdwest08_all.xlsx</a> (update: rename this file to have an .xlsx suffix after downloading, WordPress changed the extension on me).<br />
(I think I have all sessions in there, but I noticed that one session seemed to not be fully downloaded (a session with quotes in the description), so I added it back by hand. Maybe there are others missing too, but I think that was the only one.)</p>
<p>You&#8217;ll see all sessions sorted by time, color coded by time slot/event type (keynotes, birds-of-a-feather), color coded by track, and with filters on each column. I also added a priority column at the beginning to perhaps help making decisions if you change your mind while at the event.</p>
<p>And, yes, I will most likely be wearing my Geek Tie at the event (it has a Red Verbatim Store&#8217;n'Go USB memory stick and a gray CaseLogic case at the end).</p>
<p class="akst_link"><a href="http://www.geektieguy.com/?p=187&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_187" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.geektieguy.com/2008/03/01/going-to-sd-west-2008-a-planning-worksheet/feed/</wfw:commentRss>
		</item>
		<item>
		<title>WPF ControlTemplate Trigger tip</title>
		<link>http://www.geektieguy.com/2008/01/05/wpf-controltemplate-trigger-tip/</link>
		<comments>http://www.geektieguy.com/2008/01/05/wpf-controltemplate-trigger-tip/#comments</comments>
		<pubDate>Sat, 05 Jan 2008 09:11:10 +0000</pubDate>
		<dc:creator>GeekTieGuy</dc:creator>
		
		<category><![CDATA[Software development]]></category>

		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://www.geektieguy.com/2008/01/05/wpf-controltemplate-trigger-tip/</guid>
		<description><![CDATA[I didn&#8217;t fully realize how ControlTemplate Triggers work (or don&#8217;t) until I solved a problem with a UserControl today, with the help of this post on the MSDN forums.
A Triggers&#8217; EnterActions or ExitActions don&#8217;t seem to get fired when a UserControl is constructed. If you want, say, an animation in your control to start on [...]]]></description>
			<content:encoded><![CDATA[<p>I didn&#8217;t fully realize how ControlTemplate Triggers work (or don&#8217;t) until I solved a problem with a UserControl today, with the help of <a href="http://207.46.236.188/MSDN/ShowPost.aspx?PostID=2115735&amp;SiteID=1">this post on the MSDN forums</a>.</p>
<p>A Triggers&#8217; EnterActions or ExitActions don&#8217;t seem to get fired when a UserControl is constructed. If you want, say, an animation in your control to start on a property change, you can put a BeginStoryboard element into a Trigger&#8217;s EnterActions and a reverse BeginStoryboard into the ExitActions.</p>
<p>But for the control to start out right at initialization you also need to have the right Setter element on the Trigger to set initial states (in addition to setting the opposite initial states on the elements to be animated/initialized.)</p>
<p>Here&#8217;s a tiny example:</p>
<p style="display: inline; float: none; margin: 0px; padding: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:58d52c37-3145-4c1b-863f-0f57715a3603" class="wlWriterSmartContent">
<pre style="overflow: auto; background-color: white; word-wrap: break-word"><!-- 

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/ 

--><span style="color: #008080"> 1</span> <span style="color: #0000ff">&lt;</span><span style="color: #800000">UserControl</span><span style="color: #0000ff">&gt;</span><span style="color: #000000"> </span><span style="color: #008000">&lt;!&#8211;</span><span style="color: #008000"> Namespaces omitted for brevity </span><span style="color: #008000">&#8211;&gt;</span><span style="color: #000000">
</span><span style="color: #008080"> 2</span> <span style="color: #000000">  </span><span style="color: #0000ff">&lt;</span><span style="color: #800000">Grid</span><span style="color: #0000ff">&gt;</span><span style="color: #000000">
</span><span style="color: #008080"> 3</span> <span style="color: #000000">    </span><span style="color: #0000ff">&lt;</span><span style="color: #800000">ToggleButton </span><span style="color: #ff0000">x:Name</span><span style="color: #0000ff">=&#8221;Toggle&#8221;</span><span style="color: #0000ff">&gt;</span><span style="color: #000000">
</span><span style="color: #008080"> 4</span> <span style="color: #000000">      </span><span style="color: #0000ff">&lt;</span><span style="color: #800000">ToggleButton.Template</span><span style="color: #0000ff">&gt;</span><span style="color: #000000">
</span><span style="color: #008080"> 5</span> <span style="color: #000000">        </span><span style="color: #0000ff">&lt;</span><span style="color: #800000">ControlTemplate </span><span style="color: #ff0000">TargetType</span><span style="color: #0000ff">=&#8221;</span><span style="color: #808000">{x:Type ToggleButton}</span><span style="color: #0000ff">&#8220;</span><span style="color: #0000ff">&gt;</span><span style="color: #000000">
</span><span style="color: #008080"> 6</span> <span style="color: #000000">          </span><span style="color: #0000ff">&lt;</span><span style="color: #800000">Grid</span><span style="color: #0000ff">&gt;</span><span style="color: #000000">
</span><span style="color: #008080"> 7</span> <span style="color: #000000">            </span><span style="color: #008000">&lt;!&#8211;</span><span style="color: #008000"> Initial opacity is 1 for the initially unchecked ToggleButton state. A trigger changes it to 0 for an initial checked state. </span><span style="color: #008000">&#8211;&gt;</span><span style="color: #000000">
</span><span style="color: #008080"> 8</span> <span style="color: #000000">            </span><span style="color: #0000ff">&lt;</span><span style="color: #800000">Grid </span><span style="color: #ff0000">x:Name</span><span style="color: #0000ff">=&#8221;HideMe&#8221;</span><span style="color: #ff0000"> Opacity</span><span style="color: #0000ff">=&#8221;1&#8243;</span><span style="color: #0000ff">&gt;</span><span style="color: #000000">
</span><span style="color: #008080"> 9</span> <span style="color: #000000">              </span><span style="color: #0000ff">&lt;</span><span style="color: #800000">TextBlock </span><span style="color: #ff0000">Text</span><span style="color: #0000ff">=&#8221;Hidden&#8221;</span><span style="color: #0000ff">/&gt;</span><span style="color: #000000">
</span><span style="color: #008080">10</span> <span style="color: #000000">            </span><span style="color: #0000ff">&lt;/</span><span style="color: #800000">Grid</span><span style="color: #0000ff">&gt;</span><span style="color: #000000">
</span><span style="color: #008080">11</span> <span style="color: #000000">            </span><span style="color: #008000">&lt;!&#8211;</span><span style="color: #008000"> Other parts of the control go here </span><span style="color: #008000">&#8211;&gt;</span><span style="color: #000000">
</span><span style="color: #008080">12</span> <span style="color: #000000">          </span><span style="color: #0000ff">&lt;/</span><span style="color: #800000">Grid</span><span style="color: #0000ff">&gt;</span><span style="color: #000000">
</span><span style="color: #008080">13</span> <span style="color: #000000">          </span><span style="color: #0000ff">&lt;</span><span style="color: #800000">ControlTemplate.Triggers</span><span style="color: #0000ff">&gt;</span><span style="color: #000000">
</span><span style="color: #008080">14</span> <span style="color: #000000">            </span><span style="color: #0000ff">&lt;</span><span style="color: #800000">Trigger </span><span style="color: #ff0000">Property</span><span style="color: #0000ff">=&#8221;ToggleButton.IsChecked&#8221;</span><span style="color: #ff0000"> Value</span><span style="color: #0000ff">=&#8221;True&#8221;</span><span style="color: #0000ff">&gt;</span><span style="color: #000000">
</span><span style="color: #008080">15</span> <span style="color: #000000">              </span><span style="color: #008000">&lt;!&#8211;</span><span style="color: #008000"> This setter hides the desired element when the ToggleButton&#8217;s initial state is checked </span><span style="color: #008000">&#8211;&gt;</span><span style="color: #000000">
</span><span style="color: #008080">16</span> <span style="color: #000000">              </span><span style="color: #0000ff">&lt;</span><span style="color: #800000">Setter </span><span style="color: #ff0000">TargetName</span><span style="color: #0000ff">=&#8221;HideMe&#8221;</span><span style="color: #ff0000"> Property</span><span style="color: #0000ff">=&#8221;Opacity&#8221;</span><span style="color: #ff0000"> Value</span><span style="color: #0000ff">=&#8221;0&#8243;</span><span style="color: #0000ff">/&gt;</span><span style="color: #000000">
</span><span style="color: #008080">17</span> <span style="color: #000000">              </span><span style="color: #0000ff">&lt;</span><span style="color: #800000">Trigger.EnterActions</span><span style="color: #0000ff">&gt;</span><span style="color: #000000">
</span><span style="color: #008080">18</span> <span style="color: #000000">                </span><span style="color: #0000ff">&lt;</span><span style="color: #800000">BeginStoryboard</span><span style="color: #0000ff">&gt;</span><span style="color: #000000">
</span><span style="color: #008080">19</span> <span style="color: #000000">                  </span><span style="color: #0000ff">&lt;</span><span style="color: #800000">Storyboard</span><span style="color: #0000ff">&gt;</span><span style="color: #000000">
</span><span style="color: #008080">20</span> <span style="color: #000000">                    </span><span style="color: #0000ff">&lt;</span><span style="color: #800000">DoubleAnimation </span><span style="color: #ff0000">BeginTime</span><span style="color: #0000ff">=&#8221;00:00:00&#8243;</span><span style="color: #ff0000"> Duration</span><span style="color: #0000ff">=&#8221;00:00:00.05&#8243;</span><span style="color: #ff0000"> Storyboard.TargetName</span><span style="color: #0000ff">=&#8221;HideMe&#8221;</span><span style="color: #ff0000"> Storyboard.TargetProperty</span><span style="color: #0000ff">=&#8221;(UIElement.Opacity)&#8221;</span><span style="color: #ff0000"> To</span><span style="color: #0000ff">=&#8221;0&#8243;</span><span style="color: #ff0000"> </span><span style="color: #0000ff">/&gt;</span><span style="color: #000000">
</span><span style="color: #008080">21</span> <span style="color: #000000">                  </span><span style="color: #0000ff">&lt;/</span><span style="color: #800000">Storyboard</span><span style="color: #0000ff">&gt;</span><span style="color: #000000">
</span><span style="color: #008080">22</span> <span style="color: #000000">                </span><span style="color: #0000ff">&lt;/</span><span style="color: #800000">BeginStoryboard</span><span style="color: #0000ff">&gt;</span><span style="color: #000000">
</span><span style="color: #008080">23</span> <span style="color: #000000">              </span><span style="color: #0000ff">&lt;/</span><span style="color: #800000">Trigger.EnterActions</span><span style="color: #0000ff">&gt;</span><span style="color: #000000">
</span><span style="color: #008080">24</span> <span style="color: #000000">              </span><span style="color: #008000">&lt;!&#8211;</span><span style="color: #008000"> ExitActions go here to make the Grid with the TextBlock visible again </span><span style="color: #008000">&#8211;&gt;</span><span style="color: #000000">
</span><span style="color: #008080">25</span> <span style="color: #000000">            </span><span style="color: #0000ff">&lt;/</span><span style="color: #800000">Trigger</span><span style="color: #0000ff">&gt;</span><span style="color: #000000">
</span><span style="color: #008080">26</span> <span style="color: #000000">          </span><span style="color: #0000ff">&lt;/</span><span style="color: #800000">ControlTemplate.Triggers</span><span style="color: #0000ff">&gt;</span><span style="color: #000000">
</span><span style="color: #008080">27</span> <span style="color: #000000">        </span><span style="color: #0000ff">&lt;/</span><span style="color: #800000">ControlTemplate</span><span style="color: #0000ff">&gt;</span><span style="color: #000000">
</span><span style="color: #008080">28</span> <span style="color: #000000">      </span><span style="color: #0000ff">&lt;/</span><span style="color: #800000">ToggleButton.Template</span><span style="color: #0000ff">&gt;</span><span style="color: #000000">
</span><span style="color: #008080">29</span> <span style="color: #000000">    </span><span style="color: #0000ff">&lt;/</span><span style="color: #800000">ToggleButton</span><span style="color: #0000ff">&gt;</span><span style="color: #000000">
</span><span style="color: #008080">30</span> <span style="color: #000000">  </span><span style="color: #0000ff">&lt;/</span><span style="color: #800000">Grid</span><span style="color: #0000ff">&gt;</span><span style="color: #000000">
</span><span style="color: #008080">31</span> <span style="color: #000000"></span><span style="color: #0000ff">&lt;/</span><span style="color: #800000">UserControl</span><span style="color: #0000ff">&gt;</span></pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></p>
<p>The ToggleButton contains a TextBlock in line 9 that I want hidden when the ToggleButton&#8217;s IsChecked state is True. The animation in line 18 takes care of doing that when the user interacts with the control, but when the control is initialized, I need the Setter in line 16 to hide the TextBlock initially if the ToggleButton is checked by default (through data binding, for example.)</p>
<p class="akst_link"><a href="http://www.geektieguy.com/?p=165&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_165" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.geektieguy.com/2008/01/05/wpf-controltemplate-trigger-tip/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The software free-conomy</title>
		<link>http://www.geektieguy.com/2007/12/19/the-software-free-conomy/</link>
		<comments>http://www.geektieguy.com/2007/12/19/the-software-free-conomy/#comments</comments>
		<pubDate>Thu, 20 Dec 2007 06:50:09 +0000</pubDate>
		<dc:creator>GeekTieGuy</dc:creator>
		
		<category><![CDATA[Opinion]]></category>

		<category><![CDATA[Software development]]></category>

		<guid isPermaLink="false">http://www.geektieguy.com/2007/12/19/the-software-free-conomy/</guid>
		<description><![CDATA[ After looking through the comments to Jeff Atwood&#8217;s recent post on software product keys, I noticed that quite a few went down the rabbit-hole of&#160; free versus paid software. People suggesting that if you don&#8217;t like paying for software, typing in license keys, managing them and other hassles, you can always go to using [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.geektieguy.com/wp-content/uploads/2007/12/img-1453.jpg"><img style="border-right: 0px; border-top: 0px; margin: 0px 25px 0px 0px; border-left: 0px; border-bottom: 0px" height="184" alt="Richard Stallman, the prophet of free software, St. IGNUcius" src="http://www.geektieguy.com/wp-content/uploads/2007/12/img-1453-thumb.jpg" width="244" align="left" border="0"/></a> After looking through the comments to Jeff Atwood&#8217;s recent post on <a href="http://www.codinghorror.com/blog/archives/001021.html" target="_blank">software product keys</a>, I noticed that quite a few went down the rabbit-hole of&nbsp; free versus paid software. People suggesting that if you don&#8217;t like paying for software, typing in license keys, managing them and other hassles, you can always go to using free software.</p>
<p>I can see where these people are coming from. I use plenty of free software myself: Windows Live Writer, Audacity, WinMerge, Process Explorer, PowerMenu, WiX, Notepad2, Firefox, Reflector, JAlbum, Gallery, Linux (contribs.org), Paint .NET, etc. etc. etc. Many of these are essential for productive work and I&#8217;m glad they let me accomplish things.</p>
<p>In October 2002 I attended a talk by Richard Stallman, where he was spreading the gospel of free software, which is often equated with open source software, or OSS. It wasn&#8217;t the first time I&#8217;d started thinking about the implications of OSS, but his comments sparked further puzzlement: Is it really possible for programmers to make a living on open source software? Seeing the comments on Jeff&#8217;s blog brought back that question.</p>
<p>It seems to me that a lot of the more successful open source projects out there had their origin in the world of what I want to call the free-conomy, or perhaps the carefree-conomy. It&#8217;s the world all around us consisting of people who do not have to worry about real-world problems connected to making a living: Students, living on their parents&#8217; money or borrowed money; programmers employed by large corporations (that have other means of generating income that enable them to pay the programmer to work on free software); professors in tenured positions at universities, contributing as part of their research. You get the idea.</p>
<p>I&#8217;d be curious to know how many of the commenters to Jeff&#8217;s post fall into that category. I&#8217;d also be curious to know how all the people who contribute to open source, or free software make a living, or how they sustain themselves. These are honestly things I&#8217;m curious about. If you&#8217;re one of them, please tell me.</p>
<p>I think once you transition from the free-conomy to the reality-based economy (&#8221;real life&#8221;?), your perspective changes. You start realizing that you need an income to pay the rent, clothe yourself and your family, buy food, utilities and transportation. You begin to see that if you don&#8217;t pay for the music you like to listen to, the programs you like to use, the books you like to read, the movies you like to watch and the games you like to play, the people who produce those things will not be able to support themselves, and thus there may come a time when you will no longer have that music, those programs, those books, those movies or the games.</p>
<p>So all the hassles that the producers of software or other digitizable content make you go through to access their creations begin to seem like a small inconvenience to pay for the privilege.</p>
<p>Of course, you can still debate what a fair price for such creations is, but that&#8217;s a topic for a different post. You can also debate the principles of &#8220;fair use&#8221; of the creations you may have paid for. That&#8217;s also a topic for another post.</p>
<p>What&#8217;s your perspective on the implications of open source software for people who make a living at software programming/development?</p>
<p class="akst_link"><a href="http://www.geektieguy.com/?p=153&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_153" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.geektieguy.com/2007/12/19/the-software-free-conomy/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Introducing CardSharkV</title>
		<link>http://www.geektieguy.com/2007/11/25/introducing-cardsharkv/</link>
		<comments>http://www.geektieguy.com/2007/11/25/introducing-cardsharkv/#comments</comments>
		<pubDate>Sun, 25 Nov 2007 08:06:56 +0000</pubDate>
		<dc:creator>GeekTieGuy</dc:creator>
		
		<category><![CDATA[Software]]></category>

		<category><![CDATA[Software development]]></category>

		<category><![CDATA[Vista]]></category>

		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://www.geektieguy.com/2007/11/25/introducing-cardsharkv/</guid>
		<description><![CDATA[Check out this program I&#8217;ve developed, called CardSharkV. It&#8217;s a digital picture storage card/camera &#8220;downloader&#8221; with a twist.
It&#8217;s a bit of an experiment, and I&#8217;m looking for some real-world &#8220;beta&#8221; testers. My plan is to try my hand at charging for the program. But to see if word will spread, I&#8217;m planning to give out [...]]]></description>
			<content:encoded><![CDATA[<p>Check out this program I&#8217;ve developed, called CardSharkV. It&#8217;s a digital picture storage card/camera &#8220;downloader&#8221; with a twist.</p>
<p>It&#8217;s a bit of an experiment, and I&#8217;m looking for some real-world &#8220;beta&#8221; testers. My plan is to try my hand at charging for the program. But to see if word will spread, I&#8217;m planning to give out 50 or so licenses without charge while I work out any kinks that might be in the program.</p>
<p>If you&#8217;re interested in trying it out, download the program, install and run it, and then click the &#8220;Request License&#8221; button.</p>
<p>Read more about it on the <a href="http://www.geektieguy.com/products/">CardSharkV page</a>.</p>
<p>Update (2007-11-25): CardSharkV depends on the .NET Framework 3.0. It&#8217;s thus meant to be installed on Vista systems only. If you have XP and the .NET Framework 3.0, it should still work. Also, since I posted the whole thing Saturday night after a whole day of re-shaping my first, never published version, I didn&#8217;t test the install too well. I&#8217;ve since had a little time to test and found some issues, especially with the license mechanism. I&#8217;ve posted version 1.0.2.0 to correct those issues and to improve the installer as well.</p>
<p class="akst_link"><a href="http://www.geektieguy.com/?p=139&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_139" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.geektieguy.com/2007/11/25/introducing-cardsharkv/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Microsoft deprecates support for XBAP WPF apps in version 5.3 of the Media Center SDK</title>
		<link>http://www.geektieguy.com/2007/11/19/microsoft-deprecates-support-for-xbap-wpf-apps-in-version-53-of-the-media-center-sdk/</link>
		<comments>http://www.geektieguy.com/2007/11/19/microsoft-deprecates-support-for-xbap-wpf-apps-in-version-53-of-the-media-center-sdk/#comments</comments>
		<pubDate>Tue, 20 Nov 2007 05:02:28 +0000</pubDate>
		<dc:creator>GeekTieGuy</dc:creator>
		
		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[Opinion]]></category>

		<category><![CDATA[Software development]]></category>

		<category><![CDATA[Vista]]></category>

		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://www.geektieguy.com/2007/11/19/microsoft-deprecates-support-for-xbap-wpf-apps-in-version-53-of-the-media-center-sdk/</guid>
		<description><![CDATA[I downloaded and installed the latest version of the Media Center SDK just now, and was a bit surprised to see that WPF apps are now officially deprecated as a supported way of extending Windows Media Center on Vista. There&#8217;s no big announcement around this so far, it&#8217;s almost just a footnote in the &#8220;What&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>I downloaded and installed the latest version of the Media Center SDK just now, and was a bit surprised to see that WPF apps are now officially deprecated as a supported way of extending Windows Media Center on Vista. There&#8217;s no big announcement around this so far, it&#8217;s almost just a footnote in the &#8220;What&#8217;s New&#8221; section:</p>
<blockquote><p><b>Deprecated features</b> </p>
<p>The following features have been deprecated:
<ul>
<li>Hosting for Microsoft .NET Framework 3.0 Extensible Application Markup Language (XAML) browser applications (XBAPs).  </li>
<li>The Triple-tap/Soft-keyboard ActiveX control for hosted HTML applications.  </li>
<li>Support for using alternative shells to run and host HTML applications.</li>
</ul>
</blockquote>
<p>The reason I&#8217;m surprised is that Microsoft announced the support for WPF based extensibility apps at PDC05 with some fanfare.</p>
<p>I guess interest among developers just hasn&#8217;t been there for WPF-based Media Center apps, and Microsoft needs to make judgment calls on where to invest in their extensibility platform. The rest of the deprecated features seem to have been made for the same reason: limited interest among developers for these features. In addition I think there might be issues of an architectural nature that just make the three things that got dropped too expensive to maintain or improve.</p>
<p>I&#8217;m sad about this development, mostly because I still don&#8217;t see a great set of development and design tools around for MCML. WPF seems to me to have a whole lot more momentum than MCML (WPF has the Expression suite of tools and has been billed as the &#8220;GDI for the next 20 years&#8221;), but who knows what may be coming for Windows 7, or even an earlier interim update for Media Center?</p>
<p class="akst_link"><a href="http://www.geektieguy.com/?p=137&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_137" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.geektieguy.com/2007/11/19/microsoft-deprecates-support-for-xbap-wpf-apps-in-version-53-of-the-media-center-sdk/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to parse &#34;special&#34; .lnk files, aka. MSI shortcuts aka. Windows Installer advertised shortcuts using C#</title>
		<link>http://www.geektieguy.com/2007/11/19/how-to-parse-special-lnk-files-aka-msi-shortcuts-aka-windows-installer-advertised-shortcuts-using-c/</link>
		<comments>http://www.geektieguy.com/2007/11/19/how-to-parse-special-lnk-files-aka-msi-shortcuts-aka-windows-installer-advertised-shortcuts-using-c/#comments</comments>
		<pubDate>Tue, 20 Nov 2007 04:21:39 +0000</pubDate>
		<dc:creator>GeekTieGuy</dc:creator>
		
		<category><![CDATA[Software development]]></category>

		<guid isPermaLink="false">http://www.geektieguy.com/2007/11/19/how-to-parse-special-lnk-files-aka-msi-shortcuts-aka-windows-installer-advertised-shortcuts-using-c/</guid>
		<description><![CDATA[This is a problem that&#8217;s been bugging me for about a year and I finally found time to dig in and work on how to solve it. A big thank you goes to Aaron Stebner for pointing me in the right direction. Thanks Aaron!
Anyway, for various reasons I&#8217;ve wanted to display a list of applications [...]]]></description>
			<content:encoded><![CDATA[<p>This is a problem that&#8217;s been bugging me for about a year and I finally found time to dig in and work on how to solve it. A big thank you goes to <a href="http://blogs.msdn.com/astebner">Aaron Stebner</a> for pointing me in the right direction. Thanks Aaron!</p>
<p>Anyway, for various reasons I&#8217;ve wanted to display a list of applications the user has installed on the computer. Getting at the All Programs folder in the Start Menu is not too big a problem. You can get parts of it via Environment.GetFolderPath(SpecialFolder.Programs) and other parts of it (for all users) via a bunch of P/Invoke incantations that I&#8217;m not going into here. Iterating through all subfolders and picking out the .lnk files is not a problem either.</p>
<p>What is a problem (at least it was for me) is what to do with those .lnk files that you can&#8217;t get parsed correctly via WshShell.CreateShortcutFile() after adding a reference to the Windows Script Host Object Model to your project. The .TargetPath will usually return something down in a C:\Windows\Installer\{GUID} directory.</p>
<p>I had noticed that the Windows Installer XML 3.0 project creates shortcuts like that, and since Aaron is involved in that project, I asked him about it. He graciously told me that those shortcuts are &#8220;advertised&#8221; shortcuts, a kind of Windows Installer shortcut that enables putting a link in the Start Menu (or elsewhere) while not necessarily installing the whole product that the link points to. So I started digging in with Google. A CodeProject article contained a comment about two functions that can be used in combination to find the real target of and advertised shortcut: MsiGetShortcutTarget() and MsiGetComponentPath(). After some more digging, I had P/Invoke declarations for both of these from this <a href="http://sourceforge.net/project/showfiles.php?group_id=40188&amp;package_id=110212">SourceForge</a> project.</p>
<p>I ended up with this bit of code, which I use first on any shortcut file I need to interpret; then if it returns null, I use the WshShell way instead.</p>
<pre style="overflow: auto; background-color: white"></pre>
<pre><!--   

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/   

--><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">static</span><span style="color: #000000"> </span><span style="color: #0000ff">string</span><span style="color: #000000"> ParseShortcut(</span><span style="color: #0000ff">string</span><span style="color: #000000"> file)
{
    StringBuilder product </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> StringBuilder(MaxGuidLength </span><span style="color: #000000">+</span><span style="color: #000000"> </span><span style="color: #800080">1</span><span style="color: #000000">);
    StringBuilder feature </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> StringBuilder(MaxFeatureLength </span><span style="color: #000000">+</span><span style="color: #000000"> </span><span style="color: #800080">1</span><span style="color: #000000">);
    StringBuilder component </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> StringBuilder(MaxGuidLength </span><span style="color: #000000">+</span><span style="color: #000000"> </span><span style="color: #800080">1</span><span style="color: #000000">);   

    MsiGetShortcutTarget(file, product, feature, component);   

    </span><span style="color: #0000ff">int</span><span style="color: #000000"> pathLength </span><span style="color: #000000">=</span><span style="color: #000000"> MaxPathLength;
    StringBuilder path </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> StringBuilder(pathLength);   

    InstallState installState </span><span style="color: #000000">=</span><span style="color: #000000"> MsiGetComponentPath(
          </span><span style="color: #000000">product.ToString(),
          component.ToString(),
          path,
          </span><span style="color: #0000ff">ref</span><span style="color: #000000"> pathLength);
    </span><span style="color: #0000ff">if</span><span style="color: #000000"> (installState </span><span style="color: #000000">==</span><span style="color: #000000"> InstallState.Local)
    {
        </span><span style="color: #0000ff">return</span><span style="color: #000000"> path.ToString();
    }
    </span><span style="color: #0000ff">else</span><span style="color: #000000">
    {
        </span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #0000ff">null</span><span style="color: #000000">;
    }
}</span></pre>
<pre> </pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></p>
<p>If you&#8217;re interested, you can <a href="http://www.geektieguy.com/wp-content/uploads/2007/11/msishortcutparser.zip" title="msishortcutparser.zip">download the class</a> with the rest of the needed declarations.</p>
<p class="akst_link"><a href="http://www.geektieguy.com/?p=135&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_135" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.geektieguy.com/2007/11/19/how-to-parse-special-lnk-files-aka-msi-shortcuts-aka-windows-installer-advertised-shortcuts-using-c/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Silicon Valley Code Camp impressions</title>
		<link>http://www.geektieguy.com/2007/10/29/silicon-valley-code-camp-impressions/</link>
		<comments>http://www.geektieguy.com/2007/10/29/silicon-valley-code-camp-impressions/#comments</comments>
		<pubDate>Tue, 30 Oct 2007 05:19:12 +0000</pubDate>
		<dc:creator>GeekTieGuy</dc:creator>
		
		<category><![CDATA[Software development]]></category>

		<guid isPermaLink="false">http://www.geektieguy.com/2007/10/29/silicon-valley-code-camp-impressions/</guid>
		<description><![CDATA[I&#8217;m just about recovered from two interesting days at Silicon Valley Code Camp. Overall I found the time I spent there well invested. It was fun seeing the diversity of software developers we have here, and the talks were of high quality overall.
Here&#8217;s part of the lunch line from the second day:

Of all the sessions [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m just about recovered from two interesting days at Silicon Valley Code Camp. Overall I found the time I spent there well invested. It was fun seeing the diversity of software developers we have here, and the talks were of high quality overall.</p>
<p>Here&#8217;s part of the lunch line from the second day:</p>
<p><a href="http://www.geektieguy.com/wp-content/uploads/2007/10/img-9714.jpg" atomicselection="true"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="180" alt="IMG_9714" src="http://www.geektieguy.com/wp-content/uploads/2007/10/img-9714-thumb.jpg" width="240" border="0"/></a></p>
<p>Of all the sessions I attended, I&#8217;d say the top four were the introductory <a href="http://www.siliconvalley-codecamp.com/Sessions.aspx?OnlyOne=true&amp;id=191" target="_blank">LINQ talk by Beth Massi</a>, the <a href="http://www.siliconvalley-codecamp.com/Sessions.aspx?OnlyOne=true&amp;id=186" target="_blank">Architecture talk by Kim Greenlee</a>, the <a href="http://www.siliconvalley-codecamp.com/Sessions.aspx?OnlyOne=true&amp;id=148" target="_blank">Project talk by Jeff Atwood</a> and the <a href="http://www.siliconvalley-codecamp.com/Sessions.aspx?OnlyOne=true&amp;id=160" target="_blank">UI Designer talk by Uday Gajendar</a>. This picture&nbsp;is from Ujay&#8217;s talk (a bit fuzzy, sorry):</p>
<p><a href="http://www.geektieguy.com/wp-content/uploads/2007/10/img-9715.jpg" atomicselection="true"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="180" alt="IMG_9715" src="http://www.geektieguy.com/wp-content/uploads/2007/10/img-9715-thumb.jpg" width="240" border="0"/></a></p>
<p>The talk on <a href="http://www.siliconvalley-codecamp.com/Sessions.aspx?OnlyOne=true&amp;id=193" target="_blank">what makes agile projects succeed by Chris Sims</a> was not a traditional presentation, but a highly interactive workshop, where Chris introduced us to the Nominal Group Technique; a way to brainstorm while making sure nobody gets to dominate the process. I think this was the session I enjoyed the most because it was so different and engaging. In that session&nbsp;we got a glimpse of the soon to be released XO laptop (one laptop per child), and later in the day, I got to grab a hold of it for a few minutes. It&#8217;s a very well made product. Check it out at <a href="http://www.laptop.org">www.laptop.org</a> (or <a href="http://www.xogiving.org">www.xogiving.org</a>, if you&#8217;re inclined to be charitable and help out a child in a developing country.)</p>
<p>I had quite a bit of fun trying out a new toy, too: a digital sound recorder. I used it to record a few of the sessions I attended. If the speakers permit it, the recordings&nbsp;might get placed on the <a href="http://codecamp.pbwiki.com/" target="_blank">Code Camp Wiki</a> over the course of the next few days.</p>
<p>To give you a bit of an impression of what it was like to be at Foothill College early on a Saturday morning (9 AM), here is a picture:</p>
<p><a href="http://www.geektieguy.com/wp-content/uploads/2007/10/img-9711.jpg" atomicselection="true"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="180" alt="IMG_9711" src="http://www.geektieguy.com/wp-content/uploads/2007/10/img-9711-thumb.jpg" width="240" border="0"/></a></p>
<p>I have a <a href="http://www.geektieguy.com/wp-content/uploads/2007/10/ds300014.WMA" target="_blank">sound recording</a> to go with it, too. The dog in the picture is Milo. How do I know? Listen to the recording.</p>
<p>I can recommend going to Code Camp next year, if you can make it. It&#8217;s worth it trying to step out of the typical programmer &#8220;introversion&#8221; and talk to people. It&#8217;s hard to overcome that&nbsp;initial shyness, but once you do, you&#8217;ll have a much better time. I&#8217;ll need to do more of that next time. Barring any serious scheduling problems, I&#8217;ll definitely be back next year.</p>
<p>Thanks to <a href="http://www.peterkellner.net/" target="_blank">Peter Kellner</a> and all the other people who supported the event. Also a big thank you to all the presenters, especially the ones I got to hear (<a href="http://www.technicalmanagementinstitute.com" target="_blank">Chris Sims</a>, <a href="http://krgreenlee.blogspot.com/" target="_blank">Kim Greenlee</a>, <a href="http://www.codinghorror.com" target="_blank">Jeff Atwood</a>, <a href="http://www.udanium.com" target="_blank">Uday Gajendar</a>, <a href="http://www.peterkellner.net/" target="_blank">Peter Kellner</a>, <a href="http://www.insteptech.com/" target="_blank">Deborah Kurata</a>, <a href="http://blogs.msdn.com/bethmassi/" target="_blank">Beth Massi</a>, <a href="http://cyberwebconsulting.com/" target="_blank">Wesley Chun</a> and <a href="http://blog.brandewinder.com/" target="_blank">Mathias Brandewinder</a>.)</p>
<p class="akst_link"><a href="http://www.geektieguy.com/?p=133&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_133" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.geektieguy.com/2007/10/29/silicon-valley-code-camp-impressions/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Windows Live Writer Beta 3 startup problems solved</title>
		<link>http://www.geektieguy.com/2007/09/11/windows-live-writer-beta-3-startup-problems-solved/</link>
		<comments>http://www.geektieguy.com/2007/09/11/windows-live-writer-beta-3-startup-problems-solved/#comments</comments>
		<pubDate>Tue, 11 Sep 2007 19:21:07 +0000</pubDate>
		<dc:creator>GeekTieGuy</dc:creator>
		
		<category><![CDATA[Software development]]></category>

		<guid isPermaLink="false">http://www.geektieguy.com/2007/09/11/windows-live-writer-beta-3-startup-problems-solved/</guid>
		<description><![CDATA[I like Windows Live Writer. Except for one thing: I couldn&#8217;t get it to start up on my machine at work. Beta 1 worked, but Beta 2 and Beta 3 just wouldn&#8217;t. I&#8217;d always get a UriException (not sure of the precise name anymore) thrown at some point after the splash screen. 
During Beta 2, [...]]]></description>
			<content:encoded><![CDATA[<p>I like <a href="http://get.live.com/betas/writer_betas" target="_blank">Windows Live Writer</a>. Except for one thing: I couldn&#8217;t get it to start up on my machine at work. Beta 1 worked, but Beta 2 and Beta 3 just wouldn&#8217;t. I&#8217;d always get a UriException (not sure of the precise name anymore) thrown at some point after the splash screen. </p>
<p>During Beta 2, I dutifully sent the crash reports to Microsoft, and even contacted their support email address once, hoping the problem would be addressed with Beta 3.</p>
<p>It wasn&#8217;t. Live Writer Beta 3 still crashed on me after the splash screen.</p>
<p>So I started digging into why it crashed. Luckily it&#8217;s a .NET app, so <a href="http://www.aisto.com/roeder/dotnet/" target="_blank">Reflector</a> came in handy. So did <a href="http://www.codeplex.com/deblector" target="_blank">Deblector</a>. I finally tracked it down to a registry key that contained a setting for a blog at work, where the HomePageUrl was a path of the form /some/path. I deleted the entire tree for that blog, and now Live Writer finally starts up properly.</p>
<p>The key I deleted was a subkey under this:</p>
<p>HKEY_CURRENT_USER\Software\Microsoft\Windows Live\Writer\Weblogs</p>
<p>I think Microsoft needs to fix this before shipping the final version.</p>
<p class="akst_link"><a href="http://www.geektieguy.com/?p=106&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_106" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.geektieguy.com/2007/09/11/windows-live-writer-beta-3-startup-problems-solved/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Troubleshooting ClickOnce deployment issues</title>
		<link>http://www.geektieguy.com/2007/08/25/troubleshooting-clickonce-deployment-issues/</link>
		<comments>http://www.geektieguy.com/2007/08/25/troubleshooting-clickonce-deployment-issues/#comments</comments>
		<pubDate>Sun, 26 Aug 2007 04:18:18 +0000</pubDate>
		<dc:creator>GeekTieGuy</dc:creator>
		
		<category><![CDATA[Software]]></category>

		<category><![CDATA[Software development]]></category>

		<guid isPermaLink="false">http://www.geektieguy.com/2007/08/25/troubleshooting-clickonce-deployment-issues/</guid>
		<description><![CDATA[Over the last few days I ran into several puzzling ClickOnce deployment problems. I want to document and share these so that I&#8217;ll remember them better, and so others might find help with similar issues.
The first issue: I uploaded&#160;new versions of my files several times, but every time I attempted to&#160;download the refreshed versions, no [...]]]></description>
			<content:encoded><![CDATA[<p>Over the last few days I ran into several puzzling ClickOnce deployment problems. I want to document and share these so that I&#8217;ll remember them better, and so others might find help with similar issues.</p>
<p><strong>The first issue:</strong> <br />I <em>uploaded&nbsp;new versions of my files</em> several times, but <em>every time I attempted to&nbsp;download</em> the refreshed versions, no matter which computer I tried it on, <em>all I got were old files</em>. Ctrl+F5 in IE didn&#8217;t make a difference. Clearing the Internet Explorer history, cookies, temporary files didn&#8217;t make a difference. I even contacted my web host to see if they have any caching issues on the server side. In the end I stumbled across my installation of <a href="http://www.fiddlertool.com/fiddler/" target="_blank">Fiddler</a>, the HTTP debugging proxy. I looked at the raw HTTP dumps, and then I saw the issue: I&#8217;m behind an active caching proxy on my home network. <em>The proxy was giving me old files</em> all the time.<br /><strong>First issue solution:</strong> <br />Clean out the cache files on my proxy server. It happens to be squid, so this did it: </p>
<p>service squid stop<br /> echo &#8220;&#8221; &gt; /var/spool/squid/swap.state<br /> service squid start</p>
<p><strong>The second issue:</strong> <br />During the troubleshooting of the first issue I had started suspecting the ClickOnce caching system to be at fault. So I used &#8220;mage -cc&#8221; and &#8220;rundll32 dfshim CleanOnlineAppCache&#8221; to clean out the cache. No change. Then I started manually deleting files from the cache location on the hard drive. Bad mistake. Now I got weird deployment errors, talking about COM objects not being available, and &#8220;interesting&#8221; HRESULT errors: The referenced assembly is not installed on your system. (Exception from HRESULT: 0&#215;800736B3). I uninstalled the .NET Framework 2.0 and 3.0 and reinstalled them. No change. Luckily I found an article on the <a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=551880&amp;SiteID=1" target="_blank">MSDN forums</a> that pointed me to a registry location to check out: HKCU\ Software\ Classes\ Software\ Microsoft\ Windows\ CurrentVersion\ Deployment. I checked it out and found a bunch of registry keys that I remembered seeing when I cleaned out the cache files before. So what would happen if I deleted all those keys? Maybe it would &#8220;reset&#8221; ClickOnce completely? Luckily it did.<br /><strong>Second issue solution:</strong> <br />Clean out both the ClickOnce cache files [C:\Documents and Settings\(User)\Local Settings\Apps\2.0] by hand (completely), and also clean out the registry keys under Components, Marks, PackageMetadata, StateManager\ Applications, StateManager\ Families and Visibility underneath HKEY_CURRENT_USER\ Software\ Classes\ Software\ Microsoft\ Windows\ CurrentVersion\ Deployment\ SideBySide\ 2.0</p>
<p><strong>Caution! Your Mileage May Vary. Deleting registry stuff is dangerous! Make a backup first.</strong></p>
<p class="akst_link"><a href="http://www.geektieguy.com/?p=104&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_104" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.geektieguy.com/2007/08/25/troubleshooting-clickonce-deployment-issues/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Getting Vista UAC elevation to work for web deployed ClickOnce applications</title>
		<link>http://www.geektieguy.com/2007/08/25/getting-vista-uac-elevation-to-work-for-web-deployed-clickonce-applications/</link>
		<comments>http://www.geektieguy.com/2007/08/25/getting-vista-uac-elevation-to-work-for-web-deployed-clickonce-applications/#comments</comments>
		<pubDate>Sat, 25 Aug 2007 07:06:35 +0000</pubDate>
		<dc:creator>GeekTieGuy</dc:creator>
		
		<category><![CDATA[Software development]]></category>

		<category><![CDATA[Vista]]></category>

		<guid isPermaLink="false">http://www.geektieguy.com/2007/08/25/getting-vista-uac-elevation-to-work-for-web-deployed-clickonce-applications/</guid>
		<description><![CDATA[Normally you can&#8217;t have ClickOnce applications that are deployed over the web run with Vista UAC elevation prompts. It&#8217;s not something Microsoft supports. Not sure why. I guess it&#8217;s once-bitten twice-shy, coming from the whole ActiveX mess. So I guess I do kind of understand why.
There is a workaround, if you really need UAC elevation, [...]]]></description>
			<content:encoded><![CDATA[<p>Normally you can&#8217;t have ClickOnce applications that are deployed over the web run with Vista UAC elevation prompts. It&#8217;s not something Microsoft supports. Not sure why. I guess it&#8217;s once-bitten twice-shy, coming from the whole ActiveX mess. So I guess I do kind of understand why.</p>
<p>There is a workaround, if you really need UAC elevation, which you shouldn&#8217;t. But at a high level, it works like this. You create your ClickOnce app like you would normally. To go with it, you create a helper app that you equip with an embedded&nbsp;elevation manifest. You then add a test to your ClickOnce app to see if it&#8217;s running elevated. If it isn&#8217;t you make it call the helper app. It will cause a UAC elevation prompt and in turn launch the ClickOnce app anew. Since the helper got elevated, the ClickOnce app now runs elevated too. Of course, by doing this you might end up with users not accepting the elevation request. But from what I&#8217;ve seen real users do with those elevation prompts, it won&#8217;t matter much. Anyway.</p>
<p>The trick is getting the helper app included in the regular ClickOnce app. There may be better ways, but here&#8217;s one I&#8217;ve spent quite some time on to work out. Maybe it will help someone out there save time, like I&#8217;ve saved time by reading posts on elevation checks&nbsp;using managed code. So here are the steps I&#8217;ve followed to make this work:</p>
<ol>
<li>Modify your ClickOnce app&#8217;s entry point to include elevation checks as described at <a href="http://www.itwriting.com/blog/?p=198">http://www.itwriting.com/blog/?p=198</a>. If the app is not running elevated, make it run the helper application and exit.&nbsp;The launch&nbsp;looks something like this:</p>
<p><font color="#008080" size="2">
<p>ProcessStartInfo</p>
<p></font><font color="#000000" size="2"> psi = </font><font color="#0000ff" size="2">new</font><font color="#000000" size="2"> </font><font color="#008080" size="2">ProcessStartInfo</font><font color="#000000" size="2">(</font><font color="#800000" size="2">&#8220;Helper.exe&#8221;</font><font size="2"></font><font color="#000000">);<br /></font>psi.UseShellExecute = <font color="#0000ff" size="2">true</font><font size="2">;<br /></font><font color="#008080" size="2">Process</font><font size="2">.Start(psi);</p>
<p>The UseShellExecute flag makes sure the UAC prompt will happen.</font></li>
<li>
<p align="left">Create your helper application with an elevation manifest (the process for&nbsp;that is at <a href="http://blogs.msdn.com/cheller/archive/2006/08/24/how-to-embed-a-manifest-in-an-assembly-let-me-count-the-ways.aspx" target="_blank">Catherine Heller&#8217;s</a> blog)&nbsp;and have it launch your app with something like this:<br /><font color="#0000ff" size="2"><br />string</font><font color="#000000" size="2"> appExe = </font><font color="#008080" size="2">Environment</font><font color="#000000" size="2">.GetFolderPath(</font><font color="#008080" size="2">Environment</font><font color="#000000" size="2">.</font><font color="#008080" size="2">SpecialFolder</font><font color="#000000" size="2">.Programs) + </font><font color="#800000" size="2">@&#8221;\YourClickOnceApp\ClickOnceApp.appref-ms&#8221;</font><font size="2"></font><font color="#000000">;<br /></font><font color="#008080" size="2">Process</font><font size="2">.Start(appExe);</p>
<p>As you can see <strong>the whole scenario only works if you let the ClickOnce app create a Start Menu entry</strong>.</font></p>
</li>
<li>
<p align="left"><font size="2">Build and publish both applications, making sure they use the option to rename the published files to .deploy extensions. This helps tremendously with web deployment.</font></p>
</li>
<li>
<p align="left"><font size="2">Find the published helper .deploy files and copy them to the folder that contains the ClickOnce application&#8217;s .deploy files.</font></p>
</li>
<li>
<p align="left"><font size="2">Open the ClickOnce application&#8217;s .exe.manifest file using MageUI. Go to the Files section and click the Populate button to include the helper app and its manifest in the fileset for the ClickOnce app. Save and sign the manifest. I used a stored certificate for the signing.</font></p>
</li>
<li>
<p align="left"><font size="2">Open the ClickOnce application&#8217;s .application deployment manifest using MageUI. This is probably in the directory above the .deploy files. Open the Application Reference section. Click the Select Manifest&#8230; button and browse down to the manifest you modified in step 5. Save and sign the manifest.&nbsp;I used the stored certificate from step 5.</font></p>
</li>
<li>
<p align="left"><font size="2">Now you have all the needed files packaged for uploading to your web server.</font></p>
</li>
</ol>
<p align="left"><font size="2">This is what will happen when the user downloads the app for the first time: A verification&nbsp;window shows briefly, followed by a download warning, followed by a download progress window. Now the UAC prompt will come, and if accepted, another verification window. Then the app will show.</font></p>
<p align="left"><font size="2">On subsequent launches of the app the user will see the verification window, followed by the UAC prompt, followed by another verification window. Then the app will show.</font></p>
<p align="left"><font size="2">It&#8217;s not pretty, but at least it works.</font></p>
<p align="left">If you try these steps out and they don&#8217;t work, I&#8217;d appreciate an opportunity to correct them.</p>
<p align="left">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<font size="2"></font></p>
<p align="left"><font size="2">P.S.: The manifest generation step&nbsp;looks like this for C# projects:</font></p>
<p align="left"><font size="2"></font><font face="Courier New">&#8220;$(DevEnvDir)..\..\<strong>VC</strong>\bin\mt.exe&#8221; -manifest &#8220;$(ProjectDir)$(TargetName).exe.manifest&#8221;&nbsp; ?outputresource:&#8221;$(TargetDir)$(TargetFileName)&#8221;;#1</font></p>
<p align="left"><font face="ver" size="2">The .exe.manifest for the helper needs to look something like this (you can leave out the commented parts):</font></p>
<p><font color="#0000ff">
<p align="left"><font face="Courier New" size="2">&lt;?</font></p>
<p></font><font size="2"></font><font face="Courier New"></font><font color="#800000">xml</font><font color="#0000ff"> </font><font color="#ff0000">version</font><font color="#0000ff">=</font><font color="#000000">&#8220;</font><font color="#0000ff">1.0</font><font color="#000000">&#8220;</font><font color="#0000ff"> </font><font color="#ff0000">encoding</font><font color="#0000ff">=</font><font color="#000000">&#8220;</font><font color="#0000ff">utf-8</font><font color="#000000">&#8220;</font><font color="#0000ff"></font><font face="Courier New" size="2"> ?&gt;</font>
<p align="left"><font face="Courier New" size="2">&lt;</font><font size="2"></font><font face="Courier New"></font><font color="#800000">assembly</font><font color="#0000ff"> </font><font color="#ff0000">xmlns</font><font color="#0000ff">=</font><font color="#000000">&#8220;</font><font color="#0000ff">urn:schemas-microsoft-com:asm.v1</font><font color="#000000">&#8220;</font><font color="#0000ff"> </font><font color="#ff0000">manifestVersion</font><font color="#0000ff">=</font><font color="#000000">&#8220;</font><font color="#0000ff">1.0</font><font color="#000000">&#8220;</font><font color="#0000ff"></font><font face="Courier New" size="2">&gt;</font></p>
<p align="left"><font face="Courier New" size="2">&lt;</font><font size="2"></font><font face="Courier New"></font><font color="#800000">assemblyIdentity</font><font color="#0000ff"> </font><font color="#ff0000">version</font><font color="#0000ff">=</font><font color="#000000">&#8220;</font><font color="#0000ff">1.0.0.0</font><font color="#000000">&#8220;</font><font color="#0000ff"> </font><font color="#ff0000">processorArchitecture</font><font color="#0000ff">=</font><font color="#000000">&#8220;</font><font color="#0000ff">msil</font><font color="#000000">&#8220;</font><font color="#0000ff"> </font><font color="#ff0000">name</font><font color="#0000ff">=</font><font color="#000000">&#8220;</font><font color="#0000ff">Helper</font><font color="#000000">&#8220;</font><font color="#0000ff"> </font><font color="#ff0000">type</font><font color="#0000ff">=</font><font color="#000000">&#8220;</font><font color="#0000ff">win32</font><font color="#000000">&#8220;</font><font color="#0000ff"></font><font face="Courier New" size="2"> /&gt;</font></p>
<p align="left"><font face="Courier New" size="2">&lt;</font><font size="2"></font><font face="Courier New"></font><font color="#800000">description</font><font color="#0000ff">&gt;</font><font color="#000000">Helper</font><font color="#0000ff">&lt;/</font><font color="#800000">description</font><font color="#0000ff"></font><font face="Courier New" size="2">&gt;</font></p>
<p align="left"><font face="Courier New" size="2">&lt;</font><font size="2"></font><font face="Courier New"></font><font color="#800000">trustInfo</font><font color="#0000ff"> </font><font color="#ff0000">xmlns</font><font color="#0000ff">=</font><font color="#000000">&#8220;</font><font color="#0000ff">urn:schemas-microsoft-com:asm.v3</font><font color="#000000">&#8220;</font><font color="#0000ff"></font><font face="Courier New" size="2">&gt;</font></p>
<p align="left"><font face="Courier New" size="2">&lt;</font><font face="Courier New" color="#800000" size="2">security</font><font color="#0000ff"></font><font face="Courier New" size="2">&gt;</font></p>
<p align="left"><font face="Courier New" size="2">&lt;</font><font face="Courier New" color="#800000" size="2">requestedPrivileges</font><font color="#0000ff"></font><font face="Courier New" size="2">&gt;</font></p>
<p align="left"><font face="Courier New" size="2">&lt;</font><font size="2"></font><font face="Courier New"></font><font color="#800000">requestedExecutionLevel</font><font color="#0000ff"> </font><font color="#ff0000">level</font><font color="#0000ff">=</font><font color="#000000">&#8220;</font><font color="#0000ff">requireAdministrator</font><font color="#000000">&#8220;</font><font color="#0000ff"></font><font face="Courier New" size="2"> /&gt; </font></p>
<p align="left"><font face="Courier New" size="2">&lt;!&#8211;</font><font face="Courier New" color="#008000" size="2">&lt;requestedExecutionLevel level=&#8221;asInvoker&#8221; /&gt;</font><font color="#0000ff"></font><font face="Courier New" size="2">&#8211;&gt;</font></p>
<p align="left"><font face="Courier New" size="2">&lt;!&#8211;</font><font face="Courier New" color="#008000" size="2"> &lt;requestedExecutionLevel level=&#8221;highestAvailable&#8221; /&gt; </font><font color="#0000ff"></font><font face="Courier New" size="2">&#8211;&gt;</font></p>
<p align="left"><font face="Courier New" size="2">&lt;/</font><font face="Courier New" color="#800000" size="2">requestedPrivileges</font><font color="#0000ff"></font><font face="Courier New" size="2">&gt;</font></p>
<p align="left"><font face="Courier New" size="2">&lt;/</font><font face="Courier New" color="#800000" size="2">security</font><font color="#0000ff"></font><font face="Courier New" size="2">&gt;</font></p>
<p align="left"><font face="Courier New" size="2">&lt;/</font><font face="Courier New" color="#800000" size="2">trustInfo</font><font color="#0000ff"></font><font face="Courier New" size="2">&gt;</font></p>
<p align="left"><font face="Courier New" size="2">&lt;/</font><font size="2"></font><font face="Courier New"></font><font color="#800000">assembly</font><font color="#0000ff">&gt;</font></p>
<p class="akst_link"><a href="http://www.geektieguy.com/?p=103&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_103" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.geektieguy.com/2007/08/25/getting-vista-uac-elevation-to-work-for-web-deployed-clickonce-applications/feed/</wfw:commentRss>
		</item>
		<item>
		<title>I hate Windows Update right now. Or Windows Live writer. Take your pick.</title>
		<link>http://www.geektieguy.com/2007/08/24/i-hate-windows-update-right-now-or-windows-live-writer-take-your-pick/</link>
		<comments>http://www.geektieguy.com/2007/08/24/i-hate-windows-update-right-now-or-windows-live-writer-take-your-pick/#comments</comments>
		<pubDate>Sat, 25 Aug 2007 05:58:51 +0000</pubDate>
		<dc:creator>GeekTieGuy</dc:creator>
		
		<category><![CDATA[Microsoft]]></category>

		<category><![CDATA[Software]]></category>

		<category><![CDATA[Software development]]></category>

		<guid isPermaLink="false">http://www.geektieguy.com/2007/08/24/i-hate-windows-update-right-now-or-windows-live-writer-take-your-pick/</guid>
		<description><![CDATA[I spent 45 minutes or so writing up a post in Windows Live Writer this evening. All the while I repeatedly dismissed a Windows Update countdown dialog that was asking for a restart. &#8220;Not now, dammit. I&#8217;m writing something.&#8221;
Then the phone rang. Someone wanted to talk to my wife. She was in the process of [...]]]></description>
			<content:encoded><![CDATA[<p>I spent 45 minutes or so writing up a post in Windows Live Writer this evening. All the while I repeatedly dismissed a Windows Update countdown dialog that was asking for a restart. &#8220;Not now, dammit. I&#8217;m writing something.&#8221;</p>
<p>Then the phone rang. Someone wanted to talk to my wife. She was in the process of reading a good-night story to my older daughter. The caller couldn&#8217;t wait. So I volunteered to read another chapter of the story.</p>
<p>When I got back, Windows was at the logon screen. Dammit, the Windows Update had gone through with the restart, with me not there to dismiss the countdown dialog.</p>
<p>And Windows Live Writer hadn&#8217;t saved a draft.</p>
<p>Both programs violated two cardinal rules for software: Don&#8217;t ever do something the user didn&#8217;t ask for, and don&#8217;t ever, ever, ever lose the user&#8217;s data. It&#8217;s worse than what Jeff Atwood talked about recently, since there were no <a href="http://www.codinghorror.com/blog/archives/000924.html" target="_blank">crashes</a> involved.</p>
<p>I&#8217;m so mad I&#8217;m not even sure I&#8217;ll want to re-write that other post. It has the potential to help out a fellow developer. Maybe I&#8217;ll do it. But right now I hate Windows Update. Or Windows Live Writer. Take your pick.</p>
<p class="akst_link"><a href="http://www.geektieguy.com/?p=102&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_102" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.geektieguy.com/2007/08/24/i-hate-windows-update-right-now-or-windows-live-writer-take-your-pick/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Observations on making live music and writing code</title>
		<link>http://www.geektieguy.com/2007/08/04/observations-on-making-live-music-and-writing-code/</link>
		<comments>http://www.geektieguy.com/2007/08/04/observations-on-making-live-music-and-writing-code/#comments</comments>
		<pubDate>Sat, 04 Aug 2007 22:27:43 +0000</pubDate>
		<dc:creator>GeekTieGuy</dc:creator>
		
		<category><![CDATA[Software development]]></category>

		<guid isPermaLink="false">http://www.geektieguy.com/2007/08/04/observations-on-making-live-music-and-writing-code/</guid>
		<description><![CDATA[A long time ago my daughter performed a piece of harp music at a recital held at her teacher&#8217;s studio. She wasn&#8217;t playing on her own harp, and she hadn&#8217;t really learned to read the music as she was playing her song. Her teacher asked her to play a duet with her, and she reluctantly [...]]]></description>
			<content:encoded><![CDATA[<p>A long time ago my daughter performed a piece of harp music at a recital held at her teacher&#8217;s studio. She wasn&#8217;t playing on her own harp, and she hadn&#8217;t really learned to read the music as she was playing her song. Her teacher asked her to play a duet with her, and she reluctantly agreed.</p>
<p>They started playing, and at some point one of the strings on the harp made a strange noise that threw her off. She stopped playing and her teacher said, no problem, let&#8217;s pick it up again at such and such measure. Well, since she hadn&#8217;t learned the music, she couldn&#8217;t find the place and they had to start from the beginning again. This happened a couple more times. My daughter said afterwards: &#8220;That&#8217;s why I don&#8217;t like playing duets.&#8221;</p>
<p>This got me thinking about how making music together is a lot like writing code together. </p>
<p>It&#8217;s usually not too difficult&nbsp;play a piece of&nbsp;music by yourself. You&#8217;re going at your own pace and can stop and make corrections as you go. But as soon as you have another person involved, things get more complicated. You have to stay in sync somehow.&nbsp;One way you can do this is by following the beat of the music, and practicing until you can play together without mistakes. Another way is to improvise together in the style of great blues and jazz musicians, but it takes years and years of experience playing together to get to that level. When you have more than two people, things get even more complicated. At some point you usually need a conductor to keep it all together.</p>
<p>Here&#8217;s how that works when writing code:</p>
<p>You can write a piece of code by yourself pretty easily. You know what you want to do, and you can correct mistakes you make as you go along. But as soon as you have&nbsp;another person involved, things get more complicated. Now you have to agree on all kinds of stuff, and you don&#8217;t have a musical beat to help you. Who works on what? How do things interface? How do you keep the code in sync? You can&#8217;t really practice this, since most code-writing is coming up with new stuff. You can agree on a common language (patterns or idioms) to communicate, but that takes time to learn. When you have more than two&nbsp;people, things get even more complicated. Now you need to agree on source control procedures, more frequent synchronization and communication. At some point you usually need a technical lead to keep it all together.</p>
<p>How you go about doing all this when the people writing the code are not in the same physical location is quite astonishing to me. </p>
<p>Imagine trying to make music together when half the people are 12 hours away from you.</p>
<p>I bet that wouldn&#8217;t sound very good.</p>
<p class="akst_link"><a href="http://www.geektieguy.com/?p=96&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_96" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.geektieguy.com/2007/08/04/observations-on-making-live-music-and-writing-code/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Software development lessons learned from moving a 300 pound HD TV</title>
		<link>http://www.geektieguy.com/2007/07/31/software-development-lessons-learned-from-moving-a-300-pound-hd-tv/</link>
		<comments>http://www.geektieguy.com/2007/07/31/software-development-lessons-learned-from-moving-a-300-pound-hd-tv/#comments</comments>
		<pubDate>Wed, 01 Aug 2007 05:02:32 +0000</pubDate>
		<dc:creator>GeekTieGuy</dc:creator>
		
		<category><![CDATA[Software development]]></category>

		<guid isPermaLink="false">http://www.geektieguy.com/2007/07/31/software-development-lessons-learned-from-moving-a-300-pound-hd-tv/</guid>
		<description><![CDATA[I was helping a friend move an older,&#160;300 pound HD TV recently. Here are some things that happened and what I think you can learn from them about collaboration on software projects (or any collaborative project for that matter):
We had&#160;a large trailer that was much bigger than needed for the TV. We filled up the [...]]]></description>
			<content:encoded><![CDATA[<p>I was helping a friend move an older,&nbsp;300 pound HD TV recently. Here are some things that happened and what I think you can learn from them about collaboration on software projects (or any collaborative project for that matter):</p>
<p>We had&nbsp;a large trailer that was much bigger than needed for the TV. We filled up the space by putting a shelf and a closet on there first. Later we pushed the TV up against those things to stabilize it on the trailer. <strong>Lesson: You need to think about a little bit of scaffolding/infrastructure before you start the real work.</strong></p>
<p>We couldn&#8217;t find the rope we needed to tie everything down for the drive, so we had to go buy some half way through the process. <strong>Lesson: Sometimes you need to take a detour to get all the tools you need to do the job. You may not have all the tools you need when you start out.</strong></p>
<p>There were only two of us to get the TV out of the house and on to the trailer. We had to get across two sets of stairs and lift the thing up onto the trailer by ourselves. <strong>Lesson: The beginning of a project can be challenging if you don&#8217;t have quite enough people.</strong></p>
<p>We lifted the TV up onto the trailer by ourselves once we had rolled it out from the house. It was only just manageable, but we &#8220;lucked out&#8221;. We tied everything down with the rope we had bought.</p>
<p>During the drive it looked like the TV was going to roll off the trailer a couple of times, even though it was tied down well. We had to slow down in the curves to make sure nothing went wrong. <strong>Lesson: Adjust your strategy as you encounter changes in your project or the terrain you find yourself in. Sometimes you need to slow down in order to &#8220;get there&#8221;.</strong></p>
<p>When we got to the destination, we realized we wouldn&#8217;t be able to lift the TV down from the trailer with just two people (by now our arms were more worn out). <strong>Lesson: Stop and re-evaluate your progress and strategy from time to time.</strong></p>
<p>My friend had arranged for another helping hand, who arrived after we did some other jobs of moving things around. After the arrival of the third helper (and a lunch break), we went about discussing how to get the TV down without any of us breaking our backs. <strong>Lesson: Be prepared to ask for more help if you find the job too big. There&#8217;s no point in working so hard that you can&#8217;t&nbsp;work anymore&nbsp;tomorrow. Eat and relax together.</strong></p>
<p>During the discussion of how to get the TV down, we explored several tactics, and changed our plan for lifting several times. <strong>Lesson: Get together and talk things over when you&#8217;re not sure how to solve the problem.</strong></p>
<p>Our final approach involved lifting half of the TV down and setting the edge down on the ground, leaving one end on the ground and the other on the trailer. It looked a bit like this:</p>
<p>&nbsp;<a href="http://www.geektieguy.com/wp-content/uploads/2007/07/trailer-with-tv1.png" atomicselection="true"><img height="170" alt="Trailer with TV" src="http://www.geektieguy.com/wp-content/uploads/2007/07/trailer-with-tv-thumb1.png" width="422"/></a> </p>
<p>We were pretty sure we&#8217;d be unable to lift the other end down, since that would have involved lifting both ends to&nbsp;move the TV clear of the trailer. We were stuck for a while. Then one of us suggested instead of trying to lift both ends and&nbsp;move the TV&nbsp;away from the trailer, that we just lift the end that was still supported by the trailer and roll the trailer out from under it. Then we could lower the other end without having to lift both ends. <strong>Lesson: You never know who may contribute an idea that solves a problem the rest of the team can&#8217;t figure out, even when the solution is pretty much right in front of them.</strong></p>
<p class="akst_link"><a href="http://www.geektieguy.com/?p=92&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_92" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.geektieguy.com/2007/07/31/software-development-lessons-learned-from-moving-a-300-pound-hd-tv/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Debugging XBAP applications on Vista using Visual Studio 2005</title>
		<link>http://www.geektieguy.com/2007/01/23/debugging-xbap-applications-on-vista-using-visual-studio-2005/</link>
		<comments>http://www.geektieguy.com/2007/01/23/debugging-xbap-applications-on-vista-using-visual-studio-2005/#comments</comments>
		<pubDate>Wed, 24 Jan 2007 00:35:27 +0000</pubDate>
		<dc:creator>GeekTieGuy</dc:creator>
		
		<category><![CDATA[Software development]]></category>

		<category><![CDATA[Vista]]></category>

		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://www.geektieguy.com/2007/01/23/debugging-xbap-applications-on-vista-using-visual-studio-2005/</guid>
		<description><![CDATA[I ran into an interesting little quirk with Visual Studio 2005 on Vista yesterday. I was trying to start an XBAP debugging session from VS (using the F5 key), and none of my breakpoints got triggered. Upon exiting the IE instance that hosts PresentationHost.exe, VS considered the session as still &#8220;running&#8221;.
I had set my system [...]]]></description>
			<content:encoded><![CDATA[<p>I ran into an interesting little quirk with Visual Studio 2005 on Vista yesterday. I was trying to start an XBAP debugging session from VS (using the F5 key), and none of my breakpoints got triggered. Upon exiting the IE instance that hosts PresentationHost.exe, VS considered the session as still &#8220;running&#8221;.</p>
<p>I had set my system up according to Tim Sneath&#8217;s post on <a href="http://blogs.msdn.com/tims/archive/2006/12/20/building-a-perfect-wpf-developer-workstation.aspx">the perfect WPF developer system,</a> including VS 2005 SP1 and the beta version of the Vista extensions for VS 2005. I was running VS &#8220;as administrator&#8221;.</p>
<p>As it turns out there are some technical details around starting XBAP debugging sessions from an elevated VS process that cause this behavior <strong>if you already have another instance of IE running when starting the debugging session</strong>.</p>
<p>Thanks to Tim Sneath and Chango Valtchev at Microsoft&nbsp;for helping in tracking this down!</p>
<p>Moral of the story: If you want to debug an XBAP from VS 2005 under Vista, run VS non-elevated, or make sure you have no other instances of IE running when you start the debugging session.</p>
<p class="akst_link"><a href="http://www.geektieguy.com/?p=62&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_62" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.geektieguy.com/2007/01/23/debugging-xbap-applications-on-vista-using-visual-studio-2005/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Localizing an XBAP application without using LocBaml</title>
		<link>http://www.geektieguy.com/2006/12/12/localizing-an-xbap-application-without-using-locbaml/</link>
		<comments>http://www.geektieguy.com/2006/12/12/localizing-an-xbap-application-without-using-locbaml/#comments</comments>
		<pubDate>Tue, 12 Dec 2006 23:23:50 +0000</pubDate>
		<dc:creator>GeekTieGuy</dc:creator>
		
		<category><![CDATA[Software development]]></category>

		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://www.geektieguy.com/2006/12/12/localizing-an-xbap-application-without-using-locbaml/</guid>
		<description><![CDATA[Using the LocBaml sample application that Microsoft provides with the Windows SDK for Windows Presentation Foundation can be very frustrating. By default it seems to pick up a lot of things that clutter the resulting CSV file. If your application contains a lot of image resources, those will get duplicated in the localized resource dlls [...]]]></description>
			<content:encoded><![CDATA[<p>Using the LocBaml sample application that Microsoft provides with the Windows SDK for Windows Presentation Foundation can be very frustrating. By default it seems to pick up a lot of things that clutter the resulting CSV file. If your application contains a lot of image resources, those will get duplicated in the localized resource dlls as well, increasing the space that your application occupies on the hard drive. And finally, getting an XBAP application to be deployable after localization with LocBaml requires opening up the application manifest and adding all the localized resource files to it. Otherwise a deployment error will bite you.</p>
<p>So with all those problems, we decided to take a different approach for our WPF XBAP applications. We put all our strings into a standalone XAML file, producing a ResourceDictionary. This way our application can pick up strings using Text=&#8221;{StaticResource strXYZ}&#8221; for XAML markup and/or use Application.Current.FindResource(&#8221;strXYZ&#8221;) for codebehind. We name the file &#8220;Strings_en-US.xaml&#8221;. We can localize this file nicely, and name the resulting set appropriately: &#8220;Strings_de-DE.xaml&#8221;, &#8220;Strings_fr-FR.xaml&#8221; and so on. These files can then be included as resources in the application. They can also be added as &#8220;loose&#8221; XAML files, so we can add languages or make corrections after compilation.</p>
<p>The string resource file looks something like this:<br />
<font size="1"></p>
<pre>
<code>

&lt;?xml version="1.0" encoding="utf-8" ?&gt;
&lt;ResourceDictionary
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:sys="clr-namespace:System;assembly=mscorlib"
&gt;
  &lt;sys:String x:Key="strButtonOK"&gt;OK&lt;/sys&gt;
  &lt;sys:String x:Key="strButtonCancel"&gt;Cancel&lt;/sys&gt;
&lt;/ResourceDictionary&gt;

</code>
</pre>
<p></font></p>
<p>At application load time, we look at the CurrentCulture and attempt to load the ResourceDictionary object like this:<br />
<font size="1"></p>
<pre>
<code>
ResourceDictionary rd = null;
System.Globalization.CultureInfo ci =
     System.Globalization.CultureInfo.CurrentCulture;
string langCountry = ci.Name;
string languageFile =
     string.Format("/Resources/Strings/Strings_{0}.xaml", langCountry);
try
{
  rd = (ResourceDictionary)Application.LoadComponent(
                              new Uri(languageFile, UriKind.RelativeOrAbsolute)
                                  );
}
</code>
</pre>
<p></font><br />
You can imagine this with some catch {} fallbacks for when a specific language-country combination doesn&#8217;t exist. We&#8217;ll fall back to a file that&#8217;s only language specific, and if that doesn&#8217;t work out, we&#8217;ll fall back to en-US. </p>
<p>We&#8217;re not using CurrentUICulture, since that seems to be tied to the UI language of Vista, and we want our apps to follow what the user sets in Control Panel. CurrentCulture seems to work for that.</p>
<p>To load the strings into the global resource dictionary, we just do</p>
<pre><code>
Application.Current.Resources.MergedDictionaries.Add(rd);
</code></pre>
<p>
To load loose XAML files that are not part of the application&#8217;s resources, we do something like this:<br />
<font size="1"></p>
<pre>
<code>
ResourceDictionary rd1 = null;
string languageFileLoose = string.Format(
         "pack://siteoforigin:,,,/Resources/Strings/Strings_{0}.xaml",
         langCountry
      );
Uri uri = new Uri(languageFileLoose, UriKind.Absolute);
System.Windows.Resources.StreamResourceInfo info;
System.Windows.Markup.XamlReader reader;
try {
  info = Application.GetRemoteStream(uri);
  reader = new System.Windows.Markup.XamlReader();
  rd1 = (ResourceDictionary)reader.LoadAsync(info.Stream);
}
</code>
</pre>
<p></font></p>
<p>Again, we extend this with catch {} blocks to fall back to a file that&#8217;s only language specific. We do the loose XAML loading after we&#8217;ve loaded embedded resources, so we can rely on a basic set of languages and strings, but can add languages, fix string translation errors or make improvements in the loose XAML after compiling things.</p>
<p>It may work for you as well, but ymmv.</p>
<p><strong>Update:</strong> Changed the first Uri to UriKind.RelativeOrAbsolute</p>
<p class="akst_link"><a href="http://www.geektieguy.com/?p=49&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_49" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.geektieguy.com/2006/12/12/localizing-an-xbap-application-without-using-locbaml/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Software craftsmanship vs. &#8220;HighTech&#8221; jobs</title>
		<link>http://www.geektieguy.com/2006/11/13/software-craftsmanship-vs-hightech-jobs/</link>
		<comments>http://www.geektieguy.com/2006/11/13/software-craftsmanship-vs-hightech-jobs/#comments</comments>
		<pubDate>Tue, 14 Nov 2006 05:40:24 +0000</pubDate>
		<dc:creator>GeekTieGuy</dc:creator>
		
		<category><![CDATA[Personal]]></category>

		<category><![CDATA[Software development]]></category>

		<guid isPermaLink="false">http://www.geektieguy.com/2006/11/13/software-craftsmanship-vs-hightech-jobs/</guid>
		<description><![CDATA[I recently read &#8220;Peopleware&#8221; by DeMarco and Lister, a book I highly recommend to anyone wanting to understand how to manage people who write software for a living.
They mention several times that most software writers don&#8217;t work in &#8220;HighTech&#8221; jobs. The ones who really do the &#8220;HighTech&#8221; stuff are the people who write the compilers [...]]]></description>
			<content:encoded><![CDATA[<p>I recently read &#8220;Peopleware&#8221; by DeMarco and Lister, a book I highly recommend to anyone wanting to understand how to manage people who write software for a living.</p>
<p>They mention several times that most software writers don&#8217;t work in &#8220;HighTech&#8221; jobs. The ones who really do the &#8220;HighTech&#8221; stuff are the people who write the compilers and development frameworks or come up with other new technologies. I tend to agree.</p>
<p>I&#8217;ve long joked to my manager about giving up writing software and asking if he knows anyone who will take me on as a &#8220;carpenter&#8217;s apprentice&#8221;. This happens especially when I get stuck on hard-to-solve problems or when I find more bugs than I care to report in Microsoft&#8217;s platforms. And of course when the people who contract for us on software turn in one more drop in which old bugs re-surface.</p>
<p>But I realize more and more how what I do is actually more software &#8220;carpentry&#8221; than it is &#8220;HighTech&#8221; work. Seriously. I mean, it takes effort to learn about the latest technologies, such as WPF/Avalon, sure. You have to wrap your mind around how some other people want you to write programs. And you have to do it quickly, so your project can get done on time. But in the end it really comes down to being able to handle a set of tools that someone else makes. Handle them expertly, yes, but they&#8217;re someone else&#8217;s tools.</p>
<p>So that&#8217;s what I&#8217;m going to consider myself from now on. A software craftsman. Perhaps even an expert or master craftsman (depending on who I compare myself to or how I&#8217;m feeling when I consider it). But just a craftsman.</p>
<p>And I take a certain pride in the work I do. Like all real craftsmen do.</p>
<p class="akst_link"><a href="http://www.geektieguy.com/?p=33&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_33" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://www.geektieguy.com/2006/11/13/software-craftsmanship-vs-hightech-jobs/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
