You can just copy the sources from FastColoredTextBox
(except FastColoredTextBox.csproj and FastColoredTextBox.resx)
and it works with .NET 6
A quick test =>
FastColoredTextBox fctb = null;
private void Form1_Load(object sender, EventArgs e)
{
fctb = new FastColoredTextBox();
fctb.Location = new System.Drawing.Point(10, 10);
fctb.Size = new System.Drawing.Size(300, 300);
fctb.BorderStyle = BorderStyle.FixedSingle;
fctb.Language = Language.CSharp;
fctb.WordWrap = true;
fctb.WordWrapMode = WordWrapMode.CharWrapControlWidth;
fctb.Text = @"public Form1()
{
// Test comment
InitializeComponent();
}
";
Controls.Add(fctb);
}