Using multiple RIA silverlight links with shared server side entities

For a project I'm using Silverlight 4.0 with RIA and EntityFramework 4.0. I have three web projects:

  • Common.Web: contains general types
  • Workflow.Web: contains domainservices for workflows
  • Monitor.Web: contains domainservices for monitors

Both the Workflow.Web and Monitor.Web project uses a Enumeration (SalesChoice) type defined in the Common.Web project as return value on a DomainService.

So far the Web side of this story. We continue with the client part, which consists of two projects:

  • Workflow.UI: Contains the RIA connection with the Workflow.Web
  • Monitor.UI: Contains the RIA link with the Monitor.Web

Now my problem (finally :) ). In the Workflow.UI project I need to use information from the Monitor.UI project, so I added a reference between those two. When I build the project I get an error:

Warning as Error: The type 'MyProject.SalesChoice' in 'Generated_Code\Workflow.Web.g.cs' conflicts with the imported type 'MyProject.SalesChoice' in 'Monitor.UI.dll'.

It is pretty easy to explain why it's going wrong, but I'm looking for a solution. Maybe my whole approach with a shared Common.Web project is not possible or the best idea?


(sorry for my bad english) On this cases I prefer to use a Portable Class Library. Define your enum on that project and add it as reference to all projects where you need it.

Need Your Help

Highcharts: Hide and show legend

javascript jquery highcharts

I'd like to be able to toggle the visibility of the legend of a chart when the user clicks a button.

How to overwrite input field with CSS

jquery css jsf

I have a JSF input field which is overwritten by JQuery css file. I want to use Primefaces calendar.