Oshry Horn has a great blog post regarding Microsoft’s “Out of the Box” UITypeEditor for generic lists of arbitrary types. When using this functionality I ran into an issue.
After completing the following steps:
- Create custom type (class)
- Add custom type’s containing .dll to TFS “Custom Assemblies” folder
- Utilize list of custom type as argument in custom build definition
- Add custom type argument to build definition UI with Metadata argument
I would receive the following error when I opened my build definition in Visual Studio:
The parameter {CustomType} could not be loaded because the type InArgument<System.Collections.Generic.List<{CustomType}>> was not found.
As it turned out, this error is due to Visual Studio not correctly loading my new custom type from the TFS Custom Assemblies folder.
A comment on Ewald Hofman’s blog post Customize Team Build 2010 – Part 7: How is the custom assembly found? turned out to be the answer I was looking for.
It seems that unless some class in your custom assembly is marked with either the BuildActivityAttribute or the BuildExtensionAttribute that Visual Studio will ignore the assembly and it won’t be loaded.
The solution then, was to to add the BuildExtensionAttribute to my custom type as follows:
namespace Company.TfsBuildExtensions.Types
{
[BuildExtension(HostEnvironmentOption.All)]
public class CustomType
{
}
}
One final gotcha is that you apparently have to restart Visual Studio after making this change for it to take affect.

