Plunging into .NET Development

Weblog Pieter Gheysens
Microsoft .NET Development - C# - Enterprise Library - Visual Studio 2005 Team System - Compuware DevPartner - ...
 


Sunday, April 27

VISUG : Heroes Happen Here redeliveries

It will be a very busy month May for the Visual Studio User group in Belgium. 8 sessions are on our agenda at different locations :
  • Heroes Happen Here redeliveries
    • May 6 : The ABC of WCF (Peter Himschoot) - Merelbeke
    • May 7 : Team Foundation Server (Pieter Gheysens) - Zaventem
    • May 13 : The ABC of WCF (Peter Himschoot) - Kortrijk
    • May 14 : ASP.NET 3.5, AJAX and LINQ (Gill Cleeren) - Lummen
    • May 21 : Team Foundation Server (Pieter Gheysens) - Kontich
    • May 27 : Workflow Foundation in .NET 3.5 (Kurt Claeys) - Merelbeke
    • May 28 : Workflow Foundation in .NET 3.5 (Kurt Claeys) - Kortrijk
  • Other
    • May 20 : VSX, Extend Your Visual Studio Development Experience (Ken Levy) - Schelle
The original session of Gill Cleeren (ASP.NET 3.5, AJAX and LINQ) on May 20 is replaced by the VSX session of Ken Levy. We couldn't miss the opportunity to host this great session on Visual Studio Extensibility with Ken Levy. We will probably arrange a new date for the ASP.NET 3.5, AJAX and LINQ session in June.

More information and registration details on the visug website! Note that we will also give away some Heroes Happen Here DVD boxes with 1 year trial software of Windows Server 2008, Visual Studio 2008 and SQL Server 2008 ... together with a 1 year trial version of Windows Vista Ultimate (SP1). Another good reason to join our HHH redeliveries!

Labels:

Saturday, April 26

#5 - How to build an old version?

Category : Administering a Team Build

It might be needed to perform a Team Build of a specific version of your source in the past. No problem with Team Build! You can instruct the Build Server to get your sources on label, date or changeset.

  • Team Foundation Server 2008
    In TFS 2008, you may use the response file (.rsp) in your team build to override MS Build properties. Response files are automatically created text files that may contain MSBuild.exe command line switches. To override the default latest version of your source that's retrieved during a get latest, you have to set the SourceGetVersion property with the value of a specific label, date or changeset ...
    • /p:SourceGetVersion="C10" [points to source up to changeset 10]
    • /p:SourceGetVersion="MyLabel" [points to source up to label MyLabel]
    • /p:SourceGetVersion="D01/13/08" [points to source up to date January 13, 2008]
  • Team Foundation Server 2005
    In TFS 2005 it's a bit more complex because you also need to update the Get task with the Version property in the Microsoft.TeamBuild.targets file on the Build Server [%ProgramFiles%\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamBuild.targets]. This MSDN forum post explains how to set it up for TFS 2005.

Labels:

Thursday, April 17

ASP.NET Data Presentation Controls

A while ago I received an ASP.NET book of Packt Publishing to review.

   ASP.NET Data Presentation Controls Essentials (Joydip Kanjilal)
The ASP.NET Data Presentation Controls are server controls to which you can bind data for organizations and displaying in different ways.

This book shows you how to get the most from these controls to easily display and manage complex data in your web applications. The book takes you through each of the major data presentation controls in ASP.NET in a systematic way, gets you started using them, and then shows you how to use them in your applications for managing data. You will find many examples that can be reused in your daily applications. This book covers LINQ and data binding to ASP.NET 3.5 (Orcas)

In my opinion the book targets developers who are quite new to databinding and want to have a broad overview of all possible data bound controls. The author shares a lot of code snippets in C# that might be useful if you're starting with databinding in web applications. It's a pity that the code snippets are not really optimized for .NET 2.0 ... I still noticed some references to an ArrayList while it's already very common these days to use a generic list in .NET 2.0 to be type-safe and to avoid boxing/unboxing of value types. On the other hand, the book has a separate chapter on working with LINQ (.NET 3.5). A bit contradictory if you ask me, but if you're looking for a book that really focuses on databinding in ASP.NET : this is the one!

Labels:

Saturday, April 12

#4 - Shelving

Category : Source Control Guidelines

Shelving was introduced with the release of Team Foundation Server 2005 but there still seems to be a lot of confusion of how and when to use it. Shelving actually lets you set aside temporarily a group of pending changes together with pending check-in notes, a comment, and a list of associated work items. These modifications are stored on the Team Foundation Server but are not officially checked in into Source Control.

You may use this technique in the following scenarios:
  • Shelve to backup pending changes
    When you're working on a set of changes and at the end of the day you're not ready tho check-in, you may store those changes on the Team Foundation Server for backup purposes so you won't loose your work if something bad happens with your local development computer. You (or somebody else on your team) can pickup (unshelve) those changes later from any development computer.
  • Shelve to review your pending changes
    By shelving your work-in-progress code, you can invite others to review your code without checking in those changes in Source Control. This will prevent to check in unsafe code. You can also hand off partially finished work to another developer in your team.
  • Shelve to switch your development context
    In certain cases, you will be working on a feature with a lof of work-in-progress, while you need to switch urgently to another task that has higher priority. For this scenario, you can shelve all your pending changes to temporarily work on the high priority task. When you're done with the task you can unshelve your pending changes and get back to work on the feature. You won't have lost your work while you switched back to a stable version of the code.
Unshelving is the opposite of shelving and restores shelved file revisions, check-in notes, comments, and work item associations to the current workspace. When you unshelve a shelveset, Team Foundation restores each shelved revision into the destination workspace as a pending change as long as the revision does not conflict with a change that was already pending in the workspace.

Three ways to shelve/unshelve:
  • From the pending changes window in Visual Studio
  • From the context menu (right-click) in Visual Studio
  • From the command-line

Labels: