Web Client Software Factory - February 2008
What exactly is the Web Client Software Factory? The first link that comes up on Google’s result page is the patterns & practices WCSF homepage, which says:
The Web Client Software Factory (WCSF) provides a set of guidance for architects and developers building enterprise Web applications. The factory includes samples, reusable code and a guidance package which automates key development tasks from within Visual Studio.
Microspeak, as usual. After playing around with the February 2008 edition, this would be my answer:
The Web Client Software Factory (WCSF) is a Model View Presenter (MVP) project template for Visual Studio. It also comes with built-in support for the following Enterprise Library Application Blocks: Security, Logging, and Exception Handling.
The point is that you should be able to create a new WCSF project in Visual Studio as follows:

After which you should get a project as follows:

Then, to add new pages or modules, click Tools -> Guidance Package Manager:

Note that the sample Default.aspx page comprises of Default.aspx.cs (the View) and DefaultViewPresenter.cs (the Presenter). IDefaultView.cs is the interface for the View.
Out of the box, the UI is quite nice:

Installation and Setup Overview
Unfortunately installation is not just a matter of downloading an MSI and running it. You need to install Guidance Automation Extensions and Guidance Automation Toolkit for VS2008, then you need to compile and install the Web Client Factory Guidance Package.
To get going, first download and install the following:
Web Client Software Factory - February 2008.msiGuidanceAutomationExtensions.exeGuidanceAutomationToolkitForVS2008.msi
To enable guidance automation:
- Open
<wcsf_source_dir>\WCSF-Feb2008\GP\WebClientFactory Guidance Package.slnand rebuild the solution under Release config. - Execute
<wcsf_source_dir>\WCSF-Feb2008\GP\WebClientFactoryPackageSetup\Release\WebClientFactoryPackageSetup.msi - In Visual Studio, click Tools -> Guidance Package Manager
- Click “Enable / Disable Packages…”
- Select “Custom Web Client Factory Guidance Package”
Hints and Workarounds
When you open a new WCSF project, you will be prompted for the location of a list of assemblies. Copy the contents of <wcsf_source_dir>\WCSF-Feb2008\Lib\entlib and <wcsf_source_dir>\WCSF-Feb2008\Lib\WCSFBlocks into a temporary folder and point to this folder.
If you get the following error messages:
- “The file AssemblyInfo.cs.template could not be found within the project templates. Continuing to run, but the resulting project may not build properly.”
- “A problem was encountered creating the sub project ‘$WebUIProjectName$’. Unable to copy the file ‘AssemblyInfo.cs’ from the project template to the project. Cannot find file ‘…\Temp\Properties\AssemblyInfo.cs’.”
- Recipe Framework Error: “An exception occured during the binding of reference or execution of recipe CreateWebClientFactorySolutionWAPCS. Error was: The following arguments are required and don’t have values: WebUIProject, WebsiteNamespace. Can’t continue execution. You can remove the reference to this recipe through the Guidance Package”
The workaround is to copy AssemblyInfo.cs.template from <wcsf_source_dir>\WCSF-Feb2008\GP\WebClientFactoryPackage\Templates\Solutions\Projects\WebProject.CS\Properties to C:\Program Files\Microsoft patterns & practices\WebClientFactoryPackageSetup\Templates\Solutions\Projects\WebProject.CS\Properties.
6 Responses to “Web Client Software Factory - February 2008”
1 nazham 9 December 2008 @ 5:51 pm
Well, that’s quite a lot of steps just to create a front-end for a web app.
2 Rizal 9 December 2008 @ 6:08 pm
@nazham: Actually it’s an MVP framework for creating web apps, hence the extra steps.
3 nazham 10 December 2008 @ 7:25 pm
Yeah, still, it’s a lot. I mean, it’s a front-end (my easier term of MVP/web client/client/etc..etc). This haven’t yet going to other portion of an enterprise solution. There’s web services (Microsoft has web services factory for this one), business rules, Spring, CSLA, Workflow, yadda.. yadda.. yadda…
4 dirn 13 December 2008 @ 2:20 am
dude….seems like you get a lot of exposure over there
5 Ratheesh 30 July 2009 @ 2:09 pm
HI , i’m facing a problem with WCSF , I have created a WebApp using WCSF Feb 2008 . Im able to create Presenter and views , but when i copy or check out the same solution to another system or to the same system respectively the WCSF is not visible in VS 2008 sln context menu . When i open the Solution using an editor i’m able to see the following lines .GlobalSection(ExtensibilityGlobals) = postSolution
RootNamespace = WebClientMySample
IsWCSFSolution = True
The package is enabled by going to the Tools->Guidance package and selecting the package.
Can you please suggest me a workaround and cause for this . ksratheesh@gmail.com
6 Ramesh 20 October 2009 @ 5:22 pm
Hi Ratheesh,
I have also faced the same problem and while googling and seeing your problem, I could fix my problem. Go to Tools –> Guidance Package Manager then Click on Enable/Disable Package and then select the checkbox and then select any option. These steps simply solved my problem. Hope it will be helpful to you also. Anyway thanks to you.
Ramesh.
Comments: