Installation
Adding a DXFReader.NET component to a .NET 8 or higher project
Unfortunately, it is not possible to add the DXFReaderNETControl component to the Toolbox palette when developing a project targeting .NET 8 or higher. If you attempt to reference this component in the Toolbox, it will appear grayed out, as illustrated in the image below:
The inability to add a .NET 4.8 component to a .NET 8 Toolbox arises from fundamental differences in the runtime and framework compatibility between .NET Framework (used by .NET 4.8) and .NET 8, which is part of the .NET Core/.NET ecosystem.
There is a simple workaround:
Start a new .NET 8 or higher project:
Right click on "Dependencies" line on "Soultion Explorer":
Browse and add the DXFReaderNET dll:
Open the "Form1.Designer.cs" file and add the code lines showed below:
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Text = "Form1";
//Add the following 2 lines
dxfReaderNETControl1 = new DXFReaderNET.DXFReaderNETControl();
Controls.Add(dxfReaderNETControl1);
}
#endregion
//Add the following line
private DXFReaderNET.DXFReaderNETControl dxfReaderNETControl1;
You wiil find the DXFReaderNET Component on the Form1:
You can change initial properties of the control directly on the properties window:
You can easily add new instances of the control by simply copying and pasting it.