Select to view content in your preferred language

(Mis)adventures with upgrading .NET Pro SDK with VS 2017 Community

1422
4
02-20-2020 05:19 PM
AndrewQuee
Frequent Contributor

With the recent release of Pro 2.5 I thought I would be able to easily update the SDK extensions in Visual Studio 2017 to continue development.  Right?  Wrong!

Here some pitfalls I found you may wish to avoid, read on if you'd like to avoid wasting time climbing in and out of the traps.  Installation was relatively fresh install of VS2017 used exclusively for two Esri projects under Pro 2.3 and no other SDKs.

It started when I downloaded the Pro 2.5 SDK.  The SDK is no longer an automatic installer/updater but works through updating the extension in VS (official Esri instructions).  However this didn't work at all - after downloading the update and showing update pending "Click Close to dismiss the dialog and exit Visual Studio." I closed it... for step 6 "The VSIX Installer dialog will appear."  and nothing happened.  No hidden processes running, just a silent desktop.

This is a known problem with VS2017.  No matter what I did including esoteric hints from StackExchange et al about closing the IDE in a certain way/procedure, first putting on my wizard robe and hat, making sure VS was fully updated, etc it would not start the update process, and when the update was chosen again, it would faithfully tell me it was about to update the SDK then troll me by doing nothing at all.

(as a side-issue Windows 10 also did not update automatically to install the required .NET framework 4.8 and had to be done manually)

Eventually I found some hope in a Repair of VS.  After spending several hours(!) reinstalling 446 updates it wiped the previous Pro SDKs and gave me a vanilla VS.  Yay     Finally, I was able to choose the SDK and when VS closed, the VISX installer dialog appeared.

On reflection I should probably have just completely ignored all the documentation and advice from MS and done an end-run around VS by directly running the proapp-sdk-utilities.vsix and proapp-sdk-templates.vsix that came with the SDK download from Esri.  Not tested, but I suspect it would be faster than dealing with the above bargewaffle.  Yes I am salty Microsoft, I want those hours of my life back..

0 Kudos
4 Replies
GKmieliauskas
Esri Regular Contributor

Hi Andrew,

I have started from the GitHub information about ArcGIS Pro 2.5 SDK (https://github.com/esri/arcgis-pro-sdk/wiki). So my experience was a little bit different but with wasted time.

Wiki text:

hRequirements

The requirements for the machine on which you develop your ArcGIS Pro add-ins are listed here.

.NET Framework 4.8:

  • With the release of ArcGIS Pro 2.5, the minimum .NET target has been changed from 4.6.1 to 4.8. What does this mean for you and your add-ins?
    • Existing add-ins, already deployed, will work at 2.5 with no change to their forward compatibility.
    • New add-ins created at 2.5 will require the minimum target framework set to 4.8 or they will not compile (this is the default setting in the Pro SDK).
    • Existing add-ins which are recompiled at 2.5 (e.g. because a code change was made) will also require the minimum target framework set to 4.8 or they will not compile. Note: As always, if an existing add-in is changed for any reason, the desktopVersion attribute in its Config.daml file should be changed to reflect the version of Pro it was last compiled against, in this case, now 2.5

VS2017 max .Net Framework version 4.6.1. So there is one way to install VS2019.

Now look at the other Esri sources for developers: ProGuide Installation and Upgrade · Esri/arcgis-pro-sdk Wiki · GitHub 

It talks about VS2017 and VS2019. I believe in first source because I can't compile my application with VS2017 and SDK 2.5. So I came back to SDK to 2.4. It takes time take back to ArcGIS Pro 2.4.3 and SDK 2.4. 

And remember as wrote Uma uncheck "Automatically update this extension" option for ArcGIS Pro SDK extensions.

Colleagues from Esri could you please explain real situation?

0 Kudos
UmaHarano
Esri Regular Contributor

Hi Gintautas,

You can install .NET Framework 4.8 for Visual Studio 2017 by downloading the framework from Microsoft directly.  Here is the link I use to install .NET 4.8 when I need to use Visual Studio 2017.  

Download .NET Framework 4.8 Developer Pack Offline Installer 

Andrew Quee

That was definitely a bad adventure.  Just a few thoughts:

* I will update the install instructions to give the option of directly installing the Pro SDK by simply double clicking the VSIX files downloaded from the SDK repo.  This will be a good option to use so that you can circumvent the Visual Studio marketplace.  Good idea!

* One of the reasons we list that it is not a good idea to automatically "update" the Pro SDK is because you could get into a situation where you have Pro 2.4 and you get Pro SDK 2.5 automatically updated when you were not ready.  But to clarify, the Pro SDK VSIX files do support the auto update mechanism offered by Visual studio. You just have to be careful that you don't get into a situation where you have an older Pro version with a newer SDK.  If this happens, you will encounter errors when you attempt to create an ArcGIS Pro add-in using the SDK.

Thanks!

Uma

0 Kudos
GKmieliauskas
Esri Regular Contributor

Thank you Uma. Now it works.

0 Kudos
AndrewQuee
Frequent Contributor

Thanks, yes I did have issues.  For some reason I was unable to build because it was somehow already built(?) with 4.8 yet only had 4.6.1 dev framework installed.

As you say, for 2.5 with .NET 4.8 in addition to updating the SDK and the runtime, you will also need to install the 4.8 developer pack for the target framework.  Resolving target framework not found error

Once I flopped ungainly over this final hurdle and restarted VS, I was able to successfully build the sample project at 2.5 under .NET framework 4.8.

0 Kudos