Problem with Add View (with presenter) recipe ...

Topics: Web Client Software Factory, User Forum
Jan 17, 2008 at 5:22 PM
Hello!

I am just starting with WCSF and have ran into an issue. Greatly appreciate if you can take a look.

I have installed the following on a Windows 2003 Server machine (virtual pc):

EntLib3.1 (May 2007)
Guidance Automation Extensions (July 2007)
Guidance Automation Toolkit (July 2007)
WCSF (June 2007)

I have followed the instructions from

http://www.codeplex.com/websf/Wiki/View.aspx?title=Installing%20the%20Web%20Client%20Software%20Factory%20Release%20June%202007%20Release&referringTitle=Home

and all the dependencies were installed and I was able to successfully run the QuickStarts and the Recipes in the Guidance package. I create a new project using Guidance Packages -> Web Client Development June 2007 -> Web Client Solution (C#, WAP), and use the Add View (with presenter) recipe and everything works fine.

Now, I would like to implement the MVP pattern using WCSF in an existing .Net 2.0 web application. But when I execute the Add View (with presenter)(C#) recipe, a dialog 'Target Element Selection' opens up (with the following text: 'select the element to use as the target for the execution for reference that applies to web site folder'), but all the nodes in the tree are disabled. I can not proceed from this point.

I followed suggestions posted online for a similar problem (even though they were posted before the June 2007 release) and added the following to the solution and project files:

SOLUTION FILE:
GlobalSection(ExtensibilityGlobals) = postSolution
IsWCSFSolution = True
IsWCSFSolutionWAP = True
RootNamespace = XYZ
EndGlobalSection

CSPROJ FILE:
<UserProperties IsWebProject="true" />

Now, I can execute the Add View recipe, but then it fails with the following error details:



An exception occured during the binding of reference or execution of recipe CreateViewCS. Error was: An error happened while calling the value provider or evaluating the default value of argument SelectedModuleInfo. You can remove the reference to this recipe through the Guidance Package Manager

-----------------

Microsoft.Practices.RecipeFramework.ValueProviderException: An exception occurred during the binding of reference or execution of recipe CreateViewCS. Error was: An error happened while calling the value provider or evaluating the default value of argument SelectedModuleInfo..
You can remove the reference to this recipe through the Guidance Package Manager. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Practices.WebClientFactory.ValueProviders.SelectedModuleInfoProvider.FindModuleInfo(IModuleInfo[] moduleInfos, ProjectItem selectedFolder)
at Microsoft.Practices.WebClientFactory.ValueProviders.SelectedModuleInfoProvider.Evaluate(Object& newValue)
at Microsoft.Practices.WebClientFactory.ValueProviders.SelectedModuleInfoProvider.OnBeginRecipe(Object currentValue, Object& newValue)
at Microsoft.Practices.RecipeFramework.Recipe.CallProviders(IDictionary providers, IDictionaryService readonlyArguments, IDictionaryService arguments, Boolean isBefore)
--- End of inner exception stack trace ---
at Microsoft.Practices.RecipeFramework.Recipe.CallProviders(IDictionary providers, IDictionaryService readonlyArguments, IDictionaryService arguments, Boolean isBefore)
at Microsoft.Practices.RecipeFramework.Recipe.Execute(Boolean allowSuspend)
at Microsoft.Practices.RecipeFramework.GuidancePackage.Execute(String recipe, IAssetReference reference, IDictionary arguments)
at Microsoft.Practices.RecipeFramework.GuidancePackage.Execute(IAssetReference reference)
at Microsoft.Practices.RecipeFramework.RecipeReference.OnExecute()
at Microsoft.Practices.RecipeFramework.AssetReference.Execute()
at Microsoft.Practices.RecipeFramework.VisualStudio.RecipeMenuCommand.OnExec()
at Microsoft.Practices.RecipeFramework.VisualStudio.AssetMenuCommand.Invoke()


Am I missing something here? Please help.

Thanks!
Jan 18, 2008 at 12:34 PM
Hi.

That appears to be a problem with not having any module project in your solution. In order to get a complete guide to enable WC-SF in your web application, please, read the following post:


Thanks.

Sebastian Iacomuzzi
http://staff.southworks.net/blogs/siacomuzzi