0

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)

Community
  • 1
  • 1
eriksv88
  • 3,482
  • 3
  • 31
  • 50
  • Could you elaborate on how you cannot use Common in the Player project? (I assume you have added a reference to it) – Mikael Svenson Dec 25 '09 at 10:35
  • When I put "Imports PodcastPlayer.Common" in PodcastPlayer project. I get the message that the namespace no exists. – eriksv88 Dec 25 '09 at 13:35

1 Answers1

1

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 Sharing C# code between Windows and Silverlight class libraries

Community
  • 1
  • 1
Mikael Svenson
  • 39,181
  • 7
  • 73
  • 79