Migrating workflows to TFS 2012

I upgraded TFS from 2010 to 2012, the final step being to do the same to the build server. This in itself is quite painless.  I kicked off a few builds, which sailed through, so I thought I might have seen the tail end of that task.  It was not until a bit later when I was actually clicking around in the workflows that I noticed lots of warnings.

Item 1) Drilling down into the workflows this came from being unable to evaluate a number of expressions. Apparently VS has been thrown into confusion over the 10.0.0.0 assemblies and the new 11.0.0.0 ones.  Google takes me to a number of related blog posts by the helpful Jason Prickett:

http://blogs.msdn.com/b/jpricket/archive/2012/10/24/upgrading-your-build-definitions-from-tfs2010-to-tfs2012.aspx

http://blogs.msdn.com/b/jpricket/archive/2012/07/17/tfs-2012-cleaning-up-workflow-xaml-files-aka-removing-versioned-namespaces.aspx

This certainly seemed like the right area to pursue. Pursue, I did, and I am going to jump straight to the two steps that got things working, and then I will touch on one more side issue when it came to the web deploy step.

Yes, when I opened and viewed the XAML I could see I had several of the strongly typed references to 10.0.0.0.

I did not try to use Jason's XAMLCleaner, which seemed like overkill for my few references. Manually, I edited out the references to 10.0.0.0

xmlns:mtbw1="clr-namespace:Microsoft.TeamFoundation.Build.Workflow;assembly=Microsoft.TeamFoundation.Build.Workflow, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

becomes

xmlns:mtbw1="clr-namespace:Microsoft.TeamFoundation.Build.Workflow; assembly=Microsoft.TeamFoundation.Build.Workflow"

As soon as I did this I could again reopen and edit the workflows with no warnings.

Item 2) I can't say this second step was absolutely essential, but following a tip from another forum or blog post, I flipped over to the 2012 Build server to verify the presence of C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web. It did not exist on the build server, so I copied it across from a full VS2012 installation.

Almost there.

Item 3) I soon discovered that even though the workflows looked good, and the builds completed without error, they were not completing the automated web deploy.  The build output worked exactly as before. The bit that was not working was the deployment step. So I began exploring the various command line parameters and, as it turns out, the VS2012 publishing profiles are stored differently and need to be referenced differently.

PublishingProfile

Sandwiched between my DeployOnBuild and DeployTarget properties, I added /p:PublishProfile=mysite.com

That got the deployment working again.