0
votes

I am trying to create a WCF RIA Services + Prism v4 application in which the projects are laid out like so:

Client Side

Modules (only one for now):

Project.Modules.Clients (Contains a WCF RIA services link to my Project.Web application and depends on server-side Project.Web project)

Shell Project

Project.Shell (Contains a WCF RIA services link to my Project.Web application and depends on the Project.Modules.Client module and the Project.Web project. Also contains the module catalog XAML file used in my inherited UnityBootstrapper)

Server Side

Main Web Project

Project.Web (Containing my WCF RIA services, DataModel, etc.)

The Question

Why do I need to reference the module projects from my shell project? Doesn't this essentially defeat the purpose of dynamic module initialization? I've attempted following along with several sample projects and blog posts, including:

http://telecosystems.codeplex.com

and the accompanying blog post here:

http://bachelorthesis.zdechovan.com/prism-solution-based-on-the-business-application-template/

as well as David's MSDN blog post here:

http://blogs.msdn.com/b/dphill/archive/2009/08/17/prism-and-net-ria-services.aspx

What happens when I don't include the reference is an exception like so:

Resolution of the dependency failed, type = "Project.Modules.Clients.ClientsModule", name = "(none)". Exception occurred while: while resolving. Exception is: InvalidOperationException - The current type, Microsoft.Practices.Prism.Regions.IRegionManager, is an interface and cannot be constructed. Are you missing a type mapping?

So obviously Unity can't seem to pick up on the module, though I've triple checked my bootstrapper and module catalog file.

Any pointers on what I might be doing wrong to require such a reference back to my modules from my shell would be greatly appreciated.

Thanks.

1
can you post a sample from the module catalogalmog.ori
<Modularity:ModuleInfo Ref="Project.Modules.Clients.xap" ModuleName="ClientsModule" ModuleType="Project.Modules.Clients.ClientsModule, Project.Modules.Clients, Version=1.0.0.0" InitializationMode="WhenAvailable"/>...FYI my class name inheriting IModule is in fact ClientsModulecjones26
what is the name of the module xap? is it definatly Project.Modules.Clients.xapalmog.ori
Yes, I see Project.Modules.Clients.xap under my Web project's ClientBin folder.cjones26
It turns out that my App.xaml codebehind for my shell never appears to execute, and the default UnityBootstrapper is being used. I can't seem to determine why the codebehind for my shell isn't executing but my shell is still showing up? At first I thought it was build order, but this does not appear to be the case.cjones26

1 Answers

0
votes

You are correct, the issue involved my .xap files. Some how my Web application's Silverlight project links got borked and messed everything up.

Once I remediated the links, this fixed all of my issues.