Suppressing Add-in-registration task during build process
If you develop ArcGIS Add-ins with Visual Studio under limited permissions you get during the build process an error, that the stuff could not be registered....
If you develop ArcGIS Add-ins with Visual Studio under limited permissions you get during the build process an error, that the stuff could not be registered.
Normally its enough to run one times this build as an admin. Then all needed information are set and also taken for users with limited access.
So – how to suppress the registration task?
If you look inside the running target (C:\Program Files (x86)\MSBuild\ESRI\ESRI.ArcGIS.AddIns.targets) you will see these statements:
<Warning
Text="Skipping add-in registration with esriRegAddin.exe, 'Dont_EsriRegAddin.txt' exists."
Condition="Exists('Dont_EsriRegAddin.txt')" />
<Exec
IgnoreExitCode="true"
Condition="!Exists('Dont_EsriRegAddin.txt') And Exists('$(AddInFileToBeDeployed)')"
WorkingDirectory="$(CommonProgramFiles)\ArcGIS\bin"
Command="esriRegAddin.exe "$(AddInFileToBeDeployed)" /s">
<Output
TaskParameter="ExitCode"
PropertyName="ESRIRegAddinExitCode" />
</Exec>
Yeah! – you must place a simple (empty) text file Dont_EsriRegAddin.txt beside the *.csproj file of your project – nothing more.
Now you receive only a warning during build, that the Add-in will not be registered:
warning : Skipping add-in registration with esriRegAddin.exe, 'Dont_EsriRegAddin.txt' exists.