What am I doing wrong in installing this .Net SDK?

2257
9
Jump to solution
11-21-2019 12:19 PM
BrianVan_Nostrand
New Contributor III

Hi all,

I'm trying to use the Server Apply Watermark example from the community samples to create an SOI that will be used to somehow watermark a depricated map or feature service. I haven't gotten too far though, as I can't even get the SDK to install to my project, which is what I suspect is causing the following reference errors:

I'd love some advice but first let me explain what I think I know so far. I'm a total newbie at .Net development generally, but I'm going to take a crack at this anyway. Please correct any of these assumptions:

1. I needed to install ArcGIS for Server locally to be able to develop either an SOE or SOI. I've done this.

2. I need the current version (100.6.0 today) of the ArcGIS Runtime SDK for .Net to be installed to gain access to it in the Nuget Package Manager.

3. I need to point my project in Visual Studio to whatever the most current supported version of the .Net framework is and as indicated in the following, that version is 4.6.1:

So I've done all of the above but when I go to install the SDK, I see the following prompts:

Attempting to gather dependency information for package 'Esri.ArcGISRuntime.100.6.0' with respect to project 'ServerApplyWatermarkImageServiceSOI', targeting '.NETFramework,Version=v4.6.1'
Gathering dependency information took 80.16 ms
Attempting to resolve dependencies for package 'Esri.ArcGISRuntime.100.6.0' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'Esri.ArcGISRuntime.100.6.0'
Resolved actions to install package 'Esri.ArcGISRuntime.100.6.0'
Adding package 'Esri.ArcGISRuntime.WPF.100.6.0' to folder 'C:\ServerApplyWatermarkImageServiceSOI\packages'
Added package 'Esri.ArcGISRuntime.WPF.100.6.0' to folder 'C:\ServerApplyWatermarkImageServiceSOI\packages'
Added package 'Esri.ArcGISRuntime.WPF.100.6.0' to 'packages.config'
Successfully installed 'Esri.ArcGISRuntime.WPF 100.6.0' to ServerApplyWatermarkImageServiceSOI
Adding package 'Esri.ArcGISRuntime.100.6.0' to folder 'C:\ServerApplyWatermarkImageServiceSOI\packages'
Added package 'Esri.ArcGISRuntime.100.6.0' to folder 'C:\ServerApplyWatermarkImageServiceSOI\packages'
Added package 'Esri.ArcGISRuntime.100.6.0' to 'packages.config'
Successfully installed 'Esri.ArcGISRuntime 100.6.0' to ServerApplyWatermarkImageServiceSOI
Executing nuget actions took 2.3 sec
Time Elapsed: 00:00:02.8359139
========== Finished ==========

Great! That went smooth, and look! My project doesn't just have the Esri.ArcGISRuntime package installed, but also the ArcGISRuntime.WPF package installed.

This should work, right?

Wrong. The reference errors are still showing and I have a big list of errors complaining about missing assembly references.

Any idea what I'm doing wrong? There isn't a whole lot of setup documentation in the repo and I'm kind of at an impasse.

Thanks!

Brian

0 Kudos
1 Solution

Accepted Solutions
BrianVan_Nostrand
New Contributor III

All,

My colleague Jeff showed me that the issue seems to be that once the SDK is installed, Visual Studio looks for a "specific version" by default. Turning this option to False has updated my references and those errors disappear. I truly hate programming sometimes.

View solution in original post

0 Kudos
9 Replies
MichaelBranscomb
Esri Frequent Contributor

Hi,

Unfortunately you've installed the wrong SDK for that sample. 

Instead, you need: ArcGIS Pro SDK | Documentation 

Regards

Mike

0 Kudos
BrianVan_Nostrand
New Contributor III

Awesome, thanks. How did you know that? Is there a reliable way to figure that out myself?

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

Your link referenced the ArcObjects samples `arcobjects-sdk-community-samples`.

Apologies, I just noticed that it's a server-side component you're interested in, therefore it's specifically the Enterprise SDK you need to look at: ArcGIS Enterprise SDK 

Cheers

Mike

0 Kudos
BrianVan_Nostrand
New Contributor III

Thanks for the link.

   Do you know how to get the ArcGIS Enterprise SDK?

  1. When you google "Download ArcGIS Enterprise SDK", you get the "Installing ArcGIS Enterprise SDK" page with no reference to where the thing comes from
  2. It's not listed as a download on the APIS and SDKs downloads page at developers.arcgis,com
  3. It's also not referenced in the system requirements page
  4. Or anywhere in the first page or table of contents for the "ArcGIS Enterprise SDK Developer guide"
  5. ESRI doesn't seem to have published any videos on their youtube when you search "ArcGIS Enterprise SDK" there.

I must be really off target here...

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

Brian,

Sorry for the delay - to download the ArcGIS Enterprise SDK, you should sign in to My Esri (https://my.esri.com/) and download it from that site.

I'll follow up with the doc team(s) and identify how and where we could be better documenting this.

Cheers

Mike

0 Kudos
BrianVan_Nostrand
New Contributor III

Thanks Mike,

Hanhan Sun below has indicated that I should be using the ArcObjects SDK to use this project. I've installed the ArcObjects SDK for my version of ArcGIS, 10.7.1, but when I open the solution in visual studio, I'm still getting the reference errors I outlined above. Any idea how to get rid of those? Is there something in Visual Studio that I'm missing?

Thanks,

Brian

0 Kudos
HanhanSun1
Esri Contributor

Hi Brian,

The sample you referred to is in the arcobjects-sdk-community-samples repository and you need to install ArcObjects SDK for the Microsoft .NET Framework (sign in to My Esri https://my.esri.com/). These sample SOEs and SOIs only work with services published from ArcMap.

If you want to develop SOEs/SOIs for services published from ArcGIS Pro, you need to install ArcGIS Enterprise SDK, which can also be downloaded at My Esri (https://my.esri.com/). Similar SOE/SOI samples for ArcGIS Enterprise SDK can be found at GitHub - Esri/arcgis-enterprise-sdk-resources, with 10.6.x and 10.7.x download here: Releases · Esri/arcgis-enterprise-sdk-resources · GitHub 

ArcObjects SDK and Enterprise SDK have similar flavors of APIs. The main difference is that ArcObjects SDK is for developing SOE/SOI for services published from ArcMap and Enterprise SDK for developing SOE/SOI for services published from ArcGIS Pro. You can read more details in this document ArcGIS Enterprise SDK.

Let me know if you have more questions.

Thanks,
Hanhan

0 Kudos
BrianVan_Nostrand
New Contributor III

Thanks Hanhan,

   I've installed the ArcObjects SDK for my version of ArcGIS, 10.7.1, but when I open the solution for the Server Apply Watermark example in visual studio, I'm still getting the reference errors I outlined above. Any idea how to get rid of those? Is there something in Visual Studio that I'm missing?

Thanks,

Brian

0 Kudos
BrianVan_Nostrand
New Contributor III

All,

My colleague Jeff showed me that the issue seems to be that once the SDK is installed, Visual Studio looks for a "specific version" by default. Turning this option to False has updated my references and those errors disappear. I truly hate programming sometimes.

0 Kudos