Thursday, 24 April 2014

Resolve "Run On Agent (reserved build agent ) Cannot create unknown type '{clr-namespace:" for TFS Custom Build Templates

Today I came across a strange error. I have a custom build template which manipulates assembly version and was running for long time without issues. Today when I try to use this on a newly provisioned build server I came across below error

Run On Agent (reserved build agent BLDSVR - Agent1)
 Cannot create unknown type '{clr-namespace:MyCustomActivityNamespace;assembly=MyCutomActivityAssembly}MyCodeActivity'.




This Template was used for so many builds/projects in this collection so I was 100% ++ sure this is nothing wrong with my template or custom activities. Few minutes trial and error, I searched in www.. and Wow ! this was exactly my issue... Cannot create unknown type clr-namespace: ONLY on one “TFS build agent” and really thankful to Jupaol for sharing his experience. He saved my day and by spending almost his day figuring out his similar issue. Yeah..it was just a restart of the problematic build agent build service.


My custom template successfully builds the application now with the build server after restarting the build service.






This is awesome lesson...restart and try if something strange with MS windows from good old days :)

This error could be because of your mistakes as well, for example have a look at Stuck on “Cannot create unknown type {clr-namespace:” in TFS Build?

No comments: