Has anybody else run into this problem? It functions for two functions in my app, but I have two others that it hangs on afterwards. I found after a lot of trial and error that I can get it to go away if I right-click on the ArcGIS Pro icon in the taskbar (?!), it will close. I changed the code a lot to try different things, but no better results. This is the last bit I ended up with - the simplest version of what I am trying to do.
This is vb.net (apologies to all you C# developers):
Dim pProgress As New ProgressDialog("Generating Tiles...", "Cancelling...", False)
Dim cps As New CancelableProgressorSource(pProgress)
Await QueuedTask.Run(Sub() DoGenerate(lScale, Units, bBuffer, cps, ThisMap, dBufferValue), cps.Progressor)
' ^ Nothing is really going on in here, except it loops and checks every now and then to see if the user clicked the cancel button...same as the others where is does work as expected.
If cps.CancellationTokenSource.IsCancellationRequested Then Exit Sub
I need the CancellableProgressSource in case the long operation is too long for the user. I had to comment it out ".Show" in the meantime so that I could deploy. It just shows a spinning wheel cursor for now. This operation can last between 1 second and 15 minutes or possibly more.
This happens in both debug and release mode, on a deployed machine and my local environment.
Has anyone else experienced this?