Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the available runtime settings for app.config files in .NET?

In the app.config file of a .NET application there is a <runtime> element that allows you to configure various behaviours of the CLR, usually for backwards compatibility with legacy behaviours.

For example:

<configuration>
    <runtime>
        <legacyUnhandledExceptionPolicy enabled="true"/> <!-- .NET 2 -->
        <legacyCorruptedStateExceptionsPolicy enabled="true"/> <!-- .NET 4 -->
    </runtime>
</configuration>

I have come across a handful of these settings, and was hoping to find comprehensive documentation of all available settings on MSDN so I can see what else is available. However, I've been unable to find any central listing of all available runtime configuration settings, and the app.config schema is no help either, because the <runtime> element is specified as 'anything goes' (in order to be future-proof, I guess).

Can someone point me in the direction of some central documentation, preferably on MSDN, that lists all available settings for the runtime element in app.config, preferably including .NET 4.0?

like image 519
Daniel Fortunov Avatar asked Jan 24 '23 13:01

Daniel Fortunov


1 Answers

Well, I find this in MSDN:

<runtime> Element, Framework 1.1

<runtime> Element, Framework 2.0

<runtime> Element, Framework 3.0

<runtime> Element, Framework 3.5

<runtime> Element, Framework 4.0

No guarantees that it's complete, and I don't see legacyUnhandledExceptionPolicy anywhere, but I think it's as close to official as you're going to get.

like image 88
Michael Petrotta Avatar answered May 12 '23 07:05

Michael Petrotta