tagged [appdomain]

Loading multiple versions of the same assembly

Loading multiple versions of the same assembly I'm working with a third-party assembly and unfortunately I now need to load their latest and a previous version into my project so at runtime I can deci...

Best evidence to offer a sandboxed appdomain for a C# evaluator

Best evidence to offer a sandboxed appdomain for a C# evaluator I have a c# evaluator which uses the (I think) the .Net 4 new simplified sandboxed appdomain model to host the c# assembly, with remotin...

10 May at 22:3

Static Variable Instances and AppDomains, what is happening?

Static Variable Instances and AppDomains, what is happening? I have ``` public static class A { public static string ConnString; } [Serializable] public class Test{ // Accesing A's field; public st...

21 Mar at 15:29

Unable to cast transparent proxy to type from AppDomain

Unable to cast transparent proxy to type from AppDomain I'm trying to create an object in an appdomain: However, I always get the following error: I'm running on .NET 4.0, not Mono, despite what the n...

7 Sep at 03:7

Load Assembly in New AppDomain without loading it in Parent AppDomain

Load Assembly in New AppDomain without loading it in Parent AppDomain I am attempting to load a dll into a console app and then unload it and delete the file completely. The problem I am having is tha...

26 Apr at 16:30

How do I get stdout into mstest output when running in new app domain?

How do I get stdout into mstest output when running in new app domain? I have been working on test framework, which creates a new app domain to run the tests in. The primary reason being the dll's tha...

8 Mar at 11:10

Running NUnit through Resharper 8 tests fail when crossing between projects due to AppDomain

Running NUnit through Resharper 8 tests fail when crossing between projects due to AppDomain I recently updated to Resharper 8, and when I tried to run a suite of projects. These tests contain two sui...

dealing with an unmanaged dll with a memory leak

dealing with an unmanaged dll with a memory leak I have a c# application that depends on a third-party unmanaged assembly to access certain hardware. The unmanaged code has a memory leak that will inc...

AppDomain and MarshalByRefObject life time : how to avoid RemotingException?

AppDomain and MarshalByRefObject life time : how to avoid RemotingException? When a MarshalByRef object is passed from an AppDomain (1) to another (2), if you wait 6 mins before calling a method on it...

How to Load an Assembly to AppDomain with all references recursively?

How to Load an Assembly to AppDomain with all references recursively? I want to load to a new `AppDomain` some assembly which has a complex references tree (MyDll.dll -> Microsoft.Office.Interop.Excel...

Runtime callable wrapper (RCW) scope - process or application domain?

Runtime callable wrapper (RCW) scope - process or application domain? What is the scope of Runtime Callable Wrapper (RCW), when referencing unmanaged COM objects? According to the docs: > The runtime ...

MEF and ShadowCopying DLLs so that I can overwrite them at runtime

MEF and ShadowCopying DLLs so that I can overwrite them at runtime I am trying to stop my application locking DLLs in my MEF plugin directory so that I can overwrite the assemblies at runtime (note I'...

1 Oct at 18:48

Seeking alternative to AppDomain.CreateDomain(string, evidence) due to obsolete CAS policy

Seeking alternative to AppDomain.CreateDomain(string, evidence) due to obsolete CAS policy I am working through the Microsoft .Net Framework--Application Development Foundation Training Kit book Chapt...

How do I pass CancellationToken across AppDomain boundary?

How do I pass CancellationToken across AppDomain boundary? I have a command object, doing work based on a request from a request queue. This particular command will execute its work in a child appdoma...

1 Mar at 02:2

AppDomain.CreateInstanceFromAndUnwrap - Unable to cast transparent proxy

AppDomain.CreateInstanceFromAndUnwrap - Unable to cast transparent proxy I'm writing a .NET library to inject managed DLLs into external processes. My current approach is: 1. Use CreateRemoteThread to...

17 Sep at 10:0

How to force a MSTEST TestMethod to reset all singletons/statics before running?

How to force a MSTEST TestMethod to reset all singletons/statics before running? I'm using MSTEST inside Visual Studio 2008. How can I have each unit test method in a certain test class act as if it w...

Deadlock when combining app domain remoting and tasks

Deadlock when combining app domain remoting and tasks My app needs to load plugins into separate app domains and then execute some code inside of them asynchronously. I've written some code to wrap `T...

What is the minimum Cross AppDomain communication performance penalty?

What is the minimum Cross AppDomain communication performance penalty? I am trying to minimize the performance penalty of communicating across AppDomains in the same machine. In my toy example, Class ...

11 Mar at 12:20

How to detect when application terminates?

How to detect when application terminates? This is a follow up to my [initial question](https://stackoverflow.com/questions/1368697/how-to-detect-when-main-thread-terminates) and I would like to prese...

23 May at 10:30

How can I prevent CompileAssemblyFromSource from leaking memory?

How can I prevent CompileAssemblyFromSource from leaking memory? I have some C# code which is using CSharpCodeProvider.CompileAssemblyFromSource to create an assembly in memory. After the assembly has...

In .NET 4.0, how do I 'sandbox' an in-memory assembly and execute a method?

In .NET 4.0, how do I 'sandbox' an in-memory assembly and execute a method? Here is the reason why this question was being asked: [www.devplusplus.com/Tests/CSharp/Hello_World](http://www.devplusplus....

15 Nov at 03:39

How to avoid SerializationException: Type is not resolved for member XXX when testing a component that uses the LogicalCallContext

How to avoid SerializationException: Type is not resolved for member XXX when testing a component that uses the LogicalCallContext I've recently started hitting the following exception in my unit test...

Ignore exceptions that cross AppDomains when debugging in Visual Studio 2010

Ignore exceptions that cross AppDomains when debugging in Visual Studio 2010 I'm having problems with debugging an application that calls out to another AppDomain, because if an exception occurs in wh...

27 Oct at 12:34

Force unloading of DLL from assembly

Force unloading of DLL from assembly I am attempting to unload a misbehaving third-party DLL from my .NET process, as it seems to be causing a problem which is always resolved by restarting my applica...

22 Apr at 05:41

FileNotFound when load assembly with dependency to another domain

FileNotFound when load assembly with dependency to another domain I'm trying to make application with plugins. I have MainLib.dll, where I made some commnon interface(let it be `ICommon`) with 1 metho...

23 May at 12:10