Open davkean opened 6 years ago
From @Pilchie on October 17, 2017 17:49
Seems like we would need to transform this into an app.config for net4x
?
I'm running ASP.NET Core 2.0.1 with .NET 4.7.1 and for now I just add App.config with these settings:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<gcServer enabled="true" />
</runtime>
</configuration>
GCSettings.IsServerGC is now set to true.
Would be nice if I did not have to do this and this was auto configured (and respected) via ServerGarbageCollection in csproj file ...
👍 Experiencing for net45+
also experiencing for net461.
specifying in web.config did not help.
I experienced this while upgrading a project; and it was caused by previous runtimeConfig.json files being present without the setting. Deleting the output artifacts in bin/Release/netcoreapp2.0 and rebuilding caused this issue to go away for me on SDK .Net Core 2.1.401 / macOS latest / targeting net471+netcoreapp2.0.
Due to lack of recent activity, this issue has been labeled as 'stale'. It will be closed if no further activity occurs within 30 more days. Any new comment will remove the label.
This isn't stale per se - it's a valid feature request - we just haven't gotten to it and likely won't prioritize it because it only impacts .NET Framework.
From @Tornhoof on October 17, 2017 7:58
The setting server garbage collection in the new SDK project format is not honored for TargetFramework net47, it works for netcoreapp 2.0
Steps to repreoduce
Expected result
Server: True, Mode: Interactive
Actual result
Server: False, Mode: Interactive
Note: if you multi target the project with
<TargetFrameworks>net47;netcoreapp2.0</TargetFrameworks
you can see that the setting is properly used in .net core 2.0This bug is kinda annoying since it means my Web App for ASP.NET Core 2.0 on .NET 4.7 is running on workstation GC and not on server background gc as it's usually done.
All my attempts to
set complus_gcServer=true
didn't make any difference.Repro: ServerGcRepro.zip
For reference:
VS version is VS 2017 15.4.0
Copied from original issue: dotnet/project-system#2896