ASPRUNTIME: The application domain in which the th

2019-05-08 23:28发布

问题:

We're running Jekins which kicks off a gulp build process. As part of the gulp build process we trigger an msbuild task.

Every second build fails with the message:

ASPNETCOMPILER : error ASPRUNTIME: The application domain in which the thread was running has been unloaded.

This happens exactly every other build no matter the time span between builds. (i.e. Builds, Fails, Builds, Fails).

Any ideas on what might be causing this and why it happens only every other build?

回答1:

I also had this problem on a machine with enough memory. Turns out the problem was due to the target folder being Compressed using NTFS compression.

Once compression was disabled it started working without problems.

I saw that this could be a problem here.



回答2:

We solved this problem by allocating more memory to the build machine.



回答3:

A little late to the party but for googlers: I had a similar problem when doing a build in visual studio. Turns out Dropbox was locking the compiled dlls. Once I'd excluded the bin directories (did obj directories too for good measure) the problem went away. This may also be the case for antivirus/antimalware programs too.