How to Deploy a Custom Inline Function

Further to my last post, here is how to deploy a custom Inline Function…

Sign the Assembly

If you want to deploy the function to the K2 SharePoint Silverlight Designer then you need to sign it and deploy it to the GAC.  To Sign it:

  • Go to Project | Properties
  • Go to the Signing tab
  • Click on Sign the assembly
  • From the dropdown select <New>
  • Enter a name and optional password
    (or use whatever policy you have for signing)

Build the solution in Visual Studio

What I prefer to do is create a batch file that I copy into the solution folder of each project and then I just edit the name of the DLL to make it work with the current solution.  The batch file contents are as follows:

     net stop “K2 blackpearl Server”
     REM This stops the K2 server

     xcopy bin\Debug\TestInline.dll “c:\Program Files (x86)\K2 blackpearl\Host Server\Bin” /y
     REM This copies the function to the server

     xcopy bin\Debug\TestInline.dll “C:\Program Files (x86)\K2 blackpearl\Bin\Functions” /y
     REM Update K2 Studio to make the function available in the designer

     “C:\Program Files (x86)\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe” /if bin\Debug\TestInline.dll
     REM Update K2 Designer for SharePoint (if you are using it)
     REM The DLL just needs to be copied to the GAC for it to be available in the Silverlight designer

     xcopy Resources\K2Icon16x162.png “C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12
     \TEMPLATE\LAYOUTS\WebDesigner\Images\Functions\Resources.K2Icon16x162.png” /y
     REM This allows you to copy an image to be used by the Silverlight Designer

     REM Restart IIS

     net start “K2 blackpearl Server”
     REM Start the K2 Server again

Now you must restart K2 Studio to see the new Inline function


About rearcardoor

Chairman and founder of ImageFast Ltd, a leading UK ECM consultancy business and Microsoft Gold Partner. Over 20 years experience delivering successful ECM projects utilising scanning, data capture, document management, records management, workflow, BPM and SharePoint.
This entry was posted in K2 and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s