开发者

VB.NET - Imports namespace from other projects in Solutions

开发者 https://www.devze.com 2022-12-14 15:34 出处:网络
In my Solutions in Visual Studio, I have 3 projects. - Common (Root namespace: PodcastPlayer.Common) -PodcastPlayer (Root 开发者_运维技巧namespace: PodcastPlayer) This is the Silverlight project.

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:

VB.NET - Imports namespace from other projects in Solutions

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


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

0

精彩评论

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

关注公众号