I recently configured my environment to develop using Visual Studio 2019 with ArcGIS Pro 2.7.0 and the ArcGIS Pro SDK 2.7.0.26828 (specific download - not as an automatically-updating extension).
My assumption is that this combination of VS, Pro and the SDK should be compatible and allow me to create a new Visual Studio solution, but I encounter an error message saying "Index was outside the bounds of the array" anytime I attempt to use an ArcGIS Pro SDK template.
I have been able to download a Pro SDK sample (MapLayoutSample) and successfully debug using that solution, however, if I attempt to add a new item (like an ArcGIS Pro Button or ArcGIS Pro ComboBox) I encounter the same error (Index was outside the bounds of the array).
I have removed the install of the SDK, re-installed and rebooted my machine, but it did not improve the situation.
Solved! Go to Solution.
- Try uninstalling (1) Pro SDK, (2) Pro, and (3) Visual Studio. (in that order)
- Then reinstall (1) Visual Studio, (2) Pro, and (3) Pro SDK. (in that order)
- Try creating a Pro SDK app (Add-in, CoreHost, Configuration) from template again.
I am having the exact same issue with VS2022. Where you able to resolve this somehow?
Unfortunately, I was never able to resolve the problem. I continue to use the work-around of adding a new button, tool, etc from the samples or just copy and paste from existing template and perform any wiring manually.
I have been hopeful that eventually migrating to VS 2022 would address the issue, but that doesn't appear to be case 😞
That is unfortunate. I will let you know if I am able to figure anything out.
- Try uninstalling (1) Pro SDK, (2) Pro, and (3) Visual Studio. (in that order)
- Then reinstall (1) Visual Studio, (2) Pro, and (3) Pro SDK. (in that order)
- Try creating a Pro SDK app (Add-in, CoreHost, Configuration) from template again.
@SE1- I recently had to stand-up a new machine, including a development environment for Pro. I followed the sequence for installing that you suggested (1 - VS, 2 - Pro & 3 - Pro SDK) and I am now able to add a new button using the ArcGIS Pro Add-In template.