开发者

RIA Services library and resource strings in meta attributes

I've split out my domain services into a separate WCF RIA Services Class Library project. However there now seems to be a problem with using the resource strings in the client side library.

e.g.

The client project library has generated code like this:

[DataMember()]
[Display(Description="FullNameDescription", Name="FullNameLabel", Order=-1, ResourceType=typeof(MetadataStrings))]
[StringLength(255, ErrorMessageResourceName="BadFullNameLength", ErrorMessageResourceType=typeof(MetadataStrings))]
public string FullName
{
 // ...
}

where MetadataStrings is a resource file in the class library. This class library is then referenced by the silverlight project.

But the meta attributes that use ResourceType cause the designer to throw an exception when opening a view and at runtime cause a MissingManifestResourceException.

If I comment out the attributes and rebuild it all works fine. So something is not right with the resources being in another assembly i'm guessing?

Edit: Nevermind finally got this working, problem was that i renam开发者_如何学JAVAed my class library projects and the namespace of the resource file was wrong. 3 days wasted.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜