01 July 2009

MVP Award 2009

While sifting through the “Junk E-Mail” folder in Outlook this morning I came upon something a bit out of place. It was from Support@MVPAward.com. It was the following:

Even though Outlook doesn’t regard this kind of message too highly, I certainly do! After whooping it up I move this message to my Inbox where it belongs and told Outlook that it was a “bad, bad app”. I also added MVPAward.com to my whitelist to avoid such confusion in the future.

Thanks to all the folks at Microsoft, the folks that nominated me, and all the folks that put up with my ramblings on the MSDN forums, this blog and my live presentations.

- Steve

13 June 2009

Connecticut DotNet User Group – Code Camp 2

I’d like to thank everyone that attended my Intro to MSBuild presentation today at the Connecticut DotNet User Group – Code Camp 2.  The audience had some great questions about MSBuild and TFS and I had a great time presenting.

As promised, here is the link to the presentation materials.
http://manicprogrammer.com/cs/files/folders/st_jean/entry8576.aspx

- Steve

05 May 2009

Western Mass. .Net User Group Presentation Download

I’d like to thank Dan Caron and everyone that attended my Intro to MSBuild session at the Western Mass. .Net User Group meeting this evening. 

As promised, here’s a link to the Intro To MSBuild presentation materials and demo files.

http://manicprogrammer.com/cs/files/folders/st_jean/entry8576.aspx

28 April 2009

TFS Warm Standby, Friendly names and incorrect documentation

I’ve been working with a client to get a high-availability TFS installation.  They have decided that a warm-standby App Tier would be beneficial so we cracked open the TFS Installation Guide to get one configured.  Everything worked out well until we got to the second-to-last step.

On the primary application-tier computer, rename the primary server to use the virtual server name. By following this step, you can point to either computer through the DNS method that you chose.

We needed to change TFS so that it used a Friendly Name (Virtual Server Name/HOST record) instead of the primary App Tier’s machine name.  Luckily these steps are documented in the Install Guide.

Configuring Team Foundation Server to Use the Virtual Server Name

You can configure both the standby and the primary servers to use the virtual server name as soon as the name is available in the system. Any existing clients using the name of the primary server can still connect. However, after you activate the standby server, the clients need to reconnect using the virtual server name.

To configure the primary computer to use the virtual server name
  • On the primary computer, activate the virtual server name by using the ActivateAT command of the TfsAdminUtil command-line utility.

    For example, the following command activates TFS_AT as the application-tier server, which is using the same IP Address as the primary server.

    TfsAdminUtil ActivateAT TFS_AT

Unfortunately, this didn’t work.  We wound up with all kinds of errors being thrown.  We couldn’t connect to either the friendly name or machine name from Team Explorer (local or remote).  We could however rename the AT back by putting the machine name into TfsAdminUtil ActivateAT, so at least we weren’t totally broken. 

We tried a few different things including running the Best Practices Analyzer but still had no luck. 

At this point I did what any self-respecting consultant would do…I had the client call Microsoft Premier Support to get it fixed.  Oops..I forgot to mention that we had to have it all up and running for Production use the next day. :-)

The Microsoft folks were quite helpful but the steps that they gave us were “less than obvious”.  I will recount them below for anyone that may come across a similar issue.  I’m not sure why TfsAdminUtil ActivateAT didn’t work, but these steps did.

1. Configure the TFS connections using the Walkthrough: Setting up Team Foundation Server to Require HTTPS and Secure Sockets Layer (SSL) page on MSDN (http://msdn.microsoft.com/en-us/library/aa833873.aspx ).  You need to scroll about half-way down the article until you find the section marked "To update configuration information for Team Foundation Server".  This section tells you to use TfsAdminUtil ConfigureConnections to make the necessary name changes.  Here’s the basic command-line that I used.  Of course, you will need to replace the [FriendlyName] stuff with your friendly name.  You may also have to change the port number on the SharepointAdminUri property if yours is different.

TfsAdminUtil ConfigureConnections
    /ATUri:
http://[FriendlyName]:8080
    /SharepointUri:
http://[FriendlyName]
    /SharepointSitesUri:
http://[FriendlyName]/Sites
    /SharepointAdminUri:
http://[FriendlyName]:17012
    /ReportsUri:
http://[FriendlyName]/Reports
    /ReportServerUri:
http://[FriendlyName]/ReportServer/ReportService.asmx
    /SharepointUnc:\\[FriendlyName]\Sites

2. After we updated the connections things were working a bit better.  We were able to access the AT from Team Explorer using the friendly name but we were still not completely running.  We were getting permission errors from some of the services.  This, we found, was caused by a Windows Server 2003 SP1 security fix that is discussed in KB 926642 - Error message when you try to access a server locally by using its FQDN or its CNAME alias after you install Windows Server 2003 Service Pack 1: "Access denied" or "No network provider accepted the given network path" (http://support.microsoft.com/kb/926642).  We needed to update the server to get around this issue.  We used Method #2 with a reboot afterward to resolve this issue.

NOTE: Please note the bold text at the bottom of the block below.  Making this change leaves you open to a specific security vulnerability.  Please try Method #1 first or better yet, don’t do this step if your can help it.

Method 2: Disable the authentication loopback check

Re-enable the behavior that exists in Windows Server 2003 by setting the DisableLoopbackCheck registry entry in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa registry subkey to 1. To set the DisableLoopbackCheck registry entry to 1, follow these steps on the client computer:
  1. Click Start, click Run, type regedit, and then click OK.
  2. Locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
  3. Right-click Lsa, point to New, and then click DWORD Value.
  4. Type DisableLoopbackCheck, and then press ENTER.
  5. Right-click DisableLoopbackCheck, and then click Modify.
  6. In the Value data box, type 1, and then click OK.
  7. Exit Registry Editor.
  8. Restart the computer.
Note You must restart the server for this change to take effect. By default, loopback check functionality is turned on in Windows Server 2003 SP1, and the DisableLoopbackCheck registry entry is set to 0 (zero).

The security is reduced when you disable the authentication loopback check, and you open the Windows Server 2003 server for man-in-the-middle (MITM) attacks on NTLM
. (emphasis mine)

3. That’s it for the AT.  Now we need to update all of the clients so that they have the correct metadata in their cache.  We can clear the cache by doing the following:
    a. Close Visual Studio
    b. Clear TFS Client Cache by deleting the folder below:
        XP - C:\Documents and Settings\[user]\Local Settings\Application Data\Team Foundation Server\2.0
        Vista - C:\Users\[user]\AppData\Local\Microsoft\Team Foundation\2.0
    c. Restart Visual Studio and connect to [FriendlyName] in Team Explorer

That did it for us.  I hope this post is helpful to someone else struggling with this.  The next step is to actually do a fail-over test to the warm standby.  Should be interesting…

28 March 2009

Code Camp 11 Presentations

CodeCamp_thumb The Intro to MSBuild presentation and example code can be found at http://manicprogrammer.com/cs/files/folders/st_jean/entry8576.aspx.

The Extending the TFS Warehouse presentation and example code can be found at http://manicprogrammer.com/cs/files/folders/st_jean/entry8590.aspx.

Thanks to everyone that attended.

26 March 2009

VSTS DB Pro: Why does my “Data” menu have duplicate entries?

This is a known issue that arises when you install the VSTS DBPro GDR release while Visual Studio is open.  Microsoft is working on a fix but won’t have it in the VSTS DB Pro GDR v2 release (now out as an RC).  I’ve come across this on my VMs as well as some client installations.  It is frustrating.  I have yet to find a way to clean it all up. 

I should have known that Gert Drapers (THE Data Dude) would have a workaround for me. 

Is your Visual Studio Team System 2008 Database Edition GDR installation confused?
Does your menu suffer from multiple instance disorder?

Here is what you can do about it.

  1. Make sure that Visual Studio (devenv.exe) is closed.
  2. Start an elevated command prompt.
  3. Run the following two commands:

    "%ProgramFiles%\Microsoft Visual Studio 9.0\DBPro\DBProRepair.exe" RemoveDBPro2008
    "%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe" /ResetUserData

Now restart Visual Studio again, and the problem should be cured.”         -Gert Drapers

So make sure you have Visual Studio closed when installing the DB Pro GDR so you won’t have this problem in the first place.

25 March 2009

Book Review: Inside the Microsoft Build Engine: Using MSBuild and Team Foundation Build

Quote for the Mediacover ;-)

“Wow!  This is the book that I wish I had written.  Sayed and William have covered the topic’s depth and breadth with enough illustrations and code examples to make any developer productive with MSBuild and Team Build.  No Experience Required. “

Disclaimer

First, let me start by saying that I have no affiliation to the authors or Microsoft Press.  I purchased my copy of the book from Amazon.com and have been in no way influenced in my opinion other than by the book itself.

I’m writing this review because I feel that this book is an essential tome if you are serious about using MSBuild and/or Team Build to automate your build process and are serious about delivering quality applications to your users/customers.  I have been on the fence about writing a book on this subject for a couple of years now but have been daunted by the time and energy it takes to “do it right”.  Well now I am relieved to say that I no longer have to.  This book covers the topic more thoroughly that I could have. 

Review

The book is broken down into 2 sections, MSBuild first then Team Build later. 

MSBuild

The MSBuild section starts off with a “Quick Start” section for those of us too impatient to read the whole thing prior to creating our “Hello World” build.  This section holds the “essential elements” of any MSBuild project.  It describes Project files, Properties, Item Groups, Targets, Tasks, the MSBuild command-line and how they relate together all in 18 pages (including code and screen caps).  I really liked this section as it is always difficult teaching these concepts in a linear order since they are interdependent.  You can’t really talk about Tasks until you have introduced Targets, Targets rely on Project files which are run through the MSBuild command-line.  You get the picture.  They give a cohesive view of the MSBuild eco-system, what goes where and how they relate.

Once you have a taste for that, they go on to do “Deep Dive – Part 1” which covers “everything Property” including Reserved Properties, Command-Line Properties, Environment Variables as Properties and Dynamic Properties (sounds like a scene from Forrest Gump…Command-line shrimp, Reserved shrimp, Dynamic shrimp, …).  We then jump into Items, their Metadata and Transformations.  By the end of this you have a good appreciation for how you convey data to your Tasks and Targets. 

The “Deep Dive – Part 2” builds on the prior chapter to go deeper into Dynamic Properties and Items.  One of the best nuggets of the book can be found here.  On pages 60 & 61 they show the "MSBuild Order of Evaluation” which is essential to all but the most trivial MSBuild script.  Up until this point I knew the basics of the evaluation order but had never been able to find a definitive order.  This was the first time I knew that there was much I didn’t know but sadly not the last.

After we finish the MSBuild Deep-dives the book moves onto some more advanced topics, creating and consuming Custom Tasks.  The text walks you through creation of a task, handling Inputs and Outputs both in the Task code and in the MSBuild code and wrapping up any command-line tool in its own Task thus getting better control than the <Exec> task affords.  The chapter ends by showing you how to Debug your Custom Task in Visual Studio.  This last part of the chapter will save you time and frustration when creating your own tasks.

Moving on, we come to a discussion of the Standard Loggers and the creation of Custom Loggers.  As with the Custom Task chapter, you get a thorough treatise on the creation and usage of loggers in MSBuild.  The code samples (which can be downloaded) give you the basis for creating your own loggers or you can just compile and use theirs.

Now we come to Part III, Advanced MSBuild Topics.  This section is broken across 2 chapters, Batching and Incremental Builds and External Tools

Batching is a process whereby MSBuild looks at an Item list and groups its elements based on some metadata attribute’s values.  This is a very powerful feature of MSBuild which differentiates it from tools like NAnt (or other xAnt-based systems).  With Batching we can pass an Item list to a Task and have it loop over the elements performing the Task once per element or once per Metadata attribute value.  Like the section titles says, it’s an Advanced Topic but one that opens the full power of MSBuild up to you.  I have been struggling with understanding all of the ins-and-outs of this feature for a couple of years.  They did a good job of explaining it and now i think I’m finally “getting it”.

MSBuild has an Incremental Build feature which, when configured, will allow the Targets to look at the date/time stamp of the source files and the target binaries and make a decision to compile a project if any of the source files are newer than the target binary (or if one of the binary’s dependencies has been recompiled).  There’s more to it but you get the idea.  MSBuild can also partially build targets.  These optimizations can make a large, unwieldy build more manageable.

The end of this section give advice on how to create reusable MSBuild scripts that let you leverage some build functionality across multiple builds while keeping maintenance to a single script file.  It also shows how to integrate the NUnit testing framework and FxCop code analysis tools into your build, scripts and all.

Sayed ends the MSBuild part of the book with a bang!  Part IV is the MSBuild Cookbook which gives practical applications like Setting the Assembly Version, Building Multiple Projects, Handling Error, Replacing Values in Config files (read: fixing web.configs per environment), Starting and Stopping Services, Encrypting web.config, and a bunch more.  These two chapters lay out many of the common activities you perform in a build process while also showing real world examples of usable Targets and Tasks.

Team Build

After getting a good grounding in MSBuild you are ready to take on Team Build.  This part of the book follow the same pattern as the MSBuild sections by starting with the “Team Build Quick Start”.  When you finish going through this section you will have seen all of the basic pieces of Team Build and ensured that your TFS and Build agent environment is configured correctly.

The “Deep Dive” section is truly “deep”.  It describes the default build process and then shows how you can customize the defaults to bring in your project’s specific steps.  Need to customize the Clean process?  It’s in there.  Want to package your website into a Zip file?  No problem.  All the overridable “hook” Targets that Microsoft left in the process are described along with those Targets that you shouldn’t touch.  Each and every Target in each build step is described along with how to skip them if you want to.  Need to compile a VB6 app?  Just skip the standard Compilation step and add your call to VB6’s compiler in the AfterCompile target.  Now that’s helpful.

It get’s even “deeper”.  What do you do if your build needs to run tests that show a dialog on-screen?  Check out page 310 for a discussion on Running Interactively.  There’s a few pages on configuring SSL communication between the TFS App Tier and your Build Agent.  There’s also a section on Enabling Parallel Builds so that you can take advantage of MSBuild’s ability to use multiple CPU cores to run parts of a build in parallel.  In real terms this means that you can set up your build to run the Debug and Release versions of your app at the same time on a single machine.  This can significantly reduce the overall time of your build.  Good stuff!

Once you have put that stuff to good use you can learn about using the Team Build API which allows you to interrogate TFS and the Team Build services.   From this basis you could create a web page that allows “Build Self-Service” where someone could queue up a build without using Team Explorer.  you could also write an app that balances the build load among multiple Build Agents like the Team Foundation Build Load Balancer.  You could even use it to query the build history and display that information on a build dashboard like the Team Build Screensaver.

Beyond that the Team build section is true to the format laid out earlier.  There is a “Team Build Cookbook” section that goes into detail (down to screenshots and download URLs) on how to hook in Sandcastle for API Documentation generation, how to configure a Build Agent at a remote site to use a TFS Proxy server to speed up the Get portion of the build, and how to add your own custom Build Steps to the Team Build log window. 

Most organizations have a need to package and deploy the outputs of the compilation process.  The section on “Packaging and Deployment” shows you how to hook into Team Build at the appropriate point with your specific packaging steps (the examples Zip up the binaries) and copy them to some location for deployment.  The is a specific distinction between “deployment of the outputs of the build (or the package of them) to a drop location” and “deployment to an environment”.  The examples show how to deploy to the drop folder only although you could use the Zip code, a Copy task and the section on using (the excellent) PsExec tool in MSBuild to create a basic automated installation.

Summary and Opinions

While I may sound like a shill for the authors and publisher, I really do believe what I’ve written.  In fact, I bring the book with me to most of my consulting engagements and recommend it to my clients.  It’s useful when read from cover-to-cover or when used as a reference. 

So go out and buy a bunch of copies and make Sayed and William the first technical authors to get rich off writing a book. ;-)

15 March 2009

TFSAdmin Tool v1.4 Beta Released – Now Supports SQL Server 2008

TFSAdminCapture Michael Ruminer has announced the v1.4 Beta release of the TFSAdmin tool on Codeplex.  This release adds support  for setting permissions on SQL Server Reporting Services 2008. 

It is being release as a Beta to denote that it still needs further testing but is “stable.”  It was important to get this release into the community because v1.3 choked on SSRS 2008 installations.  Please kick the tires and check the engine before putting into a Production setting.

“We just release the 1.4 beta of TFS Admin Tool on Codeplex. It’s the first release in over a year. Its big feature is that is provides support for SQL Server 2008 which had not been previously supported. The 1.4 final version will follow shortly as will hopefully a 1.5 and just as important to me a 2.0 version to start to be worked on in parallel to the 1.x releases.”       - Michael Ruminer

09 March 2009

Mocking TFS objects…The TFS Adapters Project on Codeplex

TFSAdapter

I just received an email from Martin Danner, Team System MVP, announcing a new project on  Codeplex ( Team Foundation Adapters ) that implements Interfaces and Adapters for the TFS API objects.  Why is this important?  Because being able to mock dependencies is a core tenet of unit testing.  This project allows us to create robust Unit Tests for apps that extend the TFS system.  Here’s the crux of the announcement:

Team Foundation Adapters make it easier to do proper unit testing of applications that utilize the Team Foundation Server SDK , by providing a simple mechanism for mocking the commonly used sealed classes in the API, which cannot otherwise be mocked.

This is not vaporware folks. This project contains a working implementation, complete with sample unit tests. The project does not cover the entire Team Foundation API just yet, But it establishes a clearly defined baseline that will grow as needed.

Please have a look at the project and let me know what you think of this approach. If you like it, be sure to tell your friends about it. “                                   - Martin Danner

08 March 2009

TFS AdminTool v1.4 Under Development…and v2.0 in the works!

The TFS Admin Tool project on Codeplex has started back up.   TFSAdminCapture

The first order of business it to fix some glaring bugs and get a v1.4 out the door.  Michael Ruminer is the new “Primary Coordinator external to Microsoft” and is looking to get more activity from the wider TFS Community.  I’ve jumped on board as a development contributor and am working on fixing the “TFS Admin doesn’t work with SSRS 2008” bug (not as easy a task as I’d initially thought).

The key takeaway here is that we are looking for new blood on the TFS Admin Tool Team.

  • If you have some interest in this tool, or better yet, some expertise (we like both) please join up.
  • If you have ideas for features or fixes, please let us know on Codeplex.

Here’s the “startup notice” from the project site:

“3-05-08-Forthcoming Release
We will be creating a new release whose primary goal is to address
work item 18247- "Error with TFS 2008, SQLServer 2008 on Windows 2008" but the release will also include a few additional bug fixes/enhancements that are already in process or that can be fit in within the time box to fix 18247. This time box is as of yet undefined but the delivery target date will be defined within the next week When this release is complete we'll start another iteration to address a larger set of defects and enhancements and will continue on until no one finds value in adding to the tool any longer.

There will be some additional wiki pages added to assist in planning and current discussions that have kicked off this effort will be moved to that location and to inside the forum for wider participation. Speaking of wider participation, I would like to invite anyone and everyone to contribute. Right now the best mechanism is grab the code, make the contribution you'd like and upload a patch. I want to get much wider contribution. There are a lot of users out there and a lot of scenarios and a lot of people with good stuff to contribute. So send it on. “      - Michael Ruminer

06 March 2009

Windows Home Server Restore CD getting BSOD STOP 0x0000007b - Fixed

This post is to raise the awareness of a fix to the Windows Home Server Restore CD. 

I spent a number of hours researching and trying unsuccessfully to get the RTM version of the Restore CD to work on pair of Dell Studio (15 and 17) laptops that had hard drive replacements; more on that another time.  :(  From my research I also found that a number of HP, Toshiba and Lenovo laptops also had this issue.

Problem

You have a computer with SATA drives (hard drive and optical) or external USB optical drive and you need to restore the machine from backup using the Windows Home Server Restore CD.  During the boot process you get a BSOD with STOP 0x0000007B code.  This stop code indicates an INACCESSIBLE_BOOT_DEVICE.

Issue 

The RTM version of the WHS Restore CD doesn’t have all the drivers needed to load SATA drives.  When the WinPE image loads it can’t find the drivers it needs and crashes. 

Resolution

Get the updated Restore CD.  When it boots, it will look for a folder named “Drivers” on any USB drive that is available at boot-time for additional drivers.  This is where you put your specific SATA drivers if needed.  

UPDATE (7-Mar-2009): One of the commenters on this post (Mike) mentioned that all the drivers you need can be found in your last good backup in the Windows Home Server Drivers for Restore folder.  I’ve updated the steps below to reflect this new (and very handy) information.  Thanks Mike!

Another UPDATE (7-Mar-2009):  Another commenter (Erwyn van der Meer) mentions that the Windows Home Server Drivers for Restore folder only contains 32-bit drivers.  If you are restoring a 64-bit system you will have to put your 64-bit drivers onto a USB drive yourself.  Thanks Erwyn! 

You can follow the steps below:

  1. Download the updated Windows Home Server Restore CD (version 1800)  image.
  2. Install the update to get the Restore CD image on your drive.
  3. Burn the image to a CD.
  4. Get Drivers for your computer (if needed)
    1. Download the SATA drivers for your computer from your PC manufacturer’s support site (or your DVDs)
      - or -
    2. Open your last successful backup find the “Windows Home Server Drivers for Restore” folder in the root of your backup (32-bit drivers only).
  5. Copy the SATA drivers (or the entire contents of the folder in Step 4.2) to a USB drive in a folder named DRIVERS
  6. Place Restore CD in drive on machine to be restored.
  7. Attach USB drive with drivers to machine to be restored.
  8. Power up the machine and boot from the Restore CD.
  9. Follow on-screen prompts.
  10. [Possibly] take note of the Network devices found.  It may need additional drivers for NICs.

During my restore I also had to put the Network card drivers onto a USB drive so that the Restore CD could access the NIC.  These didn’t have to be in the Drivers folder as the Restore CD did a search for them.

Hope this minimizes the headaches and anxiety for someone else.  :)

- Steve

Download

Windows Home Server Restore CD Update: http://www.microsoft.com/downloads/details.aspx?FamilyID=26881305-91cc-4f37-b1fc-3813c423df2c&displaylang=en

Original MSFT Forum Thread: http://social.microsoft.com/Forums/en-US/whssoftware/thread/ffa3e6f0-0e6e-4d02-bd42-f3e379e58f55/

24 February 2009

Notion Tools for Team System v1.0 Released

logo_bulbyellow200x85

I’m proud to announce that Notion Solutions (my employer) has released v1.0 of the Notion Tools for Team System  suite. 

Notion Tools for Team System v1.0 was finally released on February 20th.  We’re actively documenting requirements for v1.1, your ideas are welcome!  You can download the software from our website and follow the instructions to get it up and running with a trial key.  In order to get it working, you do have to install the server software.  While the server components make it harder to “try it out”, it was needed to facilitate some of the capabilities we implemented.  We do offer a quick start consulting engagement to make the needed process changes and train your team up on the use of the tools.

Please review the tools and even order online.

  • Notion Timesheet - time-tracking system that allows users to capture and record time against Team System Work Items directly from within Visual Studio.
  • Notion Work Organizer - extends Visual Studio to enhance Team System with a better means of managing work items and their associated documentation and artifacts. Manages parent/child work items.
  • Notion Work Planner - By taking an account of the expertise and productivity of each team member, teams can use estimates to develop more accurate iteration and release schedules.
  • Notion Work Item Controls - contains custom work item controls that help teams visualize and maintain hierarchical relationships between work items in a Team Project.

I’ve been using this product suite daily since 01-Dec-2008 as well as having written parts of it.  We have been “dogfooding” it for a while and have worked out a lot of the kinks.  I hope that you will find this a useful product of high quality and stability. 

As stated above, we are looking for your feedback on any or all of the tools.  We can only make it better for you if you tell us what you need.

Oracle Support Announced for VS DB Pro 2010

Quest Software has announced that they will be creating an Oracle DSP (Database Schema Provider) for Visual Studio Team System 2010.  This means that all of you Team System folks that have Oracle databases in your apps can get the same benefits from the Database Edition as the SQL Server folks have enjoyed.

I have a number of clients that have Oracle back-ends so I hope that the integration is as good as we get with SQL Server. 

Quest has opened up a Beta program on their TeamFuze.net site for Oracle professionals using Team System.  Stop by and get in on it.  I’d love to hear from anyone that has used this product.

22 February 2009

Introduction to MSBuild Presentation Deck, Examples and References

Thanks!

Thanks to all the folks that attended my Introduction to MSBuild presentation yesterday at the Team System User Group – Virtual Edition meeting. I found it an interesting experience.

As promised, I’ve attached a link to the presentation materials and demos. Below you will also find a (by no means comprehensive) list of sources for using MSBuild.

I’ll be presenting this at a couple of upcoming Code Camps, so if you have attended one of these presentation…this is your download too. :-)

Here is the link to the download: http://manicprogrammer.com/cs/files/folders/st_jean/entry8576.aspx

References

Root MSBuild Reference on MSDN: http://msdn.microsoft.com/en-us/library/0k6kkbsd.aspx

MSBuild Forum on MSDN: http://social.msdn.microsoft.com/forums/en-US/msbuild/threads/

Best Practices for Creating Reusable Builds, Part 1 from MSDN Magazine: http://msdn.microsoft.com/en-us/magazine/dd419659.aspx

Inside the Microsoft® Build Engine: Using MSBuild and Team Foundation Build You can get it at Amazon.com or any other technical bookseller

MSBuild Team Blog http://blogs.msdn.com/msbuild/

MSBuild Wiki on Channel 9 http://channel9.msdn.com/wiki/msbuild/homepage/

Custom Task Libraries

MSBuild Community Tasks http://msbuildtasks.tigris.org/

SDC Tasks Library http://www.codeplex.com/sdctasks

MSBuild Extension Pack http://www.codeplex.com/MSBuildExtensionPack

21 February 2009

Introduction to MSBuild presentation Today

I just realized that I never posted about this session.  I will be giving an Intro to MSBuild session at the Team System User Group – Virtual Edition at Noon ET today.  This is a mix of SecondLife and LiveMeeting so you can access it from the comfort of your home. :) 

The info on the session can be found on the Team System Events page of VSTSRocks.  you will have to install the SecondLife and LiveMeeting clients to participate so be sure to get that all set prior to the session.

16 February 2009

New England Code Camp 11: ”Developer Stimulus Package” Announced

First off I just want to say that this is a GREAT name for a code camp!  :)  CodeCamp_thumb

Chris Bowen has announce the next New England Code Camp will be held on Saturday, 28-March-2009 from 8:30am to 7:00+pm at the Microsoft offices in Waltham, MA.

Chris Pels and I are excited to announce that the 11th edition of the venerable New England Code Camp series will be held on March 28th in Waltham, MA!

  Code Camps (started in 2004 with New England Code Camp 1), are free events organized by and for the developer community.  A fantastic chance to share knowledge without marketing noise getting in the way.  Check out the Code Camp Manifesto for the guiding principles.”                - Chris Bowen

I’ve proposed the “Introduction to MSBuild” and “Extending the TFS Warehouse” sessions so if you miss them at the New Hampshire Code Camp you will have a second chance in March.  I’m also looking into other potential sessions but since it’s a single day there may not be room.

As always Registration is Free, just browse over to TheDevCommunity.org

The call for speakers is also open (See Chris’ blog for info).  If you have any interest in getting some practice speaking in from of crowds of “like-minded individuals” I highly recommend putting together a session and presenting.  This is an great way to help out the community.  I know that everyone has something that they find interesting or are passionate about.  Why not make a session out of it and present?

15 February 2009

New Hampshire Code Camp Update

We’re two weeks out from the NH Code Camp in Nashua.  I just checked the presentation list on theDevCommunity.org site and there’s 23 sessions proposed with a good mix of topics.

I’ve proposed another session entitled “Introduction to MSBuild” that gives a “from the ground up” look at how to use MSBuild to automate your build process.

Here’s the abstract:

“The .NET Framework 2.0, 3.5 and even windows Vista now ship with an "Enterprise-grade" build automation system called MSBuild.  It is the foundation of the Visual Studio project and compilation systems and has been extended to provide the "Build in a Box" functionality within Team Foundation Server.

In this code-heavy session I'll show the basics of MSBuild's syntax, features and extensions.  Some significant improvements were shipped with the .Net 3.5 version so I'll also hilight those differences.  Time-permitting we will dive into more advanced topics that will "round out" the MSBuild experience.  The session will start from "Hello World" and build from there so no experience with MSBuild is assumed or required.”

Hope to see you at Daniel Webster College.

Oh and in case you are on the fence, we will be giving away a Visual Studio Team Suite 2008 with MSDN among other goodies.  As of this moment, you have roughly a 1 in 140 chance of winning.  Those are some pretty good odds.

06 February 2009

Team System Web Site Remodeling

msdn_teamsyslogo It looks like Microsoft have revamped the Team System Web Site.  I just finished perusing it and I like it.  It’s easy to navigate not too flashy as to be distracting.  I recommend you go and check it out for yourself.

Here’s the URL:

http://msdn.microsoft.com/en-us/teamsystem/default.aspx

28 January 2009

Security Update for Team System Web Access 2008 SP1 Posted

A number of other notable bloggers in the Team System space have already blogged about this but it is important enough that we need to get the word out to a large audience.

Microsoft posted a security update for TSWA 2008 SP1.  I would recommend that everyone install this update, but especially anyone that exposes their TSWA to the Internet as that is where the greatest risk lies.

Hakan Eskici has the original post for Microsoft.  There is no KB article yet, I will update this post when one becomes available.   The KB article can be found at: http://support.microsoft.com/kb/961267

A security issue has been identified with Team System Web Access 2008 SP1 and we have recently published an update that fixes it. Please note that this is a full release, so you will need to uninstall any existing versions of Web Access before installing this update.”                                                                - Hakan

The download link will bring you to the TSWA 2008 SP1 download page.  Since it is a full install, they have replaced the vulnerable TSWA version with the updated one.

To verify if you have the Update installed, select the Help | About menu from TSWA and check the version.  It should be 9.0.3275 for TSWA 2008 SP1 Update.

17 January 2009

Installing MOSS 2007 for TFS 2008

Sharepoint


I’m starting an engagement that includes installing MOSS 2007 for the client and I’m always  nervous when dealing with a first-time installation situation.  I keep telling myself that this is a good thing.  I have experience working with MOSS/SharePoint, but I’ve never done an install before. 

Based on that one fact, I’ve spent the last couple of days doing installs and configurations on a “Virtual DataCenter” hosted in Hyper-V on my Dell laptop.  The topology is

  • a Win2k3 Domain Controller
  • a Win2k3 MOSS server
  • a Win2k3 SQL Server
  • a Win2k3 TFS server

The TFS is running as AT/DT with MOSS hosting the Team Project portals and all are attached to the domain provided by the DC machine.

My biggest concern was configuring the MOSS server correctly so that the TFS install would go smoothly.  The installation of MOSS was quick and easy, it was the configuration after installation that was a nightmare.  I had no idea that I knew so little about MOSS configuration even after working with it in a TFS environment for a couple of years.  Luckily I found a couple of articles and blog posts that walked me through the configuration. 

I’ve attached the links here in case anyone else had to do a similar install.  The author, Justin Devine, has created a single Word doc with all the steps.  He has also reproduced the Word doc as a series of blog posts.  I’ve added links to both below in case you are working somewhere that you don’t have the ability to open a Word doc.

Order of install

  1. Create MOSS accounts (lots and lots) in AD per blog/doc.
  2. Install SQL Server per TFS Dual-Server configuration then follow additional steps in MOSS blog/doc for SQL Server Surface Area and logins.
  3. Install MOSS per blog/doc
  4. Configure MOSS per blog/doc in its entirety
  5. Install TFS Prerequisites
  6. Run TFS BPA
  7. Install TFS

MOSS Install and Configuration Blog Post (Part 1, later parts linked from this one) - http://justindevine.wordpress.com/2008/11/03/moss-2007-virtual-small-farm-walkthrough-part-1/

MOSS Install and Configuration Word Doc - http://justindevine.wordpress.com/?attachment_id=376

Technorati Tags: ,

Upcoming Events

I’ve successfully (relative term) navigated my first Team System User Group – Virtual Edition presentation by giving the Overview to Extending the TFS Warehouse simultaneously on Second Life and LiveMeeting.  What an interesting way to hold a User Group meeting.  It’s kind of like “Geeks Sans Frontières (GSF)” or “Geeks Without Borders”.  Thanks to everyone that attended.calendar

I had a great time doing the Overview but found it difficult to not dive down into the guts of the subject so I’m going to flesh out the topic into a full presentation that I’ve committed to giving at the New Hampshire Code Camp on 28-Feb-2009 at Daniel Webster College in Nashua, NH.  After I navigate that presentation I’ll tweak it and get a slot in a future TSUG-VE meeting.

Since I am a neophyte to all things BI, I’m going to attend the New England Data Camp v1.0 on 24-Jan-2009to get some more insight into Data Warehouses and Cubes.  This is one area that is an art all unto itself and I am woefully ignorant.  I know a few people that are eyeballs-deep into this and they are “scary-smart” so I’m looking forward to being the dumbest guy in the room next Saturday.

Here’s the upcomings:

24-Jan-2009        New England Data Camp v1.0 – Microsoft Offices - Waltham, MA  (attending)
28-Feb-2009        New Hampshire Code Camp – Daniel Webster College – Nashua, NH (presenting)

For a complete rundown of Developer events in New England for January and February 2009, check out Chris Bowen’s roundup.

 

P.S.   It looks like “Geeks Without Borders” is an actual group that provides “computers and related equipment to schools, clinics, and nonprofits in developing countries.”  I have no affiliation with them, but it seems like a very noble cause.  Check them out if you get a chance.

15 January 2009

Announcement: The first real MSBuild/Team Build book arrives!

Inside the Microsoft Build Engine: Using MSBuild and Team Foundation Build
Inside the Microsoft Build Engine: Using MSBuild and Team Foundation Build

Sayed Ibrahim Hashimi and William Bartholomew have just finished the first comprehensive, totally  dedicated MSBuild book on the market.  William has told me that it has 3 full chapters dealing with Team Build on top of a grounding in MSBuild.

I’m really excited about this book as it fills a gaping hole in the Visual Studio landscape and more so for those of use working with TFS.  I have a copy on order and can’t wait for it to arrive.

Here’s the blurb from the Amazon site:

Product Description
The build process when code gets assembled to see how and how well it works is a critical step in software development. Developers had few options for customizing the build process before Visual Studio 2005 and Visual Studio 2008, but the Microsoft Build Engine (MSBuild) enables developers to customize each step during a build. MSBuild is extensible and uses an XML file to describe each step, allowing the build master or developer to easily change and augment how projects are built. This book offers hands-on guidance for customizing MSBuild, and provides a cookbook of examples on Web deployment, automated releases, and other essential topics. It also covers Visual Studio Team Foundation Build, the build engine in Visual Studio Team System.

09 January 2009

Extending the TFS Warehouse Discussion on 15-Jan-2008

To anyone that is interested, I'll be having an "Extending the TFS Warehouse" discussion during the Team System User Group - Virtual Edition (TSUG-VE) meeting next Thursday, 15-Jan-2009 at 5pm PST (UTC -8:00).  I have the "warm-up" spot and then we will have Trent Nix giving a presentation on "SCRUM with Team System".

It will be a quick 15 minute discussion/slideware around how to create a warehouse adapter to get additional TFS data or your own custom data into the TFS Warehouse when the Warehouse Service runs.

This is a prelude to a full session on this topic.  If you have specific interest in this topic, I invite you to attend and let me know which areas are most important to you.  These comments will help drive the larger presentation.

The meeting is held Virtually (hence the -VE in the group name) on Second Life so it is open to everyone that has Internet access.

I'm looking forward to trying this out.  I'm also linking in some info about the user group from the group leads, (MVP) Dave McKinstry and (MVP) Paul Hacker.

A New VSTS User Group in your area

How to participate in the Team System User Group - Virtual Edition

29 December 2008

TFS and VSTS 2008 "All-up" Hyper-V Image Links for Free Download Manager

UPDATE (30-Dec-2008):  Martin Danner has gone one better and posted a file that contains the links to ALL of the VPC files and not just the Hyper-V ones.  If you need one of those, you can find his post here.

Here are the download links for the Hyper-V version of the new TFS/VSTS 2008 "all-up" virtual machines that I posted about last week.  I'm mostly putting these here so that I can find them, but I think others may find them useful as well.

These links are compatible with the Free Download Manager tool.  Just copy them to the clipboard then open FDM and select File | Import | Import list of URLs from clipboard or just use the Ctrl + Shift + V hotkey.

http://download.microsoft.com/download/A/A/C/AAC6CA2D-FEDB-466A-97E8-1F0CDC45F410/en_visual_studio_team_system_2008_sp1_december2008_hyperv.part0001.exe
http://download.microsoft.com/download/A/A/C/AAC6CA2D-FEDB-466A-97E8-1F0CDC45F410/AllUpHyperV/en_visual_studio_team_system_2008_sp1_december2008_hyperv.part0002.rar
http://download.microsoft.com/download/A/A/C/AAC6CA2D-FEDB-466A-97E8-1F0CDC45F410/AllUpHyperV/en_visual_studio_team_system_2008_sp1_december2008_hyperv.part0003.rar
http://download.microsoft.com/download/A/A/C/AAC6CA2D-FEDB-466A-97E8-1F0CDC45F410/AllUpHyperV/en_visual_studio_team_system_2008_sp1_december2008_hyperv.part0004.rar
http://download.microsoft.com/download/A/A/C/AAC6CA2D-FEDB-466A-97E8-1F0CDC45F410/AllUpHyperV/en_visual_studio_team_system_2008_sp1_december2008_hyperv.part0005.rar
http://download.microsoft.com/download/A/A/C/AAC6CA2D-FEDB-466A-97E8-1F0CDC45F410/AllUpHyperV/en_visual_studio_team_system_2008_sp1_december2008_hyperv.part0006.rar
http://download.microsoft.com/download/A/A/C/AAC6CA2D-FEDB-466A-97E8-1F0CDC45F410/AllUpHyperV/en_visual_studio_team_system_2008_sp1_december2008_hyperv.part0007.rar
http://download.microsoft.com/download/A/A/C/AAC6CA2D-FEDB-466A-97E8-1F0CDC45F410/AllUpHyperV/en_visual_studio_team_system_2008_sp1_december2008_hyperv.part0008.rar
http://download.microsoft.com/download/A/A/C/AAC6CA2D-FEDB-466A-97E8-1F0CDC45F410/AllUpHyperV/en_visual_studio_team_system_2008_sp1_december2008_hyperv.part0009.rar
http://download.microsoft.com/download/A/A/C/AAC6CA2D-FEDB-466A-97E8-1F0CDC45F410/AllUpHyperV/en_visual_studio_team_system_2008_sp1_december2008_hyperv.part0010.rar

24 December 2008

New TFS "all-up" VPC and Hyper-V images now available

Just in time for "Geeksmas" Microsoft (via Brian Randell) have made a new set of Team Foundation Server VM images available but this time they've gone one better!  They have produced the images in both Virtual Server 2005 R2 format and Hyper-V.  That means I get to spend more time playing and less time converting the image. 

They've also solved the "expires on 31-Dec-2008" problem with the current VPC.  The new ones expire on 31-Dec-2009. 

Way to go Brian!

Here's the announcement from Brian's blog:

"As many know, one of the things I do is build and maintain virtual machine images for Microsoft. With the end of the year coming, two particular virtual machines, that are very dear to me, are about to expire. Something had to be done.

I’m happy to report that the VSTS virtual machines are all updated with fresh bits and expiration dates. You now can test and evaluate (since these images are NOT licensed for production use) Team System 2008 with SP1.

First off, the new expiration date is December 31, 2009.

Second, we didn’t produce two images this time. We produced FOUR!

That’s right, we’ve produced the same pair as before. A VSTS “all-up” image with Team Foundation Server, Team Build, Team Explorer, and Team Suite. And a TFS “only” image with just Team Foundation Server, Team Build, and Team Explorer.

What’s different is that we’ve produced both Virtual PC 2007/Virtual Server 2005 R2 compatible images AND Hyper-V compatible images. Download the ones that make you happy!"                               - Brian Randell

I recommend running over to read Brian's post to get the complete low-down on the contents of the images.  Here are the links:

Happy Holidays Everyone!!!

10 December 2008

TFS API - How to retrieve a User's SID based on their Account Name

This post goes along with my prior post on working with Fact tables in a TFS Warehouse Adapter.  I specified that you can pass the User's SID as the value of the Person Dimension on a FactEntry.  You normally don't have this data readily available but the user's account name (Domain\UserName) usually is.

To retrieve the SID based on the account name, follow the steps outlined in this blog post from Peter Blomqvist.  He goes into detail about how this works and other uses for this code and I recommend reading his article thoroughly. 

I've stolen his code and modified it specifically for returning the SID so that I can grab it in the future from here.

   1:  using System;
   2:  using System.Net;
   3:  using Microsoft.TeamFoundation.Client;
   4:  using Microsoft.TeamFoundation.Server;
   5:   
   6:  public Identity GetUserInfo(string accountname)
   7:  {
   8:      string tfsUri = "YOURTFSSERVER";
   9:      string tfsUser = "YOURTFSACCOUNT";
  10:      string tfsPassword = "YOURTFSPASSWORD";
  11:      string sid = String.Empty;
  12:   
  13:      NetworkCredential nc = new NetworkCredential(tfsUser, tfsPassword);
  14:   
  15:      TeamFoundationServer tfs = new TeamFoundationServer(tfsUri, nc);
  16:   
  17:      IGroupSecurityService gss = (IGroupSecurityService)tfs.GetService(typeof(IGroupSecurityService));
  18:   
  19:      Identity identity = gss.ReadIdentity(SearchFactor.AccountName, accountname, QueryMembership.None);
  20:   
  21:      if (identity != null)
  22:      {
  23:         return identity.sid;
  24:       }
  25:   
  26:      return null;
  27:  }
  28:   

TFS Warehouse Adapter - How to link Dimensions to new Fact Entries

The Background

I've been working on a project to create a Timesheet add-in for TFS.  Other members of my team have done the easy work and created all of the database, UI and Web Service stuff.  I was tasked with creating the Warehouse Adapter to move the timesheet entries from the operational store to the TFS Warehouse.

I decided that I would create a new Fact table to hold the Timesheet Entries.  This Fact would link to the Current Work Item Fact so that we can tell which time entries go with a given Work Item.  We also have data on the Team Project, the Date that the time entry is for and the Person that did the work.  These entries live in Dimension tables, specifically the "Team Project", "Date" and "Person" Dimensions.

When I created my Warehouse Adapter I had to write some code in the MakeSchemaChanges() method to create the "Timesheet Entries" Fact table if it didn't already exist.  During this process I specified that the Timesheet Entries Fact table uses the Person, Date and Team Project Dimensions.  When the Timesheet Entries Fact table was created it now had 2 additional Int fields for Person and Team Project and one additional DateTime field for Date.  These are the foreign keys to the Dimension tables shown in yellow hilight on the graphic below.

TimesheetFact

Ok, so this all makes structural sense to me.

When the Warehouse Service runs, it call my Adapter 3 times.  The first is a call to the adapter's Initialize() method to give it an opportunity to get a reference to the Warehouse's DataStore object.  The second is the call to the adapter's MakeSchemaChanges() method which we noted above gives us an opportunity to update the Warehouse schema with our new Facts, FactLinks and Dimensions (if applicable).  The third is a call to the MakeDataChanges() method which is where we actually grab data from the transactional store and push it into the warehouse store.

The Problem

In the MakeDataChanges() method I grab my timesheet data and load up my shiny, new Timesheet Entries Fact table using this code:

   1:  private static FactEntry CreateTimesheetFactEntry(IDataStore dataStore, int teamProjectId, int id, double hours, string entryUserName, DateTime entryDate)
   2:          {
   3:              FactEntry fe = dataStore.CreateFactEntry(FactName);
   4:              fe.TrackingId = id.ToString(CultureInfo.InvariantCulture);
   5:              fe["Logical Tracking Id"] = id;
   6:              fe["Hours"] = hours;
   7:              fe["Date"] = entryDate;
   8:              fe["Team Project"] = teamProjectId;
   9:              fe["Person"] = entryUserName;
  10:              
  11:              return fe;
  12:          }

I need to pass the Id for the Team Project on Line 8 and the Id for the Person on Line 9 into my FactEntry to create the correct links to the Person and Team Project Dimension tables.  So how do I get these Ids? 

The Team Project Id is easy to get because there is a class in the Microsoft.TeamFoundation namespace called LinkingUtilities that supports retrieving links.  It has a way to use the TeamProject name to get its URI and then the ToolSpecificId.  The Person Id isn't so easy. 

I would have like to follow the same pattern that I used for retrieving a FactEntry, just call the dataStore.GetFactEntry() method but there is no dataStore.GetDimensionEntry() method in the API.  I know that I could go straight against the TFSWarehouse database using SQL code but I'm trying to keep configuration to a minimum and also stay within the API until I can no longer do so.  This pretty much brought this part of my project to a stand-still until I could figure out how Microsoft did it with their Adapters.

The Research

Next step...post a question on the MSDN Team Foundation Server - Reporting & Warehouse forum.  Within a day I had a response from Dave Brokaw at Microsoft.  This was not the answer I was expecting!  Dave said:

"When inserting into the database, the SaveDimensionMember API automatically converts from a "business" or "op store" key for a given DimensionUse, such as a string SID for the stock Person dimension, to the actual integer or "surrogate" key used in the warehouse database.  Thus, you should be in good shape if you can set the DimensionUses' value in the FactEntry to the appropriate SID.

In the data warehouse world the Int fields are often known as "surrogate keys", differentiated from the "business keys" (or in some cases more realistically "op store keys") that are used in the source databases.  They generally provide better performance via faster joins.
Having the API automatically find and link up the related dimensions in this way also helps performance, since fewer round trips to the database are required.  Additionally, it allows related dimension members to be created transactionally when a fact arrives that references them, even if they haven't been populated yet by the adapter that normally creates them.  For example, the Work Item Tracking adapter might run before the CSS adapter, and save a Work Item fact that references a Person that the CSS adapter hasn't pulled in yet.  These are known in the warehousing world as "early-arriving facts".  Prepopulating dimension members as needed ensures that the cube processing does not see "dangling" references in such facts."             - Dave Brokaw

So I don't have to figure out the Id for the used Dimension fields, all I have to do is pass the value of the KeyField and the SaveDimensionMember API will automatically figure out the Id and stick it into the field on the FactEntry.

The Solution

What does this mean in my case?  That I need to figure out what the KeyField is for each of my Dimensions.  [I've colored them in Red on the Database Diagram above.]

I start by opening the warehouseschema.xml file that can be found on the TFS App Tier in C:\Program Files\Microsoft Visual Studio 2008 Team Foundation Server\Tools.  This XML file contains the schema of the TFS Warehouse.  If you scroll down the file you get to the Dimensions section.  In here I'm looking for the Person, Date and Team Project Dimension entries.

The Team Project Dimension is defined like this:

   1:  <Dimension>
   2:    <Name>Team Project</Name>
   3:    <FriendlyName>Team Project</FriendlyName>
   4:    <Fields>
   5:      <Field>
   6:        <Name>Project Uri</Name>
   7:        <FriendlyName>Project Uri</FriendlyName>
   8:        <Type>NVARCHAR</Type>
   9:        <Length>256</Length>
  10:        <Visible>true</Visible>
  11:        <RelationalOnly>true</RelationalOnly>
  12:        <CalculatedMembers />
  13:      </Field>
  14:      <Field>
  15:        <Name>Team Project</Name>
  16:        <FriendlyName>Team Project</FriendlyName>
  17:        <Type>NVARCHAR</Type>
  18:        <Length>256</Length>
  19:        <Visible>true</Visible>
  20:        <RelationalOnly>false</RelationalOnly>
  21:        <CalculatedMembers />
  22:      </Field>
  23:      <Field>
  24:        <Name>Is Deleted</Name>
  25:        <FriendlyName>Is Deleted</FriendlyName>
  26:        <Type>BIT</Type>
  27:        <Length>0</Length>
  28:        <Visible>true</Visible>
  29:        <RelationalOnly>true</RelationalOnly>
  30:        <CalculatedMembers />
  31:      </Field>
  32:    </Fields>
  33:    <KeyFieldName>Project Uri</KeyFieldName>
  34:    <Levels />
  35:  </Dimension>

Notice on Line 33 that the KeyFieldName value is Project Uri.  This means that we can pass the Project Uri value in our FactEntry on Line 8 of CreateTimesheetFactEntry().  When we save the FactEntry this will be resolved to the actual Id of the Dimension and that Id value will be stored in the Fact.

Now we need to look at the Person Dimension.  It is defined like this:

   1:  <Dimension>
   2:    <Name>Person</Name>
   3:    <FriendlyName>Person</FriendlyName>
   4:    <Fields>
   5:      <Field>
   6:        <Name>Person</Name>
   7:        <FriendlyName>Person</FriendlyName>
   8:        <Type>NVARCHAR</Type>
   9:        <Length>256</Length>
  10:        <Visible>true</Visible>
  11:        <RelationalOnly>false</RelationalOnly>
  12:        <CalculatedMembers />
  13:      </Field>
  14:      <Field>
  15:        <Name>SID</Name>
  16:        <FriendlyName>SID</FriendlyName>
  17:        <Type>NVARCHAR</Type>
  18:        <Length>256</Length>
  19:        <Visible>true</Visible>
  20:        <RelationalOnly>true</RelationalOnly>
  21:        <CalculatedMembers />
  22:      </Field>
  23:      ... Additional Fields Removed ...
  24:    </Fields>
  25:    <KeyFieldName>SID</KeyFieldName>
  26:    <Levels />
  27:  </Dimension>

The Person Dimension's KeyFieldName is found on Line 25.  It shows that the SID is the value that we can use in our Fact.  So we can put the user's SID value in our FactEntry on Line 9 of CreateTimesheetFactEntry() and as above, the warehouse will look-up the SID on Save and replace it with the Id of that SID's row in the Person Dimension table.

Lastly, we need to look at the Date Dimension.  It is defined as:

   1:  <Dimension>
   2:    <Name>Date</Name>
   3:    <FriendlyName>Date</FriendlyName>
   4:    <Fields>
   5:      <Field>
   6:        <Name>UTCDateTime</Name>
   7:        <FriendlyName>UTCDateTime</FriendlyName>
   8:        <Type>DATETIME</Type>
   9:        <Length>0</Length>
  10:        <Visible>true</Visible>
  11:        <RelationalOnly>true</RelationalOnly>
  12:        <CalculatedMembers />
  13:      </Field>
  14:      ... Additional Fields Removed ...
  15:    </Fields>
  16:    <KeyFieldName>UTCDateTime</KeyFieldName>
  17:    <Levels>
  18:         ... Levels Removed ...
  19:    </Levels>
  20:  </Dimension>

As you can see on Line 16, the KeyFieldName is UTCDateTime.  This makes my life much easier because the EntryDate of my Timesheet Entry is already defined as a DateTime type.  All I have to do is pass the EntryDate.ToUniversalTime value to the Fact on Line 7 of CreateTimesheetFactEntry().

NOTE:  The Date dimension's UTCDateTime field always has a time of 12:00:00 am (midnight) so make sure that the date you pass as the Date Dimension KeyField has a time component of midnight. (See below)

Select  Top 10 __Id, UTCDateTime From Date

__Id                      UTCDateTime
-----------------------   -----------------------
2008-04-09 00:00:00.000   2008-04-09 00:00:00.000
2008-04-10 00:00:00.000   2008-04-10 00:00:00.000
2008-04-11 00:00:00.000   2008-04-11 00:00:00.000
2008-04-12 00:00:00.000   2008-04-12 00:00:00.000
2008-04-13 00:00:00.000   2008-04-13 00:00:00.000
2008-04-14 00:00:00.000   2008-04-14 00:00:00.000
2008-04-15 00:00:00.000   2008-04-15 00:00:00.000
2008-04-16 00:00:00.000   2008-04-16 00:00:00.000
2008-04-17 00:00:00.000   2008-04-17 00:00:00.000
2008-04-18 00:00:00.000   2008-04-18 00:00:00.000

(10 row(s) affected)

So with all this, our code changes to something like this:

   1:  private static FactEntry CreateTimesheetFactEntry(IDataStore dataStore, string teamProjectUri, int id, double hours, string entryUserSID, DateTime entryDate)
   2:          {
   3:              FactEntry fe = dataStore.CreateFactEntry(FactName);
   4:              fe.TrackingId = id.ToString(CultureInfo.InvariantCulture);
   5:              fe["Logical Tracking Id"] = id;
   6:              fe["Hours"] = hours;
   7:              fe["Date"] = entryDate.ToUniversalTime();
   8:              fe["Team Project"] = teamProjectUri;
   9:              fe["Person"] = entryUserSID;
  10:              
  11:              return fe;
  12:          }

Conclusion

To make a long story; if you have a Fact table that uses Dimensions you don't have to figure out the Ids that need to be stored in the Fact entry.  All you have to do is give the FactEntry object a KeyField value for that particular Dimension and it will be replaced by the correct Id value when the FactEntry is saved.  This is possible because the SaveDimensionMember API will do a lookup of the passed value on the KeyField to get the matching Dimension row.

You can find out what the KeyField is for a given Dimension table by looking at the Dimension definition in the warehouseschema.xml file and noting the KeyFieldName entry's value.

You can get the Team Project Uri from the Team Project name by using the LinkingUtilities class in the Microsoft.TeamFoundation namespace.

Thanks

Thanks go out to Dave Brokaw and all the folks on the Team System team at Microsoft.  I have always found them to be quick in their responses and immensely helpful. 

If you ever have a question about Team System or TFS, I highly recommend posting your question to the MSDN Team System forums.  There are folks inside the Team System team, MVPs and regular users that are always looking at new questions and are quick to answer or help you dig deeper to find the right question for your situation.

05 December 2008

MVP TV: Team System Reporting

Microsoft and the MVP program have been putting on Live Meeting presentation of some of the topics that you see at conferences like VS Live and Tech-Ed.  On Friday, 12-Dec-2008 Team System MVP Steve Borg will be giving a presentation on Reporting in Team System.  Creating your own Team System reports is something of a Black Art and the number of sources of good information and tutorials is quite limited.  Don't miss this opportunity to get a little more in depth on Reporting in Team System as well as have an opportunity to ask follow-up questions.

Here's the scoop:

MVP TV: Gaze into the Crystal Ball: Reporting in Team System made Easy!

Friday, December 12th, 2008 | 9:00am – 10:00am (PST, Redmond time)

Targeted: This Product Group Interaction is open to all Developer MVPs in all Technical Expertise and public audience.

You’ve paid your nickel and it’s time to ask the Zoltar Fortune Teller for your future: “Is my software development project going down the toilet? Will I be able to ship on time, with high quality? Can I hit my budget?” (Wait, three questions = three nickels.) Zoltar says… Let’s face it, traditional status reporting is about as accurate as I am, and worse, it takes a whole lot longer!!! Team System can help! Its built in reporting capabilities provide a strong foundation for understanding the current status of your project. Not only does it provide a series of built in reports, it gathers the metrics to allow for excellent ad-hoc reports! Using both the built in and ad hoc report capabilities, finding the current status of your project, and predicting your project’s probability of success or failure along several axis. Come learn how to predict your future! You’ll learn how to interpret the build in reports, learn what’s required to create the reports, and how to use Excel pivot tables to connect to the TFS cube for ad hoc reporting. Note: The original delivery of this presentation was the second highest rating of all TechEd 2008 presentations and Steve has made it even BETTER!!

About Steven Borg: Steven Borg is a principal of Northwest Cadence, a Microsoft VSTS Inner Circle partner, that focuses exclusively on helping companies improve their Application Lifecycle Management using Team System. At Northwest Cadence, he is the VSTS Practice Lead, and has worked with dozens of corporations to improve their overall software development process, including identifying and reporting appropriate metrics supporting process improvement. In addition, he assists the Team System community as a Team System MVP. 

Join the meeting.
Audio Information
Computer Audio
To use computer audio, you need speakers and microphone, or a headset.
Telephone conferencing
Use the information below to connect:
Toll-free: +1 (866) 500-6738
Toll: +1 (203) 480-8000
Participant code: 6133095

WW Event URL: (which points to the live meeting attendee link)

http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032398300&EventCategory=4&culture=en-US&CountryCode=US

Live Meeting Attendee Link:
https://www.livemeeting.com/cc/mvp/join?id=29Z5N5&role=attend&pw=A4547ml25OU

03 December 2008

Mapping out Team Build 2008 Targets

Martin Danner has done a great job of mapping out the firing order of Targets in Team Build 2008.  He has posted this map to his blog. 

"I had the good fortune of reviewing the upcoming book titled Inside the Microsoft® Build Engine: Using MSBuild and Team Foundation Build. This book is an absolute must for anyone who is creating and customizing build definitions in Team Foundation Build. As part of my review process I created a map that lists the order of target invocation. I found this map very handy, so I’m posting it because I figure others will find it handy too."           - Martin Danner

This is a handy link to have if you are working with Team Build and want to understand the process flow. 

I'll also be checking out the Team Build book he reviewed.  It look like the first book to cover MSBuild and Team Build thoroughly and is long overdue, but that's for a later post.

Thanks Martin!

Hyper-V...Not Coming to A Vista machine near YOU!!

 

NOTE:  Microsoft has clarified their announcement.  While SP2 will ship for Vista and Windows Server 2008 as a single update the Hyper-V components WILL NOT install on Vista.

Here is some clarification from a ComputerWorld article:

"Later, Allee clarified a mix-up regarding Microsoft's Hyper-V virtualization technology, which is included in the service pack but not installed on Vista machines. "To clarify, Hyper-V is not included in Windows Vista SP2," Allee said. "It is part of the Windows Server 2008 service pack."

The confusion arose because this is the first time that Microsoft has packaged a single service pack that updates both the client and server editions of Windows."     - ComputerWorld

Yesterday afternoon Microsoft announced Service Pack 2 Beta or Windows Vista and Windows Server 2008.  While that may seem all nice and boring there are a few great tidbits that got slipped in (see Notable Changes post).

Service Pack 2 is for both Vista and Win 2k8.  That means you can deploy a single Service Pack to all of your Vista and Win2k8 machines.  If you have a fully Vista/2k8 environment then you only need this one SP.  Even though most of us work in mixed Vista/XP/Win2k3/Win2k8 environments I really like the way Microsoft moving.  Simplification of patching will make the IT Pros out there very happy and can't hurt us geeks running multiple home computers and VMs. :)

Second off (and more important to me) is that they have brought Hyper-V to Vista!  Now I really have to rethink what I have running on my laptop.  I currently run Windows Server 2008 x64 on my Dell D630.  I have done this for 2 main reasons, first I wanted access to all 4GB of RAM so that's the x64 part.  Second, I wanted the VMs that I use constantly for client environments and TFS development to run under Hyper-V to eek out all the performance I could.  Since Hyper-V only shipped with Windows Server 2008 it was a no-brainer.  Unfortunately, I had to go through a lot of configuration to get the Win2k8 OS to work nicely as a workstation (and I'm still having a hard time running Flash).

If I migrate my laptop back to Vista Business x64 with SP2 I think I can get the same functionality with better compatibility.  I'll probably have to do some tweaking to a Vista install to get better performance out of it though, so there are trade-offs.

I think my boss would say that it's good because now he can have Hyper-V on a machine that can Sleep (Win2k8 doesn't have Sleep).

So all-in-all a good morning for news from this geek's perspective.  I'm off to download SP2 Beta and patch my home machine and check out Hyper-V in Vista.

02 December 2008

VSTS 2008 Database Edition GDR - RTM has shipped

Just catching up on my reading and I noticed that Gert Drapers and the DB Pro Team have ruined another holiday weekend for a bunch of folks in VSTS land.  They shipped the "gold" release of Visual Studio Team System 2008 Database Edition GDR - RTM on 25-Nov, just in time for the long Thanksgiving holiday weekend in the US.

This release is a Major one for the DataDude team.

"Finally the moment is there, the final version of the Visual Studio Team System 2008 Database Edition GDR has been released to the web.

Although the name "GDR", which stands for "General Redistribution Release", implies otherwise, this really is a complete new release, based on a new architecture. We have taken the architectural changes from the Rosario project (Visual Studio Team System 2010) and rolled them forward in time. Rolling forward these changes help us align the GDR release with the upcoming Visual Studio Team System 2010 release and provide numerous new features and extensibility points in this release. If you would compare the GDR release with the "Visual Studio 2005 Team Edition for Database Professionals" or "Visual Studio Team System 2008 Database Edition" you will agree this is a completely new product! "                                     - Gert Drapers

You need to uninstall any prior GDR releases before installing the RTM version so I advise reading the Installation section of Gert's post.

Here are some of my favorite features from the long list on Gert's blog.  My selections are weighted toward build and deploy because that's where my pain points have been in the past.  Model based architecture - Everything underneath the covers is based on a true model representation of the SQL Server schema. This facilitates a true offline declarative database development system where the source code defines the shapes of the schema objects.

  • Separation of BUILD and DEPLOY. - The separation of build & deploy makes it possible to deploy the output of your database project to many different targets and different points in time. Build now produces a single artifact file hat describes the schema inside your database, called a .DBSCHEMA file. This file is used by the deployment engine to deploy your schema.
  • Standalone Deployment Engine. - The inclusion of a standalone and redistributable deployment engine makes it possible to deploy the output of your database projects (.DBSCHEMA files) to a target database without the need of having Visual Studio Team System Database Edition installed. This enables key scenarios like the inclusion of database schema deployment as part of your application installation.

I recommend that everyone check out the full list on Gert's blog posting for all the goodness.

Here are the links.

Download page
http://www.microsoft.com/downloads/details.aspx?FamilyID=bb3ad767-5f69-4db9-b1c9-8f55759846ed&displaylang=en

Setup
http://download.microsoft.com/download/0/a/e/0ae1153a-8798-474a-93e6-d19299f37c8b/setup.exe

Read Me
http://download.microsoft.com/download/0/a/e/0ae1153a-8798-474a-93e6-d19299f37c8b/Readme.mht

Documentation
http://download.microsoft.com/download/0/a/e/0ae1153a-8798-474a-93e6-d19299f37c8b/Documentation.zip

New Team System Events Blog

Omar Villarreal (VSTS MVP, Notion Consultant and all around swell guy) has created a new blog on TeamSystemRocks.com that allows User Groups and Presenters to advertise their presentations in a single place.  Think of it as "one-stop-shopping" for all of your VSTS brain candy needs.

"The Team System community has been growing over time and information about the different events and presentations is being published everywhere.

This blog has been created for Team System user group leaders, influencers, speakers and event organizers worldwide to advertise their upcoming Team System related events through this blog and for those of you attending these events to find out about them. Categories will be created as needed to help everyone filter and find the events they are interested in."      - OmarV

The URL of the site is: http://teamsystemrocks.com/blogs/vstsevents

It's a great idea to help improve the signal-to-noise ratio you get from the search engines when looking for information.

- Steve

02 October 2008

VSTS Dev + MSDN = VSTS DBPro...and vice versa

Microsoft announced on Monday that if you have Visual Studio Team System for Developers and an  MSDN subscription you will be able to download and install the Visual Studio Team System for Database Professionals at NO ADDITIONAL COST.

If you are a DB Pro user with MSDN, you now get the Developer edition!

[UPDATE - 03-Oct-2008] Gert Drapers of the DB Pro Team has posted additional information on this new benefit.  You can find his post here.  There is also a FAQ on MSDN here.

equation

Since Visual Studio 2010 has merged these 2 editions, they felt that they could provide the same value to current (VS 2005, VS 2008) MSDN subscribers.

This is great!  I have a lot of clients that have balked at using the features in DB Pro because they already had Developer and couldn't justify the additional cost.  They lost out on some great features because of this.  Now they can deploy DB Pro to all of their Devs that also do database work and get their entire development process under a single umbrella with version control, work item tracking and automated builds.

Another cool thing that you may not have known; All of the Visual Studio Editions install into a single Visual Studio IDE.  That means that if you have VSTS Dev installed and then install DB Pro, you don't see another icon in the Start menu and you don't have a second, unneeded, full install of the Visual Studio files on your drive wasting space.  The DB Pro just plugs in to your existing installation and "lights up" the additional features.  I've noticed that this isn't a widely know topic so I thought I'd bring it up.

The download is available as of Wednesday, 1-Oct-2008 on your MSDN downloads page.

Major TFS Power Tools Release Is Coming

Brian Harry has posted a "teaser" on his blog outlining the next TFS Power Tools release.  There is some major new, cool and useful functionality being dropped.  They are looking at a late October 2008 timeframe.

This release has some excellent, new collaboration tools like integration with Live Messenger and Team Member based querying.  They have also written extension points that allow you to hook in your favorite IM program.

To make life even easier for those folks that work in a mixed environment (.Net, Java, PHP, etc) they have done some excellent Shell Integration.

I can't do half as good a job explaining this as Brian, so go and read his post for all the new goodness.

http://blogs.msdn.com/bharry/archive/2008/10/01/preview-of-the-next-tfs-power-tools-release.aspx

- Steve

30 September 2008

Announcing Visual Studio Team System 2010

Microsoft has 'officially' named the Visual Studio Team System Code-name 'Rosario' suite of tools to "Visual Studio Team System 2010" in an announcement on 29-Sep-2008.  They have also posted information on MSDN and Channel 9.

Here are 2 of the items that are important to me and my clients of the many announced:

  • The VSTS Developer and Database Editions are being combined into a single product so you no longer have to buy Team Suite for all of your coders that also write stored procs and mantain databases.  The separation of these 2 tools has been one of the barriers to bringing the database into Version Control with some of my clients.  As Brian Harry puts it:

"Another key announcement is that we will be combining the Team Development product and the Team Database product into a single Team Development product (essentially giving you 2 for the price of 1).  That change will be in effect go into effect on 10/1/08 (the day after tomorrow).- Brian Harry

  • VSTS 2010 allows the developer to see the state of the test system when the test failed.  This was internally called "TiVo for Debuggers" which pretty much gives a nice, clear picture of what it does.  Removing "Can't Reproduce" from a team's vocabulary is a big win in itself.

In Brian Harry's blog post he also stated that there would be another CTP this fall.  Yippee!

Here are some links to the announcements, feature sets, goodies and articles:

Microsoft PressPass - Microsoft Unveils Next Version of Visual Studio and .NET Framework

Brian Harry's Blog - Shining the Light on Rosario

MSDN - Visual Studio Team System 2010 Overview

MSDN - Visual Studio 2010 and the .Net Framework 4.0 Overview

Channel 9 - Norm Guadagno: Announcing Visual Studio Team System 2010 

Channel 9 - Visual Studio Team System 2010 Week on Channel 9!

Information Week - Microsoft Details Visual Studio 2010, .Net 4.0

CNet News - Visual Studio 2010 to come with 'black box'

23 September 2008

VSTS How To: Code Coverage for Manual Tests

I was just reading through Michael Ruminer's recent post about code coverage for Manual Tests and it got me to thinking about manual testing and code coverage.  I've often discussed code coverage in conjunction with automated testing but never with manual tests.  I guess I'll walk through the process so that I can discuss and demo the topic the next time testing and code coverage comes up with a client.

Kudos go out to the VSTS Quality Tools team for a great blog post that was the basis for a large part of this post.

There are 3 basic cases:

  1. You have the source code for the app and tests.
  2. You only have the binaries for the app but have the source code for the tests.
  3. You only have the binaries for the app and tests. 

In each case, the same steps are implemented:

  1. Instrument the DLL to test
  2. Start Manual Test run
  3. Start app
  4. Run all manual tests
  5. Stop app
  6. End Manual Test run
  7. Review Code Coverage

In each of the Cases described below we will be using the attached "Hello World" app.  This app is a simple WinForms app written in VB.Net 2008.  The basics of the app are that you enter a value in the textbox and click the Click Me! button.  The app then displays a dialog specifying if the value is an integer or not and if it is an integer, then whether the value is odd or even.  This will give us a simple code path to test and view coverage.

Here's the layout that we will use:

SolutionExplorer

Here's the method that we will be testing and retrieving coverage data.

   1:  Public Class Form1
   2:  
   3:      Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
   4:          Dim msg As String = "The entered value is not an integer."
   5:          Dim value As Integer
   6:   
   7:          If Integer.TryParse(TextBox1.Text, value) Then
   8:              If value Mod 2 = 0 Then
   9:                 msg = String.Format("The number {0} is even.", value)
  10:              Else
  11:                  msg = String.Format("The number {0} is odd.", value)
  12:              End If
  13:          End If
  14:          MessageBox.Show(msg, "Silly little test app", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly, False)
  15:      End Sub
  16:   
  17:   
  18:  End Class

Case 1 - You have app and test source code

The first case is the similar to the way we implement code coverage for Unit Tests.  Instead of selecting a group of Unit Tests to run, you run a set of Manual Tests.  In our case, we have the app project and the test project.  So let's run this manual test and grab code coverage data.

1. Instrument the DLL to test

Double-click on LocalTestRun.testrunconfig and navigate to the Code Coverage tab.  In here you will be shown all of the assemblies and web apps in your project.  Check the box next to assemblies that you want to get coverage on.  Leave the Instrument assemblies in place checkbox checked (default).  Click the Close button to finish

testrunconfig

2. Start Manual Test run

Open the Test View window (Test | Windows | Test View...), select the manual tests that will be part of this test run and click the Run Tests button.

testview

This will start the code coverage service and display the first manual test in the test run.

3. Start the application being tested

You could press the F5 key to run the app but if you did you would see this dialog.

errordebug 

You can't run code coverage and debugging at the same time because instrumentation of the assembly injects probes into the call stack thus throwing off debugger when it tries to match up the stack frames with the PDB information.

To get the app running you need to press CTRL + F5 to start the app without debugging.

4. Run all manual tests

Follow the steps in each test, select whether the test passed or failed and add any comments.  Once the test is done, don't forget to click the Apply button to submit that test result.

testrunning 

5. Stop the application

Once your manual tests are all finished but before you Apply the last test's results, close the application.  You close the application to flush the coverage data that has been recorded.

6. End Manual Test run

Finish marking the last test in the run, mark it passed or failed and then click the Apply button to save the test results and finish the test run.  This will let the test run results window load with the final test data.

testrunning

7. Review Code Coverage

To open the Code Coverage window you can either select the Test | Windows | Code Coverage menu item or right-click on your test results in the Test Results windows and select Code Coverage.

testresults

This will open up the Code Coverage windows where you can drill-down into your application and view the covered and non-covered code metrics.  These include the blocks of code or the lines of code.  You can right-click within the Code Coverage Results window and select Add/Remove Columns to display the coverage metrics by Lines covered.

coverageresults

To see the source code with coverage hilighting, right-click on the method you wish to view and select Go to source code. 

gotosourcecode

This will open your source code and bring up the selected method with hilighting applied.  The code in blue was covered by the tests in this test run and the code in red was not.

coverage

 

Case 2 - you have test source code but only app binaries

In this case you are doing effectively the same steps as in Case 1 except you will need to add the assemblies to the instrumentation list in Step 1.

If you do not have access to the app's source code you will not be able to see the source code coloring.

1. Instrument the DLL to test

Double-click on LocalTestRun.testrunconfig and navigate to the Code Coverage tab.  In here you not see any assemblies, unlike in Case 1.  Click on the Add Assembly... button to open an Explorer window.  Select the assembly or assemblies to instrument.  Leave the Instrument assemblies in place checkbox checked (default). 

If the assemblies have been strong-named, you will need access to their key to re-sign them after instrumentation.  If you can't get access to the key, you can't instrument the assemblies. 

Click the Close button to finish

testrunconfig2

2 through 7

Follow the steps in Case 1.

 

 

Case 3 - You have app and test binaries but no source code

Manual tests aren't able to be run from the mstest.exe command-line tool, so this post is actually applicable for any scenario where you have app and test binaries.  Unfortunately, this means that you will need to have the manual tests printed out and available to your testers.

As we discussed, we are going to follow the same set of steps as the earlier 2 cases but we are going to use the tools in a bit of a different way. 

1. Instrument the DLL to Test

a. To instrument the DLL we need first need to copy them from wherever they are stage to a directory on the local machine.

b. Next we have to open a Visual Studio 2008 Command Prompt  (Start | All Programs | Microsoft Visual Studio 2008 | Visual Studio Tools | Visual Studio 2008 Command Prompt)

c. Change directories to the directory on the local machine use in Step 1a.

d. Run the following command for each assembly you wish to instrument
    vsinstr –coverage [YourAssemblyNameHere]

2. Start Manual Test run

To start our test run we need to spin up the code coverage monitor.  We do this by running the following command from the Visual Studio 2008 Command Prompt we opened in Step 1b.

vsperfcmd –start:coverage –output:[AMeaningfulOutputName].coverage

3. Start app

You start your application by running it from the location specified in Step 1b.

4. Run all manual tests

Here's where those copies of the manual tests come in.  In Cases 1 & 2 we were able to run the manual tests inside of Visual Studio but we can't do that if we only have test binaries. 

5. Stop app

Shut down your app the way a user normally would.

6. End Manual Test run

We need to shutdown the code coverage monitor. This will cause the code coverage data to be written out to the file that we specified on the command-line in Step 2.   Do this by running the following command in the Visual Studio 2008 Command Prompt we opened in Step 1b.

vsperfcmd –shutdown

7. Review Code Coverage

To look at the code coverage results, open the .coverage file (specified on the command-line in Step 2) in Visual Studio 2008.  If someone looking at the .coverage file has access to the source code, they will be able to see the source code coloring.

 

Sources

Running Tests with Code Coverage 
 
http://blogs.msdn.com/vstsqualitytools/archive/2005/06/08/426979.aspx

MSDN: Manual Test Overview
 
http://msdn.microsoft.com/en-us/library/ms182496(VS.80).aspx

Perform Code Coverage Analysis with .NET to Ensure Thorough Application Testing(MSDN Magazine)
 
http://msdn.microsoft.com/en-us/magazine/cc163981.aspx

MSDN - VSInstr
  http://msdn.microsoft.com/en-us/library/ms182402.aspx

 MSDN - VSPerfCmd
  http://msdn.microsoft.com/en-us/library/ms182403.aspx