I recently got a new work computer and installed VS Pro 2022 and the ArcGIS Pro SDK extensions. I am no longer able to open existing or create new ArcGIS Pro Module Addins. When I try to open an existing project, I get a message saying that it was not loaded correctly. If I try to create a new one, I get "Exception of type 'System.Exception' was thrown". I can create a regular (non-Arc) projects without error.
I've uninstalled, reinstalled, made sure the install is exactly the same as my old PC down to the .NET SDK version. Nothing seems to work. I've installed on a personal laptop the exact same way and it works flawlessly. Is it possibly something with the new PC itself?
Images attached of error messages received.
Emphasis on the "practicing". ESRI has a lot of good sources to teach yourself the basics of add-ins and configurations in .NET, but I was thinking more along the lines of a list of exercises you can attempt yourself? Stuff to try after you've completed the getting-started stuff? Anything is appreciated.
@SeanConway2 were you able to solve this issue? I'm facing the exact same problem
Unfortunately, no. I have a coworker who did resolve it by reinstalling the most recent dot net desktop runtime, but that didn't work for me. It's not a huge issue as I still have access to a computer it does work on, but just can't get it up and running on my newest work machine.
Okay I finally managed to solve that issue after many troubleshooting steps and was so happy that created an esri account to share it here.
That was frustrating when starting a fresh visual studio (last community version) install with ArcGIS SDK 3.1 having that cryptic error message when creating a new ArcGIS plugin project 'System.Exception' was thrown"... To solve it I had tried reinstall, repair, reboot, removing all .net frameworks and sdk, etc etc
I solved the problem thanks to https://learn.microsoft.com/en-us/answers/questions/1184941/the-sdk-microsoft-net-sdk-specified-coul... and https://stackoverflow.com/questions/63746838/net-sdks-not-installing-correctly/66128116#66128116
Thanks to command (console from visual studio) where.exe dotnet I was able to check that my x86 dotnet was listed first and as my computer was 64 architecture I had to edit path environment valriable to put the 64 dotnet BEFORE the x86 dotnet (and reboot to take effect).
When locating dotnet if you computer is a 64 you should see this correct order:
I had the same issue and this worked for me. Thanks for the links.