If you are using the out of the box Release Management build templates with Team Foundation Server 2013 Update 2 and Release Management Update 2 you may in certain circumstances get a variety of errors and your build will not deploy. These errors can be generic like “Exception Message: Release build failed (type Exception)” to “Exception Message: Values must be bound to a non-null expression before ForEach activity 'Process each ConfigurationsToRelease' can be used.” There are several other errors which may appear as well.
It isn’t you!
It appears as though the wrong Release Management process template was shipped in the box with RM Update 2. The RM Update 2 build templates, by default are in the folder C:\Program Files (x86)\Microsoft Visual Studio 12.0\Release Management. Do NOT use the build templates from this folder. Instead, download the good templates from here:
Now that that’s out of the way, how do you tell which template you are currently using? That’s easy. Edit your build definition and go to the Process tab. Scroll to the bottom of the screen and you’ll see one of the two views:
The Release section shown on the right is the out of the box build template. The one on the left is the good template which can be downloaded from the URL above.
The next problem is going to be the Configurations to Release. It appears as though we found a bug in the template which the team is now aware of. If you try to do the build without filling in the Configurations To Build or the Configurations To Release section of the build process, the deploy will fail with the second error message shown above. In order to make this work, you must specify at least one configuration in the Configurations To Build section even if you only want the default configuration built.
Once you do that, everything will work!