'Could not load file or assembly. Invalid pointer (Exception from HRESULT: 0x80004003 (E_POINTER))

I have rebuilt my solution and got the following compilation error:

Error 9 'Could not load file or assembly 'ComponentArt.Web.UI, Version=2009.1.1819.35, Culture=neutral, PublicKeyToken=9bc9f846553156bb' or one of its dependencies. Invalid pointer (Exception from HRESULT: 0x80004003 (E_POINTER))' D:..\MyProj.Account\LC

The dll is in infra folder and is moved finaly to the bin folder of the output project (web-site).

Any productive ideas? what else should I check? It seems all other projects in this sln compiles.

Unless I get this error to soon. btw, what's LC (under "project" column) ?



Solution 1:[1]

I would check your licenses.licx file and ensure the version specified in there matches exactly with the DLL you are referencing.

We often remove everything after the version in this file due to similar problems.

And LC usually refers to the license compiler, lc.exe.

Solution 2:[2]

As I described in "this post regarding Telerik.Web.UI" it is probably due to a missing or misplaced dll file.

Solution 3:[3]

Ensure that there are no spaces in the path to your project...

I am using Windows 10 with Visual Studio Community 2019 and I was cloning a multi project solution as it was from a GIT repo. I was having this error along with all other dependencies in the solution with a metadata not found for xyz.dll error. Its path, inherited from GIT, had spaces like C:/repos/MY PROJECT NAME/ ...

I deleted it, cloned it again and make sure that its path contained no spaces like C:/repos/MY_PROJECT_NAME/ ...

That fixed my problem.

Solution 4:[4]

In my case, the publish profile was the problem, I was using Release - Any CPU publishing configuration to publish the project to a local folder. Using this way, it was not loading the telerik.web.ui assembly but when debugging, it was working perfectly fine. So, I modified the publishing configuration to Debug - Any CPU and the error went away.

PS: Remember, this will take the Debug configurations from your web.config file which would be web.debug.config and if you don't have the file, it will take web.config file configurations as default. So make sure you are pointing to right configuration when you post the files on live environment.

Solution 5:[5]

If you have unloaded any of the projects (RIght-click on the project -> Unload Project) in your solution and forgot to remove the references (to the removed project) from the existing projects it could potentially cause this error.

What you need to do is check for the references of all the existing projects in the solution and make sure there is no reference marked with an exclamation mark. (Expand the project -> Expand 'References'). If you find such a reference, simply right-click and remove it.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 competent_tech
Solution 2 Community
Solution 3 Ph0b0x
Solution 4 Jamshaid K.
Solution 5 Kushan Randima