Problem Creating an ArcGIS Runtime deployment

6693
7
Jump to solution
10-13-2014 02:29 PM
deleted-user-997AEHHSB7nZ
New Contributor II

I'm walking through the steps in the guide - Create an ArcGIS Runtime deployment—ArcGIS Runtime SDK for .NET | ArcGIS for Developers

After I add the manifest, I rebuild, and I'm prompted to 'update project imports to support ArcGISRuntime Deployment build extensions' - if I hit Yes here, and reload the project, then my project wont build, I start getting compile errors (e.g. The tag 'MapView' does not exist in the XML namespace 'http://schemas.esri.com/arcgis/runtime/2013') - I notice that I lose my project reference to ESRI.ArcGISRuntime.  When I inspect the change that was made behind the scenes to the csproj file, it's adding this line:

  <Import Project="$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\ArcGISRuntimeSDKNET10.2.4@InstallDir)ideintegration\ArcGISRuntime.targets" />

However - I looked in my registry and there is no such ESRI key or value under HKEY_LOCAL_MACHINE\SOFTWARE.  This seems to me like a problem with the SDK installer, that it forgot to put this key in the registry.

Anybody else experiencing this problem?  Is this a bug?

Thanks!

Pete

0 Kudos
1 Solution

Accepted Solutions
MichaelBranscomb
Esri Frequent Contributor

Hi,

The Nuget packages provide easier access to the API but do not contain the full contents of the SDK. The SDK download contains additional IDE integration in the form of project and item templates and the deployment builder. Also, for the Windows Desktop API, the SDK includes the LocalServer component.

I have entered an issue to investigate and better handle the case where the Nuget package is installed first, then the SDK and your app project still references the API via Nuget.

Cheers

Mike

View solution in original post

0 Kudos
7 Replies
dotMorten_esri
Esri Notable Contributor

If you are on a 64-bit OS, note that the registry keys are in th WOW6432 nodes:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ESRI\ArcGISRuntimeSDKNET10.2.4

Is that the case?

Did you save your project before adding the deployment file? I'm wondering if the reference got lost during the reload?

0 Kudos
deleted-user-997AEHHSB7nZ
New Contributor II

Morton - thanks for the response.  I think the problem was caused by the reference that was in place to the ESRI ArcGIS Runtime for .Net Nuget Package‌ .  I Removed the reference to ESRI.ArcGIS.Runtime that was pointing to the nuget package and then added it back using the assembly installed with the SDK (Under C:\Program Files (x86)\ArcGIS SDKs\DotNet10.2.4).  After this I rebuilt the project and the reference persists and all is well.

But on that note, what is the best practice then with the SDK vs nuget?  I've opted to uninstall the nuget package (I think it was about 200mb) and just have all developers install the SDK.  Are we missing anything by going this route?

Thanks!

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

Hi,

The Nuget packages provide easier access to the API but do not contain the full contents of the SDK. The SDK download contains additional IDE integration in the form of project and item templates and the deployment builder. Also, for the Windows Desktop API, the SDK includes the LocalServer component.

I have entered an issue to investigate and better handle the case where the Nuget package is installed first, then the SDK and your app project still references the API via Nuget.

Cheers

Mike

0 Kudos
dotMorten_esri
Esri Notable Contributor

You cannot mix. You either have to go full on with nuget, or full on with the installed SDK.

0 Kudos
deleted-user-997AEHHSB7nZ
New Contributor II

Another chapter challenge these days is fixing my nightly build which has been broken ever since I dropped the NuGet piece in favor of the SDK.  The error I'm getting on the build server (msbuild running via Jenkins) is:

Project "E:\Jenkins\jobs\[SolutionName.sln]" (1) is building "E:\Jenkins\jobs\[ProjectName].csproj" (2) on node 1 (default targets).

E:\Jenkins\jobs\[ProjectName].csproj(605,3): error MSB4019: The imported project "E:\Jenkins\jobs\[ProjectFolder]\ideintegration\ArcGISRuntime.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

Done Building Project "E:\Jenkins\jobs\[ProjectName].csproj" (default targets) -- FAILED.

If I look in my csproj file there's a import like this:

<Import Project="$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\ArcGISRuntimeSDKNET10.2.4@InstallDir)ideintegration\ArcGISRuntime.targets" />

And I know this registry key isn't on the build server because the SDK isn't installed there

I'm considering the following options:

1-Install the SDK on the build server (would rather not - kind of bad practice - but likely easiest thing to get me out of jail)

2-Add the ESRI.ArcGISRuntime.dll to source control and somehow use it on the server at build time (something tells me this wont work because it would likely fail on it's own dependencies - this is the poor man's NuGet fake option)

3-Go back to Nuget

4-Do nothing - build project on my dev environment for all releases (ouch - hate this idea)

This might be more of a .net question or an MSBUILD question but just thought I'd see if any smart folks out there had any ideas.

THANKS!

Pete

0 Kudos
AnttiKajanus1
Occasional Contributor III

This issue comes when mix matching the Nuget and Deployment (SDK). When you are using Nuget -package, default ArcGIS Runtime deployment is done on build which means you should see arcgisruntime10.2.4 folder in bin. This deployment doesn't have local server or specialized symbology in it but everything else should be included. If you aren't working with Local server and/or specialized symbols, just remove that import from the project file and you should be good to go.

If you can't do that then you need to include .targets file and other needed stuff from the SDK but I think that full installation is not necessarily needed if files are found.

Edit:

I missed the part when you said that you dropped using Nuget. Basically your options are following

- Move back to the Nuget

- Install SDK to the build server

- Create needed registrykeys and copy needed files to the build server. Also make sure that the deployment tool run ok.

0 Kudos
dotMorten_esri
Esri Notable Contributor

To build against extension sdks on a build server, use the SDKReferenceDirectoryRoot trick to give it an alternative location to find the extension sdk:

    http://www.saramgsilva.com/index.php/2013/extension-sdks-in-build-server-without-installing-it/

You can xcopy deploy this, so you don't need to actually install the SDK but just having it reside in a folder on the build server.

0 Kudos