Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

<gcServer> Element 

Specifies whether the common language runtime runs server garbage collection.


The following sections describe attributes, child elements, and parent elements.


Attribute Description


Required attribute.

Specifies whether the runtime runs server garbage collection.

Enabled Attribute

Value Description


Does not run server garbage collection. This is the default.


Runs server garbage collection.

Child Elements


Parent Elements

Element Description


The root element in every configuration file used by the common language runtime and .NET Framework applications.


Contains information about assembly binding and garbage collection.

There are only two garbage collection options, workstation or server. For single-processor computers, the default workstation garbage collection should be the fastest option. Either workstation or server can be used for two-processor computers. Server garbage collection should be the fastest option for more than two processors. Use the System.Runtime.GCSettings.IsServerGC property to determine if server garbage collection is enabled.

This element can be used only in the application configuration file.

The following example shows how to enable server garbage collection.

      <gcServer enabled="true"/>

Community Additions

© 2015 Microsoft