1
votes

I have silverlight 4 application project and silverlight 4 library project. In library project i have class and method in it that depends on 3rd party assembly, so i am referencing it(Add reference->Browse). But when i call this method from silverlight application i get following error:

System.IO.FileNotFoundException: Could not load file or assembly "blabla" or one of its dependencies. The system cannot find the file specified.

When i add reference to 3rd party library also to silverlight application, everything works. So i have now reference to that 3d party in both projects even i am not using it in one of them directly. Is this normal in silverlight or am i doing something wrong? Is there any logical explanation why i need to add reference to both projects?

3
after digging more i found similar problem here stackoverflow.com/questions/8877379/… but still i dont understand why it is so, because it is not logicalsanjuro

3 Answers

0
votes

Go to the properties of your project. In the application tab, set the Target Framework to .Net Framework x instead of .Net Framework x Client Profile

0
votes

Try the following :

In Silverlight Application add reference to 3rd party assembly and set Copy Local property to true.

In Silverlight Library project add reference to 3rd party assembly and set Copy Local property to false.

0
votes

It seems the problem arise because it can not have access to the dll's properly.
I solved the it by changing dll Copy local property from false to true.