Michael Knopf

turning concepts into working products...

Error: This assembly may have been downloaded from the Web
Author: Michael Knopf
Published: Thursday, August 12, 2010

If you're like most programmers you get a LOT of stuff from the Internet, like sample projects, assembly's (i.e. .DLL's), etc... It seems like just about everything we do these days in software is somehow related to the Web, even if that means you are just blogging about it.

After upgrading a Silverlight project so that it can be developed on Visual Studio.NET 2010 I ran into a show-stopper error: Could not load the assembly file:///.... .dll. This assembly may have been downloaded from the Web. If an assembly has been downloaded from the Web, it is flagged by Windows as being a Web file, even if it resides on the local computer. This may prevent it from being used in your project. You can change this designation by changing the file properties. Only unblock assemblies that you trust. See http://go.microsoft.com/fwlink/?LinkId=179545 for more information. The recommended solution is to "Unblock" the content through Windows Explorer, the only problem is that I was developing this application on a machine at my work and that machine's Security Settings prevented the "Unblock" feature from Windows Explorer (you couldn't even see the Unblock button), I thought I was totally screwed.

 

After banging my head on the desk a few thousand times a co-worker finally suggested that I copy the DLL's to a Fat32 drive (like an external Thumb drive), then copy them back to the orginal location (over-writing the originals with the copy).
 
I then simply needed to select "View All Files" for the project in Visual Studio, expand the Bin directory, and delete all the contents (I also removed the reference to the DLL and re-added it just to be safe).

Recompiling the project was successful and I could finally get back to work, what a pain in the a---, hope this helps you fix this issue if you run into it


What Others Are Saying:
Posted on 10/17/2010 4:18:07 AM by vince
nice tip - thanks
Posted on 12/22/2010 9:26:24 PM by ani
http://msdn.microsoft.com/en-us/library/ee890038(VS.100).aspx the error msg has details
Posted on 2/11/2011 7:22:56 AM by Thomas Jensen
I don't know if this will work for others, but I just renamed the dll, e.g. filename.dll => filenameX.dll and then renamed it back again. That seemed to do the trick.
Posted on 2/11/2011 9:33:02 PM by mknopf
@Thomas Jensen - That's a great idea. This all comes down to 'zones'. Renaming the file moves it from the 'Internet' zone to the 'Local Zone' which replaces the limited trust level with 'Full Trust', eliminating the problem. Thanks for providing the info. Michael
Posted on 3/10/2011 5:53:12 AM by Gaurav
Unblock the downloaded zip file first and then extract the dll's. Check this out http://www.galasoft.ch/mvvm/installing/manually/#unblock
Posted on 10/6/2011 1:02:31 PM by Stoage
Renaming the DLL did the trick....thanks
Posted on 11/29/2011 9:02:40 PM by sjohns
Thanks - this saved me a lot of time!