Sunday, January 2, 2011

How to add features into solution file

Maybe this one is too easy to fix, but it did confuse me for quite a while.

Recently I am reading "Professional SharePoint 2010 Development".  In Chapter 12("Workflow"), there is some code about workflow.  I downloaded the source code from wrox, then opened it through Visual Studio 2010 on the SharePoint server. The project "AdventureWorksWFs" was compiled and deployed successfully. However, when I tried to add the workflow activity("Create Training Site") into the declarative workflow through SharePoint Designer, it was not in the activity list!

Although the dll file "AdventureWorksWFs.dll" is deployed to GAC, and the farm solution was deployed, but there was no new custom workflow activity, no web.config changes and no error message in ULS.  In the end, I found I made a silly mistake.  Although there are quite a lot of features in the source code, by default, no feature is added into the solution file.

Below is the screen shot of the original solution design form:



After adding "AdventureWorksWFs feature" and "Workflow" mapped folder to the solution, everything works perfectly.

No comments:

Post a Comment