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: 
This solution might not apply to all cases, as the answers provided in previous posts are correct, but were not the solution to my issue. This answer assumes the following:

1. the custom solution assemblies are all changed in checked in and are correctly tagged and built.
2. The build controller has been pointed at the correct source control location for the custom assemblies.

What I and(I suspect many others) are doing is copying, or linking their xaml workflow documents into the solution so you can use the workflow designer and the new custom assemblies. Well, this works great in the VS designer, but VS will modify your assembly references with its own. For example I have a reference that looks like the following:

```
xmlns:ca="clr-namespace:Custom.TFS.Activities;assembly=Custom.TFS.Activities" 

```

After editing the workflow with my project solution, visual studio changed that to:

```
xmlns:local="clr-namespace:Custom.TFS.Activities" 

```

When you check this file in to test or use, you will now see the dreaded TF215097 error.

Adding the `;assembly=your.assembly` should fix the problem and remove the need to put everything in the GAC. You might also need to fix the name space references using in the rest of the xaml file.

BIG THANKS TO:
<http://msmvps.com/blogs/rfennell/archive/2010/03/08/lessons-learnt-building-a-custom-activity-to-run-typemock-isolator-in-vs2010-team-build.aspx>
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.