0x80004005: the materials library that won't open
Friday, May 22, 2026A while ago I wrote about 0x80004005, the answer to almost everything, the meaningless error code Inventor throws at you the moment something goes wrong. This week it caught me again, in a case instructive enough to deserve its own article.
The symptom
On a test machine, opening a materials library (an .adsklib file) was crashing with this stack trace:
System.Runtime.InteropServices.COMException (0x80004005): Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))
at Inventor.AssetLibraries.Open(String FullFileName)
at ...MaterialsManager.GetLibrary(...)
The offending code is nothing exotic, though:
AssetLibrary library = application.AssetLibraries.Open(materialsLibraryPath);
And here's the puzzling part: the .adsklib file does exist on disk, and it is not empty. So we get a raw E_FAIL, without the slightest hint as to what the actual problem is. 0x80004005 in all its glory.
The investigation
When AssetLibraries.Open() throws an E_FAIL, the two usual suspects are:
- A version mismatch. An
.adsklibis tied to the version of Inventor that saved it. If the library was created with a version newer than the one on the machine, opening it fails. That wasn't the case here: same Inventor version on both sides. - A library already loaded.
Open()also fails if the library is already open. But the code was already checking for that case beforehand.
With both classic leads ruled out, a more subtle cause remained.
The real cause
An .adsklib file is not self-contained. It references other files (textures, appearances, linked resources). As long as those files are not all present locally, Inventor refuses to load the library.
And that was exactly it: the library had been retrieved from Vault, but only the .adsklib itself, without the files it depends on. Once all the linked files were retrieved from Vault, Open() worked without complaint.
The problem, as you've guessed, is that the API says none of this. No "such-and-such file is missing", no "dependency not found". Just 0x80004005, and potentially hours spent looking in the wrong place.
The user interface, on the other hand, does leave a clue. In the material manager, the library appears with a small yellow warning triangle. Hovering over it reads: "Failed to load library at ...adsklib". It's thin, but it at least confirms the problem comes from loading the library, and not from somewhere else.

Need an Inventor (iLogic, .NET, VBA, C++) or Fusion 360 (Python, C++) development? Contact me for a free quote.