NUnit tests not recognizing gcAllowVeryLargeObjects setting
18:04 12 May 2020

I'm using NUnit 3.12, VS 2019, and .Net 4.6.1.

I'm attempting to set the setting for NUnit tests via the App.config but it doesn't appear to be registering the config change when actually executing the tests.

Here is my App.config for my Test project:


  
    
  

Code that is failing:

[Test]
public void TestLargeAllocation()
{
    var x = new double[18000, 18000];
}

System.OutOfMemoryException Message: "Array dimensions exceeded supported range."

I have verified that the tests.dll.config in the output directory actually contains the config setting:



  
    
    

Any help would be appreciated.

c# .net out-of-memory nunit