none
TFS 2010 :Queue new build failed

    Question

  • Hi Everyone,
    I have created a custom activity and placed the dll in the GAC.
    It is working fine when i dragged that activity from toolbox onto my buildprocesstemplate.xaml.


    But when i am trying to use only a share location like version control path to custom assemblies(which is in build controllers),It is showing the following error.
    "TF21509:An error occured while initializing a build definition \CustomBuildTasks\BuildName:Cannot create
    unknown type '{clr-namepace:NamespaceName,asembly=AssemblyName}Activityname'."

    I have checked in the dll in the shared location and set the  version control path to custom assemblies which is in build controllers.I have followed the Ewald's blog

    http://www.ewaldhofman.nl/post/2010/05/27/Customize-Team-Build-2010-e28093-Part-7-How-is-the-custom-assembly-found.aspx

    But no luck.

    Please let me know why exactly it is showing the error?And a step by step solution this one?

    OR let me know which process is recommended?(GAC /Probing path/version control path to custom assemblies)?
    Can u please help me..!

    Thanks,
    eswar reddy

    Monday, August 30, 2010 8:03 PM

Answers

  •  Hey Ewald,

    First of all,Thank you for your reply..!!!

    My problem gets resolved.

    This particular error is

    "TF21509:An error occured while initializing a build definition \CustomBuildTasks\BuildName:Cannot create
    unknown type '{clr-namepace:NamespaceName,asembly=AssemblyName}Activityname'."

    because  I missed this attribute at class level [BuildActivity(HostEnvironmentOption.All)]. I have checked this one by removing and placing it successively.So the error is because of not placing that attribute.

    [BuildActivity(HostEnvironmentOption.All)]

    public sealed class CustomActivity : CodeActivity

    {}

    Tuesday, August 31, 2010 2:58 PM

All replies

  • If you put the assembly in the GAC, then you have to install it in the GAC of the build agent too. I prefer to add the assembly to source control and then set the version control path in the build controller. But to use this, add it to source control. Did you do that?
    Ewald - Please remember to mark the replies as answers if they help.

    Ewald Hofman
    Blog: www.ewaldhofman.nl
    Monday, August 30, 2010 8:40 PM
  • 1)I have placed it in the GAC,but not installed in the GAC of the build agent.Can you let me know where is the location of GAC of the build agent ?

    2)I added and checked in the dll to the source control,and mentioned the version control path to assemblies which is in build controller properties, still getting the error?

    Please help me..!

    Tuesday, August 31, 2010 6:08 AM
  • If you have 2 in place then you don't need to use the GAC.

    When I get this error, I first verify whether the assembly name and namespace are correct with reflector of Red Gate.


    Ewald - Please remember to mark the replies as answers if they help.

    Ewald Hofman
    Blog: www.ewaldhofman.nl
    Tuesday, August 31, 2010 6:48 AM
  •  Hey Ewald,

    First of all,Thank you for your reply..!!!

    My problem gets resolved.

    This particular error is

    "TF21509:An error occured while initializing a build definition \CustomBuildTasks\BuildName:Cannot create
    unknown type '{clr-namepace:NamespaceName,asembly=AssemblyName}Activityname'."

    because  I missed this attribute at class level [BuildActivity(HostEnvironmentOption.All)]. I have checked this one by removing and placing it successively.So the error is because of not placing that attribute.

    [BuildActivity(HostEnvironmentOption.All)]

    public sealed class CustomActivity : CodeActivity

    {}

    Tuesday, August 31, 2010 2:58 PM
  • Great, and thanks for getting back with the solution. I have updated my blog post http://www.ewaldhofman.nl/post/2010/05/27/Customize-Team-Build-2010-e28093-Part-7-How-is-the-custom-assembly-found.aspx at the bottom.
    Ewald - Please remember to mark the replies as answers if they help.

    Ewald Hofman
    Blog: www.ewaldhofman.nl
    Tuesday, August 31, 2010 5:55 PM
  • Thank you very much Ewald..!

    And try to update this in part 4,

    http://www.ewaldhofman.nl/post/2010/04/29/Customize-Team-Build-2010-e28093-Part-4-Create-your-own-activity.aspx

    because some else get this problem, and he posted that one in part4.

    Regards,

    venkat

    Tuesday, August 31, 2010 6:10 PM
  • I'm having the same problem, but I can't (or don't know how) implement the suggestion here. My custom activity is not code based (it's workflow based). Is there anywhere else to set that attribute? (maybe editing the xaml code directly?)
    Wednesday, September 14, 2011 8:43 PM
  • Hi,

    i'm using TFS 2010 SP1.

    I've many customized activities, all of the classes are wrapped with one of the following:

    [BuildActivity(HostEnvironmentOption.Agent)] or

    [BuildActivity(HostEnvironmentOption.All)]

    But, when i compile and check-in my dll (without version increase) it's not loaded by the agents. Only after i restart the agents' TFS service the up-to-date dlls are loaded.

    Any idea?

    Monday, July 08, 2013 12:27 PM