WSPBuilder Extensions, VS 2008 SP1 beta, workflows

May 15, 2008 at 4:57 PM
Edited May 15, 2008 at 5:02 PM

This is about the new, experimental WSBuilder Extensions that integrates into both Visual Studio 2005 and Visual Studio 2008.

 

I'm running Visual Studio 2008 Service Pack 1 (beta) and do 99% custom SharePoint workflow development in VS 2005 but want to migrate to VS 2008 but was waiting for the VSeWSS extensions to be made available by Microsoft in VS 2008.

Meanwhile I see WSPBuilder Extensions and think, hey, why not try it while waiting for Microsoft to put out VSeWSS 2.0?  Maybe I won't even want VSeWSS 2.0.  So naturally, the first thing I tried after installing WSPBuilder Extensions was to fire up Visual Studio 2008 and create a new project, of type "WSPBuilder Project with Workflow", being careful to set the .Net level to 3.0 instead of the default of 3.5.

 

Next, I right-clicked on the WSPBuilderProject1 and chose Add...New Item and selected "Sequential Workflow Feature" from the WSPBuilder group of templates.

 

The whole process seemed to work correctly until I noticed that I could not bring up the Workflow Designer.  After poking around in Solution Explorer, I noticed the dreaded "yellow triangle" next to the following references:

 

System.Workflow.Activities

System.Workflow.ComponentModel

System.Workflow.Runtime.

 

I noticed that many of the Properties of those references were blank, so I decided to investigate the underlying csproj file via notepad.  After exiting Visual Studio 2008, I opened up the csproj file and noted the following:

 

<ItemGroup>

      ... many references

    <Reference Include="System.Workflow.Activities, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">

      <RequiredTargetFramework>3.0</RequiredTargetFramework>

    </Reference>

    <Reference Include="System.Workflow.ComponentModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">

      <RequiredTargetFramework>3.0</RequiredTargetFramework>

    </Reference>

    <Reference Include="System.Workflow.Runtime, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">

      <RequiredTargetFramework>3.0</RequiredTargetFramework>

    </Reference>

    <Reference Include="System.Xml" />

      ... many more references

</ItemGroup>

 

I opened up the csproj file for another workflow that was created “the old fashioned way” and noted the following:

 

<ItemGroup>

    ... other references

    <Reference Include="System.Workflow.Activities" />

    <Reference Include="System.Workflow.ComponentModel" />

    <Reference Include="System.Workflow.Runtime" />

    ... more references

</ItemGroup>

 

I replaced the references generated by WSPBuilder Extensions with the “simple” ones and when I opened up the solution in Visual Studio 2008 I saw:

1. The dreaded yellow triangles were gone

2. I could now use the Workflow Designer inside Visual Studio 2008.

Let's keep in mind the operative phrase: experimental before coming down too harshly on what is otherwise looking like a splendid piece of tooling.

With a little more polish, I could see myself not waiting for Microsoft to port VSeWSS to VS 2008 and simply use WSPBuilder Extensions.

Developer
Jun 3, 2008 at 3:54 AM

For an easier workaround, try right clicking on the reference to bring up the properties pane and set specific version to false.

The change is fairly trivial to make but we'll probably hold off on it until there is the opportunity to test it properly - it should be ok, but I don't want to risk breaking it in VS2005.
Aug 27, 2008 at 9:12 PM
Thank you for this tip.  After doing this, I attempted to click on the Feature.cs, but received the error -

The service 'System.Workflow.ComponentModel.Compiler.ITypeProvider' must be installed for this operation to succeed.  Please ensure that this service is available.

I also received a similar message regarding 'System.Workflow.ComponentModel.Design.IIDentifierCreationService'

Anyone have any idea what these may be referring to?

Thanks
Aug 28, 2008 at 1:47 PM
It seems I have solved my own problem.  This morning, instead of using the WSPBuilder Project template, I tried the WSPBuider Project with Workflow template and it seemed to work fine.  (somehow, I managed to overlook that template when creating my project yesterday).

Thanks again for the great work.
Feb 2, 2009 at 9:22 AM
For whoever like dinger have this error :
The service 'System.Workflow.ComponentModel.Compiler.ITypeProvider' must be installed for this operation to succeed.  Please ensure that this service is available.

Just fixed it by diffing a working project file (csproj, vbproj), I added the following line :
  • in <Project> >> <PropertyGroup> :
    •     <ProjectTypeGuids>{F8810EC1-6754-47FC-A15F-DFABD2E3FA90};{D59BE175-2ED0-4C54-BE3D-CDAA9F3214C8};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>
Just to make sure i also added in <Project :
  •   <Import Project="$(MSBuildExtensionsPath)\Microsoft\Windows Workflow Foundation\v3.5\Workflow.VisualBasic.Targets" />
(Im working with VB)

Vincent.
Apr 14, 2009 at 5:09 PM
The "dreaded yellow triangle" problem I first documented back in May 2008 is still a problem in March 2009, even using the latest WSPBuilder Extensions with the official Visual Studio 2008 Developer Edition with SP1 applied.

Can somebody on the team make a formal bug out of this so it can be tracked and eventually fixed?
Dec 17, 2009 at 12:46 PM

this is still a problem in december 2009. 

Jan 10, 2010 at 8:33 PM

Check, which version of .NET has you project. Right click on a project node -> Properties -> Application -> Target Framework. 3.0 or 3.5 are must. By default, new projects have 2.0 (VS Studio 2008)

Feb 23, 2010 at 4:56 PM

We spent considerable time on this issue and documented these steps below to follow.  Cheers!

Create a workflow project using WSP Builder

There are two ways to create workflows with WSPBuilder.  The steps below detail this -

Option 1 - New Project using the "WSPBuilder Project with Workflow" Template

  1. Create a new project and choose template under WSPBuilder called WSPBuilder Project with workflow
  2. Change the target framework for the project to use the 3.5 or higher
  3. Right click on the project, and add a new item from WSPBuilder; either Sequential Workflow Feature or State Machine Workflow Feature depending on your type of workflow
  4. Enter the Title and Description for the WorkFlow in the dialogue box and change the scope to be site level or higher.  If left at web scope, it will fail at deployment.

Option 2 - New Project using the "WSPBuilder Project " Template

(Note: currently there is a bug with WSPBuilder when using the standard "WSPBuilder Project" whereby it doesn't add an additional required GUID to the ProjectTypeGuids element in the Visual Studio Project File.  The steps below will walk through how to correct this.)

  1. Create a new project and choose template under WSPBuilder called WSPBuilder Project 
  2. Set Framework version to 3.5
  3. Add New Item of type "WSPBuilder --> Sequential Workflow Feature"
  4. Close Solution, exit Visual Studio
  5. Open Project File in Notepad
  6. Replace the "ProjectTypeGuids" element near the begining with this line -

    <ProjectTypeGuids>{14822709-B5A1-4724-98CA-57A101D1B079};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
       
  7. Open Solution back in Visual Studio
  8. Compile Project
  9. Workflow will now open

Note: you could also use this approach to add a new workflow into an existing project using the same steps above albeit excluding the creation of a new project.  Just delete the new feature and merge into your existing one when finished.

 

Apr 19, 2010 at 9:31 PM
Edited Apr 19, 2010 at 10:41 PM

I am soooo stuck.  I have uninstalled and reinstalled WSPBuilder.  I am using Win7 x64, vs2008, vb language for preference.  I don't have a "WSPBuilder Project with Workflow" option - only the basic template.  When I follow the steps in option 2 above, my .vbproj file does not have an element named ProjectTypeGuids.   If I add the element, I get a message that "A project with that name is already opened in the solution." Am I looking at the wrong file?  How can I get the missing template?  I hate feeling this dumb.