How to: Use an Assembly from the Web in Visual Studio
Updated: July 2010
This topic shows how to use an assembly that you download from the Web in Visual Studio. For security reasons, Visual Studio blocks you from loading a Web assembly in the Choose Items and Add Reference dialog boxes.
Caution |
|---|
Unblocking an assembly that is downloaded from the Web gives it Full Trust. Only unblock assemblies that you trust. |
To unblock a Web assembly
-
Close Visual Studio.
-
Using Windows Explorer, browse to the assembly that you downloaded from the Web.
-
Right-click the assembly, and from the shortcut menu, select Properties.
The Properties dialog box opens.
-
On the General tab, click the Unblock button to indicate that this assembly is trusted
Note
The Unblock button will not appear if the assembly is already unblocked and available.
-
Click OK to close the Properties dialog box.
-
Restart Visual Studio and open your project.
You should now be able to browse to the assembly in the Choose Items or Add Reference dialog boxes.
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe.config" and added the following lines
<runtime>
<loadFromRemoteSources enabled="true" />
....
</runtime>
and it resolved the issue for me. All other options - "unlock button", "Moving the assembly to different folder" -- did not work
Jagan
- 11/19/2011
- JSSOR
I receive this error in the xaml designer for a assembly not loaded from the web....
The assembly is a project reference and it used to run until ...(what?)
(I'm working on a server terminal and our admins made some changes on the dns server, maybe that's the reason?)
The project can be built and runs properly. Designing the gui is no more possible... :-(
- 9/13/2011
- karle_at_nfr
- 4/11/2011
- Thieum22
- 3/10/2011
- SliverNinja
Error 1 Unable to load the metadata for assembly 'WPFToolkit.Extended'. This assembly may have been downloaded from the web. See http://go.microsoft.com/fwlink/?LinkId=179545. The following error was encountered during load: Could not load file or assembly 'WPFToolkit.Extended, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
The link points to this article. The "Unblock" button is not present on the Properties dialog.
- 3/4/2011
- medinat
as well as this one: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\*,*
Note that you are totally opening up your system by doing this, so be WARNED that any assembly is get loaded and you will not be warned if it is evil or not!!
- 2/12/2011
- deherb3185
Peter
- 1/23/2011
- WayPoint7
Open devenv.exe.config (in C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE on my machine), and add this
<runtime>
<loadFromRemoteSources enabled="true" />
....
</runtime>
Restart Visual Studio and it should work.
My zip had no unblock button and neither did the assembly's I was trying to load.
- 12/30/2010
- EliteMike
Open devenv.exe.config (in C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE on my machine), and add this
<runtime>
<loadFromRemoteSources enabled="true" />
....
</runtime>
Restart Visual Studio and it should work.
- 11/29/2010
- Mihir Pathak
- 11/12/2010
- SColorado
- 10/8/2010
- dfsdxfSDFSDFS
1. Right click on the zip file
2. Click on 'Properties'
3. Choose 'Unblock' in the 'Attributes' section
4. Extract file
Note: If you unzip the file before unblocking, all files in the extracted folder are flagged as unsafe.
- 8/9/2010
- Shaunaks
- 8/9/2010
- cheshire137
First)
If your project files reside on a network drive, then move it to a local drive.
You can vote for a solution here: https://connect.microsoft.com/VisualStudio/feedback/details/568464/wpf-project-on-a-network-share-with-clr-namespace?wa=wsignin1.0
I think Kellen run into this problem
Second)
If you download a zip file with source code, then don't open the file directly! First save it on a local drive, then open the folder of the file and there you have to unblock the zip file. Otherwise all the files inside the zip file get the unsafe attribute and need to be unblocked when you extract them!
- 7/3/2010
- Contessa Mary
This one is Microsoft.Maps.MapControl.Common.dll. Worked great when the guy
demoed it at codecamp. Sure wish I could get it working!
I even downloaded the .msi and installed it local. No luck.
- 6/9/2010
- philwe
Caution