Search code examples
winformsvisual-studio-2017asp.net-core-3.0

Create a WinForm project based on .net core 3


I am trying to figure out what I am missing here, must be something quite obvious but I am unable to see it.

what I am trying to achieve is to have a working solution/project of WinForms app based on .net core 3. it might be too early to look into it as they just announced it but still why not if we can. here are steps I've done so far:

  1. create a blank solution
  2. run the ".net new winforms" command
  3. attempt to add the generated project to the solution.

i'm getting the error: Project File is incomplete. Expected imports are missing.

here is the output of the CLI:

    Package Manager Console Host Version 4.9.2.5706

Type 'get-help NuGet' to see all available NuGet commands.

PM> dotnet --list-sdks
2.1.202 [C:\Program Files\dotnet\sdk]
2.1.502 [C:\Program Files\dotnet\sdk]
2.2.105 [C:\Program Files\dotnet\sdk]
3.0.100-preview3-010431 [C:\Program Files\dotnet\sdk]
PM> dotnet new winforms
The template "Windows Forms Application" was created successfully.

Processing post-creation actions...
Running 'dotnet restore' on C:\DevProjects\winformscore3\winformscore3.csproj...
  Persisting no-op dg to C:\DevProjects\winformscore3\obj\winformscore3.csproj.nuget.dgspec.json
  Restore completed in 113.9 ms for C:\DevProjects\winformscore3\winformscore3.csproj.

Restore succeeded.

PM>

Solution

  • https://dotnet.microsoft.com/download/dotnet-core/3.0

    "To use .NET Core 3.0 with Visual Studio, you'll need Visual Studio 2019 Preview."