Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I enable Server GC in .NET Core?

Tags:

I have a .NET Core app (MyApp.exe) developed in VS2017 running on the 1.0.4 version of the SDK. I have tried adding an App.config with the following entries:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <runtime>
    <gcServer enabled="true"/>
  </runtime>
</configuration>

Which on build is renamed to: MyApp.config.

But this does not change the GC mode; Any ideas?

like image 253
MaYaN Avatar asked May 17 '17 21:05

MaYaN


1 Answers

Based on this source, you do that via the csproj:

<PropertyGroup>
  <ServerGarbageCollection>true</ServerGarbageCollection>
</PropertyGroup>
like image 151
Marc Gravell Avatar answered Sep 21 '22 18:09

Marc Gravell