A Prism 4 Application Checklist

Topics: Prism v4 - WPF 4
Apr 18, 2012 at 3:59 PM

I am working my way through a CodeProject.com example of Prism, and I get the following message: "Could not load file or assembly 'file:///C:\Dev\Samples\Prism4Demo\Prism4Demo\bin\Debug\Microsoft.Practices.Prism.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)".  What does it mean?

Apr 18, 2012 at 4:56 PM
Edited Apr 18, 2012 at 5:14 PM


We believe that your problem could be caused by the fact that your projects are referencing different versions of an assembly in your solution.

If I'm right, the sample you are trying to run is the one mentioned in this blog post. If so, you might have to ensure that all the projects reference the same Microsoft.Practices.*.dll, as the Prism4Demo project is not referencing the assemblies from the directory included in the sample, as it happens with the other projects. This can be easily achieved by removing and adding the corresponding references.

I hope you find this helpful,

Agustin Adami

May 16, 2012 at 4:04 PM
Edited May 16, 2012 at 4:05 PM

All projects within my solution do reference the same Microsoft.Practices.*.dll at "C:\Dev\Samples\Prism4Demo\Prism4Demo.Library\Prism\"

May 16, 2012 at 4:55 PM


If I am not mistaken, Agustin could solve the error you are mentioning in that sample application by ensuring that all the projects were referencing the same Microsoft.Practices.*.dll libraries. However, if this is does not solve the aforementioned error in you case, it would be helpful if you could provide us with your sample application so that we can analyze it and help your further with this.


Damian Cherubini

May 16, 2012 at 5:16 PM

Hi Damian,

The point of my reply above is that all projects do reference the same Microsoft.Proacties.*.dll libraries.  How can I upload my sample application so it can be analyzed?

May 16, 2012 at 6:17 PM


You can upload your sample to SkyDrive or any other file hosting service of your preference and post the link to download the sample in this thread.


Damian Cherubini

May 16, 2012 at 8:24 PM

The problem is now resolved.  Agustin's solution was correct.  I missed one of the references while relinking them.  Thank you, Agustin and Damian.

Dec 26, 2012 at 8:30 AM
Edited Dec 26, 2012 at 8:30 AM

I was getting the same problem but it resolved by using  tag


<loadFromRemoteSources enabled="true" />


 in my app.config.