Hi All,
I wonder how to reload add-ins in ArcGIS Pro without exiting and restarting the application.
The reason of me asking this is because I need to develop a few add-ins and I realized when I rebuild the solution in Visual Studio it actually executes the RegisterAddIn.exe executable - but there are no changes occurring in the add-in unless I restart Pro.
I was looking into the documentations, but I couldn't find any answers yet. Regarding the UI update during development, I am aware that there is something called XAML Hot reload in WPF/UWP that I successfully used before in a non-ArcGIS Pro-based development when I changed some XAML elements - in such case there were no need to restart the running debugging session, changes just showed up upon saving the new XAML. This is mainly for XAML changes only though, as far as I recall code changes not always propagate this way.
Still - I was not able to configure that in VS 2022 and the XAML hot reload stays disabled - I checked all settings as per Microsoft recommendation but no luck.
Dealing with Light and Dark Themes in WPF Windows - @Wolf in this article points out that the XAML reload can actually work.
At this stage I am trying to build up a development routine pathway, which somehow reduces the number of load-in/load-out of ArcGIS Pro during debugging.
Any help, pointers to doco's, etc will be very much appreciated.
Tamas
Solved! Go to Solution.
Manage add-ins—ArcGIS Pro | Documentation
step 4 If ArcGIS Pro is open, exit and restart the application.
check other sections there as well
Manage add-ins—ArcGIS Pro | Documentation
step 4 If ArcGIS Pro is open, exit and restart the application.
check other sections there as well
Thank you - so it seems there is always a need for an exit-restart if I want to see changes made in a deployed add-in.
Cheers
Since you are talking about Development in Visual Studio, it sounds like you need to setup your debug environment to launch and run ArcGIS Pro. Using the debug environment gives you the ability to do 'hot reload' of code so you can edit 'most' forms and modules without restarting ArcGIS Pro, secondly recall that you need to update the config.daml <Date>02/04/2025 10:45:00 AM</Date> tag every time you rebuild and deploy your add-in.
In Visual Studio you need to setup you test environment. In your .\properties folder in your project you should have a launchSettings.json file with the following:
{
"profiles": {
"NameOfYourAddIn": {
"commandName": "Executable",
"executablePath": "C:\\Program Files\\ArcGIS\\Pro\\bin\\ArcGISPro.exe",
"commandLineArgs": ""
}
}
}
This can be SET in Visual Studio with Project Properties -> Debug -> Open Debug Launch Profiles -> New Profile -> Executable.
Also, if you setup your test environment as described above, but it looks like 'the old code' keeps running, remember to CLEAR your Cache at C:\Users\<UserName>\AppData\Local\ESRI\ArcGISPro\AssemblyCache
Thanks @RichardDaniels , VS configured itself ok upon installing the Pro development VSIX file including the Debug run configuration. Thankfully I have not had any issues with "old code" running - but I will remember the location of the AssemblyCache just in case.
In the meantime, I have been able to set up the hot deploy feature in VS (It was just not fully activated within VS), so now I can see code change results in a running Pro/add-in debug session without the need of a full start/stop cycle - like in an ordinary WPF environment.
Replying just to keep my ex-corporate account's forum post to link to my private forum account.