How to enable GC server in .NET Core?

I have a .NET Core application (MyApp.exe) developed in VS2017 running in SDK version 1.0.4 . I tried adding App.configwith the following data:

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

Which of the assembly is renamed to: MyApp.config.

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

+4
source share
1 answer

Based on this source , you do this through csproj:

<PropertyGroup>
  <ServerGarbageCollection>true</ServerGarbageCollection>
</PropertyGroup>
+10
source

Source: https://habr.com/ru/post/1677393/


All Articles