Have you checked whether in the "ArcGISLocalServer.AGSDeployment" file, is the "enabled" element of "Geoprocessing" set to true?
If set to false, GPK can’t be used on LocalServer, so you may have an error in your execution environment.
<Package name="Geoprocessing" enabled="true">
Hope that helps.
I have enabled geoprocessing as you suggested, but result is the same:
I have a few questions about deployment file. That file is located in my ArcGIS Runtime excutable folder. How can I change it after end of development when I will start to build deployment pack? Or it will be taken from my executable folder? Second question is about geoprocessing child packages. They all are set to “false”. How I can detect which child package must be set to “true”?
I have found that it works with geoprocessing package made with ArcMap 10.3.1, but does not work with ArcGIS Pro package and ArcMap 10.5.1 package. ArcMap 10.5.1 geoprocesing sharing tool does not have "Support ArcGIS Runtime" checkbox.
Geoprocessing option in "ArcGISLocalServer.AGSDeployment" file must be set to "true". I have checked only loading of geoprocessing service but I hope that calculation will work too.
Glad that after enabling the "GeoProcessing" option in 'ArcGISLocalServer.AGSDeployment', you are able to run gpk through the Local Server. For your question, "how I can detect which child package must be set to “true"", it depends on which option you use when you create the GeoProcessing tools in ArcMap, suppose if you use '3D Analyst' to create the geoprocessing tool, then in the AGSDeployment file, you need to set that child option to 'true.
I am using ArcMap 10.5, and I see the "Packaging" option available under the menu "Customize --> ArcMap options --> "Sharing" to use that in Runtime application.
Hope that helps.
Please let us know if you think there is information missing from the LocalServer deployment topic and/or system requirements: