I migrated my winforms .Net Framework application to .net Core 3.1, but some controls are missing in the toolbox like DataGridView.
Is there a way to activate those missing controls as Microsoft intends to support them later.
I migrated my winforms .Net Framework application to .net Core 3.1, but some controls are missing in the toolbox like DataGridView.
Is there a way to activate those missing controls as Microsoft intends to support them later.
We know that Microsoft Visual Studio Preview 2 with .Net Core 3.1 is missing some Winforms controls like DataGridView, and others. Microsoft is planning to support the missing controls soon.
This simple trick can easily activate all the missing controls to start your Winforms .Net Core 3.1
Before you do these steps, just know that is only confirmed for testing, and not for production yet. one It is confirmed for final production application, I will update the post.
this solution is confirmed for me with .Net Framework 4.8 and .net Core 3.1.
with some steps as following: 1- Create your winofrms .Net Core project. 2- Press on project_name.csproj and change this:
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
to this new one:
<TargetFrameworks>net48;netcoreapp3.1</TargetFrameworks>
3- Then open Program.cs and comment this
Application.SetHighDpiMode(HighDpiMode.SystemAware);
To be like this:
//Application.SetHighDpiMode(HighDpiMode.SystemAware);
this solution will add all the controls. just close the solution and reopen.
4- After you finish your application, just change everything to default again like this:
Press on project_name.csproj and change this:
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
For the program.cs uncomment, even after I rolled back to default, the application give an error for this line, so I keep it commented
Thanks goes for Kirsan
This is not a question, It is a helping post. So please no need to provide answers. Your comments are highly appreciated.