0
votes

I am trying to load an assembly to a different AppDomain than that of current one. I was suggested to use AppDomain.CreateDomain method for this. But it seems like the AppDomain class in .NET 4.5 doesn't have CreateDomain() method anymore.

AppDomain newAppDomain = new AppDomain.CreateDomain();

CreateDomain is highlighted in red as intellisense is not suggesting any method. I wonder if there is an alternative way to do this.

1
your code is wrong... is it a typing error?StefanoGermani
I was using 'new', that's the reason for errorVishal Potti

1 Answers

1
votes

CreateDomain needs a name for the new app domain:

AppDomain newAppDomain = AppDomain.CreateDomain("MyNewAppDomain");

See MSDN for more details.