Exception from HRESULT: 0x80131047
If you are using Assembly.Load() to load file try to change it with Assembly.LoadFile() instead.
If you are using Assembly.Load() to load file try to change it with Assembly.LoadFile() instead.
For .Net Framework 4.5 and above, you can use the Exception.HResult property: int hr = ex.HResult; For older versions, you can use Marshal.GetHRForException to get back the HResult, but this has significant side-effects and is not recommended: int hr = Marshal.GetHRForException(ex);
I’ll show you how to do it. Paste the negative number into Calculator (Windows) in programmer mode “Dec” setting. Then convert to “Hex” setting. You get the number: FFFFFFFF80004005. The error is 80004005 which is: 0x80004005 E_FAIL Unspecified Unfortunately the provider of the function that gave you this error did not categorize the error. Useful … Read more
You can use _com_error: _com_error err(hr); LPCTSTR errMsg = err.ErrorMessage(); If you don’t want to use _com_error for whatever reason, you can still take a look at its source, and see how it’s done. Don’t forget to include the header comdef.h
Update for those who got this issue for VS2013 or VS2015 after upgrading a VS200X setup project using the Microsoft Visual Studio Installer Projects extension. Following the recipe for v1.0.0.0 from MS finally made it work for me: Microsoft Visual Studio Installer Projects Unfortunately we couldn’t address all cases of the command line issue for … Read more