views:

219

answers:

1

In my Solutions in Visual Studio, I have 3 projects.
- Common (Root namespace: PodcastPlayer.Common)
-PodcastPlayer (Root namespace: PodcastPlayer) This is the Silverlight project.
-PodcastPlayer.Web (Root namespace: PodcastPlayer.Web)

In Common, I have several classes and service references. But my problem is that I can`t not use PodcastPlayer.Common namespace in PodcastPlayer project.
How can one resolve this?

When I try to add project references in the PodcastPlayer I get this message:

alt text
(http://bildr.no/view/553295)

+1  A: 

Your error message says it quite clearly. Your Common library is not a Silverlight project. Silverlight implements a subset of the CLR, so you cannot include regular .Net libraries (the other way is allowed).

If you have the source files for Common, you can change the project type to a silverlight library and re-compile (or copy the source files over to a silverlight library project).

You might get some errors since Silverlight doesn't include all the functions of the .Net runtime, as it is a subset.

Posts regarding the subject:

http://bytes.com/topic/c-sharp/answers/716163-adding-c-library-reference-silverlight-project http://stackoverflow.com/questions/465460/sharing-c-code-between-windows-and-silverlight-class-libraries

Mikael Svenson