NUnit AppDomainUnloadedException and a feature request

Nov 9, 2010 at 4:45 PM

I have just started investigating using CassiniDev as a replacement for the built-in WebDev server for use in a CI environment for some integration tests I'd like to run. However, I'm having some difficulty with an AppDomainUnloadedException when running my tests under NUnit. I'm using the in-proc library at the moment. Apparently, this is a well-known issue, and there was an attempt at a fix early this year, which was promptly backed out a couple of days later. The comments from the rollback seem to indicate that using the out-of-process server is the best approach for me to use to avoid the exception. Is that the case? Are there any implications of using the out-of-process version that I need to be aware of?

Also, would it be possible to get an overload of CassiniDevServer.StartServer (and CassiniDevServerOP.StartServer) that takes two string arguments, a physical path and a virtual path? I want to use the automatic port and host name assignment, but with a specific virtual directory, and none of the existing overloads support this. I've added it to my locally downloaded snapshot of the source code (I'm using AnyCPU, so I have to build myself), but surely I can't be the only person who'd find that overload useful.

Dec 31, 2010 at 1:58 PM

Is this issue fixed in the latest version?  I think that I am also getting an AppDomainUnloadedException when running my tests under NUnit.  Using the using the out-of-process server is not an option for me becuase I am using a code coverage tool that picks up my system tests automatically when I run the site in-process.  I am getting intermittent error messages relating to the unloading of the AppDomain so I am wondering if CassiniDev might be where these are coming from.

Mar 12, 2011 at 1:25 AM

@all - yes is an artifact of running in nunit's test runner. the behaviour of that runner seems to be a bit different than most others such as R#, DevExpress and  


I realize that the nunit runner is quite common but to date have not realized a clean solution to the issue. The AppDomain is not directly managed by Cassini(dev) but some attention should be devoted to finding a solution. Will reply here when/if there is progress.

Mar 21, 2011 at 2:59 AM

guys, both the fix and the overload are in the latest source push. please let me know if it solves your problems. Will publish binaries later this month.

Mar 21, 2011 at 9:34 AM

It appears that I was onto this issue early in 2010 but backed the fix out for some odd reason. After a lot of examination and regression testing I have restored the fix and it seems to resolve the issues. pull and build the last commit and let me know how it works out for ya.

Nov 17, 2012 at 3:40 PM

Has this been fixed been release? I'm having the same issue when using