本文介绍了网站不能找到Silverlight的库组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Visual Studio中的网站类型的项目,我已经包括了提到我的Silverlight 5的库项目。在SL5项目中,我包括System.Runtime.Serialization组装。当我尝试访问我的网站使用的SL5库中的一个网页,我收到以下错误:

I have a web site type project in visual studio and I have included a reference to my silverlight 5 library project. In the SL5 project, I am including the System.Runtime.Serialization assembly. When I try to access one of the pages of my web site that uses the SL5 library, I am getting the following error:

Could not load file or assembly 'System.Runtime.Serialization, Version=5.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified.

我已经安装了SL5 SDK上我发布在网站上的框,但现在看来,这是无法找到该程序集。什么任何想法是怎么回事?我已经重新启动IIS。

I have installed the SL5 SDK on the box I am publishing the website on, but it seems it is unable to find that assembly. Any ideas on what is going on? I have already restarted IIS.

推荐答案

您不能使用SL5类库在ASP网站项目,因为他们有不同的运行时间。有时,它的工作原理,当库是简单的,但在你的情况下,图书馆有依赖System.Runtime.Serialization。

You can not use SL5 class library in asp web site project, because they have different runtime. Sometimes it works, when library is simple, but in your case library has dependency on System.Runtime.Serialization.

如果你需要共享SL和ASP项目之间的code,您可以创建简单的.NET类库(不SL5)和SL5库中添加所有文件的链接。NET库(添加/现有项目。 .. /加为链接)。添加引用新的库为你的asp网络项目,并删除旧的(SL5)库。

If you need share your code between SL and ASP projects, you can create simple .Net class library (not SL5) and add all you files from SL5 library as link to .Net library (Add/ Existing item... / Add as Link). Add reference to new library for your asp web project and remove old (SL5) library.

这是共享不同的库类型之间code的一种方式。也许你不能建立新的图书馆,如果你有SL具体依赖于你的code。我希望我的想法会帮助你。

It's one way to share code between different libraries types. Probably you can not build new library if you have SL specific dependency in your code. I hope my idea will help you.

这篇关于网站不能找到Silverlight的库组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-26 02:25