Could not load file or assembly Operation is not supported. (Exception from HRESULT: 0x80131515)

magicandre1981 picture magicandre1981 · Dec 21, 2015 · Viewed 57.3k times · Source

When I run CodedUI Test from a small Console tool via vstest.console.exe from a scheduled task I sometimes see this error message on different PCs:

error : Could not load file or assembly 'file:///C:\foobar.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

Why/what is this not supported?

Answer

Raj picture Raj · Jul 20, 2017

enter image description here

Right click on the Dll and unblock it.