Select to view content in your preferred language

GoToCoordinates Addin template not working in visual Studio 2012

3443
1
Jump to solution
08-27-2013 11:41 PM
Yann-EricBoyeau
Frequent Contributor
Hi,

I downloaded the GoToCoordinates Add-In code here : http://www.arcgis.com/home/item.html?id=8257a39cb73148c8bb15270daed2cd8f.

VS2012 upgrade the solution

I managed to compile it in visual studio 2012 : No error.
code analysis : No Issues

When I launch the project for debug I get a quick error message in the viewer during a fraction of second:
[ATTACH=CONFIG]27041[/ATTACH]

And then the app load without any tools (of course I can not modify or debug the add-in...)

[ATTACH=CONFIG]27042[/ATTACH]

I have these kind of errors in the debug output:

{System.Windows.Markup.XamlParseException: The invocation of the constructor on type 'GoToCoordinates.AddIns.GoToCoordinatesTool' that matches the specified binding constraints threw an exception. [Line: 1 Position: 60] ---> System.IO.FileLoadException: Could not load file or assembly 'ESRI.ArcGIS.Client.Extensibility, Version=3.1.0.110, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86' or one of its dependencies. The requested assembly version conflicts with what is already bound in the app domain or specified in the manifest. (Exception from HRESULT: 0x80131053)
   at GoToCoordinates.AddIns.GoToCoordinatesTool..ctor()
   --- End of inner exception stack trace ---
   at MS.Internal.XcpImports.CreateFromXaml(String xamlString, Boolean createNamescope, Boolean requireDefaultNamespace, Boolean allowEventHandlers, Boolean expandTemplatesDuringParse)}




If I comment out the GoToCoordinate tool in Config/Tools.xml, the application launch with all others tools with no problem

I wonder if anyone can reproduce / explain the error.

I did not manage to solve it yet.

THX
1 Solution

Accepted Solutions
by Anonymous User
Not applicable
Original User: MAGISNC

Solved it finally, just wanted to share solution with other people who might have the same problem.

In fact the Add-In solution source code contains a Viewer template named GoToCoordinates and the GoToCoordinates.AddIn project itself.

Do not use the GoToCoordinates Viewer template provided as it contains old libraries (.dll) in its Viewer.xap file.
When you compile the Add-In, compilation process of the addin uses the fresh 3.1 librairies in the "ArcGIS API 3.1 for Silverlight" you just downloaded. But the viewer will still use the old librairies of its .xap file.
This will make your solution unusable in Visual Studio 2012.

Start from a new ESRI silverlight template (ArcGIS Extensibility SDK for Silverlight 3.1) and compile it. This new compiled viewer will use the same librairies as the Add-In does. Replace the GoToCoordinates Viewer template files by the new template you compiled.

View solution in original post

0 Kudos
1 Reply
by Anonymous User
Not applicable
Original User: MAGISNC

Solved it finally, just wanted to share solution with other people who might have the same problem.

In fact the Add-In solution source code contains a Viewer template named GoToCoordinates and the GoToCoordinates.AddIn project itself.

Do not use the GoToCoordinates Viewer template provided as it contains old libraries (.dll) in its Viewer.xap file.
When you compile the Add-In, compilation process of the addin uses the fresh 3.1 librairies in the "ArcGIS API 3.1 for Silverlight" you just downloaded. But the viewer will still use the old librairies of its .xap file.
This will make your solution unusable in Visual Studio 2012.

Start from a new ESRI silverlight template (ArcGIS Extensibility SDK for Silverlight 3.1) and compile it. This new compiled viewer will use the same librairies as the Add-In does. Replace the GoToCoordinates Viewer template files by the new template you compiled.
0 Kudos