VB.NET-从解决方案中的其他项目导入命名空间

VB.NET-从解决方案中的其他项目导入命名空间,vb.net,namespaces,global,solution,Vb.net,Namespaces,Global,Solution,在我的Visual Studio解决方案中,我有3个项目。 -公共(根命名空间:PodcastPlayer.Common) -PodcastPlayer(根命名空间:PodcastPlayer)这是Silverlight项目。 -Web(根命名空间:PodcastPlayer.Web) 通常,我有几个类和服务引用。 但我的问题是,我不能在PodcastPlayer项目中使用PodcastPlayer.Common名称空间。 如何解决这个问题? 当我尝试在PodcastPlayer中添加项目引用

在我的Visual Studio解决方案中,我有3个项目。
-公共(根命名空间:PodcastPlayer.Common)
-PodcastPlayer(根命名空间:PodcastPlayer)这是Silverlight项目。
-Web(根命名空间:PodcastPlayer.Web)

通常,我有几个类和服务引用。 但我的问题是,我不能在PodcastPlayer项目中使用PodcastPlayer.Common名称空间。
如何解决这个问题?

当我尝试在PodcastPlayer中添加项目引用时,我收到以下消息:



()

您的错误消息非常清楚地说明了这一点。您的公共库不是Silverlight项目。Silverlight实现了CLR的一个子集,因此不能包含常规的.Net库(允许使用另一种方法)

如果您有Common的源文件,则可以将项目类型更改为silverlight库并重新编译(或将源文件复制到silverlight库项目)

您可能会遇到一些错误,因为Silverlight不包含.Net运行时的所有函数,因为它是一个子集

关于该主题的帖子:


能否详细说明如何在Player项目中不能使用Common?(我假设您已经添加了对它的引用)当我将“Imports PodcastPlayer.Common”放在PodcastPlayer项目中时。我得到的消息是名称空间不存在。