Welcome to Manicprogrammer Sign in | Join | Help

PowerCommands for Visual Studio 2008

If you are not familiar with the Microsoft Visual Studio Gallery you should definitely check it out. There are some great nuggets out there such as the recently dropped in PowerCommands for Visual Studio 2008.

More later but wanted to make sure I put the word out on this nice little addition.

Posted by michaelruminer | 0 Comments
Filed under

A Burndown Chart I Can Live With

Though I am not too pleased with the "Actual Velocity" this is a burndown chart I can live with.


The up tick you see in the first image are from tasks that were added one day and then corresponding amount of estimated effort removed from sprint the following day plus some tasks that just fell out of the sprint as they were found during feedback with the customer to not really be needed.

My trend line is a bit optimistic. If I used a more linear projection like I did in the second graph it would be running right along with the baseline despite only having a 1.375 velocity versus the base line set for 1.75. This is because I minded the gap and dropped a task or two. The polynomial line I used for the trend in this picture is a tad bit optimistic but I like to use different trend line calculation types at different times depending on how the data looks and what I can best foresee. When I say I like to use different types of trend lines I mean within the same sprint changing from day to day if needed. Tomorrow's chart I may have a linear trend line. I almost never start a trend line until half way through the sprint or until some very dominant trend is appearing. Ideally I am managing to the gap so that my baseline is the real trend line. I'd prefer to never have a trend line because I was tracking so closely to the baseline but the real world is never quite so clean so I find a trend line to be a helpful thing at the appropriate time.

Burndown

 

The former chart I can live with as opposed to one from the not too distant past which was one I could not live with

 

bad burndown

That dash-dot line that runs just above where it says 'Sprint Canceled' was my current linear trend line projection. As you can see it was not going to be about minding the gap.The velocity was divergent from what was needed to deliver at all. The reason being resources were cannibalized and I canceled the sprint.

Here the up tick was planned in that some tasks estimates had been deferred with the expectation they would be added in within a few days. Not the ideal way to do it but the reality of the world.

 

Just thought I'd share two very small sprints and how different they can be when most everything is done in the same manner in terms of preparation.

Silverlight Won Out

The other day in a small spurt I bemused my options for napping, working on a sorely needed domain model or working on Silverlight. Silverlight 2 won out in the end and I am glad it did. I had issues galore which is the best way to learn. Especially as I was using the 2.0 Alpha and trying to do some of the activities in a series of Silverlight 2 tutorials. It will make we really appreciate the Beta when it arrives. Apparently the beta is imminent. That sense of immediacy from my understanding of Scott Guthrie. My words not his but that's the gist.

Hey--- isn't Mix 08 coming up in a few days. Hmm.... And Scott has recently posted a whole series on Silverlight 2 (notice it's not 2.0 it's just called "2")- smart move.

Posted by michaelruminer | 0 Comments
Filed under

A Few Things I Look Forward To In Rosario

After months of working with Visual Studio 2008 Team Suite (Orcas) during it's haul in CTP's and betas and the short lived RC (was there an RC? I forget- seems like we skipped right over that) I am still learning and finding goodness in it. That, of course, doesn't keep me from looking toward 'Rosario'. Rosario is the codename for the next major release of the Team System Products.

I think Rosario will be the equivalent of the product having it's sweet 16 birthday. Perhaps that is a bit optimistic and may seem premature but if you do the math it makes the product life move along less than if it were dog years.

In a totally random post for today  I just thought I'd express my excitement for many of the features but today in specific I am really stoked for the logical class and sequence diagrams. That's today. Not that this excitement will likely change just it will be a lower focus on most other days, whereas every day I look forward to those hierarchal work items.

 

Just a twitteresque post. I am working on a domain model and the class diagram tool in Visual Studio 2008 leaves so much to be desired- time to boot up the Rosario CTP and see what I can get away with in the Logical Class Diagram tool before it yells at me- sorry- not yet.

Posted by michaelruminer | 0 Comments
Filed under

DDD, a nap or Silverlight and TFS

Now if that is not a broad title what is? I'm torn at the moment between spending some time working on a domain design that is sorely needed for my day job, reading and taking a nap- because I do not feel all that well, or working on a Silverlight 2.0 project I have in my head related to TFS and agile software development practices.

KB935796 Vista SP1 and Things That You Should Expect To Stop Working And 1 I Would Have Never Guessed

KB935796 titled  "Information about programs that are known to experience a loss of functionality when they run on a Windows Vista Service Pack 1-based computer". I took a look because I run AVG anti-virus and wanted to make sure I wasn't on the list of applications I'd likely need to upgrade. I was pretty certain I was fine as I had just received a virus signature update only moments before. I was right- I'm all good. But I was surprised to see the NYT Reader on the list. You know the much ballyhooed piece of software that allowed for reading the New York Times in a digital format both on-line and off-line (for Windows OS). You know the piece of software that was specifically created with Vista in mind and makes use of WPF and soon enough for others via Silverlight. Apparently the V 1 will suffer under Vista SP1 with the following ailment. New York Times Reader stops working when the right mouse button pressed. But there is a newer version than V1 out there just go to the NYT Reader web site and grab it.

In all fairness. It might not be surprising to see this on the list. Since I don't use the software I don't know how it works in terms of updating itself and I do know from a New York Times Reader advisory that the software is on version 1.1.3.0 and that since November with the release of .NET 3.5 there has been an update that was needed to play well with .NET 3.5.

Posted by michaelruminer | 1 Comments
Filed under

Vista SP1 - You may now see it in your auto updates.

I had speculated in an earlier post that Microsoft would release SP1 to the broader public earlier than the mid-March that they had been indicating. Guess what. They have done just. Only not in the way I had anticipated. Instead they did it in a way that is not ironic but is rather amusing. Unintentionally, according to some CNET posts and others, it's showing up in windows update.

I can't confirm this because as you may know have been running the incarnations of SP1 for some time. What makes it amusing is that for a company whose every hiccup is watched and cheered by many as examples of the companies demise and with the perception of Vista being much more poor than it really deserves this is a fitting example to those of just one more thing gone wrong. I guess it's a dark humor for me, a technology professional strongly invested in the Microsoft stack, to just shake my head and say 'Oh, Microsoft'. I'd  imbue that little statement with the same affection I'd have for my son Eli who in learning to put on his own jacket seems to get it upside down every single time. The law of averages says he should get it right half the time but... every attempt seems to end with an upside down jacket to which I can only just giggle and say 'Oh Eli, come here. Let daddy help you.' 

The moral is--- there isn't one. I can only recommend if you are running Vista grab the SP1. It's worth the 30-50 minutes you'll spend installing it and be grateful for this little snafu. You got the goods a few weeks early.

Posted by michaelruminer | 0 Comments
Filed under

TeamBuild OutDir, Item Expansion and Why Your Copy Task Gave You Nothing

I have been meaning to blog this for a long time and not too long ago the question came up again. So after seeing the question raised about three times I decided to add one more link out to the cloud that might be found to help people out.

One of the sources of this question came from an MSDN forums post and the response I placed on there about sums it up.

 

Basically the question usually involves creating a build Item that is expected to consists of the output files, such as those in OUTDIR, and then at some point near the end of the script copying those to some other location. But when the script completes this additional target location is empty.

Usually the persons build script will contain some elements of this nature:

   1: <ItemGroup>
   2:     <MyDropFiles Include="$(DropLocation)\$(BuildNumber)\**\*.*"/>
   3: </ItemGroup>
   4: <Target Name="AfterDropBuild">
   5:     <Copy
   6:         SourceFiles="@(MyDropFiles)"
   7:         DestinationFiles="@(MyDropFiles->'\\mymachine\Drop\$(BuildNumber)\%(RecursiveDir)%(Filename)%(Extension)')"
   8:     />
   9: </Target>

 

It's important to understand the points in time when things occur inside a build script. It's not a linear activity through the script so regardless of where you may put the Item definition found on line 2 in the script it will be evaluated and the MyDropFiles Item Collection will be populated very early on in the script- pretty much as soon as the script starts. Obviously if you look at the path in this example as soon as teh script starts you will find no files. You probably won't even find the path. There has been no build output and thus not files in the drop location because we haven't even done the first compile- assuming this path are for the files generated as part of this specific script itself. Thus when the AfterBuildDrop target runs there are no items in MyDropFiles (line 6) because MyDropFiles was populated as soon as the script started.

What you really want is for MyDropFiles to be populated just before you use the items. To do this you need to have something more like the following:

 

   1: <!-- get rid of this- it get evaluated and expanded at the wrong time
   2: <ItemGroup>
   3:       <MyDropFiles Include="$(DropLocation)\$(BuildNumber)\**\*.*"/>
   4: </ItemGroup>
   5: -->
   6:  
   7: <Target Name="AfterDropBuild">
   8:  

9: <!-- I just do the below as a matter of form and practice for easier maintenance if the property is referred to in multiple locations in this target -->

  10:   <CreateProperty
  11:         Value="\\mymachine\Drop\$(BuildNumber)">
  12:        <Output
  13:            TaskParameter="Value"
  14:            PropertyName ="MyDropLocation"/>
  15:    </CreateProperty>
  16:  
  17: <!-- notice I also don't use *.* in the include but * so that I pick up any files without an extension as well - this may or may not be what you desire-->
  18:   <CreateItem
  19:         Include="$(DropLocation)\$(BuildNumber)\**\*">
  20:         <Output
  21:            TaskParameter ="Include"
  22:             ItemName ="MyDropFiles"/>
  23:     </CreateItem>
  24:  
  25:     <Copy
  26:        SourceFiles="@(MyDropFiles)" 
  27:        DestinationFiles="@(MyDropFiles->'$(MyDropLocation)\%(RecursiveDir)%(Filename)%(Extension)')"/>
  28: </Target>

I also recommend reading Aaron Hallberg's blog and most specifically a great post in regards to OUTDIR and other related properties. You can also find this as a recipe (as lame of one as it may be on TeamBuild.com.

Vista SP1 and My Notebook as a Dog

I've been wondering why my notebook has been running like a dog lately. It was up to some of its old tricks. The trick that involved opening windows explorer when you have mapped drives and even on the local drives it just staring at you with a blank Windows Explorer window for about 3-5 seconds before it populated. Tricks likes the fan constantly coming on and whirring at such a speed that I thought the machine was about to launch into space. Tricks like trying to copy a file or extract a zip took something close to an eon for completion.

Oh yeah--- did I mention I run Vista. This isn't actually a bash on Vista but a proclamation of how much better is SP1. We (us techies) often install an SP and wonder - 'and did that really do anything for me?' I know Vista SP1 did because I had it, my demons were gone, I removed an RC version to put on the next RC version and just never got around to putting that last RC release on. I know very well what SP1 did for me because I downgraded and lived with it for a while. Yuck!

I've been one of those 'few' Vista SP1 beta testers. I have been running the SP1 betas on my notebook,well, since the first ones became available to us on Microsoft Connect. Even from early on the install of SP1 had resolved all the little 'tricks' I mentioned above. Back in mid January, or there abouts, RC2 or RC2 refresh or some variant came out. I started my dutiful but long uninstall of the prior SP1 RC so that I could install the new one. But that night after the 3 or 4 reboots and long wait times in between for the uninstall I just was not up to installing the newest bits.

Then I forgot about it. I forgot well enough that even with the little build number info in the lower right corner missing and my little demons back that SP1 had been so nice as to remove that I never remember to put the latest bits on board. 

Now I am glad to say the RTM for Vista SP1 is available via MVL and to those of us who had access on Microsoft Connect. As I write this I'm installing it via Windows Update (I always did the standalone install on all the other versions). I'm glad to now realize why my machine was acting like such a brick and how glad I am to be putting the actual release bits back into it's life so that we can live harmoniously together.

I've read news reports that it won't be publicly available until Mid-March. I'll believe that when I see it. I suspect public pressure will cause an acquiescence by Microsoft and the SP1 will hit the broader public sooner than is currently being reported.

I'll let you know how the update goes and how much my demons have gone.

Posted by michaelruminer | 5 Comments
Filed under

They Didn't Find Water but They Did Find a Mermaid

You have to love this stuff-- the pics from Mars when they look like "stuff" that they aren't. It just makes it really fun and exciting to explore other planets. (say that underlined part in a 80's valley girl sing song tone for the proper affect)  Once you get your head around the mind boggling statement that 'We ACTUALLY explore other planets'. Really, just reflect on that. It's almost too amazing to truly digest. I felt silly today and inspired so here is some fun on it all.

Ok. I love this stuff. Sadly- there will probably be people who really think this way without the parody. I place no disclaimer on the below except to say that it should probably have a disclaimer but it's safe for your work RSS reader - mostly. And please excuse the far overloaded and meandering parody references and multiple plot lines. I just couldn't help myself.  For something entirely different...

*News Flash* This just in...

Proof of Water, Life and More on Mars

After months of NASA public relations debacles NASA has made strong showing in the public involvement arena as of late with definitive proof of not only water on Mars but of life on Mars. Not only life on Mars but 'hot' fish women as part of that life. NASA has pictures of a mermaid on Mars. See below the picture from Mars and the classic mermaid sculpture from Copenhagen side by side and decide for yourself. I won't even tell you which is which.

 

copenhagenmermaid203 marsmaid

 

Granted the scale of the photos differ significantly in that the Mars photo is blown up to show something only a few inches high at most. So perhaps the mermaid on Mars is more like a sea monkey or perhaps she grows to normal mermaid size, whatever that is, like some child's toy when she is in the water. But don't let little things like this keep you from coming to the conclusion that is obvious. Mars has at least one fish woman.

NASA has dubbed it the 'FILF Find' and plan to fund all of NASA by starting up a web site next week named as such. An unnamed highly placed executive source within NASA has stated the choice of names was a tribute to the late Dr. Abraham Filf that discovered there was a strong attraction between many men and dirt of the figurative and literal type.

Another unnamed source within NASA, that is really a nobody and had to have his bespeckled ass pulled from a dark corner of a basement office, claims to be the progenesis (sic) of the new "FILF Find" name. He assured me that

"the name has nothing to do with the late Dr. Filf. Except that the naming choice has only added to the proof of the late Dr's. work. He would be very proud. We couldn't really use the term mermaid since that would conflict with 'mothers' so I decided to just use 'fish' "

When asked to clarify that statement he only blushed. This same source went on to confirm the statement by the NASA executive about the creation of a web site -

"I'm working on the web site now. Just moments ago I was doing some research on similar sites. The biodiversity of our planet is amazing. Well... I guess I can now say the biodiversity of our universe is amazing and getting better every day. NASA will never have a funding issue again."

This is all welcome news as late last year NASA continued its multi-year trend of acting more like a member of the White House than a public science agency and garnered even more public dissatisfaction by withholding U.S. air safety survey data it collected. NASA rejected calls to publish the data only publishing it in figurative and literal terms at the 11th hour after congressional hearings and congressional orders. Among most NASA watchers, the most prominent being the NASA Youth Watchers also known as N-A-Say-Wat (pronounced: NAY-SAY-WAT?) or as is known on The A Daily Show - NAMBLA (pronounced: Per-Verts!), the data was finally published only after a call from a secret  U.S. space outpost on the dark side of the moon by none other than it's 2nd most prominent citizen Karl Rove. A notable fact is that Michael Jackson is the first most prominent citizen on-board. There have been further rumors that in a Pinky-and-Brain-esque plot to take over the world that Osama-bin-Laden may also be a member of the enclave with some infighting between Rove and bin-Laden as whether Mr. Jackson will fulfill the Pinky style role or await President Bush's term ending.

NASA's other high profile bungling over the last few years involved suppression or manipulation of scientific findings and attempts at censoring the free speech of their own scientist by pimple faced political appointees within the NASA hierarchy who are said to often have such poor demeanors because their wisdom teeth are just coming in. NASA's censoring has been most notably around issues of climate change research and in demanding the official discussion of the theory of the 'Big Bang' have an equal nod to a divine intelligent designer. A quote from such a political lap dog close to NASA and at the heart of some of these controversies, Georgina Douche (formerly Georgina Bag who sometimes uses her hyphenated name though oddly in reverse order from convention ) was very pleased to see the findings. Ms. Douche commented:

"Mermaids have always been considered special and with a great love for man. Now that we know there are mermaids on Mars we can rest assured they were intentionally placed there to welcome us. This whole big bang thing just went up in smoke. I know people haven't always thought I was right but now that I am 26 I know even more than when I was 24."

All in all NASA is on cloud nine. Public relations are at a new high, funding issues are about to be a thing of the past, a whole new group of people never before interested in NASA are now likely devoted followers and it's all because of a little mermaid.

Posted by michaelruminer | 5 Comments
Filed under

Test Entry. <Ignore>

This is a test entry for Live Writer installed on a new machine. Need to ensure it publishes correctly and images make it properly.

Kids watching the snow 

The triplets enjoying watching the snow out the bay window.

Honored to be re-awarded MVP status

I received the email today that renewed my Microsoft MVP - Visual Developer Team System status. There was much rejoicing in my household.

Whew! I'm honored and relieved. It happens my renewal status falls on Jan. 1 of each year so I get to see if by around 11am GMT -5 I get an email saying- 'Congratulations! We are pleased to present you with the 2008 Microsoft® MVP Award!' I always sweat it. It can be a good or poor start to a new year.

Now to live up to the recognition and appreciation provided by Microsoft for this last years efforts and exceed the value in the coming year.

Congratulations to my fellow Team System MVPs that were renewed today (and all other MVPs renewed today). I look forward to working closely with you again this year. I have to say that the intimate, vocal and of course opinionated group of Team System MVPs and influencers are fantastic people to communicate with on a daily basis. And we really do communicate with extreme regularity.

See you at the MVP Summit! I missed it last year. I won't this year.

 

Posted by michaelruminer | 4 Comments
Filed under ,

Tech Ed 2008 Submissions in just under the gun

I finally filed my Tech Ed content submissions just under the deadline for those with invites that matched the internal Microsoftees submission deadline (Dec. 31, 2007 11:59pm). I actually proposed a few and hope that at least one is picked up.

The submissions were heavy in the TFS arena,as you might imagine, but also some good Silverlight 2.0 proposed content around using Silverlight for new interfaces to existing systems. I especially felt one submission would do well as a breakout session and I'd added some Hands On Lab (HOL) content- enough for a module versus a single excercise. One of the TFS related submissions was probably more appropriate for Tech Ed IT Professionals Conference than the Tech Ed Developers Conference. It was "What to do when your enterprise landscape doesn’t look like the scenarios in the TFS install guide. Installing and using TFS in the undocumented scenarios of the real world." I don't have high hopes for its selection.

You did realize they split up US Tech Ed this year (I think I recall in Europe this was done last year if not before)? I think that was great as it likely means more content on developer items for the dev conference. The downside is I will likely now have more sessions going on at one time that force me to choose one to sit in on and miss the others. Luckily they now record all these and I can watch what I missed.

I did make a 400 level proposal on Spec# and it's value and use TODAY - even if it is coming out of the Microsoft Research section. It's one of two sections I'd be especially pleased to have picked up. The proposed section is designed to be light on theory and heavy on pragmatic use but I do have planned in the session for a bit of time on the Boogie PL.

 But I'll be glad for any one of them. Heck, I'm glad to have the honor to be offered the opportunity to make a submission.

Now to cross my fingers and hope for the best. I'm not a "real" name on the speaker circuit but I've done my small share as well. What would you like to see at Tech Ed 2008? I'll get registerd on the site soon and post my contact info as well as a facebook group to match. Join me, add me as a friend and let's look forward to Tech Ed.

 

 

Posted by michaelruminer | 0 Comments
Filed under

Working on Tech-Ed 2008 Content Submissions

I'm closing out my abstracts and submissions for content to Tech-Ed 2008 this weekend (I must be done prior to Dec. 31, 11:59pm). I always find identifying which topics to propose from a list of topics I brainstorm to be the most difficult part. I think it ranks even higher in the difficulty threshold than creating the abstract, which I also wrestle with. I either struggle with thinking the topic is not interesting enough, is for too narrow an audience or is too overdone in other mediums. Sometimes I struggle with feeling the presentation topic is 'old hat' because it is usually in an area I focus a lot of attention in and am thus often on the proverbial bleeding edge of the discussion. I forget that this is not really old hat for most folks or even for myself as the topic ideas can often be on areas that are not yet fully fleshed out. Add to it that I pretty much don't do the same content more than once thus don't get the value of reuse and comfort that the content will come out as I envision. (A conference and then a user group- yes but never two conferences- not that I have spoken at a ton of them)

Sometimes this over analysis throws me into publication/submission paralysis. Okay, often it throws me into that state. If I can find one or two good blog entries on the item with a few ping backs to them then I fear the content may not add value to the community. If I find less than the aforementioned amount of activity then I fear the content is either for too narrow an audience or I'm off base in thinking it has value at all. I can beat myself up in this day and night.

This time I have a nice list of topics I have been accumulating that I think have value and could be engaging to the appropriate number of people. Not overdone. Cross-functional. Not removed from real world use. Definitely not behind these warp-speed times. In fact, I have too many topic ideas this time around. For what may be the first time ever I need to narrow down my topic list and find the gems that will get picked up- and I like them all.

Do you think a topic of  "Writing unit tests specifically with Spec# in mind" is too far out there??? ;-)

Don't expect to see that last topic but I do hope the powers that be will pick up one my of my few submissions.

Bennie's Weblog : Team Foundation Server Extensibility - Navigating the Object Model

I'm very interested to see what this potential PSDrive provider for the TFS repository does and looks like.  Bennie... bring it on. I'd like to see what your thoughts are. I'll be patiently waiting.

Posted by michaelruminer | 0 Comments
Filed under ,

Web Client Software Factory on Visual Studio 2008 and the MVP Bundle

The Installation

I wanted to get the Web Client Software Factory (WCSF) running under Visual Studio 2008 and also grab the Model-View-Presenter (MVP) Bundle. To make the WCSF work properly with Visual Studio 2008 takes a little bit of a hack. I found Ezequiel Jadib's post on Web Client Software Factory (WCSF) June 2007 & Visual Studio Orcas Beta 2 did the trick and applies as well to Visual Studio 2008 RTM as it did to Orcas Beta 2.

 

Using the MVP Bundle: a Small Problem

It all worked fine. I do recommend installing the Guidance Automation Extensions Technology Preview (July 2007 Release for Visual Studio 2005 and Visual Studio Beta 2) prior to the WCSF install so that you get the July 2007 CTP versus the February 2007 CTP. It is my assumption that the WCSF still installs the Feb. drop - I have not tested that assumption. I was surprised when I took one of the sample solutions in the MVP bundle, opened it up in Visual Studio 2008, went through a clean conversion of the solution and projects to the 2008 format (both leaving it as .NET 2.0 and shifting it to .NET 3.5) and then found I DID NOT have the Web Client Software Factory Guidance coming up in the context menus. Hmm... Turns out that after doing the conversion on the projects despite the fact that the .sln file contained the following bit of information it still didn't give me the guidance context I was after.

GlobalSection(ExtensibilityGlobals) = postSolution
        IsWCSFSolution = True
        IsWCSFSolutionWAP = True
        RootNamespace = MVPQuickstart
EndGlobalSection

What you have to do to make the guidance package begin to function after being converted (and in reality may need to be done when you open up the package in Visual Studio 2005 even without conversion- again- I haven't checked) is to go into Tools -> Guidance Package Manager and turn on the web client guidance package. As an excuse to create a Silverlight streaming application and try the corresponding Windows Live Writer plug-in I created a small Silverlight streaming video below that shows nothing but opening the solution, converting it, and then selecting to turn on the guidance via the tools menu. I didn't take time to add sound. A lame reason for a video, I know, but it was an immediate reason to play. The video is below. Sorry- but I realize it auto starts and runs in a loop. I haven't taken the time to determine how to have it not load and run but to play on demand. It's very distracting and an endless loop. I apologize and will try to investigate and resolve this evening.

 

Who Broke The Build

By shops that run a rolling CI build versus a pure "build on every check-in" CI process I have often had it asked

"Is there a way to send an email to all the people that had a changeset as part of that build notifying if there is a build break?"

My answer is always- "Sure you can write a custom task for that. It sounds like a good exercise for you to learn how to create an MSBuild task"

Well I have put most of the code below. I haven't actually tested it so caveat emptor and I also haven't finished it. As it is missing the crucial piece of code that connects to the LDAP and gets the email for the users. This might take some playing with the user string in the collection to get it correct and then once that is done the ITaskItem needs to be created for each and added to the EmailAddresses array. But other than that this code probably works. :-) If you do grab it and finish it off and fix my omissions etc. you'll want to place this task in/after AfterGetChangesetsAndUpdateWorkItems otherwise I don't believe the task will have the data there to return. I told you I hadn't tested it.

At any rate, if you want to create a set of MSBuild Items consisting of email addresses of people who had a changeset in the broken build so that they can then be emailed via another task try out the following and let me know how it works. If I get to test it before you I will. It was really just for me to play around with some of the new Team Build OM.

 

   1: public class WhoBrokeTheBuild  : Microsoft.Build.Utilities.Task 
   2:    {
   3:        private TeamFoundationServer _tfs;
   4:  
   5:        [Output]
   6:        public ITaskItem[] EmailAddresses { get; set; }
   7:  
   8:        [Required]
   9:        public string TeamFoundationServerURL { get; set; }
  10:  
  11:        [Required]
  12:        public string BuildUri { get; set; }
  15:  
  17:        
  18:        public WhoBrokeTheBuild() { }
  19:  
  20:        public override bool Execute()
  21:        {
  22:            _tfs = TFSCommon.GetTFS(TeamFoundationServerURL);
  23:            IBuildDetail buildDetail = GetBuildDetail();
  24:            List<string> changesetOwners = GetChangesetOwners(buildDetail);
  25:            
  26:            //Now we should take the changesetOwners and look up their email
  27:            //in the LDAP creating ITaskItem to populate EmailAddresses
  28:            //but this hasn't been done yet
  29:            throw new System.NotImplementedException();   
  30:            
  31:            
  32:        }
  33:  
  34:        public IBuildDetail GetBuildDetail()
  35:        {
  36:            IBuildServer buildServer = (IBuildServer)_tfs.GetService(typeof(IBuildServer));
  37:            IBuildDetail buildDetail = buildServer.GetAllBuildDetails(new Uri(BuildUri));
  38:            return buildDetail;
  39:        }
  40:  
  41:        public List<string> GetChangesetOwners(IBuildDetail buildDetail)
  42:        {
  43:            List<string> changesetOwners = new List<string>();
  44:            
  45:            IBuildDefinition buildDefinition = buildDetail.BuildDefinition;
  46:            if (buildDefinition.LastGoodBuildUri != buildDefinition.LastBuildUri)
  47:            {
  48:                return changesetOwners;
  49:            }
  50:  
  51:            List<IChangesetSummary> assocChangesets = InformationNodeConverters.GetAssociatedChangesets(buildDetail);
  52:            foreach (IChangesetSummary csSum in assocChangesets)
  53:            {
  54:                if (!(changesetOwners.Contains(csSum.CheckedInBy)))
  55:                {
  56:                    changesetOwners.Add(csSum.CheckedInBy);
  57:  
  58:                }
  59:            }
  60:  
  61:            return changesetOwners;
  62:        }
  63:  
  64:    }

TFS Admin Tool on CodePlex

I have checked in changeset 29249 on CodePlex (tfs01.codeplex.com) related to the TFS Administration Tool. This changeset and changeset 28959 will likely be pushed down in some form from the branch I was working in to the main line and rolled into a new release of the tool. If you don't wish to wait for the official release you can grab the code from the branch mruminer_working_for_2008 and compile it for yourself. It adds support for TFS 2008 in the form of supporting WSS 3.0/MOSS. This was the only issue I found in supporting TFS 2008- not to say there could not be others. I have copied and pasted below the updates I made. If you know of other issues in using the tool with TFS 2008 speak up so we can get them resolved for a new release.

 

Changes to the schema of the RoleConfig.xml file:

<!-- a new attribute of wss3role on the System element is the role name used when

communicating to a WSS 3.0 site. The values that need to be used changed from

WSS 2.0 and WSS 3.0. If a WSS 2.0 site is in use it uses the role attribute value

if it is a WSS 3.0 site it uses the wss3role attribute. The comparable default values

are as follows in the format 2.0 -> 3.0:

Administrator -> Full Control

Contributor -> Contribute

Web Designer -> Design

Reader -> Read

-->

Changes to the RoleConfig class

Support for WSS 3.0 was added by changing the signature of ctor of this class to expect a bool inidicating whether the team site being connected to is a WSS 3.0 site.

Changed the assignment of the XmlNode roleAttrib to be determined by the flag indicating if this is a WSS 3.0 team project site.

Changes to MainForm class

Added the call to the AppController.PrepRoleConfig to parse the RoleConfig.xml file at this point. Prior to this it was in the AppController as part of the OnTfsLogin method. This was too early in the process as a team project had not been selected and thus the team project SharePoint site could not be connected to and evaluated to determine if WSS 3.0.

Changes to Controller class

Removed the creation of the RoleConfig instance from the OnTFSLogin method and moved the process to the method PrepRoleConfig so that the MainForm instance can call for the parsing of the RoleConfig.xml file when the team project is selected thus being able to evaluate if the team project SharePoint site is a WSS 3.0 site.

Created the PrepRoleConfig method that will parse the RoleConfig.xml file via the RoleConfig class. It uses the team project name to determine the team project SharePoint site and thus determine if the site if a WSS 3.0 site for the proper parsing of the RoleConfig.xml file.

Changes to SPServerProxy class

Created a private string field _wssVersionNumber with a default value of “6.x” to represent WSS 2.0 and created a public getter property for the field.

Changed the SetUrl method from private to public so that it could be called from the Controller class and added a call to a new method of DetermineVersionNumber so that the version number will be determined when the team site URL is set.

The DetermineVersionNumber method uses the response that was created when setting the URL and testing the URL to see if a server responded at that URL. It looks for the MicrosoftSharePointTeamServices property in the response header and sets the _wssVersionNumber to this value. If this header property does not exist it defaults to “6.x” (even though it seems some instances of WSS 2.0 may return ’11.x’ and others ‘6.x’ depending on the sku and service pack.

An additional method isWSS3() was added that parses the _wssVersionNumber field and if the string value begins with ‘12’ returns true.

Changes to ReportServerUnitTests and SharePointUnitTests

The ReportServerUnitTests and SharePointUnitTests expected that the SSRS and WSS site existed on the application tier. This was the default supported condition for TFS 2005 but is not accurate for TFS 2008 where SSRS and WSS may exist on servers other than the application tier. Changes were made to the TestFixtureSetup to connect to the TFS instance just as in the previous version but then to utilize the ReportingServiceProxy and SPServerProxy for the proper connections to the respective servers.

Posted by michaelruminer | 4 Comments
Filed under