Elisha Sterngold
Elisha Sterngold

Reputation: 46

workflow toolbox not updated with new activity

I've added to the activity pack the following activity:

namespace TeamFoundation.Build.ActivityPack
{
    using System;
    using System.Activities;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Microsoft.TeamFoundation.Build.Client;

    [BuildActivity(HostEnvironmentOption.Agent)]
    public sealed class CheckSlothInitialized : CodeActivity
    {
        [RequiredArgument]
        public InArgument<string> DbUser { get; set; }

        [RequiredArgument]
        public InArgument<string> DbPassword { get; set; }

        [RequiredArgument]
        public InArgument<string> DbServer { get; set; }

        [RequiredArgument]
        public InArgument<string> DbName { get; set; }

        protected override void Execute(CodeActivityContext context)
        {
            string connString =  String.Format(
                            "data source={0};Integrated Security=false;Initial Catalog={1};User ID={2};Password={3}",
                            DbServer, DbName, DbUser, DbPassword);


        }
    }
}

After that I compile it I can't find it in the toolbox. I'm going to choose items in the toolbox and choosing the dll of my activity, but even then I can't find it in the list of System.Activities Components.

Upvotes: 1

Views: 928

Answers (2)

Alejandro Cuervo
Alejandro Cuervo

Reputation: 1

Just review in an exhaustive way if each opened are closed ({) are in the right position

Upvotes: 0

Vivek
Vivek

Reputation: 570

Please follow these check points.

  1. Clean and rebuild your solution.
  2. If your activity is in independent project (activity library) and you are referring this activity in a project containg xaml or xamlx file make sure all referenced dll should be added in reference.
  3. Try to add this activity as code behind in a workflow and execute it, is there any exception thrown?

Upvotes: 1

Related Questions