Build fails with “Operation not supported” and “Exception from HRESULT: 0x80131515”
TroubleshootingSummary
Description
One of the following error messages (or a similar one) may appear when trying to build an application using yFiles:
Could not load file or assembly 'yWorks.yFilesNET.Algorithms, Version=5.2.0.1, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
LC : error LC0000: 'Could not load file or assembly 'yWorks.yFilesWPF.Viewer' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)'
Cause
The underlying cause is that the yFiles assembly is marked as originating from the Internet Zone and thus a number of restrictions are placed on it. In this case this includes being unable to compile an application that tries to use a yFiles license. This marker is placed on downloaded files by browsers and is sometimes propagated into files extracted from downloaded archives, depending on the application used to extract the archive. The most common application that will propagate this marker when extracting a ZIP archive is Windows Explorer. Most standalone archivers will not do this.
Some applications, notably .NET's license compiler lc.exe and MSTest, will refuse to load an assembly from the internet zone, leading to the error shown above.
Solution
You can also unblock the files manually:
- Open the properties of the ZIP archive you downloaded
Check the Unblock checkbox next to the message “This file came from another computer and might be blocked to help protect this computer”:

- Re-extract the contents of the ZIP archive again and overwrite the existing files
Alternatively you can just unblock the yFiles assemblies in the lib directory as described above. All other files in the distribution should be unaffected by having such a marker.
See also
- KB736: A similar issue with the .NET Framework Resource Compiler, which prevents a successful build if
.resxfiles in demos have a mark of the web.