CKS Dev – Copy to SharePoint Root errors

SP2007-2010

Hello everyone

Today I’ll talk about a problem that may occur using CKS Dev.This problem occurs when you use the “Copy to SharePoint Root” option.

If you have tags on your solution (i.e. :  CodeBesideAssembly=”$assemblyname$”  when you work on a workflow) and use this function, the tags are not replaced as during a deployment!

In my case, it happened during the development of a Workfow for SharePoint 2010

This can lead (in this case) to workflows that have a status of “Failed on start” and logs like:

Load Workflow Assembly: System.IO.FileNotFoundException:
Could not load file or assembly ‘$assemblyname$’ or one of its dependencies. The system cannot find the file specified. File name: ‘$assemblyname$’

After some research on my error I came across this post by Koen van der Linden, who had already got this error:

http://kvdlinden.blogspot.com/2011/06/sharepoint-2010-workflow-could-not-load.html

Hope this helps !

Christopher.

Advertisements

Overview of CKSDev tool

Hello everyone,

Today I’ll talk about an add-in that I use every day in my developments, namely the CKSDEV.

It’s a codeplex project that you can find here: http://cksdev.codeplex.com/

I stumbled upon it almost a year ago and now I can’t do without it! Indeed it adds very useful functionalities to Visual Studio for SharePoint developers.

I’m not going to present all the possibilities of this tool for the simple reason that I do not know them all! I’ll tell you about four big features includes in this tools.

1) « quick deploy » menu :

 

If you right click on your project, you may notice a new menu: “Quick Deploy (CKSDev). “By clicking on this menu you will see a lot of useful links, among them you will find:

« Copy to SharePoint Root » : will copy all files into the 14 hive (the link is present on all files in the solution).

« Copy to GAC/BIN » : allows to update the project DLL in the GAC.

« Attach to All SharePoint processes » : allows to attach to the process to debug SharePoint code.

2) Import Field and Import Content Type

For this tutorial I ‘ve created via the interface of SharePoint a content type named  “CKSDemo” based on the standard content type of lists: Item. I’ve added a column of type”Multiple line of text”, a “Choice”, a “Date and Time”, a “Lookup” and a”Person or Group”

 

In Visual Studio, add a connection to our SharePoint site.

 

Browse to find our content type “CKSDemo”

 

We see a link “Import Content Type” which, when clicked, generates the xml of the content type!

If we now browse to the fields of this content type, we can also import them via the “Import Field” button.

 

Link which, when clicked, generates the xml of the field definition!

3) SharePoint Reference tab :

A small addition very valuable when you want to add a reference to a SharePoint dll, no need to go through all the “. NET” and “recent” tabs , a “SharePoint” tab with the dll has been added!

 

4) New item’s template

When you add an item to your project, new templates are present, the one’s whose name ends with “(CKSDev)”

 

Example with “Branding” which, when selected, creates a series of items in our project.

 

As you can see the following items are automatically generated:

  1. A “CSS” module containing the CSS file and uploading it in the “Style Library”.
  2. A “MasterPages” module containing the MASTER file and the uploading it in the gallery of masterpages
  3. A SiteFeatureReceiver applying customization on all sites of the collection and the site feature associated.
  4. A WebEventReceiver applying customization on new sites and the web feature associated.

That it, as I said I did not talk about everything but you have an overview of the benefits related to this add-in! A big thanks to the development team behind this project!

Christopher