Geeks With Blogs
Stephanie Grima C#, ASP.NET and my life.


Tutorial: Deploying an Activity to Office SharePoint Designer

I had a really difficult time to deploy my first activity to Office SharePoint Designer, because I didn't find a complete tutorial of how to do it, so I figured out that I should do a proper one and share it with you all. Please read :-)

1.       Save and successfully build the activity in Visual Studio
2.       Sign the Assembly:
·         Right click the solution node in the Solution Explorer
·         Select Properties
·         Click the tab named: Signing
·         Check the box ‘Sign the assembly’
·         Select ‘New’ from the Choose a strong name key file dropdown list
·         Name the key file according to the solution name example Sample.Activity.snk. Always finish the name with ‘.snk’
·         Uncheck the checkbox of ‘Protect my key file with a password’
·         Click OK
3.       Build the Assembly again
4.       Obtain the PublicKeyToken by either:
·         Open Visual Studio’s Command Prompt
·         Change to the directory of your project up to the Debug folder where one finds the dll example: C:\Documents and Settings\stephG\My Documents\Visual Studio 2005\Projects\Sample.Activity\Sample.Activity\bin\Debug
·         Write down the following command: sn –T Sample.Activity.dll
·         Make a copy of the value given and paste it into the AssemblyInfo.cs. This is found in the project. Make sure you put this as a comment ex:
//Public key token is <publickeytoken>
·         In the Visual Studio, click Tools, External Tools
o   Click on the add button to add a new tool to those already created
o   In the Title toolbox write down: GET SN TOKEN
o   In the Command toolbox write the location of the sn.exe. This is not the same for everyone since not everyone has the same version of Visual Studio. To find where it is located, go to VS Command Prompt and type: where sn.exe. Write the location it gives you here
o   In the argument toolbox write: -T $(TargetPath)
o   Tick ‘User Output Window’
o   Click on Apply
o   Click OK
·         Go to Tools and find: GET SN TOKEN
·         The PublicKeyToken is displayed in the OutputWindow
·         Take a copy of it and put it into the AssemblyInfo.cs. This is found in the project. Make sure you put this as a comment ex:
//Public key token is <publickeytoken>
5.     Deploy the assembly file on the SharePoint Server:
• Go on the Visual Studio Command Prompt
• Find the location of the dll of your project example: C:\Documents and Settings\admin\My   Documents\Visual Studio 2005\Projects\project name\ project name \bin\Debug
• Type: gacutil /I “project name.dll”
• If the assembly is deployed successfully you will get the following: “Assembly successfully added to the cache.”
6. Create a .ACTION file and save it at the following directory: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\1033\Workflow
·         Put in the XML inside this textfile and save.
7.       Go to the following location: C:\Inetpub\wwwroot\wss\VirtualDirectories\80\ and double click on web.config. Find the section<authorizedTokens> and write the following xml inside:
·         <authorizedType Assembly="SOLUTION NAME HERE, Version=, Culture=neutral, PublicKeyToken=TOKEN HERE" Namespace="SOLUTION NAME HERE" TypeName="*" Authorized="True" />
·         Save the web.config
·         Reset IIS
8.       If you follow these steps, the deployment of the project into Office SharePoint Designer should be successful.
Posted on Wednesday, October 29, 2008 4:50 AM SharePoint , Office SharePoint Designer | Back to top

Comments on this post: Tutorial: [SharePoint Designer] Deploying an Activity to Office SharePoint Designer

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Steffi | Powered by: