Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3395412
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:17:13+00:00 2026-05-18T04:17:13+00:00

I am working on a desktop application for which I need to load the

  • 0

I am working on a desktop application for which I need to load the assembly and execute it in different appdomain.

For loading the assembly I have written as:

public static DataTable GetAllPluginNames(string[] args)
{
        SqlConnection sConnection = new SqlConnection(ConfigurationSettings.AppSettings["ConnectionString"]);

        //ToDo: create a table of one column - only name of the plugin and return that.
        //ToDo: refer the code from MFAssemblyValidator from MFPluggerService.

        DataTable dt = null;
        List<string> assemblyNames = new List<string>();
        Assembly[] oAssemblies = new Assembly[args.Length];

        for (int assemblyCount = 0; assemblyCount < args.Length; assemblyCount++)
        {
            oAssemblies[assemblyCount] = Assembly.LoadFile(args[assemblyCount]);

            try
            {
                foreach (Type oType in oAssemblies[assemblyCount].GetTypes())
                {
                    // Check whether class is inheriting from IMFDBAnalyserPlugin.
                    if (oType.GetInterface("IMFDBAnalyserPlugin") == typeof(IMFDBAnalyserPlugin))
                    {
                        assemblyNames.Add(args[assemblyCount].Substring(args[assemblyCount].LastIndexOf("\\") + 1));
                    }
                }
                 return dt;
            }
            catch (Exception ex) 
            {
                lblError.Text = "ERROR";
            }


        // Passing data one application domain to another.
        AppDomain.CurrentDomain.SetData("AssemblyNames", assemblyNames.ToArray());
      }
}

but typeof(IMFDBAnalyserPlugin)) is showing a namespace error.

IMFDBAnalyserPlugin is the interface class in my program as:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MFDBAnalyser
{
    public interface IMFDBAnalyserPlugin
    {
        void ExecutePlugin();
    }
}

What might be the problem??
Can anyone help me out!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T04:17:14+00:00Added an answer on May 18, 2026 at 4:17 am

    Is the GetAllPluginNames method located under the same namespace as the interface IMFDBAnalyserPlugin?

    If not, you either need to add a using directive to the top of the code file that contains the GetAllPluginNames method, or fully qualify the interface reference with its namespace, i.e.

    if (oType.GetInterface("MFDBAnalyser.IMFDBAnalyserPlugin") == typeof(MFDBAnalyser.IMFDBAnalyserPlugin))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently working on desktop application which calls third party API. After authorizing against
Currently i am working on a desktop application which consists mathematical analysiss.I am using
I am working on a small AIR desktop application and I have some configuration
I am working on a desktop application which uses JavaDB. I am using NetBeans
I am working on a desktop application in PyGTK and seem to be bumping
I am working on designing and building a desktop application. I am thinking about
I'm working on an ASP.NET website which targets desktop browsers. We want to enable
I have a desktop application that will 'sync' with an iPhone application. The sync
I need to develop a small-medium sized desktop GUI application, preferably with Python as
I am working in a desktop application. In my application i am performing login

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.