Saturday, January 20, 2007

Defeating Cancer: Lance Armstrong starts Lobby

Most fortunately, no one in my family has battled cancer. Hopefully, this will continue. However, we must become more vigilant in this fight. I'm encouraged by Lance Armstrong's renewed push to conquer this silent foe. It is truly an abomination that a people so rich in knowledge and experience have yet to defeat cancer. We put men on the moon...almost 40 years ago! How is cancer anything but a footnote from the 1990's?

I urge you to join in with Lance's army. The V Foundation and the American Cancer Society are also responsible agents in the fight against cancer.

CodeMash: Day 2

Well done! Well done. CodeMash really delivered. Day 2, for me, could be summed up as Scott Guthrie Day. I'm not sure how he pulled off 3 knowledge-laden, engaging presentations...all while on Redmond time. I kept noticing the clock on his laptop. During his keynote at 9am, his clock read 6am. And he was still going strong during his 3-4:15 discussion. Impressive. I hope he gets/got a few hours of nap time on the flight to SeaTac.

  • Dave Donaldson's review of NHibernate. This guy just impresses me. He's not a rock star (as in unapproachable, full of himself) but more like the people's developer. Down to earth. Human. Wants to help. I'm excited about the prospect of NHibernate. I've used NetTiers with good success but never really pushed the limits. Although, LINQ may trump NHibernate...
  • LINQ. This Object-Relational Mapper (ORM) will revolutionize traditional data access tier development. The Microsoft developer community made solid progress in recent times through leveraging shared source tools such as Enterprise Library/Patterns & Practices and FxCop and open source tools like NUnit. Embracing agile and TDD also helps. But, I think LINQ will finally bring ORM to a place where developers feel comfortable implementing it and enterprises feel comfortable allowing it into their shops (there's still a reluctance to accept OSS in a lot of the bigger shops). Guthrie's demos and information nailed it on LINQ.
Overall, CodeMash delivered great value in a short period of time for a very reasonable price. Great work, guys. I look forward to next year.

Friday, January 19, 2007

CodeMash: Day 1

I'm so impressed with the organizers of this conference. In some ways, the "grass roots" effort exceeded the effectiveness of "professionally" organized conferences. Some of the highlights:
  • Bruce Eckle - Listen to him speak if you get the chance. Abstract but a good message: we must experiment to learn; your assumptions are probably wrong; designing up front will likely miss the mark
  • Ted Neward - I love it when people break through the religion and the BS to tell it like it is. Ted discussed embracing both Java and .Net to create the best solution to a business problem.
  • Pillar programming problem contest - I spent about an hour trying to figure this one out on a spreadsheet and failed miserably. ;-) (I think I'm missing some constraints...) Regardless, it was a fun exercise and likely, a great way to attract solid developer candidates.
  • Video games - I've never been a gamer but I find the innovation intriguing. The Wii over at Quick Solutions seems to be the biggest draw. XBox 360 at Microsoft was a close 2nd.
  • Booth babes at Compuware - Enough said. (Note to Compuware: guys, this just won't yield candidates...we're not that shallow)
  • Free pop - I don't drink pop but a lot of developers do. Props to Pillar for dropping $1000 on pop Thursday
  • Open Spaces - A concept from Bruce Eckle and Martin Fowler for informal, engaging gatherings to experience ____ (fill in the blank). A neat idea.
  • Wireless access (free!)
Overall, day 1 was great. I learned a lot and experienced some coming technologies as well as some topics outside my normal realm. Good work, guys.

Sunday, January 07, 2007

Installing Team Foundation Server Workgroup Edition

It's not rocket science but I found the Team Foundation Server (TFS) installation process a bit tedious and tricky. The install MSI will reactively inform you of what you're missing (with System Health Check) but something more proactive would help. Also, an error within the System Health Check necessitates re-starting the TFS install from scratch. ;-( Regardless, I wanted to share my experience.

My purpose in installing TFS is learn the product and prepare to share with others through demos and presentations. So, I'm working off a Dell Inspiron 6000 laptop running Windows XP. Also, I chose Workgroup Edition because I don't want to mess with CALs and I don't intend to upgrade to Standard or Enterprise Edition. Workgroup and Standard are the same except Workgroup limits to 5 users.

TFS doesn't support Windows XP and I don't want to run Win2k3 Server so I'm using Virutal PC to host my TFS instance. This, BTW, is an amazingly effective and safe way to install beta or stuff you just want to try out without horking your base OS.

Of further difficulty, Virtual PC (and TFS) want a lot of memory. I only had 1GB so I had to upgrade to the max 2GB.

My process:
  • Install and configure a Virtual PC instance with Win2k3 SP1
  • This should install the .Net Framework 2.0 but double check...
  • Install IIS (enable ASP.Net) and SMTP
  • Create two accounts for TFS services. I named them TFSService and TFSReporting. I added them to the local Administrators group
  • Install SQL Server 2005 Standard Edition (Developer is not supported). I installed under a separate local account I created named SQLService. I added this to the local Administrators group.
  • I logged in as TFSService from here on out to install the remaining software.
  • Important: Before installing WSS in the next step, read "How to: Install Microsoft Windows SharePoint Services for Team Foundation Server". You *must* install WSS to leverage SQL Server instead of the default MSDE database installed with WSS. You can do this by selecting the Server Farm option during WSS's installation. Otherwise, you'll need to uninstall WSS and re-install from scratch. Unfortunately, the TFS install doesn't enlighten you to your mistake until well into the install. (Oh yes, I'm speaking from experience...) If you accidentally skipped this step, make sure to uninstall both WSS and the Sharepoint instance of MSDE. Otherwise, the Server Farm option will not appear on the WSS install.
  • Install WSS 2.0 with SP2...not 3.0. Sharepoint 3.0 and WSS 3.0 is not yet supported for TFS...even TFS SP1. I did not have to install Sharepoint Portal Server...just WSS.
  • When WSS prompted for the IIS Application Pool, I chose StsAdminAppPool from the drop-down.
  • Important: When WSS prompted for the Configuration Database, I chose "." for the Database Server, "STS_Config_TFS" (you *must* use this name) as the name of the database, recall I'm logged in as TFSService so I kept the Windows Auth option,
  • Install SQL Server 2005 KB914595 Hotfix (x86)
  • Install ASP.Net 2.0 QFE KB913393. I don't believe the KB ever actually got published but the install is included on the TFS media.
  • Install TFS using the Single-Server option. On a non-server class machine and/or virtual instance, you may get a processor or disk space nasty-gram but these were just warnings. I used the two accounts I created earlier, enabled SMTP alerts, and accepted the default install location.
  • Install Team Explorer.
  • Install KB919156
  • Install TFS SP1.
After a very long day of trial and error, I got TFS Workgroup installed onto a Virtual PC instance. I hope your experience consumes far less of your weekend!

Some final links applicable to the process:
New TFS Install and Sharepoint versions
Upgrading to Team Foundation Server SP1 – Workgroup Version and a Gotcha!!

Is it safe to install VS2005 SP1 on client machine without updating the TFS server?

TFS and Sharepoint 2007 (now that would be cool)
Warning about upgrading WSS to v3.0 on Team Foundation Server

Update 01/22/2007: When attempting to create a new team project, I kept receiving an HTTP 403 error. This post resolved the issue.

Update 01/22/2007: After resolving the 403 error, I experienced a 503 permissions error. I checked the NT Event log noticing a web service permission issue accessing the database. Checking SQL Management Studio, I noticed several databases were in single user mode. I switched them to multiple, shut down, and restarted Visual Studio. I also needed to restart IIS. All was well. Some helpful posts:

Update 02/10/2007: Insightful post regarding issues with TFS SP1; Updated TFS SP1 Install Guide

Update 03/11/2007: I discovered Team Explorer is not installed by default with VS.Net Team Edition. The Team Explorer setup resides within the TFS install media under a folder named "tfc".

Update 03/11/2007: Finally overcame the "Unable to connect to the Windows SharePoint Services" error. Solution.

Friday, January 05, 2007

Converting .Net 1.1 Applications to 2.0

This post outlines my approach and findings from converting several hundred .Net 1.1 projects (300+) from .Net 1.1 to .Net 2.0.

Retrieve all .Net 1.1 source code from source code control repository

At the root directory, use “DIR /C /B *.csproj >> projects.txt” at a command line to dump the full path of each C#.Net project into a file

Use the /upgrade option with devenv to convert the .Net projects to 2.0 (devenv "MyProject.sln" /upgrade)

  1. Open a new worksheet in Excel
  2. Type devenv in the A1 cell; copy it down into the next several hundred rows
  3. Open the projects.txt file, select all, and copy
  4. Placing the cursor in cell B1 in Excel, paste
  5. Type /upgrade in the C1 cell; copy it down into the next several hundred rows
  6. In the D1 cell, paste in the following formula =A1& " " & B1& " " & C1; copy it down into the next several hundred rows
  7. Select the D column and copy
  8. Create a new file called convert.bat
  9. convert.bat and paste the clipboard from Excel into the file and save
  10. From a VS.Net 2005 command line, execute the convert.bat file piping it to convert.log: convert.bat >> convert.log

This process will upgrade the projects to .Net 2.0, create a backup of the original files, and output an upgrade report in XML format (UpgradeLog.xml).

Using Windows Explorer or your favorite searching tool (RegEx, FindStr, etc.), find all the UpgradeLog.xml files possessing the string “

Resolve all upgrade / conversion issues. Likely, this will be a manual process. (i.e. open up the project and resolve issues)

Use MSBuild to compile the newly-converted .Net 2.0 projects

  1. In Excel, copy the column containing all project files (B)
  2. Open a second worksheet; paste into column B
  3. Type msbuild in the A1 cell; copy it down into the next several hundred rows
  4. In the C1 cell, paste in the following formula =A1& " " & B1; copy it down into the next several hundred rows
  5. Select the C column and copy
  6. Create a new file called compile.bat
  7. Open compile.bat and paste the clipboard from Excel into the file and save
  8. From a VS.Net 2005 command line, execute the compile.bat file piping it to compile.log: compile.bat >> compile.log

Resolve all compilation issues. Likely, this will be a manual process. (i.e. open up the project and resolve issues)

Issues Encountered
  • Broken references
  • System.Diagnostics.Assert no longer supported. Use System.Diagnostics.Trace.Assert()
  • Post Build Events e.g. GAC’ing using hard-coded gacutil.exe path (e.g. call "c:\program files\Microsoft Visual Studio .NET 2003\common7\tools\vsvars32.bat")
  • Broken pre/post-build event scripting
  • Enterprise Library hard-coded paths (e.g. C:\Program Files\Microsoft Enterprise Instrumentation\Bin\Microsoft.EnterpriseInstrumentation.dll)
  • C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Lib\' specified in 'LIB environment variable' -- 'The system cannot find the path specified. ' à Resolution: remove all vc98 references from LIB path, reboot
  • Use project properties dialog to set keyfile instead of within AssemblyInfo.cs ([assembly: AssemblyKeyFile(@"W:\ServiceFramework\_setup\key.snk")]) – could be scripted
  • Many events and methods unavailable in Enterprise Library 2.0
  • NUnit 2.0 implementation different / incompatible from 1.0 (Broken/missing test harness projects)
  • Missing framework references
  • Missing web.config files
  • 'System.Xml.Xsl.XslTransform' is obsolete: 'This class has been deprecated. Please use System.Xml.Xsl.XslCompiledTransform instead.'
  • Devenv /upgrade converts .Net 1.1 web applications to .Net 2.0 Web Site Projects instead of Web Application Projects. These projects must be individually converted from WSP to WAP.

Happy upgrading!

Microsoft MCPD Certification Preparation

While I likely won't pursue it (probably not the best use of my time...), I'm starting to point some of my folks down the .Net 2.0 certification route and I wanted to clear up some confusion as well as share some of what I've learned. There are three MS Certified Professional Developer (MCPD) "tracks" one can pursue: windows, web, and enterprise applications (EA). Due to the exam matrix (below), I would recommend developers pursue the EA because it's a combination of web and windows requiring only 5 exams. In contrast, pursuing the web and windows tracks individually requires 7 exams.