开发者

Shared enum in RIA service gets generated twice on client

I have two client-side R开发者_如何转开发IA services projects, each mapped to server-side RIA assembly for code-gen etc.. Let's call them domains A and B.

To make matters slightly more complicated, on the server side, domain project B references domain project A.

In project A on the server side, I create an Enum, and call the file MyEnum.shared.cs. I build it, and then build the client side (Silverlight) proxy projects. I then get a compile error: -

"The type MyEnum exists in both DomainProjectA.dll and DomainProjectB.dll."

The problem is that both my client-side proxy projects have copied this Enum file across, so the solution fails as its generated twice. I have proved this by looking at the hidden files in both proxy projects.

Why is this happening? How can I stop it from happening :)

Cheers

Isaac


I'm now fairly sure that this problem is caused because the type generation on the client-side proxy projects is sourced from all types exposed on the server assembly or any referenced assemblies; this also applies to .shared files.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜