Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@

This property represents an entity member name, not the name of a corresponding data field. Therefore, this name is not localized. It should be set only for property or parameter contexts.

In .NET Framework 4.7.2 and earlier versions, when using a custom <xref:System.ComponentModel.DataAnnotations.ValidationAttribute?displayProperty=nameWithType>, the `MemberName` property returns `null`. Starting with .NET Framework 4.8, the property returns the member name. To restore the previous behavior, you can add the following setting to your app config file:
In .NET Framework 4.7.2 and earlier versions, when using a custom <xref:System.ComponentModel.DataAnnotations.ValidationAttribute?displayProperty=nameWithType>, the `MemberName` property returns `null`. Starting with [.NET Framework October 2019 Preview of Quality Rollup](https://devblogs.microsoft.com/dotnet/net-framework-october-2019-preview-of-quality-rollup/) for .NET Framework 4.8, the property returns the member name if you add the following setting to your *web.config* file:

```xml
<configuration>
Expand All @@ -368,6 +368,10 @@ In .NET Framework 4.7.2 and earlier versions, when using a custom <xref:System.C
</configuration>
```

Without this setting, this property returns `null` with .NET Framework October 2019 Preview of Quality Rollup or later versions.

In .NET Framework 4.8 version prior to the October 2019 update, this property returns member name without the configuration setting. If you change your *web.config* file as shown in the previous example, the property returns `null`.

]]></format>
</remarks>
</Docs>
Expand Down