I have a VS-project that contains some code for some ArcMap-Extensions (no AddIn). Thus when compiling I also register them using ESRIRegAsm as follows:
<Exec WorkingDirectory="$(CommonProgramFiles)\ArcGIS\bin" Command="esriRegasm.exe "$(TargetPath)" /p:Desktop /u /s" Condition="Exists('$(TargetPath)')" />
<Exec WorkingDirectory="$(CommonProgramFiles)\ArcGIS\bin" Command="esriRegasm.exe "$(TargetPath)" /p:Desktop /s" />
However I always get the following error on ReBuild, which invokes BeforeClean:
error MSB3073: The command "esriRegasm.exe "MyAssembly.dll" /p:Desktop /u /s" terminated with the code -1.
I looked for the appropriate ECFG-file within "C:\Program Files (x86)\Common Files\ArcGIS\Desktop10.6\Configuration\CATID" and there is none for the mentioned project. Therefor I assumed that esriregasm with the /u-switch enabled just returns -1 when there is no such ECGF-file. However when I run the command within a shell with the /u-switch it works just fine, nothing is returned at all, even when there is no ECFG-file:
C:\Program Files (x86)\Common Files\ArcGIS\bin>esriRegasm.exe "C:\MyPath\MyAssembly.dll" /p:Desktop /u /s
Is there any log that indicates why registerung/unregistering fails?
I´m using VS2017 and ArcGIS Desktop 10.6.1.