开发者

Silverlight 4 + WCF RIA Services + Prism v4 why do I need a module dependency on my shell?

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: InvalidOper开发者_如何学编程ationException - 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜