30 August 2008

You can be alerted of failed builds in Team Foundation Server 2008

In Team Foundation Server 2008 you can configure a project alert that sends an alert to your email address when a build completes. This is a very useful if a build fails, but if you enabled continuous integration your inbox will probably contain many alerts of successful builds. The out-of-the-box functionality for configuring alerts is very limited, but luckily Microsoft has released Visual Studio Team System 2008 Team Foundation Server Power Tools which is an add-on to Visual Studio 2008.
One of the tools in this package is called Alert Editor, and it lets you subscribe to build faults in a few simple steps:
  1. Select “Alerts Editor…” from the “Team” menu.
  2. Click “New” on the toolbar to create a new alert.
  3. Select “Failed builds” from the “Build Alerts” sub group, and click OK.
    New Alert
  4. You might have to enter you e-mail address in the Send To field if Team Foundation Server can’t resolve your name.Alert Editor
    This alert has a filter that only sends an alert if StatusCode is not Succeded. If you already has an alert, you can add this clause to your existing alert definition.
  5. Select another alert or close the window to save the changes before testing the alert.
As you see in the previous window, the Alerts Editor is very powerful and you have much more control over your alerts than by only using the standard functionality in Team Foundation Server.

Update: Thanks to TerrenceJ in my comments for recommending an improved filter.

28 August 2008

You can create a windows service in a few minutes

At today's Norwegian .NET User Group (NNUG) meeting in Trondheim, I gave a short zip talk about windows services. I didn't pretend to give a thorough discussion about the ins and outs of windows services, but showed the steps necessary to create a project and install and run the service. I did however talk about some of my own experiences, and focused on the importance of threading and exception handling.

If you're a member of NNUG you can log in and download my simple demo from the following web page:
http://nnug.no/Avdelinger/Trondheim/Moter/NNUG-Trondheim---28-august-2008/

27 August 2008

I created this blog to share things that I think is cool and interesting

This is my second post, and first of all I just want to say thank you for subscribing.

To give you an idea of what to expect, I currently think that the contents of this blog will be about .NET and related technologies. My goal is to write short and informative posts from my own experience, and I hope you'll at least find some of them useful. I will try to avoid repeating information that can be found elsewhere, and instead focus on particular tips and tricks that I think is cool and interesting. I also want to share thoughts on other issues that is important to me, and this will hopefully make this blog more personal.

This is a test of embedding code on blogger.com
<TemplatesExport>
  <Template uid="0fb9eda3-89fa-4507-84c9-8d8b6847e66f" shortcut="tm"
    description="Creates an MS Test method"
 text="[TestMethod, TestCategory(&quot;$TestCategory$&quot;), Owner(&quot;$DomainAndUsername$&quot;)]&#xD;&#xA;public void $Test_method_name$()&#xD;&#xA;{&#xD;&#xA; $END$&#xD;&#xA;}" reformat="True" shortenQualifiedReferences="True">
    <Context>
      <CSharpContext context="TypeMember" minimumLanguageVersion="2.0" />
    </Context>
    <Categories>
      <Category name="MSTest" />
    </Categories>
    <Variables>
      <Variable name="TestCategory"
     expression="list(&quot;,Unit,Integration&quot;)" initialRange="0" />
      <Variable name="DomainAndUsername"
     expression="JoarOyenLiveTemplateMacros.DomainAndUsername()"
  initialRange="-1" />
      <Variable name="Test_method_name"
     expression="JoarOyenLiveTemplateMacros.ValidIdentifier()"
  initialRange="0" />
    </Variables>
    <CustomProperties />
  </Template>
</TemplatesExport>

You can create a blog in a couple of hours

I've been thinking of starting a blog for quite some time now, and I must say that it was much easier than I thought. I started by buying a domain name, and luckily I have a very rare name and joaroyen.com was still available. I bought the domain from GoDaddy, used Diggnation's promotional code, and for $35.75 I have the name for five years.

Next I did a search for blogging software, and landed pretty quickly on Blogger. The main reason is that I didn't want to do my own hosting right away, and Blogger seemed to have the features that suited my needs best. In addition, Blogger has very good documentation of how you can connect your own domain to your blog.

The last thing I set up was FeedBurner so that I can track traffic to this blog (thanks to the two of you that are reading this). In addition this gives me better flexibility if I want to switch to another blogging software in the future.