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?
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.
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.
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 .
Right click on the Dll and unblock it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With