Skip to content

ufcpp/InternalReservedAttributeGenerator

Repository files navigation

InternalReservedAttributeGenerator

A C# Source Generator for generating C# reserved attributes with internal accessibility.

see also: https://github.com/ufcpp/InternalReservedAttributeContent

Some C# features depend on attributes and modifiers but these can be internal. For instance, you may get CS0518 "Predefined type 'System.Runtime.CompilerServices.IsExternalInit' is not defined or imported" errors when using records (C# 9.0 feature) and you can avoid this error by adding the IsExternalInit class internally in your project.

namespace System.Runtime.CompilerServices
{
    internal sealed class IsExternalInit { }
}

The InternalReservedAttributeGenerator automatically generates these attributes and modifiers:

NuGet

NuGet

About

A C# Source Generator for generating C# reserved attributes with internal accessibility.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 2

  •  
  •  

Languages