# Using Records in .NET Framework Records require .NET 5+ due to an empty class defined in `System.Runtime.CompilerServices` which is used by the compiler. If you simply include it everything works as expected. ```csharp namespace System.Runtime.CompilerServices; internal sealed class RequiredMemberAttribute : Attribute { } public sealed class CompilerFeatureRequiredAttribute : Attribute { public CompilerFeatureRequiredAttribute(string featureName) { FeatureName = featureName; } public string FeatureName { get; } public bool IsOptional { get; init; } public const string RefStructs = nameof(RefStructs); public const string RequiredMembers = nameof(RequiredMembers); } public static class IsExternalInit { } ``` This is a solution for `The predefined type 'System.Runtime.CompilerServices.IsExternalInit' must be defined or imported in order to declare init-only setter` and `[CS0656] Missing compiler required member 'System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute..ctor` errors.