Archive

Archive for the ‘Team System’ Category

VS2010/.NET4 Coming March 22nd

October 19, 2009 Leave a comment

In case you haven’t heard, VS 2010 and .NET 4.0 are officially scheduled for release on March 22nd. If you’re into playing with Betas (I know I am) and have an MSDN subscription you can go download it now. Those of you without subscriptions will need to wait about a week or so.

What I like most about this version of VS2010 is that someone at Microsoft finally wised up and realized that selling a gazillion different flavors wasn’t working and just confused/angered everyone. So now they’ve got just three:

  • Microsoft Visual Studio 2010 Ultimate with MSDN. The comprehensive suite of application life-cycle management tools for software teams to help ensure quality results from design to deployment
  • Microsoft Visual Studio 2010 Premium with MSDN. A complete toolset to help developers deliver scalable, high-quality applications
  • Microsoft Visual Studio 2010 Professional with MSDN. The essential tool for basic development tasks to assist developers in implementing their ideas easily
Categories: .NET, Team System

Getting a distinct list of changed files from TFS using PowerShell

April 1, 2009 6 comments

If you’re like me and need to do code-reviews of other people’s stuff or maybe you just want to see everything that’s changed during a certain period of a project, then here’s a nice PowerShell tip for you.

First, make sure you’ve downloaded the latest version of the Team Foundation Powertools. Starting with the October ‘08 release, the tools now include a PowerShell snap-in that add several commands which enable rich interaction with your Team Foundation Server. Of particular interest to us for this exercise though is the Get-TfsItemHistory command.

Now, let’s assume a scenario where we have a Team Project named $/Foo and we’ve been working on some patches in a v1.1 branch within that project. Now it’s time to review the work we’ve done in the current iteration which started on March 1st ‘09 and ended on March 31st ‘09. Here’s how we might start gathering those changes:

Get-TfsItemHistory “$/Foo/v1.1” -Version “D3/1/09~D3/31/09” -Recurse

Now, what this is gonna do is bring us back all the changesets that are related to any file underneath the v1.1 branch. While listing out the changesets is nice, it’s not going to tell exactly which source files I need to review. So the next thing we need to do is make sure we bring back all the changes in the changesets by adding the -IncludeItems parameter to the Get-TfsItemHistory call. We’ll also want to do is flatten out the list because, again, we’re interested in the indvidual changes, not the changesets themselves. So we use Select-Object’s -Expand parameter to flatten out the list:

Get-TfsItemHistory “$/Foo/v1.1” -Version “D3/1/09~D3/31/09” -Recurse -IncludeItems | Select-Object -Expand “Changes”

Great, so now we have a list of all the changes that were made to each file in this release, but this is still a little noisy. For starters, change types such as deletes, branches and merges are shown here. Well, if the file was deleted there’s not much to look at now, so… I don’t want those in my list. Also if a file was simply branched into the project from someplace else we don’t really care because wherever it came from already underwent a review. Merges are also questionable as, hopefully, the merged was reviewed for any conflicts at the time the merge occurred. Plus if there was a conflict that means they must have changed the file which will show up as a standalone edit anyway which means it will still end up on our list. So, how do we filter that noise out? Like so:

Get-TfsItemHistory “$/Foo/v1.1” -Version “D3/1/09~D3/31/09” -Recurse -IncludeItems | Select-Object -Expand “Changes” | Where-Object { ($_.ChangeType -band ([Microsoft.TeamFoundation.VersionControl.Client.ChangeType]::Delete -bor [Microsoft.TeamFoundation.VersionControl.Client.ChangeType]::Merge -bor [Microsoft.TeamFoundation.VersionControl.Client.ChangeType]::Branch)) -eq 0 }

Alright, almost there! Now the only problem is that if the same file is changed multiple times it’s going to be listed multilple times and really we just want the distinct names. This is a little tricky because the Change object contains the Item as a Note property, luckily there’s a Select-TfsItem command to help read what we’re interested in out. After that we just do a little grouping and sorting and we have a list we can work with:

Get-TfsItemHistory “$/Foo/v1.1” -Version “D3/1/09~D3/31/09” -Recurse -IncludeItems | Select-Object -Expand “Changes” | Where-Object { ($_.ChangeType -band ([Microsoft.TeamFoundation.VersionControl.Client.ChangeType]::Delete -bor [Microsoft.TeamFoundation.VersionControl.Client.ChangeType]::Merge -bor [Microsoft.TeamFoundation.VersionControl.Client.ChangeType]::Branch)) -eq 0 } | Select-TfsItem | Group-Object Path | Select-Object Name | Sort-Object

Finally, in true PowerShell fashion, this will write the paths out to the host (console or ISE), but naturally you could also Export-*, Out-*, etc as well.

Categories: PowerShell, Team System

VS 2005 SP1 in September

July 26, 2006 Leave a comment

Guess we can look forward to the first service pack for VS 2005 in Sept. For details, check out this page over on MSDN.

Categories: .NET, Team System

Can't wait for VSTE for DB Pros!

July 12, 2006 Leave a comment

Run, don’t walk, over to Channel9 and check out this awesome demonstration of all the capabilities of Visual Studio Team Edition for Database Professionals. Then click here to download the latest CTP which was released last week.

While database projects weren’t amazing in VS2003, I was extremely frustrated that they absolutely crippled the feature in VS2005. You can’t generate .dat files anymore, it doesn’t generate command files anymore and it generates schema files in a completely diff. fashion than 2003. Not cool at all. Luckily this new Team Edition for DBs really makes up for it 100x over… just wish it was released at the same time as the rest of VSTS.

Categories: Team System

WPF MSDN Browser

June 21, 2006 Leave a comment

Inspired by Craig’s MSDNMan, Ian has created an MSDN browser with WPF. If, like me, you read a ton of MSDN content every day, both of these tools are extreeeemely welcome additions to browsing the online content or using the installed version of the content.

Team Build: Get only changesets and work items related to a subfolder in a project

June 7, 2006 Leave a comment

There are a couple ways to approach structuring your Team Projects depending on what you want to accomplish (see the answer to the “Should I create a team project per application or per release?” in the FAQ). Consider the per application scenario, where you have a single Team Project with multiple trunks per-version:

$/My Project
    |- Main
    |- Version 1.1
    |- Version 1.2
    |- ... etc ...

A Team Build, by default, will apply the build label at the Team Project level (in this case $/My Project). Then, in order to gather changeset and work item details for the build report, it looks at the history of everything that has been given that label. Well, as you can imagine, this is a bit of a problem if there is concurrent development being done in the Version 1.1 and 1.2 branches since a build of one will label and gather changesets for the other.

We realized this problem today as we started a new version branch and, initially, we weren’t sure if we’d be able to prevent it. Then I dug around in the team build files for about five minutes looking for a way to control this and found a solution that might work, but was reluctant to change the Team Foundation MSBuild file since I don’t want to have to support changes to that on multiple build machines, dev workstations that do desktop builds, etc. So I did a search real quick and, what do you know, there is a way to fix this by only having to modify the build type’s proj file. It has to do with changing where the label is applied. Instead of applying it to the Team Project level, you can actually have it apply the label to a specific subdirectory and then the report will only reflect the changes to that subdirectory. You can get the details on how to achieve this behavior with Team Build over on Manish Agarwal’s blog.

Categories: Team System

Web Application Projects for Visual Studio 2005 Released

May 9, 2006 Leave a comment

Microsoft’s mea cupla for screwing up the web project model with the Web Site Project type has been released. We’ve been using it here at Mimeo ever since we started our 2.0/2005 migration and had great success wth it even in the beta stages.

The differences between RC1 and Release are surprisingly big, but I guess they did enough internal testing to feel it was solid enough and pushed it out the door. Read all about it on Scott Guthrie’s blog and/or download it from here. Big thanks to the team that worked on getting this out there!

Oh and make sure to check out Web Deployment Projects too! It works for both project Web Site projects as well as Web Application projects.

Limitation with Team Build with respect to TestRunConfigs

April 30, 2006 Leave a comment

I made a post to the Team Build forums about two weeks ago about the inability to use multiple .testrunconfig settings in a Team Build and, unfortunately, haven’t heard back from anyone on it yet. So I figured I’d post it here in case anyone else is stumbles across the limitation and is looking for help.

The problem lies in the way that you specify test lists and test configurations in a Team Build build type. While you can technically supply multiple test meta-data files per build type, you can only supply one test configuration for them all to run under. This stems from the fact that they chose to use a separate property, called RunConfigFile, to specify the testrunconfig file to use for the build type as opposed to making it a piece of meta-data for the MetaDataFile item. I’m somewhat baffled why they went this route, regardless of whether they wanted to support multiple test meta-data files, since they used item meta-data for everything else about it.

Why might you want to have two testrunconfigs? Well the main reason that I had was that I have some tests that need to be run under an ASP.NET host and others that only need to be run under the default host. I guess I technically could run the others under an ASP.NET host as well, but, aside from that not making sense logically, if my testrunconfig is shared across solutions then some of those solutions might not have a web project for the ASP.NET host to be configured with.

Anyway, I recommended a solution in the post that’s really simple to do: just modify the Microsoft.TeamFoundation.Build.targets file to pull the testrunconfig from the MetaDataFile item instead of a property. The only downside is that you need to make sure you do this on all machines where you’re planning on running builds.

Categories: Team System

VSS -> TFVC Conversion Completed

April 30, 2006 Leave a comment

So Mimeo has officially made the shift to VS 2005/.NET 2.0 this weekend. Part of that was cutting over to Team Foundation Server completely. We’ve been using TFS for about a month now with great success, but we’ve only been using the Work Item Tracking features thus far. This weekend, I finally migrated our Visual Source Safe Database over to Team Foundation Version Control. It’s quite simple and well documented here on MSDN. However, I did encounter one error during my experimentation phase:

Unable to write to SQL Server: .\SQLEXPRESS due to Error: The size (4969) given to the parameter ‘Mappings’ exceeds the maximum allowed (4000).

Luckily I found a work around. You can read about my experience in this post in the VSTF TFVC Forum. Hopefully it saves someone else some head scratching.

Categories: Team System

Release Builds with PDBs in 2005…?

April 17, 2006 3 comments

It’s late and I’m definitely overtired and getting that halo effect around my monitor, but… am I missing something or does VS 2005 give you no way to do PDBOnly builds through the IDE? Well, in any case I made it do it by editing the csproj, which is just an MSBuild file, by hand.

All you have to do is go into the file and find the <PropertyGroup> that corresponds to your configuration and platform, in my case Release|AnyCPU, and edit the <DebugType> property to be “pdbonly” instead of “none”. 

I certainly hope I’m just missing some checkbox somewhere because I don’t know how any development shop worth their salt can possibly do release mode builds without PDBs.

Categories: .NET, Team System
Follow

Get every new post delivered to your Inbox.