AppDomain not working for Extension of Visual Studio

  • Thread starter Thread starter vaira20ster
  • Start date Start date
V

vaira20ster

Guest
I have developed an extension for Visual Studio. And in my extension code, I am trying to load a dll into my own new AppDomain. Below is the code which I am trying.


AppDomainSetup setupInfo = new AppDomainSetup();
info.ApplicationBase = @"C:\Users\xxx\AppData\Local\Microsoft\VisualStudio\15.0_60bdd44eExp\Extensions\National Instruments\Project1\1.0\";
appDomain = AppDomain.CreateDomain("mydomain", null, setupInfo);
var someclassObj1 = (someclass)appDomain.CreateInstanceAndUnwrap(Assembly.GetExecutingAssembly().FullName, typeof(someclass).FullName);
var returnValue = someclassObj.getsomething();


I am getting "Unable to cast transparent proxy to type 'Project1.Model.someclass'.

what am I missing here.

Continue reading...
 
Back
Top