Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I create a windows forms project using .NET Core?

I'm migrating my project from .net Framework pro .net core.

I installed Visual Studio Community 2019 and .net core packages (Including .net core 3.0).

Error Message

I have already followed the guidelines outlined but the selection I am oriented to do simply does not exist in Visual Studio Community 2019:

instructions

I did it in 2017, but the problem was not solved.

VS 2017


I also tried to create the form through the command:

dotnet new winforms -o FormCore

The project is created, but I can not open it. I have the error message:

The project file is incomplete. Expected imports are missing

I've already tried installing Visual Studio Community 2019. The problem persists.

If anyone can help me with the solution to this problem, thank you very much.

like image 683
Thiago Soares Mota Avatar asked Jan 01 '26 03:01

Thiago Soares Mota


1 Answers

Are you using the preview version of visual studio 2019? To be able to open winforms projects with .NET Core you have to have the preview version of it. The release version doesn't have support for desktop development in .net core 3.0

You should also enable the preview development with Visual Studio, to do it you should go to

Tools → Options → Projects and Solutions → .NET Core and check Use preview versions of the .NET Core SDK

Or depending on your vs version preview version in could be located in:

Tools → Options → Environment → Use preview versions of the .NET Core SDK

like image 118
carlos chourio Avatar answered Jan 05 '26 01:01

carlos chourio



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!