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

<channel>
	<title>Trimagination &#187; Entwicklung</title>
	<atom:link href="http://www.trimagination.info/category/entwicklung/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.trimagination.info</link>
	<description>...far beyond</description>
	<lastBuildDate>Mon, 19 Oct 2009 13:46:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Augmented Reality Cache (AR Cache)</title>
		<link>http://www.trimagination.info/2009/04/21/augmented-reality-cache-ar-cache/</link>
		<comments>http://www.trimagination.info/2009/04/21/augmented-reality-cache-ar-cache/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 11:25:25 +0000</pubDate>
		<dc:creator>cjacob</dc:creator>
				<category><![CDATA[Entwicklung]]></category>
		<category><![CDATA[GeoCaching]]></category>
		<category><![CDATA[Interessantes]]></category>
		<category><![CDATA[Augmented Reality]]></category>
		<category><![CDATA[Groundspeak]]></category>

		<guid isPermaLink="false">http://www.trimagination.info/?p=220</guid>
		<description><![CDATA[I have a new hobby. It&#8217;s called GeoCaching. In case you don&#8217;t know what GeoCaching is, you can get a good introduction here. Otherwise simply think of it as some sort of treasure hunt with the treasure map being GPS coordinates (that you find using a GPS enabled device) and the treasure usually being some [...]]]></description>
			<content:encoded><![CDATA[<p>I have a new hobby. It&#8217;s called GeoCaching. In case you don&#8217;t know what GeoCaching is, you can get a good introduction <a href="http://en.wikipedia.org/wiki/Geocaching" target="_blank">here</a>. Otherwise simply think of it as some sort of treasure hunt with the treasure map being GPS coordinates (that you find using a GPS enabled device) and the treasure usually being some sort of waterproof box with a logbook for you to leave your name and date when you found it. Believe me, it&#8217;s a lot of fun searching and more than that: finding GeoCaches.</p>
<p>As you can imagine, there are different types of GeoCaches. Traditionals like described above, Mystery Caches for which you need to solve puzzles, NightCaches that can only be found at night and several more. However, recently an absolutely awesome idea popped into my mind. An idea for a new type of GeoCache.</p>
<h3>The Augmented Reality Cache</h3>
<p><a href="http://www.trimagination.info/wp-content/uploads/2009/04/arcache.png" target="_blank"><img class="size-full wp-image-221 alignright" title="arcache" src="http://www.trimagination.info/wp-content/uploads/2009/04/arcache.png" alt="Augmented Reality Cache" width="288" height="384" /></a><a href="http://en.wikipedia.org/wiki/Augmented_reality" target="_blank">Augmented Reality</a> basically means that the reality is &#8220;extended&#8221; by virtual information (most commonly 3D Objects). But how does this work? Easy: You place a marker that can be recognized by a special software that runs on a device which has an integrated camera (or the ability to have a camera attached). The software then extends the real world image with the virtual object and displays the result on the display. What makes AR so damn fancy is that this all happens in <strong>real time</strong>. So if you turn or tilt your device, the virtual objects does the same just as if it exists in the real world.</p>
<p>More easy: On the display  it simply looks like as if the giant monster dwarf was really standing in front of you swinging his enormous warhammer. Only&#8230; that he&#8217;s of course not really there. <img src='http://www.trimagination.info/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Look <a href="http://www.artag.net/" target="_blank">here</a> to get an impression of what the heck I am talking about.</p>
<h3>What does that mean for GeoCaching</h3>
<p>So back to GeoCaching. GeoCaching means that you go to given GPS coordinates and then search for some sort of hidden treasure (the Cache). Sometimes you follow hints or need to solve puzzles.My vision now works like this: The coordinates lead you to a traffic sign for instance. You point your Windows Mobile cellphone with an integrated GPS device and camera to the sign and what you see on the display is a virtual three-dimensional arrow pointing to the right with a text on it saying 50m. Everyone else only sees that traffic sign. But <strong>you</strong> have a device that extends your sense of reality. <img src='http://www.trimagination.info/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  You see more. You took the red pill!</p>
<p>So the <em>AR Cache</em> could incredibly increase the GeoCaching experience by adding hints, coordinates and visual clues to real world objects. Also, many cacher already use devices like Windows Mobile cellphones (for instance running <a href="http://www.cachewolf.de/wiki/pmwiki.php" target="_blank">CacheWolf</a>) or the iPhone (running <a href="http://www.groundspeak.com/" target="_blank">Groundspeaks</a> own <a href="http://www.geocaching.com/iphone/" target="_blank">proprietary software</a>). So there will be lots of people who can experience this new type of GeoCache.</p>
<h3>Ideas</h3>
<p>For this type of GeoCache to work, a couple of things need to be accomplished. First of all, applications need to be developed that are able to recognize either simple marker or even basic geometric forms (to be able to work with real objects like traffic signs instead of stickers that need to be attached to real world objects). This application needs to be able to import markers as well as 3D Objects, images or whatever, so that a Cache Owner can create an own set of extension for his specific <em>AR Cache</em>. Of course it would be awesome if this application also has an Owner-Tool that makes it possible for the owner to create markers from real world objects instantly with the integrated camera of his device for instance.</p>
<p>Next, this type of software needs to be made widely available for different platforms. The easiest would most certainly be Windows Mobile. Also, Groundspeak should be pretty interested in extending their own GC software with this feature. A Java based application should be interesting, too, so that it will work on basically every device that is able to run own applications. Maybe this is something, the CacheWolf community is looking for?</p>
<p>Speaking of Groundspeak: I sent an email to them with a suggestion to create this new type of GeoCache. I am curious if I get feedback. <img src='http://www.trimagination.info/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Please comment on this if you like the idea.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.trimagination.info/2009/04/21/augmented-reality-cache-ar-cache/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Nabaztag goes Second Life</title>
		<link>http://www.trimagination.info/2009/03/07/nabaztag-goes-second-life/</link>
		<comments>http://www.trimagination.info/2009/03/07/nabaztag-goes-second-life/#comments</comments>
		<pubDate>Sat, 07 Mar 2009 21:52:50 +0000</pubDate>
		<dc:creator>cjacob</dc:creator>
				<category><![CDATA[Entwicklung]]></category>
		<category><![CDATA[Second Life]]></category>
		<category><![CDATA[Spiele]]></category>
		<category><![CDATA[Unterhaltung]]></category>

		<guid isPermaLink="false">http://www.trimagination.info/?p=217</guid>
		<description><![CDATA[Having your Nabaztag communicating with Second Life ist not that hard as I found out. Others already tried it and now, even I did. I am currently able to wake my rabbit up and send it to sleep.
Well&#8230; it&#8217;s a start.

]]></description>
			<content:encoded><![CDATA[<p>Having your Nabaztag communicating with Second Life ist not that hard as I found out. Others already tried it and now, even I did. I am currently able to wake my rabbit up and send it to sleep.</p>
<p>Well&#8230; it&#8217;s a start.</p>
<p><a href="http://www.trimagination.info/wp-content/uploads/2009/03/nabaztag_001.png"><img class="size-full wp-image-218 alignleft" title="nabaztag_001" src="http://www.trimagination.info/wp-content/uploads/2009/03/nabaztag_001.png" alt="nabaztag_001" width="290" height="192" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.trimagination.info/2009/03/07/nabaztag-goes-second-life/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Why I like being a developer, or: BunnyTray &#8211; Send your Nabaztag to sleep</title>
		<link>http://www.trimagination.info/2009/03/01/why-i-like-being-a-developer-or-bunnytray-send-your-nabaztag-to-sleep/</link>
		<comments>http://www.trimagination.info/2009/03/01/why-i-like-being-a-developer-or-bunnytray-send-your-nabaztag-to-sleep/#comments</comments>
		<pubDate>Sat, 28 Feb 2009 22:15:51 +0000</pubDate>
		<dc:creator>cjacob</dc:creator>
				<category><![CDATA[Entwicklung]]></category>

		<guid isPermaLink="false">http://www.trimagination.info/?p=211</guid>
		<description><![CDATA[My girlfriend asked me lately, what she can do to put our Nabaztag to sleep, because she wanted to take a nap in the livingroom and that thing had a lot of fun talking to her all the time.
So I implemented a little tray-application for her that she can use to put it to sleep [...]]]></description>
			<content:encoded><![CDATA[<p>My girlfriend asked me lately, what she can do to put our Nabaztag to sleep, because she wanted to take a nap in the livingroom and that thing had a lot of fun talking to her all the time.</p>
<p>So I implemented a little tray-application for her that she can use to put it to sleep and wake it up again whenever she wants:</p>
<p><a href="http://www.trimagination.info/wp-content/uploads/2009/03/bunnytray.png"><img class="size-full wp-image-212 alignleft" title="bunnytray" src="http://www.trimagination.info/wp-content/uploads/2009/03/bunnytray.png" alt="bunnytray" width="201" height="27" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.trimagination.info/2009/03/01/why-i-like-being-a-developer-or-bunnytray-send-your-nabaztag-to-sleep/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What&#8217;s the matter with InstallShields&#8217; LogonInformation dialog. List is empty?!</title>
		<link>http://www.trimagination.info/2009/02/27/whats-the-matter-with-installshields-logoninformation-dialog-list-is-empty/</link>
		<comments>http://www.trimagination.info/2009/02/27/whats-the-matter-with-installshields-logoninformation-dialog-list-is-empty/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 07:39:33 +0000</pubDate>
		<dc:creator>cjacob</dc:creator>
				<category><![CDATA[Entwicklung]]></category>
		<category><![CDATA[Interessantes]]></category>

		<guid isPermaLink="false">http://www.trimagination.info/?p=208</guid>
		<description><![CDATA[The one or other might have already stumbled across the famous three words when using InstallShields&#8217; LogonInformation dialogs: List is empty. This preferrably happens right after you finished creating your setup and befor you are about to deploy it to a customers&#8217;s server. You click on &#60;Browse&#62; to see a list of available Domains and get &#8220;The [...]]]></description>
			<content:encoded><![CDATA[<p>The one or other might have already stumbled across the famous three words when using InstallShields&#8217; LogonInformation dialogs: List is empty. This preferrably happens right after you finished creating your setup and befor you are about to deploy it to a customers&#8217;s server. You click on &lt;Browse&gt; to see a list of available Domains and get &#8220;The list is empty&#8221;. You enter a domain name for yourself and click on &lt;Browse&gt; for a list of users in that domain and Windows Installer tells you it can&#8217;t find the domain you entered. So what the hell is wrong with that thing?</p>
<p>The answer is easy but you will be less than thrilled.</p>
<p>One of the software developers of Acresso <a href="http://community.installshield.com/showthread.php?t=168450&amp;page=2" target="_blank">explained</a> they were using the API function NetServerEnum. And if you look <a href="http://www.cisco.com/en/US/products/sw/custcosw/ps1001/products_tech_note09186a0080524e22.shtml" target="_blank">here</a> you will find out that if it does not work, the reason might be that the ComputerBrowser service is not active.</p>
<p>In all test cases I tried, I was able to get the LogonInformation dialog to work with enabling the ComputerBrowser service. However, this solution has a major drawback: The ComputerBrowser service itself depends on File and Printersharing. All these services are disabled by default on a Windows Server 2008 for instance.</p>
<p>In most cases you won&#8217;t be able to tell your customers they need to enable and active several services only for your setup to work. So I guess the bad news is that you will need to find a work around.</p>
<p>What I did, by the way, is implementing a couple of own Custom Actions and replace the calls in InstallShields&#8217; dialogs with my own ones. That works like a charm. <img src='http://www.trimagination.info/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.trimagination.info/2009/02/27/whats-the-matter-with-installshields-logoninformation-dialog-list-is-empty/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Where to get Microsoft.Win32.Security</title>
		<link>http://www.trimagination.info/2009/02/19/where-to-get-microsoftwin32security/</link>
		<comments>http://www.trimagination.info/2009/02/19/where-to-get-microsoftwin32security/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 12:08:29 +0000</pubDate>
		<dc:creator>cjacob</dc:creator>
				<category><![CDATA[Entwicklung]]></category>
		<category><![CDATA[Interessantes]]></category>

		<guid isPermaLink="false">http://www.trimagination.info/?p=205</guid>
		<description><![CDATA[If you are trying to deal with Security Descriptors, Access Control Lists, permissions and all that funny stuff, you might have already thought about why the hell nobody implemented an easy to use managed library for it yet.
Well. Somebody did.
There used to be a sample called Microsoft.Win32.Security that was released for free on gotdotnet. When [...]]]></description>
			<content:encoded><![CDATA[<p>If you are trying to deal with Security Descriptors, Access Control Lists, permissions and all that funny stuff, you might have already thought about why the hell nobody implemented an easy to use managed library for it yet.</p>
<p>Well. Somebody did.</p>
<p>There used to be a sample called Microsoft.Win32.Security that was released for free on gotdotnet. When you are reading this, I bet you already know that and found out that GDN does not exist anymore and Microsoft somehow forgot to put the code up on MSDN.</p>
<p>Also you will almost certainly already have stumbled across <a href="http://blogs.msdn.com/johnkoz/articles/Creating_Security_Descriptors.aspx" target="_blank">this</a> site, <a href="http://www.secnewsgroups.net/group/microsoft.public.dotnet.security/topic10767.aspx" target="_blank">that</a> newsgroup and in case you are actually searching for a way of playing with DCOM also across <a href="http://www.myitforum.com/articles/15/view.asp?id=9323" target="_blank">myITforum</a> and maybe <a href="http://community.acresso.com/showthread.php?p=432512" target="_blank">Acresso</a>. </p>
<p>If you also found out that the Assembly was built for .NET 1.1 and Microsoft already implemented an own (official) wrapper for .NET 2.0 and called it System.Security.AccessControl and if you also found out that it does not contain the features you needed, than read further.</p>
<p>Although you won&#8217;t find the official source of Microsoft.Win32.Security, there is at least one project still active that makes use of it and &#8211; fortunate for us &#8211; contains the complete sources. The project&#8217;s name is FlexWiki and you can download its sources easily with any Subversion Browser. Here is how:</p>
<ol>
<li>Obtain and install the latest version of  <a href="http://tortoisesvn.tigris.org/" target="_blank">TortoiseSVN</a> from tigris</li>
<li>Create a folder on your harddrive and name it <em>flexwiki</em></li>
<li>Right click that folder and use TortoiseSVN to <a href="http://sourceforge.net/svn/?group_id=113273" target="_blank">check out the flexwiki source</a></li>
</ol>
<p>For the last step you will have to enter the following URL: https://flexwiki.svn.sourceforge.net/svnroot/flexwiki and simply check out the main trunk.</p>
<p>You will find the sources for the Microsoft.Win32.Security assembly right under flexwikicore/trunk/lib/Win32Security. In the bin subfolder there already is a compiled dll you can use right away.</p>
<p>Hope that this information if useful for someone. If so, please comment. <img src='http://www.trimagination.info/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.trimagination.info/2009/02/19/where-to-get-microsoftwin32security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to run PowerShell scripts as native Custom Actions from within an MSI based setup</title>
		<link>http://www.trimagination.info/2009/02/06/how-to-run-powershell-scripts-as-native-custom-actions-from-within-an-msi-based-setup/</link>
		<comments>http://www.trimagination.info/2009/02/06/how-to-run-powershell-scripts-as-native-custom-actions-from-within-an-msi-based-setup/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 13:31:00 +0000</pubDate>
		<dc:creator>cjacob</dc:creator>
				<category><![CDATA[Entwicklung]]></category>
		<category><![CDATA[Interessantes]]></category>

		<guid isPermaLink="false">http://www.trimagination.info/?p=197</guid>
		<description><![CDATA[The common answer to this topic may be rather doing without any custom actions whatsoever However, I believe that there is a strong request for running PowerShell scripts for configuration purposes at installation time.
Although there currently is no real native way of doing so, it is still virtually possible and I will show you how.

First [...]]]></description>
			<content:encoded><![CDATA[<p>The common answer to this topic may be rather doing without any custom actions whatsoever However, I believe that there is a strong request for running <a href="http://blogs.msdn.com/powershell/" target="_blank">PowerShell</a> scripts for configuration purposes at installation time.</p>
<p>Although there currently is no <em>real</em> native way of doing so, it is still virtually possible and I will show you how.</p>
<p><span id="more-197"></span></p>
<p>First of all you need to know that MSI does not support managed code custom actions by default. However, people of both Acresso (publisher of the famous jack-of-all-trades <a href="http://www.acresso.com/products/is/installshield-overview.htm" target="_blank">InstallShield</a>) and Microsoft created a way of working around the limitations of the still unmanaged Windows Installer. They put a wrapper around a library that establishes a bidirectional way of communicating in and out the managed code from within a custom action.</p>
<p>If you don&#8217;t use (or can afford using) InstallShield 2009, simply <a href="http://wix.sourceforge.net/releases/" target="_blank">download</a> <a href="http://wix.sourceforge.net/" target="_blank">Windows Installer Xml</a> (WiX), install it and have a look at its samples regarding managed custom actions (you might want to download the sources as well as it contains more sophisticated examples in its <a href="http://blog.torresdal.net/2008/09/03/WiXAndDTFIntroduction.aspx" target="_blank">DTF</a> subdirectory).</p>
<p>Now that you can actually build managed code custom actions and thus have full control of the MSI while it runs (such as accessing the MSIs&#8217; logfile, all properties and virtually every table contained within the MSI), it&#8217;s an easy step of implementing code to eventually run PowerShell scripts in less than 20 lines of code.</p>
<div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New">
<p style="MARGIN: 0px">[<span style="COLOR: #2b91af">CustomAction</span>]</p>
<p style="MARGIN: 0px"><span style="COLOR: blue">public</span> <span style="COLOR: blue">static</span> <span style="COLOR: #2b91af">ActionResult</span> PSInvoke(<span style="COLOR: #2b91af">Session</span> session)</p>
<p style="MARGIN: 0px">{ </p>
<p style="MARGIN: 0px">    <span style="COLOR: #2b91af">Collection</span>&lt;<span style="COLOR: #2b91af">PSObject</span>&gt; results = <span style="COLOR: blue">null</span>;</p>
<p style="MARGIN: 0px"> </p>
<p style="MARGIN: 0px">    session.Log(<span style="COLOR: #a31515">&#8220;Begin PSInvoke&#8221;</span>); </p>
<p style="MARGIN: 0px">    <span style="COLOR: blue">string</span> scriptFile = session[<span style="COLOR: #a31515">"CA_PS_INVOKE_SCRIPT"</span>];</p>
<p style="MARGIN: 0px">     </p>
<p style="MARGIN: 0px">    <span style="COLOR: #2b91af">RunspaceConfiguration</span> runspaceConfig = <span style="COLOR: #2b91af">RunspaceConfiguration</span>.Create();</p>
<p style="MARGIN: 0px"> </p>
<p style="MARGIN: 0px">    <span style="COLOR: blue">using</span> (<span style="COLOR: #2b91af">Runspace</span> runspace = <span style="COLOR: #2b91af">RunspaceFactory</span>.CreateRunspace(runspaceConfig))</p>
<p style="MARGIN: 0px">    {</p>
<p style="MARGIN: 0px">        runspace.Open();</p>
<p style="MARGIN: 0px"><span style="COLOR: #2b91af">        Pipeline</span> pipeline = runspace.CreatePipeline();</p>
<p style="MARGIN: 0px">        pipeline.Commands.Add(scriptFile);</p>
<p style="MARGIN: 0px"> </p>
<p style="MARGIN: 0px">        results = pipeline.Invoke(); </p>
<p style="MARGIN: 0px">    }</p>
<p style="MARGIN: 0px"> </p>
<p style="MARGIN: 0px">    session.Log(<span style="COLOR: #a31515">&#8220;End PSInvoke&#8221;</span>);</p>
<p style="MARGIN: 0px">    <span style="COLOR: blue">return</span> <span style="COLOR: #2b91af">ActionResult</span>.Success;</p>
<p style="MARGIN: 0px">} </p>
</div>
<p>This is pretty much it. Of course the code is only a sample and you will have to add some security to it as well as exception handling. You might want to try finding out how to send data to the MSI from within the PowerShell script so that you could update the progress bar with useful information about what&#8217;s hapening e.g.</p>
<p>Also you need to take care of the execution policy that might prevent you from actually executing a PowerShell script in the first place.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.trimagination.info/2009/02/06/how-to-run-powershell-scripts-as-native-custom-actions-from-within-an-msi-based-setup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Brian the Build Bunny &#8211; Part II</title>
		<link>http://www.trimagination.info/2009/01/29/brian-the-build-bunny-part-ii/</link>
		<comments>http://www.trimagination.info/2009/01/29/brian-the-build-bunny-part-ii/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 07:01:31 +0000</pubDate>
		<dc:creator>cjacob</dc:creator>
				<category><![CDATA[Interessantes]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.trimagination.info/?p=183</guid>
		<description><![CDATA[On December, 4th, I posted a small article containing a youtube video of Brian the Build Bunny and simply the comment that I wished I had one (update on this: maybe I&#8217;ll get myself one&#8230;). What was most fascinating on this was, that two weeks later, I suddenly got over 300 hits on my blog [...]]]></description>
			<content:encoded><![CDATA[<p>On December, 4th, I posted a <a href="http://www.trimagination.info/2008/12/04/brain-the-build-bunny/" target="_blank">small article</a> containing a youtube video of <a href="http://www.woodwardweb.com/vsts/behind_brian_th.html" target="_blank">Brian the Build Bunny</a> and simply the comment that I wished I had one (update on this: maybe I&#8217;ll get myself one&#8230;). What was most fascinating on this was, that two weeks later, I suddenly got over 300 hits on my blog (which usually has around 10 to 20 hits per day). I had a quick look at the stats and noticed that all of them went directly to my Build Bunny post.</p>
<p><a href="http://www.trimagination.info/wp-content/uploads/2009/01/nabaztag.jpg" target="_new"><img class="size-medium wp-image-186 alignright" title="nabaztag" src="http://www.trimagination.info/wp-content/uploads/2009/01/nabaztag-248x300.jpg" alt="nabaztag" width="248" height="300" /></a></p>
<p>However, the article didnt actually contain anything of any interest. And the referers didn&#8217;t show how those people got to my blog. Today, I noticed that there are still visitors looking for Brian (did you notice, that I had a typo in the headline?). This time I got curious. Where did those people come from anyway. So I had a closer look into the stats.</p>
<p>And guess what: From Redmond. Microsoft Corp.</p>
<p>This is so typical. I post really interesting stuff about <a href="http://www.trimagination.info/2009/01/12/quitting-microsoft-windows-live-onecare-part-iii-finally/" target="_blank">how to quit Microsoft Windows Live OneCare</a>, <a href="http://www.trimagination.info/2009/01/13/why-windows-7-calculator-does-change-peoples-minds/" target="_blank">why Microsoft Windows 7 will kick ass</a>, the all new Microsoft Team Foundation Server 2008 <a href="http://www.trimagination.info/2009/01/05/team-foundation-server-branching-guide-20/" target="_blank">Branching Guide 2.0</a>, <a href="http://www.trimagination.info/2009/01/23/automatically-generate-release-notes-textfile-from-team-foundation-build/" target="_blank">how to generate Release Notes</a> with Microsoft Team Foundation Server 2008 Team Build and automate the <a href="http://www.trimagination.info/2009/01/28/how-to-let-team-build-automatically-increment-the-assemblys-version-information/" target="_blank">incrementing of Assembly version numbers</a> (thanks again, <a href="http://blogs.msdn.com/cbinder/archive/2007/03/15/wie-inkrementiere-ich-meine-assembly-versionen-automatisch-mit-tfs-build.aspx" target="_blank">Chris</a>!). And they come for looking at a youtube video about Brian the Build Bunny.</p>
<p>Time to get one and do something with it, they really find interesting.</p>
<p>Since I can safely assume, that you guys from Microsoft still visit my blog for Brian, could you please add comments about why and where you got the link from? <img src='http://www.trimagination.info/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.trimagination.info/2009/01/29/brian-the-build-bunny-part-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to let Team Build automatically increment the Assemblys&#8217; version information</title>
		<link>http://www.trimagination.info/2009/01/28/how-to-let-team-build-automatically-increment-the-assemblys-version-information/</link>
		<comments>http://www.trimagination.info/2009/01/28/how-to-let-team-build-automatically-increment-the-assemblys-version-information/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 18:27:50 +0000</pubDate>
		<dc:creator>cjacob</dc:creator>
				<category><![CDATA[Entwicklung]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.trimagination.info/?p=179</guid>
		<description><![CDATA[First of all let me say that credit goes to Christian Binder whose blog article was the reason why I got things working in the first place. Thank Chris! Since his howto is in german, I will translate most of it here. For reference, please visit his blog!
So this is what this article is about: [...]]]></description>
			<content:encoded><![CDATA[<p>First of all let me say that credit goes to Christian Binder whose blog article was the reason why I got things working in the first place. Thank Chris! Since his howto is in german, I will translate most of it here. For reference, please visit his <a href="http://blogs.msdn.com/cbinder/archive/2007/03/15/wie-inkrementiere-ich-meine-assembly-versionen-automatisch-mit-tfs-build.aspx" target="_blank">blog</a>!</p>
<p><span id="more-179"></span>So this is what this article is about: Imagine you were doing nightly builds of your software. Sure enough you wouldn&#8217;t want to touch every AssemblyInfo.cs or .vb every day only for manually incrementing the version number. The Assembly version number basically looks like this:</p>
<p>MajorVersion.MinorVersion.BuildNumber.Revision.</p>
<p>What you want to achieve is that you can see the Assembly version in the file properties in explorer so that you know which release build it refers to.</p>
<p>To know which release build the Assembly refers to, you need the buildnumber Team Build assigned to the release. The naming convention looks like this: Buildname + Date + Revision. So if you built your FooBar application today already the third time, its buildnumber would be FooBar_20090128.3. Easy, huh?</p>
<p>While FooBar&#8217;s sources are labled with that buildnumber, the Assembly properties are not altered.</p>
<p>The settings you would want Team Build to alter are these:</p>
<p><span style="font-size: x-small;"><span style="color: #008080;"><span style="font-family: Tahoma;">// Version information for an assembly consists of the following four values:<br />
//<br />
// Major Version<br />
// Minor Version<br />
// Build Number<br />
// Revision<br />
//<br />
// You can specify all the values or you can default the Revision and Build Numbers<br />
// by using the &#8216;*&#8217; as shown below:<br />
[assembly: AssemblyVersion("1.0.0.0")]<br />
[assembly: AssemblyFileVersion("1.0.0.0")]</span></span><span style="font-family: Courier New;"> </span></span></p>
<p>Before I go into details about what Chris did to get things working, let me add the following:</p>
<p>My project consists of several solutions. I have libraries for example that are shared amongst several projects. This is why I only wanted to have build definitions that contained the main project and the referenced libraries. However, for automatically checking out and back in the AssemblyInfo files while editing them at build time, Chris uses the <strong>/recursive</strong> argument to recursively go through all subdirectories and touch all AssemblyInfo files. When having more than one workspace in your build definition that explicitly copy only specific projects to Team Builds&#8217; local workspace, that does not work.</p>
<p>However, he also shows how to create a list of all AssemblyInfo files within the folder structure. And I changed his TFS tasks so that instead of the recursive argument the list generated earlier is used. That works like a charm!</p>
<p>And this is how you extend the build process to let Team Build automatically set the version information:</p>
<h3> 1. Download and install AssemblyInfoTask</h3>
<p>You need to get this custom build task. Chris references the original source at gotdotnet.com which does not exist anymore. Either search for the text AssemblyInfoTaskvers with google or try <a href="http://code.msdn.microsoft.com/AssemblyInfoTaskvers/Release/ProjectReleases.aspx?ReleaseId=232" target="_blank">this</a> link. It should redirect you to the download area on MSDN where you can get the lates setup release.</p>
<h3>2. Import the task into your build project</h3>
<p>Open Source Control in Visual Studio and make sure you have a local copy of the build project in your workspace. Then check out the TFSBuild.proj file (<em>Unchanged, keep any existing lock</em>) and open it. Add the following line right after the import of Microsoft.TeamFoundation.Build.targets: </p>
<div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New">
<p style="MARGIN: 0px"><span style="COLOR: blue">&lt;</span><span style="COLOR: #a31515">Import</span><span style="COLOR: blue"> </span><span style="COLOR: red">Project</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">$(MSBuildExtensionsPath)\Microsoft\AssemblyInfoTask\Microsoft.VersionNumber.Targets</span>&#8220;<span style="COLOR: blue">/&gt;</span> </p>
</div>
<h3>3. Use a custom task for retrieving the revision number</h3>
<p>Each buildnumber contains a revision: FooBar_20090128.<span style="color: #ff0000;">3 </span>What we want to do is using this revision number also as revision in our Assembly version. So we need to implement a custom build task that is able to extract the revision number from the buildnumber so that we can assign it to the Assemblys&#8217; revision number. At the end of this article, I will post the sources you will need.</p>
<p>Right after the import statement from above, register this custom build task by adding the following line: </p>
<div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New">
<p style="MARGIN: 0px"><span style="COLOR: blue">&lt;</span><span style="COLOR: #a31515">UsingTask</span><span style="COLOR: blue"> </span><span style="COLOR: red">TaskName</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">ExtractRevision.ExtractRevisionTask</span>&#8220;<span style="COLOR: blue"> </span><span style="COLOR: red">AssemblyFile</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">ExtractRevision.dll</span>&#8220;<span style="COLOR: blue">/&gt;</span> </p>
</div>
<h3> 4. Add a property group for setting the assembly information</h3>
<p>To configure all assembly properties and format the number formats respectively, add the following lines to your project file:</p>
<div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New">
<p style="MARGIN: 0px"><span style="COLOR: blue">  &lt;</span><span style="COLOR: #a31515">PropertyGroup</span><span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;!&#8211;</span><span style="COLOR: green"> Assembly version properties. Add others here </span><span style="COLOR: blue">&#8211;&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;</span><span style="COLOR: #a31515">AssemblyMajorVersion</span><span style="COLOR: blue">&gt;</span>4<span style="COLOR: blue">&lt;/</span><span style="COLOR: #a31515">AssemblyMajorVersion</span><span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;</span><span style="COLOR: #a31515">AssemblyMinorVersion</span><span style="COLOR: blue">&gt;</span>0<span style="COLOR: blue">&lt;/</span><span style="COLOR: #a31515">AssemblyMinorVersion</span><span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;</span><span style="COLOR: #a31515">AssemblyBuildNumber</span><span style="COLOR: blue">&gt;</span>0<span style="COLOR: blue">&lt;/</span><span style="COLOR: #a31515">AssemblyBuildNumber</span><span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;</span><span style="COLOR: #a31515">AssemblyRevision</span><span style="COLOR: blue">&gt;</span>0<span style="COLOR: blue">&lt;/</span><span style="COLOR: #a31515">AssemblyRevision</span><span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"> </p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;</span><span style="COLOR: #a31515">AssemblyFileMajorVersion</span><span style="COLOR: blue">&gt;</span>4<span style="COLOR: blue">&lt;/</span><span style="COLOR: #a31515">AssemblyFileMajorVersion</span><span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;</span><span style="COLOR: #a31515">AssemblyFileMinorVersion</span><span style="COLOR: blue">&gt;</span>0<span style="COLOR: blue">&lt;/</span><span style="COLOR: #a31515">AssemblyFileMinorVersion</span><span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;</span><span style="COLOR: #a31515">AssemblyFileBuildNumber</span><span style="COLOR: blue">&gt;</span>0<span style="COLOR: blue">&lt;/</span><span style="COLOR: #a31515">AssemblyFileBuildNumber</span><span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;</span><span style="COLOR: #a31515">AssemblyFileRevision</span><span style="COLOR: blue">&gt;</span>0<span style="COLOR: blue">&lt;/</span><span style="COLOR: #a31515">AssemblyFileRevision</span><span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"> </p>
<p style="MARGIN: 0px"> </p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;</span><span style="COLOR: #a31515">AssemblyBuildNumberType</span><span style="COLOR: blue">&gt;</span>DateString<span style="COLOR: blue">&lt;/</span><span style="COLOR: #a31515">AssemblyBuildNumberType</span><span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;</span><span style="COLOR: #a31515">AssemblyBuildNumberFormat</span><span style="COLOR: blue">&gt;</span>MMdd<span style="COLOR: blue">&lt;/</span><span style="COLOR: #a31515">AssemblyBuildNumberFormat</span><span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;</span><span style="COLOR: #a31515">AssemblyRevisionType</span><span style="COLOR: blue">&gt;</span>NoIncrement<span style="COLOR: blue">&lt;/</span><span style="COLOR: #a31515">AssemblyRevisionType</span><span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;</span><span style="COLOR: #a31515">AssemblyRevisionFormat</span><span style="COLOR: blue">&gt;</span>0<span style="COLOR: blue">&lt;/</span><span style="COLOR: #a31515">AssemblyRevisionFormat</span><span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"> </p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;</span><span style="COLOR: #a31515">AssemblyFileBuildNumberType</span><span style="COLOR: blue">&gt;</span>DateString<span style="COLOR: blue">&lt;/</span><span style="COLOR: #a31515">AssemblyFileBuildNumberType</span><span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;</span><span style="COLOR: #a31515">AssemblyFileBuildNumberFormat</span><span style="COLOR: blue">&gt;</span>MMdd<span style="COLOR: blue">&lt;/</span><span style="COLOR: #a31515">AssemblyFileBuildNumberFormat</span><span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;</span><span style="COLOR: #a31515">AssemblyFileRevisionType</span><span style="COLOR: blue">&gt;</span>NoIncrement<span style="COLOR: blue">&lt;/</span><span style="COLOR: #a31515">AssemblyFileRevisionType</span><span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;</span><span style="COLOR: #a31515">AssemblyFileRevisionFormat</span><span style="COLOR: blue">&gt;</span>0<span style="COLOR: blue">&lt;/</span><span style="COLOR: #a31515">AssemblyFileRevisionFormat</span><span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"> </p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;!&#8211;</span><span style="COLOR: green"> Dump the TFS BuildNumber to the Assembly Comment Prop </span><span style="COLOR: blue">&#8211;&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;</span><span style="COLOR: #a31515">AssemblyDescription</span><span style="COLOR: blue">&gt;</span>$(BuildNumber)<span style="COLOR: blue">&lt;/</span><span style="COLOR: #a31515">AssemblyDescription</span><span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"> </p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;!&#8211;</span><span style="COLOR: green"> TF.exe </span><span style="COLOR: blue">&#8211;&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;</span><span style="COLOR: #a31515">TF</span><span style="COLOR: blue">&gt;</span><span style="COLOR: red">&amp;quot;</span>$(TeamBuildRefPath)\..\tf.exe<span style="COLOR: red">&amp;quot;</span><span style="COLOR: blue">&lt;/</span><span style="COLOR: #a31515">TF</span><span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;!&#8211;</span><span style="COLOR: green"> AssemblyInfo file </span><span style="COLOR: blue">&#8211;&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;</span><span style="COLOR: #a31515">AssemblyInfoSpec</span><span style="COLOR: blue">&gt;</span>AssemblyInfo.*<span style="COLOR: blue">&lt;/</span><span style="COLOR: #a31515">AssemblyInfoSpec</span><span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">  &lt;/</span><span style="COLOR: #a31515">PropertyGroup</span><span style="COLOR: blue">&gt;</span> </p>
</div>
<h3>5. Set the revision number</h3>
<p>By altering the target CheckSettingsForEndToEndIteration, you can use the custom build task you have yet to implement for extracting the revision number from the buildnumber and add it to the assembly version:</p>
<p style="MARGIN: 0px"><span style="COLOR: blue">  &lt;!&#8211;</span><span style="COLOR: green"> Use the ExtractRevionTask to get the RevionNumber out of the BuildNumber. </span></p>
<p style="MARGIN: 0px"><span style="COLOR: green">       Update the AssemblyInfoTask Properties with the result BuildRevision. </span><span style="COLOR: blue">&#8211;&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">  &lt;</span><span style="COLOR: #a31515">Target</span><span style="COLOR: blue"> </span><span style="COLOR: red">Name</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">CheckSettingsForEndToEndIteration</span>&#8220;<span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"> </p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;!&#8211;</span><span style="COLOR: green">for 2008 use the GetBuildProperties Task to get the BuildNumber </span><span style="COLOR: blue">&#8211;&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;</span><span style="COLOR: #a31515">GetBuildProperties</span><span style="COLOR: blue"> </span><span style="COLOR: red">TeamFoundationServerUrl</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">$(TeamFoundationServerUrl)</span>&#8220;<span style="COLOR: blue"> </span><span style="COLOR: red">BuildUri</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">$(BuildUri)</span>&#8220;<span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">      &lt;</span><span style="COLOR: #a31515">Output</span><span style="COLOR: blue"> </span><span style="COLOR: red">TaskParameter</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">BuildNumber</span>&#8220;<span style="COLOR: blue"> </span><span style="COLOR: red">PropertyName</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">BuildNumber</span>&#8220;<span style="COLOR: blue">&gt;&lt;/</span><span style="COLOR: #a31515">Output</span><span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;/</span><span style="COLOR: #a31515">GetBuildProperties</span><span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"> </p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;!&#8211;</span><span style="COLOR: green">  extract the BuildRevision </span><span style="COLOR: blue">&#8211;&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;</span><span style="COLOR: #a31515">ExtractRevisionTask</span><span style="COLOR: blue"> </span><span style="COLOR: red">BuildNumber</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">$(BuildNumber)</span>&#8220;<span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">      &lt;</span><span style="COLOR: #a31515">Output</span><span style="COLOR: blue"> </span><span style="COLOR: red">TaskParameter</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">BuildRevision</span>&#8220;<span style="COLOR: blue"> </span><span style="COLOR: red">PropertyName</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">BuildRevision</span>&#8220;<span style="COLOR: blue"> /&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;/</span><span style="COLOR: #a31515">ExtractRevisionTask</span><span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"> </p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;!&#8211;</span><span style="COLOR: green">  update the AssemblyInfo Props </span><span style="COLOR: blue">&#8211;&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;</span><span style="COLOR: #a31515">CreateProperty</span><span style="COLOR: blue"> </span><span style="COLOR: red">Value</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">$(BuildRevision)</span>&#8220;<span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">      &lt;</span><span style="COLOR: #a31515">Output</span><span style="COLOR: blue"> </span><span style="COLOR: red">TaskParameter</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">Value</span>&#8220;<span style="COLOR: blue"> </span><span style="COLOR: red">PropertyName</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">AssemblyRevision</span>&#8220;<span style="COLOR: blue">/&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;/</span><span style="COLOR: #a31515">CreateProperty</span><span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;</span><span style="COLOR: #a31515">CreateProperty</span><span style="COLOR: blue"> </span><span style="COLOR: red">Value</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">$(BuildRevision)</span>&#8220;<span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">      &lt;</span><span style="COLOR: #a31515">Output</span><span style="COLOR: blue"> </span><span style="COLOR: red">TaskParameter</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">Value</span>&#8220;<span style="COLOR: blue"> </span><span style="COLOR: red">PropertyName</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">AssemblyFileRevision</span>&#8220;<span style="COLOR: blue">/&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;/</span><span style="COLOR: #a31515">CreateProperty</span><span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"> </p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;!&#8211;</span><span style="COLOR: green">  just needed if you populate the AssemblyDescription  too like in the sample  </span><span style="COLOR: blue">&#8211;&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;</span><span style="COLOR: #a31515">CreateProperty</span><span style="COLOR: blue"> </span><span style="COLOR: red">Value</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">$(BuildNumber)</span>&#8220;<span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">      &lt;</span><span style="COLOR: #a31515">Output</span><span style="COLOR: blue"> </span><span style="COLOR: red">TaskParameter</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">Value</span>&#8220;<span style="COLOR: blue"> </span><span style="COLOR: red">PropertyName</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">AssemblyDescription</span>&#8220;<span style="COLOR: blue">/&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;/</span><span style="COLOR: #a31515">CreateProperty</span><span style="COLOR: blue">&gt;</span></p>
<h3 style="MARGIN: 0px"><span style="COLOR: blue">  &lt;/</span><span style="COLOR: #a31515">Target</span><span style="COLOR: blue">&gt;</span></h3>
<p><!--EndFragment--></p>
<h3>6. Check out and back in all AssemblyInfo.[cs|vb] files from your workspaces</h3>
<p>Before you can alter the AssemblyInfo files, you need to let Team Build check them out:</p>
<div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New">
<p style="MARGIN: 0px"><span style="COLOR: blue">  &lt;!&#8211;</span><span style="COLOR: green"> Use TF to check-out/In the assemblyinfo files to persist updated Version Info </span><span style="COLOR: blue">&#8211;&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">  &lt;</span><span style="COLOR: #a31515">Target</span><span style="COLOR: blue"> </span><span style="COLOR: red">Name</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">AfterGet</span>&#8220;<span style="COLOR: blue"> </span><span style="COLOR: red">Condition</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">&#8216;$(IsDesktopBuild)&#8217;!=&#8217;true&#8217;</span>&#8220;<span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"> </p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;!&#8211;</span><span style="COLOR: green"> Set the AssemblyInfoFiles items dynamically </span><span style="COLOR: blue">&#8211;&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;</span><span style="COLOR: #a31515">CreateItem</span><span style="COLOR: blue"> </span><span style="COLOR: red">Include</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">$(SolutionRoot)\**\$(AssemblyInfoSpec)</span>&#8220;<span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">      &lt;</span><span style="COLOR: #a31515">Output</span><span style="COLOR: blue"> </span><span style="COLOR: red">ItemName</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">AssemblyInfoFiles</span>&#8220;<span style="COLOR: blue"> </span><span style="COLOR: red">TaskParameter</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">Include</span>&#8220;<span style="COLOR: blue"> /&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;/</span><span style="COLOR: #a31515">CreateItem</span><span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"> </p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;</span><span style="COLOR: #a31515">Message</span><span style="COLOR: blue"> </span><span style="COLOR: red">Text</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">These AssemblyInfo.* files were found:</span>&#8220;<span style="COLOR: blue">/&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;</span><span style="COLOR: #a31515">Message</span><span style="COLOR: blue"> </span><span style="COLOR: red">Text</span><span style="COLOR: blue"> =</span>&#8220;<span style="COLOR: blue">@(AssemblyInfoFiles)</span>&#8220;<span style="COLOR: blue">/&gt;</span></p>
<p style="MARGIN: 0px"> </p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;</span><span style="COLOR: #a31515">Exec</span><span style="COLOR: blue"> </span><span style="COLOR: red">WorkingDirectory</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">$(SolutionRoot)</span>&#8220;</p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    </span><span style="COLOR: red">Command</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">$(TF) checkout </span><span style="COLOR: red">&amp;quot;</span><span style="COLOR: blue">@(AssemblyInfoFiles, &#8216;</span><span style="COLOR: red">&amp;quot;</span><span style="COLOR: blue"> </span><span style="COLOR: red">&amp;quot;</span><span style="COLOR: blue">&#8216;)</span><span style="COLOR: red">&amp;quot;</span>&#8220;<span style="COLOR: blue">/&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">  &lt;/</span><span style="COLOR: #a31515">Target</span><span style="COLOR: blue">&gt;</span></p>
</div>
<p><!--EndFragment--></p>
<p> Right after the altered files have been compiled, you can check them back in:</p>
<div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New">
<p style="MARGIN: 0px"><span style="COLOR: blue">  &lt;</span><span style="COLOR: #a31515">Target</span><span style="COLOR: blue"> </span><span style="COLOR: red">Name</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">AfterCompile</span>&#8220;<span style="COLOR: blue"> </span><span style="COLOR: red">Condition</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">&#8216;$(IsDesktopBuild)&#8217;!=&#8217;true&#8217;</span>&#8220;<span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;</span><span style="COLOR: #a31515">Exec</span><span style="COLOR: blue"> </span><span style="COLOR: red">WorkingDirectory</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">$(SolutionRoot)</span>&#8220;</p>
<p style="MARGIN: 0px"> </p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    </span><span style="COLOR: red">Command</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">$(TF) checkin /comment:</span><span style="COLOR: red">&amp;quot;</span><span style="COLOR: blue">Auto-Build: Version Update</span><span style="COLOR: red">&amp;quot;</span><span style="COLOR: blue"> /noprompt /override:</span><span style="COLOR: red">&amp;quot;</span><span style="COLOR: blue">Auto-Build: Version Update</span><span style="COLOR: red">&amp;quot;</span><span style="COLOR: blue"> </span><span style="COLOR: red">&amp;quot;</span><span style="COLOR: blue">@(AssemblyInfoFiles, &#8216;</span><span style="COLOR: red">&amp;quot;</span><span style="COLOR: blue"> </span><span style="COLOR: red">&amp;quot;</span><span style="COLOR: blue">&#8216;)</span><span style="COLOR: red">&amp;quot;</span>&#8220;<span style="COLOR: blue">/&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">  &lt;/</span><span style="COLOR: #a31515">Target</span><span style="COLOR: blue">&gt;</span><span style="color: #008080;"> </span></p>
</div>
<p>Just in case anything bad happens, there is a way of undoing the changes:</p>
<p style="MARGIN: 0px"><span style="COLOR: blue">  &lt;!&#8211;</span><span style="COLOR: green"> In case of Build failure, the AfterCompile target is not executed. Undo the changes </span><span style="COLOR: blue">&#8211;&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">  &lt;</span><span style="COLOR: #a31515">Target</span><span style="COLOR: blue"> </span><span style="COLOR: red">Name</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">BeforeOnBuildBreak</span>&#8220;<span style="COLOR: blue"> </span><span style="COLOR: red">Condition</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">&#8216;$(IsDesktopBuild)&#8217;!=&#8217;true&#8217;</span>&#8220;<span style="COLOR: blue">&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    &lt;</span><span style="COLOR: #a31515">Exec</span><span style="COLOR: blue"> </span><span style="COLOR: red">WorkingDirectory</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">$(SolutionRoot)</span>&#8220;</p>
<p style="MARGIN: 0px"><span style="COLOR: blue">    </span><span style="COLOR: red">Command</span><span style="COLOR: blue">=</span>&#8220;<span style="COLOR: blue">$(TF) undo /noprompt </span><span style="COLOR: red">&amp;quot;</span><span style="COLOR: blue">@(AssemblyInfoFiles, &#8216;</span><span style="COLOR: red">&amp;quot;</span><span style="COLOR: blue"> </span><span style="COLOR: red">&amp;quot;</span><span style="COLOR: blue">&#8216;)</span><span style="COLOR: red">&amp;quot;</span>&#8220;<span style="COLOR: blue">/&gt;</span></p>
<p style="MARGIN: 0px"><span style="COLOR: blue">  &lt;/</span><span style="COLOR: #a31515">Target</span><span style="COLOR: blue">&gt;</span></p>
<h3><!--EndFragment--> 7. Implement the ExtractRevision custom build task</h3>
<p>Simply create a new C# library project with the following class (and add a strong name to it by signing it in the project properties):</p>
<div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New">
<p style="MARGIN: 0px"><span style="COLOR: blue">namespace</span> ExtractRevision</p>
<p style="MARGIN: 0px">{</p>
<p style="MARGIN: 0px">    <span style="COLOR: blue">using</span> Microsoft.Build.Framework;</p>
<p style="MARGIN: 0px">    <span style="COLOR: blue">using</span> Microsoft.Build.Utilities;</p>
<p style="MARGIN: 0px"> </p>
<p style="MARGIN: 0px">    <span style="COLOR: blue">public</span> <span style="COLOR: blue">class</span> <span style="COLOR: #2b91af">ExtractRevisionTask</span> : <span style="COLOR: #2b91af">Task</span></p>
<p style="MARGIN: 0px">    {</p>
<p style="MARGIN: 0px">        <span style="COLOR: blue">public</span> <span style="COLOR: blue">override</span> <span style="COLOR: blue">bool</span> Execute()</p>
<p style="MARGIN: 0px">        {</p>
<p style="MARGIN: 0px">            <span style="COLOR: blue">int</span> indexOfDot = buildNumber.LastIndexOf(<span style="COLOR: #a31515">&#8220;.&#8221;</span>);</p>
<p style="MARGIN: 0px">            <span style="COLOR: blue">if</span> (indexOfDot != -1 &amp; indexOfDot != buildNumber.Length &#8211; 1)</p>
<p style="MARGIN: 0px">            {</p>
<p style="MARGIN: 0px">                buildRevision = buildNumber.Substring(indexOfDot + 1, buildNumber.Length &#8211; (indexOfDot + 1));</p>
<p style="MARGIN: 0px">            }</p>
<p style="MARGIN: 0px">            <span style="COLOR: blue">else</span></p>
<p style="MARGIN: 0px">            {</p>
<p style="MARGIN: 0px">                <span style="COLOR: green">//there is no char following the dot or we can&#8217;t find a dot </span></p>
<p style="MARGIN: 0px">                buildRevision = <span style="COLOR: #a31515">&#8220;0&#8243;</span>;</p>
<p style="MARGIN: 0px">            }</p>
<p style="MARGIN: 0px">            <span style="COLOR: blue">return</span> <span style="COLOR: blue">true</span>;</p>
<p style="MARGIN: 0px">        }</p>
<p style="MARGIN: 0px"> </p>
<p style="MARGIN: 0px">        <span style="COLOR: blue">private</span> <span style="COLOR: blue">string</span> buildRevision;</p>
<p style="MARGIN: 0px">        <span style="COLOR: blue">private</span> <span style="COLOR: blue">string</span> buildNumber;</p>
<p style="MARGIN: 0px"> </p>
<p style="MARGIN: 0px">        <span style="COLOR: blue">public</span> <span style="COLOR: blue">string</span> BuildNumber</p>
<p style="MARGIN: 0px">        {</p>
<p style="MARGIN: 0px">            <span style="COLOR: blue">set</span> { buildNumber = <span style="COLOR: blue">value</span>; }</p>
<p style="MARGIN: 0px">        }</p>
<p style="MARGIN: 0px"> </p>
<p style="MARGIN: 0px">        [<span style="COLOR: #2b91af">Output</span>]</p>
<p style="MARGIN: 0px">        <span style="COLOR: blue">public</span> <span style="COLOR: blue">string</span> BuildRevision</p>
<p style="MARGIN: 0px">        {</p>
<p style="MARGIN: 0px">            <span style="COLOR: blue">get</span> { <span style="COLOR: blue">return</span> buildRevision; }</p>
<p style="MARGIN: 0px">        }</p>
<p style="MARGIN: 0px">    }</p>
<p style="MARGIN: 0px">}</p>
<p style="MARGIN: 0px"> </p>
<p style="MARGIN: 0px">You need to check in the .dll file directly into your TeamBuildTypes folder on TFS.</p>
</div>
<p><!--EndFragment--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.trimagination.info/2009/01/28/how-to-let-team-build-automatically-increment-the-assemblys-version-information/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Automatically generate release notes textfile from Team Foundation Build</title>
		<link>http://www.trimagination.info/2009/01/23/automatically-generate-release-notes-textfile-from-team-foundation-build/</link>
		<comments>http://www.trimagination.info/2009/01/23/automatically-generate-release-notes-textfile-from-team-foundation-build/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 12:22:04 +0000</pubDate>
		<dc:creator>cjacob</dc:creator>
				<category><![CDATA[Entwicklung]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.trimagination.info/?p=161</guid>
		<description><![CDATA[I recently found out about a blog entry written by Grant Holliday, that describes how to extend an MS Build process within an automated Team Foundation Build so that a release notes textfile is generated and copied to the drop location.
This basically goes something like this:

Download and install the MS Build Community Tasks from tigris
Download [...]]]></description>
			<content:encoded><![CDATA[<p>I recently found out about a <a href="http://ozgrant.com/2008/02/19/building-a-release-notes-text-file-with-team-build/" target="_blank">blog entry</a> written by Grant Holliday, that describes how to extend an MS Build process within an automated Team Foundation Build so that a release notes textfile is generated and copied to the drop location.</p>
<p>This basically goes something like this:</p>
<ol>
<li>Download and install the <a href="http://msbuildtasks.tigris.org/" target="_blank">MS Build Community Tasks from tigris</a></li>
<li>Download and install the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=2FB55371-C94E-4373-B0E9-DB4816552E41&amp;displaylang=en" target="_blank">MSXSL.exe tool from Microsoft</a></li>
<li>Extend the build.proj file</li>
</ol>
<p>This process involves the WebDownload build tasks that retrieves the buildlog.xml file from the respective TFS webservice after the build is done. Nex step is transforming the xml file to generate a releasenotes.txt file.</p>
<p>Everything you need to know to get things done is very well documented on Hollidays blog.</p>
<p>However, there are two things to notice: First, you need to download the Community Tasks msi file directly from tigris. The link, Holliday provides, leads to an outdated version that does not include the UseDefaultCredentials property. The result ist, that the process will terminate with a 401 error due to missing authorization.</p>
<p>Second, Holliday does not provide an example xsl file for transformation of the xml file.</p>
<p>To achieve the same result as Holliday does (and shows on the blurry screenshot), you can try using the following xsl file: <a href="http://www.trimagination.info/wp-content/uploads/2009/01/releasenotes1.xsl">ReleaseNotes.xsl</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.trimagination.info/2009/01/23/automatically-generate-release-notes-textfile-from-team-foundation-build/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Team Foundation Server Branching Guide 2.0</title>
		<link>http://www.trimagination.info/2009/01/05/team-foundation-server-branching-guide-20/</link>
		<comments>http://www.trimagination.info/2009/01/05/team-foundation-server-branching-guide-20/#comments</comments>
		<pubDate>Mon, 05 Jan 2009 21:18:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Entwicklung]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.trimagination.info/?p=143</guid>
		<description><![CDATA[The TFS Rangers recently releases a revised version of their popular Branching Guide. The new version contains several pdf files with information about branching in Team Foundation Server 2008 and different scenarious as well as a Q&#38;A, a poster, branching drawins and a couple of examples with hands on labs.
Learn everything about it here: TFS Branching [...]]]></description>
			<content:encoded><![CDATA[<p>The TFS Rangers recently releases a revised version of their popular Branching Guide. The new version contains several pdf files with information about branching in Team Foundation Server 2008 and different scenarious as well as a Q&amp;A, a poster, branching drawins and a couple of examples with hands on labs.</p>
<p>Learn everything about it here: <a href="http://www.codeplex.com/TFSBranchingGuideII">TFS Branching Guide 2.0 &#8211; Home </a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.trimagination.info/2009/01/05/team-foundation-server-branching-guide-20/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
