Hello,
In order to create a new workflow in VS, one normally selects a template from the Workflow node of a C# or VB.NET project type in the New Project dialog. I tried creating an empty C# project (not of the workflow variety), copying the .cs and .Designer.cs files to this project, changing the namespace, and adding the same references to my empty project system that are present in the one created explicitly from the C# Workflow template. Everything built fine, but when I tried to display the editor, it failed with an error message about ''System.Workflow.ComponentModel.Design.IMemberCreationService' not being available.
My question is, how much of the viewing of the WWF designer in VS is tied into the project system and how much is managed by the designer itself (I know some VS designers are associated with an extension and work with miscellaneous projects system, and some are private to a project system). Does the project system provide special hosting ability Is the C# and VB.NET workflow projects 'flavors' of the corresponding base C# and VB .NET projects I know there is a sample that demonstrates how to host the WWF designer in a Windows Form app, but what if I want to host it in Visual Studio, but within my own, custom project system rather than in one of the VS out-of-the box project systems
Thanks,
Notre

How much of WWF designer support in VS is managed by the project system?
Sean D
Hi Don,
Hopefully someone at MS can give you actual confirmation, but my guess is that the WF project system doesn't support flavoring. From what I understand, a project system needs to be explicitly written to support flavoring, otherwise you can't customize it in this way.
In my original post, I asked the question as to whether the workflow project type is a flavor of C# of VB.NET but didn't get an answer...
Notre
TerryMcP
Hi Notre,
I think the CSharp based workflow project is a flavor of a CSharp project. If you look at a standard workflow project file, it contains the entry:
<ProjectTypeGuids>{14822709-B5A1-4724-98CA-57A101D1B079};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
The first guid is for the workflow, and the second is the well known guid for a CSharp project. (well known enough to Google it :-)
From the VSIP CSharp sample ProjectSubtype it appears to be a simple matter to create a project flavor that itself can be flavored.
Don.
m1ch3ll3
Hi Notre,
Theoretically you can implement most of the functionality that you can see in the Workflow Designer by writing implementations for different things yourself though it will be non-trivial.
Type system is the implementation for discovering types. You will have to write your own implementation to determine types that exist in code beside, referenced assemblies etc
Devinder
Moon3000
Workflow designer will work only within Workflow Project System. Any other project system is not supported. There are many dependencies on project system like workflow compiler, code generation and type system. Some features will not available when WWF designer is rehosted and many will need a custom implementation.
Andrei Saygo
Hi Devinder,
Thank you very much for your reply and your clarification, particularly with respect to code generation.
I am currently using VSIP (the VS SDK 2005) to create my own custom project system.
My goal is to allow creation and configuration of the workflow; it is not just a visual represenation of a pre-existing workflow. I would like to achieve the richness of the VS WF project systems and then tailor it for my specific needs. I would also like to create the ability for users to author/edit workflows inside a custom Windows Form application, outside of Visual Studio.
I would appreciate any clarification as to Ghenadie's comment about the 'type system' along with guidance as to what features would require a custom implementation outside of the VS WF project systems, and whether there are any features for which it is simply not possible to provide a custom implementation. Also, some guidance on whether there's much to be concerned about with using the workflow compiler or if it's just a matter of using the wfc.exe or the related build classes (which I've not yet explored) would be appreciated.
So far, I've taken bits out of the Workflow Designer Control technology sample so that I could host the workflow designer in a custom VS toolwindow and I've provided basic integration with this and the VS toolbox and property grid. It's looking promising so far, but I'm not sure of the scope of what I need to replicate/provide custom implementations for and any roadblocks that I might be expected to encounter by taking this approach.
Thanks,
Notre
Gaara_btk
Hi ghenap,
Thank you very much for your reply. I'd like to drill down on some of the points you made, if possible, as this is very important to me. First, it sounds like having a workflow designer in any of the project systems other than the C# or VB .NET workflow project systems is a rehosting exercise on the order of rehosting the workflow designer in any 3rd party Windows From application, such as the Workflow Designer Control technology sample. In other words, is it fair to say that just because my project system exists in VS, it doesn't provide any benefits over a custom Windows Form application, once I try to move the workflow designer files out of one of the Workflow project systems
Naively, I'm not overly concerned about the dependency of the workflow project system on the workflow compiler. I know that WWF offers the wfc.exe and I believe some classes to compile a workflow, so calling this from my own project system (or a custom Windows Form application hosting the WWF designer) should be trivial. Is there more to it than this
I'm confused on what you mean by code generation and type system. Could you expand on these points Likewise, you say:
Could you give some examples of what won't be available and what will require a custom implementation Is there anything that's not available that one can't provide a custom implementation for
I have two main goals. First, to see if I can host the WWF designers in my own project system. I may have to abandon this idea, if things get too messy or it's just not possible. Second, to host the WWF designers in a custom Windows Form application. I'd like to understand what areas I need to provide custom implementations for, and any anticipated areas in which I simply will not be able to replicate the design experience found within a workflow project system in Visual Studio.
Thanks again for your help.
Notre
PeepingTom1000
Dribble
Hi Devinder,
If possible, would you be able to give me the names of a few type system related interfaces that I would need to work with/implement so that I can read up further on them
Thanks,
Notre
bnanajo
Hi Notre,
I take my answer back on the TypeSystem. You can have a look at the documentation for ITypeProvider interface and it will allow you to work with the Type System. Sorry about the confusion.
Thanks
Devinder
ajbj
Hi Devinder,
The question about flavoring the workflow project type is very important to me as well. Do you know who at Microsoft could answer this question Perhaps, if it is not possible to flavor WF beta 1, it will be for beta 2 Again, this is very imporant to me and I would be greatly appriciative if someone at Microsoft can provide an answer.
Thanks, Don.
Pr0g
Rehosting of the Designer is as you mention - such as the Workflow Designer Control technology Sample.
The part about integrating it with Visual Studio. We use VSIP - this is provided by VS to enable creation of Project Systems outside of the ones that ship out of the box. For more information on how you can create your own project system you can refer to http://msdn.microsoft.com/vstudio/extend/default.aspx
What Ghenadie meant by Code Generation was - For example in C# Workflow Project if you drop a code activity and set the ExecuteCode property there is a handler that gets created in the code-beside file. This code generation is integrated with the setting of the property in the property browser. If you look at a vanilla rehosting sample it will demonstrate rendering of Workflows in a control. However if you want to configure properties when rehosted then you might need the ability to generate code etc.
Also if you could provide more details in terms of what goal you are trying to achieve by rehosting then it would be great - is it just to provide user with Visual representation of the worklow, or assist in creation, or configuration
Kaltenberg
Thank you for the information, Devinder. It's good to know it sounds like it is theoretically possible, if not easy to do.
Where can I find more information on implementing a type system. Is this part of VSIP or specific to Windows Workflow Foundation Does the vanilla rehosting sample demonstrate anything related to the type system If not, do you have any idea if this will be included in Beta 2
Thanks again,
Notre
Rowland
It seems like it should be possible to create a project subtype, or flavor, of the workflow project type and then override it's behavior as needed through the ProjectFlavor class interface. However, I have tried this and it doesn't seem to work.
Should this be possible Or has the workflow project type been created to disallow flavors of itself
Here's what I've done: Created a project flavor in VSIP and a project file (as template) that references the guid of my project along with the guid of the workflow project type and CSharp project types, via the ProjectTypeGuids node, like this:
<ProjectTypeGuids>{49436A9E-2160-435a-8EB1-0E152289265A}; {14822709-B5A1-4724-98CA-57A101D1B079};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
When attempting to load this project, VS (expermental hive) disiplays an error saying that the project type is not installed. But, workflow is installed because it shows up as one of the available project types. If I remove the reference to the workflow project type, leaving references to just my own and the CSharp types, the project loads - but the workflow designer is not functional...
Kris B
Hi Devinder,
Thank you for the further clarification about the Type System. It's really too bad that there's an internal implementation to discover types and that it's therefore not documented. I would expect that people that wish to rehost the designer outside of VS would likely need to resolve these kind of problems, so having some guidance/implementation/documentation would go a long way. Having said this, I really do appreciate your efforts in answering all my questions.
At this point, I would like to echo Don's question about the project workflow project systems: are they flavors of C# and VB.NET And can an ISV further flavor the workflow project to provide some customization While my preferred approach would be to host the workflow designer in my own project system and provide a completely custom and seemless integration, as a fallback flavoring the workflow project systems might be the seond best option.
Thanks again,
Notre