Unable to add a reference to a COM EXE to a C# project

  • Thread starter Thread starter Sagar R. Kapadia
  • Start date Start date
S

Sagar R. Kapadia

Guest
I am trying to add a reference to a 64 bit and a 32 bit COM Exe to a C# 4.6.1 project. The reference to the 32 bit COM Exe gets added without problems but I get a "A reference to "ProcessMonitorLibX64,exe" could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component". I did not have problems with the 64 bit COM Exe earlier. This problem came up suddenly and I cant resolve it. Some setting has changed or the project has become corrupt

When this problem happened some time ago previously, restoring from git worked. But this time it seems I have committed the corrupt version to git



I tried the following steps, and then tried adding the exe after recompiling it

a. Unloading and reloading the project

b. Cleaning the project

c. Loading and unloading the solution [Restarting VS2019]

d. Restoring the project from a git repository

e. Trying /regserver from admin command prompt [By the way, the project name does not show in the list of COM components in the "Add Reference" dialog.]

Please help.

Thanks,

Sagar

Continue reading...
 
Back
Top