Question: For the Build Process in TFS 2010 I've created a library containing some custom code activities. 
In the past it all worked fine by adding the library (\*.dll) to Source Control and setting the 'Build Controller - Version Control Path to Custom Assemblies' to the path where the library could be found in Source Control.

But since a few days (and I've been updating the library often) the build doesn't succeed anymore.
The error reported is:

> 
> TF215097: An error occurred while
>  initializing a build for build
>  definition "Cannot create unknown
>  type '{clr-namespace:BuildTasks;assembly=BuildTasks}'"
> 
> 
> 

After [searching](https://stackoverflow.com/questions/1419734/how-to-solve-unknow-type-problem-when-load-a-xmal-file) I couldn't find any other solution than installing the library to the GAC. That works but I wonder why it is impossible to get it to work without having to install in to the GAC. 

So although it working again now, I'd like to get it back to work the old way, without GAC. Hopefully some of you can help me. Thanks in advance.

Answer: 
As mentioned by Rhapsody on June 2 2010, the GAC can be used. However it needs to be noted that if you do use the GAC, you need to stop and restart the build service, so that it re-scans the GAC, hence picking up your DLL.

I had initially registered my DLL in the GAC, and when I kicked off a build that pointed to a workflow consisting of my custom code activity assembly, the build failed. But after stopping and restarting the build service, the build does not fail straight away with the dreaded "An error occurred while initializing a build for build definition [BuildDefinitionName] : Cannot create unknown type...".
The fix I needed was to create a partial class definition of my class, and apply the BuildActivity attribute to it. My problem was that I was missing the BuildActivity attribute on my activity class, since I had implemented it in loose Xaml and not as a Code Activity, so this fixed it for me.

Supposedly, Team Build loads up any assembly containing a class with BuildActivity or BuildExtension on it, and in theory this should result in any class in said assembly being available to the build. This would have enabled a kind of dummy loader class that would allow loading of Xaml activities without needing these partial class definitions, but in practice that didn't work for me.