Reputation: 253
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).
I have already followed the guidelines outlined but the selection I am oriented to do simply does not exist in Visual Studio Community 2019:
I did it in 2017, but the problem was not solved.
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.
Upvotes: 3
Views: 1663
Reputation: 873
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
Upvotes: 6