Visual Studio: Unknown Build Error (HRESULT 0x80131515)
If you are receiving this really informative error message in Visual Studio and looking for a solution, I hope the following can help you. I spent wasted a fair bit of time trying to figure this out. Funny thing is, it’s actually quite common in the post-XP(i.e. Vista and Windows 7) era (I’ve had it myself several times now).. The Cause After much digging, it turns out the issue is caused by the file blocking placed on downloaded assemblies. For example, I had the following after downloading the binaries for Autofac and adding it to my project: Error 1 Unknown build error, 'Could not load file or assembly 'file:///c:\{Project}\lib\Autofac.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)' {Project} To Fix The good news, is this is pretty easy to fix (as are most problems when you know the cause!). Open up the file properties dialog (right click in Explorer ...