You are here: > ESRI Forums > arcgis explorer discussion forums > Thread Replies

ArcGIS Explorer Discussion Forums

ArcGIS Explorer: SDK Developers forum

referencing external assembies   Phil Townsend Apr 21, 2008
Re: referencing external assembies   Kent Riggins May 06, 2008
Re: referencing external assembies   Simon Fisher Mar 04, 2009
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject referencing external assembies 
Author Phil Townsend 
Date Apr 21, 2008 
Message I am developing a custom task that will hopefully have the ability to respond to an external event. When the task loads, hopefully it will be able to listen for events and respond by adding points to the map.

I have referenced some external assemblies and this apparently causes the task to fail when loading. The error message states that the referenced assembly could not be found. The referenced assemblies are other projects within the same solution. I have tried referencing the project, as well as the actual compiled DLLs with the same results.

Any ideas as to why this my be occuring? Thanks! 
 
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration;
using System.Drawing;
using System.Data;
using System.IO;
using System.Runtime.Remoting;
using System.Text;
using System.Windows.Forms;
using System.Xml;

using ESRI.ArcGIS.E2API;
using RemoteEvents;
using EventListener;

namespace ShowDetection
{
    public partial class ShowIncidentsTask : UserControl
    {
        private const string _coordFormat = "#,##0.0000";
        private CustomTaskUI _taskUI = null;

        RemoteEvents.RemoteObj remoteObj;
        EventListener.EventListener listener;

        public ShowIncidentsTask(CustomTaskUI taskUI)
        {
            try
            {
                _taskUI = taskUI;

            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine("ERROR >> " + ex.Message);
            }
            
            InitializeComponent();
        }


        private void ShowIncidentsTask_Load(object sender, EventArgs e)
        {
            // create the remote object and remotable listener
            string configFile = @"C:\Projects\DFFPPortal\ArcTasks\ShowDetection\ShowIncidentsTask.config";
            RemotingConfiguration.Configure(configFile, false);
            
            // TASK FAILS HERE
            remoteObj = new RemoteEvents.RemoteObj();
            listener = new EventListener.EventListener();
        } 
}
 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: referencing external assembies 
Author Kent Riggins 
Date May 06, 2008 
Message Hi,
During development the last step of the build for a task is to copy the Task.DLL to "C:\Documents and Settings\YOURUSERNAME\Application Data\ESRI\ArcGIS Explorer\Tasks\YOURTASKNAME".

The task is then run from that task directory.

All of the DLL's in your project are not copied there, just the one for the task. So during development you need to figure out a way to do this for the support DLL's of your project. You could copy them yourself (very tedious) or you could write a Batch file to do it and add the batch file to the final step of the build process.

Finally, when you deploy your task you are going to have a similar problem. ESRI created a way to deliver tasks by Zip file.
Read this blog post http://blogs.esri.com/Info/blogs/arcgisexplorerblog/archive/2008/02/11/deploying-custom-tasks-with-supporting-files.aspx

Also, my "Show Result Table Task" is delivered this way. See http://boohoo.us/MyToys/tabid/122/Default.aspx

Hope thi shelps,
Kent
 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: referencing external assembies 
Author Simon Fisher 
Date Mar 04, 2009 
Message Phil,

I am trying to do something similar to you where ArcGIS Explorer responds to external calls from another .Net application. I have been looking at using .Net remoting, Windows messaging, and a few other methods. So far windows messaging works for outgoing calls from ArcGIS Explorer to an external app, but it cannot respond to incoming calls for some reason.

The external dlls you are using (RemoteEvents and EventListener), are these 3rd party dlls or open source components? Did they work well for you, or did you end up using a different method.

Thanks for the help,
Simon