It seems I can't debug an ArcGIS Pro Addin in VS.
Every time it struggles and gives me a System.AggregateException.
It seems like the map is not being loaded well.
I've tried to do some changes in the firewall, but no results.
If I run the project directly, no problems. It happens only if I run it via debug in VS.
Any ideas?
"An unhandled exception of type 'System.AggregateException' occurred in mscorlib.dll
Additional information: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread.
"
Sounds like a timing issue. That is, running on the VM is changing the sequence of execution in the Add-in. From the exception you are making an Async call that you are not awaiting. That async call is failing when you are running on the VM (but I have no idea why). If you use the debugger and look at the inner exceptions property it may give you the actual exception that faulted the task. That said, if you do "await" the async call you can bracket it with a standard "try { } catch" block to trap the exception.
I will need to see your code to assist further.