Add View ( with presenter ) Error.

Topics: Web Client Software Factory
Feb 11, 2007 at 8:33 PM
I get this error a lot, but normally I can shutdown Visual Studio and do a rebuild of the website / solution and the error goes away. Of course, while talking to a room full of people at the South Florida Code Camp this weekend, the usual trick did not work so I could only show them results and not the process.

No big deal, but I would love some guidance as to how to avoid or fix the error if it happens again. I have another presentation at the Orlando Code Camp in about 6 weeks.

Here is the error:

Microsoft.Practices.RecipeFramework.ValueProviderException: An exception occurred during the binding of reference or execution of recipe CreateView. Error was: An error happened while calling the value provider or evaluating the default value of argument ModuleInfos..
You can remove the reference to this recipe through the Guidance Package Manager. ---> System.ArgumentException: Value Microsoft.Practices.CompositeWeb.Configuration.DependantModuleInfo[] specified for argument ModuleInfos can't be converted to the argument type Microsoft.Practices.CompositeWeb.Configuration.DependantModuleInfo[].
at Microsoft.Practices.RecipeFramework.Services.DictionaryService.SetValue(Object key, Object value)
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()


Thanks,

Dave

__________________________

David Hayden
Microsoft MVP C#
Feb 13, 2007 at 2:17 AM
I just got this error again simply trying to add a view ( with presenter ) to a folder in the website. This time I just quit Visual Studio, reopened the application, and chose add view ( with presenter ) and it worked. I did nothing else- No recompile, nada. I am adding this as a work item because it is a huge pain. Nobody else gets this error?

Here is the error and the config file for the module:

Microsoft.Practices.RecipeFramework.ValueProviderException: An exception occurred during the binding of reference or execution of recipe CreateView. Error was: An error happened while calling the value provider or evaluating the default value of argument ModuleInfos..
You can remove the reference to this recipe through the Guidance Package Manager. ---> System.ArgumentException: Value Microsoft.Practices.CompositeWeb.Configuration.DependantModuleInfo[] specified for argument ModuleInfos can't be converted to the argument type Microsoft.Practices.CompositeWeb.Configuration.DependantModuleInfo[].
at Microsoft.Practices.RecipeFramework.Services.DictionaryService.SetValue(Object key, Object value)
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()

I never modified this config...

<configuration>
  <compositeWeb>
    <modules>
      <module name="Subscribers" assemblyName="Subscribers" virtualPath="~/Subscribers">
		<dependencies>
          <dependency module="Shell" />
        </dependencies>
      </module>
    </modules>
    <authorization>
		<!-- Add your own view-rule mappings here:
          e.g.:
              <rule Url="~/Subscribers/Default.aspx" Rule="AllowAccessSubscribersDefaultView" />
          -->
	</authorization>
  </compositeWeb>
  <appSettings/>
  <connectionStrings/>
  <system.web />  
</configuration>

Regards,

Dave

_________________________

David Hayden
Microsoft MVP C#
Feb 13, 2007 at 11:02 PM
Thanks for the information David. I'm adding the info you have included to the Issue we have open.
Feb 14, 2007 at 12:59 AM
I've had this issue also. I found that using the guidance package to create the new view worked, and also that the error resolved by itself - although this occurred after installing the Enterprise Library the following day.
Feb 16, 2007 at 12:55 PM
I also encountered this issue. I created a new web client solution, modify the Text on the Master page and then right click on the website > web client factory > add view(with presenter)
Feb 16, 2007 at 1:15 PM
Edited Feb 16, 2007 at 1:16 PM
i faced same issue and correct it by close and reopen vs and it work now.
Regards
Ayman El Badawy, MCAD C#
Feb 21, 2007 at 5:19 PM
I get this same error too but for me simply closing or closing and rebuilding is not helping. I have gotten it to work by reinstall/repairing with the WCSF January 2007 msi, but that is a huge time consuming pain.
Any other ideas?
Feb 21, 2007 at 5:38 PM
I too am getting this error message, however I can't get anything to allow me to create a new view. I've tried shutting down, reinstalling the WCSF.
Feb 21, 2007 at 6:54 PM
All,

there is a similar set of posts here;

http://www.codeplex.com/websf/Thread/View.aspx?ThreadId=3494

Do any of you have Page Flow projects in your solutions?

Simon
http://www.dotnetblogs.co.uk/
Feb 21, 2007 at 7:36 PM
I have the standard files created from a basic Web Client Solution. I tried rebooting and still nothing.
Feb 21, 2007 at 9:12 PM
After reinstalling I figured out that I wasn't able to add a view to the root of the website but rather only to a folder. DOH! Need to read the documentation a little closer. However on the project that threw the error I still wasn't able to add a view to a new folder. I created a clean project and am not able to only add views to the new project.
Feb 21, 2007 at 11:29 PM
There is a WorkItem for this in the IssueTracker:

http://www.codeplex.com/websf/WorkItem/View.aspx?WorkItemId=7561

If you haven't voted on it and are having problems, I recommend voting and commenting on the issue so your concerns are heard :)

Regards,

Dave

_____________________

David Hayden
Microsoft MVP C#
Mar 13, 2007 at 2:59 PM
Edited Mar 13, 2007 at 3:00 PM
Hi, I'm glad to tell you that we've found a fix for this issue.

Follow this link to get the solution: http://www.codeplex.com/Wiki/View.aspx?ProjectName=websf&title=AddViewPresenterException

If you know what what happening behind the scenes, read my blog post: http://staff.southworks.net/blogs/jdominguez/archive/2007/03/13/WCSF_3A00_-Add-View-_2800_with-Presenter_2900_-fix.aspx

Let me know how this works for all of you,
http://staff.southworks.net/blogs/jdominguez