CSharpFeeds - All your C# feeds in one place.

Sponsors

Saturday, December 12, 2009

Visual Studio Project Sample Loading Error: Assembly could not be loaded and will be ignored. Could not load file or assembly or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

by BradA via Brad Abrams on 12/12/2009 4:21:00 AM

Some folks have mentioned to me that they are having trouble getting some of my samples to work.  And in fact, just the other day, I ran into a problem getting my own samples to work.  It turns out to be a problem with the way windows treats the sample that you down load.

Specifically, because you downloaded the sample from the internet, windows treats the sample as “untrusted” content.  When you unzip untrusted content you get a directory full of untrusted content.  Visual Studio is not so good and running untrusted content.  Unfortunately, you get some really bad error messages like the one above.

Here is the error message from VB

image

Warning    1    Assembly 'C:\Users\brada\Desktop\MyApp.VB\MyApp.VB.Web\bin\MyApp.VB.Web.dll' could not be loaded and will be ignored.
Could not load file or assembly 'file:///C:\Users\brada\Desktop\MyApp.VB\MyApp.VB.Web\bin\MyApp.VB.Web.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)    MyApp.VB

 

And here is the message from C#:

image

Warning    1    Assembly 'C:\Users\brada\Desktop\MyApp.Starter\MyApp.Web\bin\MyApp.Web.dll' could not be loaded and will be ignored.
Could not load file or assembly 'file:///C:\Users\brada\Desktop\MyApp.Starter\MyApp.Web\bin\MyApp.Web.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)    MyApp

 

Notice these are warnings, so if you are only looking at errors, you will be even more confused. 

 

There is at least a good warning when the project is being loaded.     I am not sure why you are giving the option to continue here, because there are very few projects that will just work in the semi-trusted way.  If you see this, hit cancel and fix the issue first. 

image

 

Luckily fixing this is very easy.  Just go back to the ZIP file you downloaded, select properties, then “unblock” the content. 

image

 

 

 

 

 

Then extract the contents and rerun it.  Everything should work fine.

 

Good luck!

email it!bookmark it!digg it!

Original Post: Visual Studio Project Sample Loading Error: Assembly could not be loaded and will be ignored. Could not load file or assembly or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

Subscribe

New Feed

Product Spotlight

Recently Updated Sources

Legal Note

The content of the postings is owned by the respective author. CSharpFeeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on CSharpFeeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.

Advertise with us