Question

I am trying to compile a sample from ESRI and I get this error

Error 1: The command "esriRegasm.exe CommandInheritingBaseCommand.dll" /p:Desktop /s" exited with code -1.

So, there must be a command to invoke esriRegasm.exe somewhere in the project, but I cannot find it. I right-clicked on the project → Properties and looked in Build and Build Events tabs, but found nothing there. Where else could it be?

Was it helpful?

Solution 2

I couldn't find the answer, but I got around the esriRegasm error by developing as "Administrator" in Windows 7 and not as a user.

OTHER TIPS

If you can't find it through Visual Studio, try editing the project file in a text editor and see where it is storing a reference to that executable.

for VB, if you open the vbproj file in an xml editor you will find these lines at the end (I assume C# is similar.) You could remove them from the file and reopen your project

It is an MSBuild task. I got the same error, but compiling my own project rather than the sample project. It turned out that esriRegAsm.exe failed because it could not find one of my assembly's dependencies (a different assembly of mine that is referenced by this project). So, this error is pretty generic and could mean that esriRegAsm.exe failed for a number of reasons. Troubleshoot by running esriRegAsm.exe yourself on the command line.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top