c# - Reference to a Silverlight Class Library -


i'm building service-client application using silverlight , wcf, have model project (which contains pocos) on server side, , wanted share same entities silverlight-client application, , thought, hey! can change model project silverlight class library, , should work fine.

i did change , now, i'm able add references getting exclamation mark when reference not resolved... , if take @ properties value of "resolved" set "false", causing following code analysis errors:

ca0058 [ca0001][2]

please note: not typical question referencing typical class library silverlight project (i know can't done), other way arround.

it should work fine (unlike wayne says, can reference silverlight assemblies projects target full .net framework). however, may have references in project full .net framework can't load (you need keep references base types). you've got 2 alternative options.

  1. create 2 class library projects (one targeting silverlight, other .net framework), , share files between them, discuss in article: http://www.silverlightshow.net/items/building-a-silverlight-line-of-business-application-part-3.aspx

  2. try out portable library tools (currently in beta): http://blogs.msdn.com/b/sburke/archive/2011/01/23/3-screen-coding-is-here-portable-library-tools-allow-you-to-target-multiple-net-platforms-with-one-binary.aspx

hope helps...

chris anderson


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -