Select to view content in your preferred language

Esri.ArcGISRuntime.LocalServices nuget package for 100.3

1652
3
07-17-2018 05:31 AM
RobertHaines
Emerging Contributor

We are looking to upgrade to ArcGISRuntime 100.3 .NET however only an updated nuget package for Esri.ArcGISRuntime.WPF exists. The Esri.ArcGISRuntime.LocalServices package remains on version 100.2.1. The ArcGIS Runtime Local Server SDK via the web site, https://developers.arcgis.com/downloads/apis-and-sdks?product=local-server, is version 100.2.0.

If I just upgrade the Esri.ArcGISRuntime.WPF package to 100.3 an error occurs when the map is initialised as follows:

Could not load file or assembly 'Esri.ArcGISRuntime, Version=100.2.1.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I assume that I also require an updated nuget package for Esri.ArcGISRuntime.LocalServices which is not currently available?

Thanks,

Robert

0 Kudos
3 Replies
MichaelBranscomb
Esri Frequent Contributor

Hi,

The ArcGIS Runtime Local Server SDK v100.3 is still undergoing release certification (significant architectural changes were required to add support for ArcGIS Pro map and geoprocessing packages). Until it is released you can update your Esri.ArcGISRuntime.WPF reference from v100.2.1 to v100.3 and continue to reference Esri.ArcGISRuntime.LocalServices v100.2.1 (which will use ArcGIS Runtime Local Server SDK v100.2).

Cheers

Mike

0 Kudos
RobertHaines
Emerging Contributor

Hi Mike,

I had tried just updating the WPF nuget package but get an error occurs when the map is initialised as follows:

Could not load file or assembly 'Esri.ArcGISRuntime, Version=100.2.1.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Can you give an indicative timescale for when the ArcGIS Runtime Local Server SDK v100.3 might be released? Hopefully just a week or two?

Thanks,

Robert

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

Hi,

I would not expect to see the error above. 

#. Which Esri.ArcGISRuntime.* NuGet packages are you referencing? (e.g. Esri.ArcGISRuntime, Esri.ArcGISRuntime.WPF, and Esri.ArcGISRuntime.LocalServices)

#. How are you referencing the NuGet packages: packages.config or the newer `PackageReference` approach?

Occasionally we have run into issues adding/removing/updating NuGet packages from various projects. You may need to open the NuGet package manager dialog for your solution and uninstall the Esri.ArcGISRuntime.* packages then check your packages.config and .csproj files for any rogue imports or error conditions. After adding them back you should see something like this:

e.g. packages.config:

<?xml version="1.0" encoding="utf-8"?>
<packages>
 <package id="Esri.ArcGISRuntime" version="100.3.0" targetFramework="net472" />
 <package id="Esri.ArcGISRuntime.LocalServices" version="100.2.1" targetFramework="net472" />
 <package id="Esri.ArcGISRuntime.WPF" version="100.3.0" targetFramework="net472" />
</packages>
‍‍‍‍‍‍

e.g. csproj:

<Reference Include="Esri.ArcGISRuntime, Version=100.3.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86, processorArchitecture=MSIL">
 <HintPath>packages\Esri.ArcGISRuntime.WPF.100.3.0\lib\net461\Esri.ArcGISRuntime.dll</HintPath>
</Reference>
<Reference Include="Esri.ArcGISRuntime.LocalServices, Version=100.2.1.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86, processorArchitecture=MSIL">
 <HintPath>packages\Esri.ArcGISRuntime.LocalServices.100.2.1\lib\net452\Esri.ArcGISRuntime.LocalServices.dll</HintPath>
</Reference>
...
<Import Project="..\packages\Esri.ArcGISRuntime.WPF.100.3.0\build\net461\Esri.ArcGISRuntime.WPF.targets" Condition="Exists('..\packages\Esri.ArcGISRuntime.WPF.100.3.0\build\net461\Esri.ArcGISRuntime.WPF.targets')" />
<Import Project="packages\Esri.ArcGISRuntime.WPF.100.3.0\build\net461\Esri.ArcGISRuntime.WPF.targets" Condition="Exists('packages\Esri.ArcGISRuntime.WPF.100.3.0\build\net461\Esri.ArcGISRuntime.WPF.targets')" />
<Import Project="packages\Esri.ArcGISRuntime.LocalServices.100.2.1\build\net452\Esri.ArcGISRuntime.LocalServices.targets" Condition="Exists('packages\Esri.ArcGISRuntime.LocalServices.100.2.1\build\net452\Esri.ArcGISRuntime.LocalServices.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
 <PropertyGroup>
 <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
 </PropertyGroup>
 <Error Condition="!Exists('packages\Esri.ArcGISRuntime.WPF.100.3.0\build\net461\Esri.ArcGISRuntime.WPF.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Esri.ArcGISRuntime.WPF.100.3.0\build\net461\Esri.ArcGISRuntime.WPF.targets'))" />
 <Error Condition="!Exists('packages\Esri.ArcGISRuntime.LocalServices.100.2.1\build\net452\Esri.ArcGISRuntime.LocalServices.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Esri.ArcGISRuntime.LocalServices.100.2.1\build\net452\Esri.ArcGISRuntime.LocalServices.targets'))" />
</Target>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

From our experience so far, the newer PackageReference approach appears to have helped resolve some of these occasional uninstall/install/update issues. 

e.g. .csproj using PackageReference (removes packages.config):

<PackageReference Include="Esri.ArcGISRuntime">
 <Version>100.3.0</Version>
</PackageReference>
<PackageReference Include="Esri.ArcGISRuntime.LocalServices">
 <Version>100.2.1</Version>
</PackageReference>
<PackageReference Include="Esri.ArcGISRuntime.WPF">
 <Version>100.3.0</Version>
</PackageReference>‍‍‍‍‍‍‍‍‍

I hope this can help you resolve the referencing issue. But as you suggested, it will probably only be another couple/few weeks as we continue testing and readying the new Local Server SDK. 

Cheers

Mike

0 Kudos