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 6022269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:50:03+00:00 2026-05-23T03:50:03+00:00

Hello I have a main app that is going to have some plugins in

  • 0

Hello
I have a main app that is going to have some plugins in the ./plugin directory.
Every plugin is a .NET dll and should have the namespace “Plugin” and a class “MainClass” implementing the IPlugin interface defined in the main app.
The problem I have is that I don’t know how I could share the same interface across the main app and every plugin without a using reference?

A part of the main app class:

        object oo = Assembly.LoadFile(path).CreateInstance("Plugin.MainClass");
        IPlugin pp = (IPlugin)oo; //Fails if I define the interface in the main app and the plugins

and a part of the first plugin:

namespace Plugin
{
    public class MainClass : IPlugin //I cannot reference the interface in the main app?
    {
       public string getName()
       {
          return "Plugin 1";
       }
    }
}
  • 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-23T03:50:04+00:00Added an answer on May 23, 2026 at 3:50 am

    You are correct in that to use an interface (or class, struct etc…) you must reference that assembly. If you do not wish to have your plugins reference the main application (which makes sense) Why not add a new assembly for this purpose? Calling it ‘framework’ or ‘util’.

    E.G

    Framework Assembly
     - IPlugin
    
    PluginOne Assembly (references Framework)
     - PluginOne : IPlugin
    
    Main App Exe (references PluginOne & Framework assemblies)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have simple java app that prints `hello world!' on console. It is packed
I have a file called hellowf.cs class MyFirstApp { static void Main() { System.Windows.Forms.MessageBox.Show(Hello,
Imagine I have the following: inFile = /adda/adas/sdas/hello.txt # that instruction give me hello.txt
I'm just starting iPhone development (coming fron a .Net world) and have been going
I used to think that an assembly could have only one main() method until
I'm trying to create a simple Java app that uses JNI to call some
I have a main menu screen with a simple ListView that contains links to
I am developing an Android App that gets some data from a web server,
Hello I have in my app a modal view controller which when a certain
I have a simple IronPython script: # Foo.py import os def main(): print( Hello

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.