Project setup for CRM 2011 custom workflow activity development

Today I wanted to create a custom workflow activity in code. I had some issues while creating and building this project in Visual Studio.By trial and error I slowly discovered what I was doing wrong. So here is you and for myself as future reference the setup of a CRM 2011 custom workflow activity.

1) Add XRM binaries from CRM 2011 SDK BIN folder. You need to add the following two:
- microsoft.xrm.sdk
- microsoft.xrm.sdk.workflow

2) These two assemblies have dependencies on System.ServiceModel and System.ServiceModel.Web so you need to add these too.
If you can’t add them, make sure that the target framework in you project properties is set to “.NET Framework 4″ and not “.NET Framework 4 Client Profile”

If you don’t add them then you’ll get build errors like:

- The referenced assembly “microsoft.xrm.sdk” could not be resolved because it has a dependency on “System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ which is not in the currently targeted framework “.NETFramework,Version=v4.0,Profile=Client”. Please remove references to assemblies not in the targeted framework or consider retargeting your project.
- The referenced assembly “microsoft.xrm.sdk.workflow” could not be resolved because it has a dependency on “System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ which is not in the currently targeted framework “.NETFramework,Version=v4.0,Profile=Client”. Please remove references to assemblies not in the targeted framework or consider retargeting your project.

3) Also add a reference to System.Runtime.Serialization if you are going to use an entities class generated by crmsvcutil.exe

Now you are finally set to start coding your custom CRM 2011 Workflow Activity Library…

4) Remove Activity1.xaml

3) Add a new C# class file to contain your custom workflow code

Once the workflow activity library is created…

5) Make sure to sign your assembly via the Project Properties / Signing tab

Custom workflow activity libraries need to be registered like a regular CRM plugin so…

6) Make sure you are a CRM 2011 deployment administrator otherwise you’ll not be able to register the plugin

Use the custom workflow activity in your CRM 2011 processes.

Free SharePoint 2007 Development training sessions

The FireStarter event is a US event where they show as much as possible content on a specific subject. Basically a kind of technical bootcamp. Some time ago there was such an event on SharePoint development. These are 101 courses so a beginner should do fine with these and a more experienced developer can brush up a bit. Are you wondering how you can use Silverlight with SharePoint. Asking yourself the questions: what is a SharePoint webpart, how do I develop a SharePoint webpart. What are webservices? How can I use webservices together with SharePoint? What are Workflow’s? How can I create a workflow process in SharePoint? What kind of events are there in a SharePoint site and how can I catch these events? How can I brand my SharePoint site with my custom colors and logo’s? Well, an answer to all these questions can be found in the  following recordings.

LIVE MEETING REPLAY URL:                       

Session 1 – Introduction To Day & Keynote:

https://www.livemeeting.com/cc/mseventsbmo/view?id=1032380419&role=attend

Session 2 – Whirlwind SharePoint on Visual Studio:

https://www.livemeeting.com/cc/mseventsbmo/view?id=1032380419-1&role=attend

Session 3 – Silverlight on SharePoint:

https://www.livemeeting.com/cc/mseventsbmo/view?id=1032380419-2&role=attend

Session 4 – Web Parts on SharePoint:

https://www.livemeeting.com/cc/mseventsbmo/view?id=1032380419-3&role=attend

Session 5 – Web Services on SharePoint:

https://www.livemeeting.com/cc/mseventsbmo/view?id=1032380419-4&role=attend

Session 6 – Workflow on SharePoint:

https://www.livemeeting.com/cc/mseventsbmo/view?id=1032380419-5&role=attend

Session 7 – Event Handlers on SharePoint:

https://www.livemeeting.com/cc/mseventsbmo/view?id=1032380419-6&role=attend

Session 8 – Page Branding on SharePoint:

https://www.livemeeting.com/cc/mseventsbmo/view?id=1032380419-7&role=attend

 

More info can be found here: SharePoint Web 2.0 FireStarter – Live Meeting Recordings