Note that there are some explanatory texts on larger screens.

plurals
  1. POType or namespace name could not be found
    primarykey
    data
    text
    <p>I am working on a desktop application for which I need to load the assembly and execute it in different appdomain.</p> <p>For loading the assembly I have written as:</p> <pre><code>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&lt;string&gt; assemblyNames = new List&lt;string&gt;(); Assembly[] oAssemblies = new Assembly[args.Length]; for (int assemblyCount = 0; assemblyCount &lt; 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()); } } </code></pre> <p>but <code>typeof(IMFDBAnalyserPlugin))</code> is showing a namespace error.</p> <p>IMFDBAnalyserPlugin is the interface class in my program as:</p> <pre><code>using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace MFDBAnalyser { public interface IMFDBAnalyserPlugin { void ExecutePlugin(); } } </code></pre> <p>What might be the problem?? Can anyone help me out!!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload