Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 522
magicandre1981 Avatar asked Dec 21 '15 16:12

magicandre1981


People also ask

Could not load file or assembly WinSCpnet?

You may get this error, if the WinSCP . NET assembly package was downloaded using Microsoft Internet Explorer or Edge browsers and extracted using Windows File Explorer. These applications, under certain circumstances, block libraries downloaded from Internet as potentially harmful, what prevents their loading.

Could not load file or assembly DLL or one of its dependencies?

There are some workarounds for this issue: The dll file may not be in /bin folder. Just copy the dll file to /bin folder or set this preference Copy Local = True from Visual Studio. If the problem persists, check if the version of the assembly that is referenced is different than the version it is looking for.

Could not load file or assembly or one of its dependencies operation is not supported Sgen?

This ended up in the path where the build was performed, and caused SGEN to fail with the message "Could not load file or assembly file '' or one of its dependences. Operation is not supported." The fix was to remove the comma from the Build Definition Name. You might also try to right click on the .


1 Answers

enter image description here

Right click on the Dll and unblock it.

like image 164
Raj Avatar answered Sep 22 '22 12:09

Raj