Error thrown from Toolkit after upgrade to VS Update 4

3146
4
12-03-2014 07:05 AM
SimonFisher
Occasional Contributor II

A colleague of mine upgraded his Visual Studio 2013 to Update 4 and now gets the error below thrown from the ArcGIS Runtime Toolkit for .Net.  Others on the team, including myself do not get this error staying at VS Update 3.  We also tested on another VM with update 4 and same error occurs, so we are guessing its something related to Update 4. 

Anyone get this issue? Or have any suggestions? Besides reverting to Update 3, he already tried and cannot seem to do that.

Error is thrown in ScaleLines.cs GetMile method.

Inner Exception:

{"Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))"}

  1. System.TypeLoadException

{"Requested Windows Runtime type 'RuntimeCoreNet.CoreUnit' is not registered.":"RuntimeCoreNet.CoreUnit"}

Stack Trace

   at System.StubHelpers.StubHelpers.GetWinRTFactoryObject(IntPtr pCPCMD)

   at RuntimeCoreNet.CoreUnit.Create(Int32 id)

   at Esri.ArcGISRuntime.Geometry.Unit.TryCreate(Int32 id)

   at Esri.ArcGISRuntime.Geometry.Unit.Create(Int32 id)

   at Esri.ArcGISRuntime.Geometry.LinearUnits.get_Inches()

   at Esri.ArcGISRuntime.Toolkit.Controls.ScaleLine.GetMile()

   at Esri.ArcGISRuntime.Toolkit.Controls.ScaleLine.Refresh()

   at Esri.ArcGISRuntime.Toolkit.Controls.ScaleLine.OnScalePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)

0 Kudos
4 Replies
dotMorten_esri
Esri Notable Contributor

Are you using Windows Store, Windows Phone or Windows Desktop?

This error would occur if the native resources are not deployed at runtime. There could be a number of reason for this, none of which should occur because of the update.

In any case, try one of the following two things:

- Create a new app using the provided template. Will the app run?

- Re-install the SDK.

0 Kudos
dotMorten_esri
Esri Notable Contributor

Actually just noticed in your screenshot that this is Windows Store. In that case it's likely because you are referencing the DLL and not the Extension SDK. Try and remove the reference to the runtime SDK and add a reference to the extension sdk instead, as described here: Creating your first app

0 Kudos
SimonFisher
Occasional Contributor II

We have always referenced the Extension SDK.  I did ask him to remove the reference anyway and try re-adding it, but it did not help, same error.  Could VS Update 4 have changed something in the way the references get loaded?  We still think its something to do with Update 4 as we have 3 machines on Update 3 that work fine and 2 machines on Update 4 that show this error.  Has the SDK team gone to Update 4 yet and tested?

Thanks

Simon

0 Kudos
AnttiKajanus1
Occasional Contributor III

I think that most of us (if not all) are using Update 4.

0 Kudos