Upgrading from 10.1 to 10.3.1 and getting an error on 'GraphicTrackerClass'

2325
1
08-19-2015 03:46 PM
DarcyHathaway
New Contributor

I am trying to upgrading from 10.1 to 10.3.1 and getting an error "Interop type 'GraphicTrackerClass' cannot be embedded. Use the applicable interface instead."
I updated all the after updating all the References and an coding in Visual Studio 2013.

Here is the code that is failing:

'Initialize the GraphicTracker with the Map

               m_graphicTracker = New GraphicTrackerClass()

               m_graphicTracker.Initialize(TryCast(m_mapControl.Map, IBasicMap))
I have tried just removing the Class like this:

m_graphicTracker = New GraphicTracker()

But then I get the error : Cannot embed interop type 'ESRI.ArcGIS.EngineCore.IActiveViewEvents_Event' because the source interface 'ESRI.ArcGIS.Carto.IActiveViewEvents' referenced by its ComEventInterfaceAttribute cannot be found.

0 Kudos
1 Reply
by Anonymous User
Not applicable

It sounds like you have "Embed Interop Types" set to true for the EngineCore assembly which is a feature of .NET 4.x. Try setting the .NET target framework to 3.5 in the project properties.

0 Kudos