dotnet / sdk

Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
https://dot.net/core
MIT License
2.7k stars 1.06k forks source link

net5.0 or netcoreapp5.0? #13295

Closed ndepend closed 4 years ago

ndepend commented 4 years ago

I am working with VS2019 16.6.5 and runtime 5.0.0-preview.8 (both updated to latest available today)  

It seems to me that in .csproj I should have <TargetFramework>**net5.0**</TargetFramework>   and not <TargetFramework>**netcoreapp5.0**</TargetFramework>  

However for projects of kind Blazor AspNetCore and WindowsDesktop (both WPF and Winforms) I have netcoreapp5.0 only for Console project I have net5.0

It seems related to this closed issue

net5_0_console

netcoreapp5_0_blazor_bug

netcoreapp5_0_bug

sfoslund commented 4 years ago

@pranavkm I assume the blazor templates just haven't been updated yet? Is that work being tracked?

pranavkm commented 4 years ago

That's strange, I don't see that in our preview8 (or later templates). @psmacchia could you try running dotnet new -u? It should tell you what templates you have installed. It might gives us hints if something's amiss.

ndepend commented 4 years ago

@pranavkm Here is the result:


C:\Program Files (x86)\Microsoft Visual Studio\2019\Community>dotnet new -u
Template Instantiation Commands for .NET Core CLI

Currently installed items:
  Microsoft.DotNet.Common.ProjectTemplates.3.0
    Details:
      NuGetPackageId: Microsoft.DotNet.Common.ProjectTemplates.3.0
      Version: 2.0.0-preview8.19373.1
      Author: Microsoft
    Templates:
      Class library (classlib) C#
      Class library (classlib) F#
      Class library (classlib) VB
      Console Application (console) C#
      Console Application (console) F#
      Console Application (console) VB
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Common.ProjectTemplates.3.0

  Microsoft.DotNet.Common.ProjectTemplates.2.1
    Details:
      NuGetPackageId: Microsoft.DotNet.Common.ProjectTemplates.2.1
      Version: 1.0.2-beta3
      Author: Microsoft
    Templates:
      Class library (classlib) C#
      Class library (classlib) F#
      Class library (classlib) VB
      Console Application (console) C#
      Console Application (console) F#
      Console Application (console) VB
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Common.ProjectTemplates.2.1

  Microsoft.DotNet.Test.ProjectTemplates.2.1
    Details:
      NuGetPackageId: Microsoft.DotNet.Test.ProjectTemplates.2.1
      Version: 1.0.2-beta4.20105.2
      Author: Microsoft
    Templates:
      Unit Test Project (mstest) C#
      Unit Test Project (mstest) F#
      Unit Test Project (mstest) VB
      xUnit Test Project (xunit) C#
      xUnit Test Project (xunit) F#
      xUnit Test Project (xunit) VB
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Test.ProjectTemplates.2.1

  Microsoft.DotNet.Web.ProjectTemplates.3.0
    Details:
      NuGetPackageId: Microsoft.DotNet.Web.ProjectTemplates.3.0
      Version: 3.0.0
      Author: Microsoft
    Templates:
      Blazor Server App (blazorserver) C#
      ASP.NET Core Empty (web) C#
      ASP.NET Core Empty (web) F#
      ASP.NET Core gRPC Service (grpc) C#
      Razor Class Library (razorclasslib) C#
      ASP.NET Core Web App (webapp) C#
      ASP.NET Core Web App (Model-View-Controller) (mvc) C#
      ASP.NET Core Web App (Model-View-Controller) (mvc) F#
      ASP.NET Core Web API (webapi) C#
      ASP.NET Core Web API (webapi) F#
      Worker Service (worker) C#
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Web.ProjectTemplates.3.0

  Microsoft.DotNet.Web.ProjectTemplates.2.1
    Details:
      NuGetPackageId: Microsoft.DotNet.Web.ProjectTemplates.2.1
      Version: 2.1.14
      Author: Microsoft
    Templates:
      ASP.NET Core Empty (web) C#
      ASP.NET Core Empty (web) F#
      Razor Class Library (razorclasslib) C#
      ASP.NET Core Web App (razor) C#
      ASP.NET Core Web App (Model-View-Controller) (mvc) C#
      ASP.NET Core Web App (Model-View-Controller) (mvc) F#
      ASP.NET Core Web API (webapi) C#
      ASP.NET Core Web API (webapi) F#
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Web.ProjectTemplates.2.1

  Microsoft.DotNet.Web.Spa.ProjectTemplates.2.1
    Details:
      NuGetPackageId: Microsoft.DotNet.Web.Spa.ProjectTemplates.2.1
      Version: 2.1.14
      Author: Microsoft
    Templates:
      ASP.NET Core with Angular (angular) C#
      ASP.NET Core with React.js (react) C#
      ASP.NET Core with React.js and Redux (reactredux) C#
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Web.Spa.ProjectTemplates.2.1

  Microsoft.DotNet.Common.ProjectTemplates.3.1
    Details:
      NuGetPackageId: Microsoft.DotNet.Common.ProjectTemplates.3.1
      Version: 3.1.4
      Author: Microsoft
    Templates:
      Class library (classlib) C#
      Class library (classlib) F#
      Class library (classlib) VB
      Console Application (console) C#
      Console Application (console) F#
      Console Application (console) VB
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Common.ProjectTemplates.3.1

  Microsoft.DotNet.Test.ProjectTemplates.3.0
    Details:
      NuGetPackageId: Microsoft.DotNet.Test.ProjectTemplates.3.0
      Version: 1.0.2-beta4.19354.2
      Author: Microsoft
    Templates:
      Unit Test Project (mstest) C#
      Unit Test Project (mstest) F#
      Unit Test Project (mstest) VB
      xUnit Test Project (xunit) C#
      xUnit Test Project (xunit) F#
      xUnit Test Project (xunit) VB
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Test.ProjectTemplates.3.0

  Microsoft.DotNet.Web.ProjectTemplates.3.1
    Details:
      NuGetPackageId: Microsoft.DotNet.Web.ProjectTemplates.3.1
      Version: 3.1.4
      Author: Microsoft
    Templates:
      Blazor Server App (blazorserver) C#
      ASP.NET Core Empty (web) C#
      ASP.NET Core Empty (web) F#
      ASP.NET Core gRPC Service (grpc) C#
      Razor Class Library (razorclasslib) C#
      ASP.NET Core Web App (webapp) C#
      ASP.NET Core Web App (Model-View-Controller) (mvc) C#
      ASP.NET Core Web App (Model-View-Controller) (mvc) F#
      ASP.NET Core Web API (webapi) C#
      ASP.NET Core Web API (webapi) F#
      Worker Service (worker) C#
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Web.ProjectTemplates.3.1

  Microsoft.DotNet.Web.Spa.ProjectTemplates.3.0
    Details:
      NuGetPackageId: Microsoft.DotNet.Web.Spa.ProjectTemplates.3.0
      Version: 3.0.0
      Author: Microsoft
    Templates:
      ASP.NET Core with Angular (angular) C#
      ASP.NET Core with React.js (react) C#
      ASP.NET Core with React.js and Redux (reactredux) C#
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Web.Spa.ProjectTemplates.3.0

  NUnit3.DotNetNew.Template
    Details:
      NuGetPackageId: NUnit3.DotNetNew.Template
      Version: 1.8.1
      Author: akharlov
    Templates:
      NUnit 3 Test Project (nunit) C#
      NUnit 3 Test Item (nunit-test) C#
      NUnit 3 Test Project (nunit) F#
      NUnit 3 Test Item (nunit-test) F#
      NUnit 3 Test Project (nunit) VB
      NUnit 3 Test Item (nunit-test) VB
    Uninstall Command:
      dotnet new -u NUnit3.DotNetNew.Template

  Microsoft.DotNet.Common.ItemTemplates
    Details:
      NuGetPackageId: Microsoft.DotNet.Common.ItemTemplates
      Version: 5.0.0-preview.4.20221.2
      Author: Microsoft
    Templates:
      dotnet gitignore file (gitignore)
      global.json file (globaljson)
      NuGet Config (nugetconfig)
      Solution File (sln)
      Dotnet local tool manifest file (tool-manifest)
      Web Config (webconfig)
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Common.ItemTemplates

  Microsoft.DotNet.Common.ProjectTemplates.5.0
    Details:
      NuGetPackageId: Microsoft.DotNet.Common.ProjectTemplates.5.0
      Version: 5.0.0-preview.4.20221.2
      Author: Microsoft
    Templates:
      Class library (classlib) C#
      Class library (classlib) F#
      Class library (classlib) VB
      Console Application (console) C#
      Console Application (console) F#
      Console Application (console) VB
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Common.ProjectTemplates.5.0

  Microsoft.DotNet.Test.ProjectTemplates.3.1
    Details:
      NuGetPackageId: Microsoft.DotNet.Test.ProjectTemplates.3.1
      Version: 1.0.2-beta4.20176.1
      Author: Microsoft
    Templates:
      Unit Test Project (mstest) C#
      Unit Test Project (mstest) F#
      Unit Test Project (mstest) VB
      xUnit Test Project (xunit) C#
      xUnit Test Project (xunit) F#
      xUnit Test Project (xunit) VB
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Test.ProjectTemplates.3.1

  Microsoft.DotNet.Web.ProjectTemplates.5.0
    Details:
      NuGetPackageId: Microsoft.DotNet.Web.ProjectTemplates.5.0
      Version: 5.0.0-preview.4.20257.10
      Author: Microsoft
    Templates:
      Blazor Server App (blazorserver) C#
      ASP.NET Core Empty (web) C#
      ASP.NET Core Empty (web) F#
      ASP.NET Core gRPC Service (grpc) C#
      Razor Class Library (razorclasslib) C#
      ASP.NET Core Web App (webapp) C#
      ASP.NET Core Web App (Model-View-Controller) (mvc) C#
      ASP.NET Core Web App (Model-View-Controller) (mvc) F#
      ASP.NET Core Web API (webapi) C#
      ASP.NET Core Web API (webapi) F#
      Worker Service (worker) C#
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Web.ProjectTemplates.5.0

  Microsoft.DotNet.Web.Spa.ProjectTemplates.3.1
    Details:
      NuGetPackageId: Microsoft.DotNet.Web.Spa.ProjectTemplates.3.1
      Version: 3.1.4
      Author: Microsoft
    Templates:
      ASP.NET Core with Angular (angular) C#
      ASP.NET Core with React.js (react) C#
      ASP.NET Core with React.js and Redux (reactredux) C#
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Web.Spa.ProjectTemplates.3.1

  Microsoft.DotNet.Wpf.ProjectTemplates
    Details:
      NuGetPackageId: Microsoft.DotNet.Wpf.ProjectTemplates
      Version: 5.0.0-preview.4.20251.1
      Author: Microsoft
    Templates:
      WPF Application (wpf) C#
      WPF Application (wpf) VB
      WPF Class library (wpflib) C#
      WPF Class library (wpflib) VB
      WPF Custom Control Library (wpfcustomcontrollib) C#
      WPF Custom Control Library (wpfcustomcontrollib) VB
      WPF User Control Library (wpfusercontrollib) C#
      WPF User Control Library (wpfusercontrollib) VB
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Wpf.ProjectTemplates

  Microsoft.DotNet.Test.ProjectTemplates.5.0
    Details:
      NuGetPackageId: Microsoft.DotNet.Test.ProjectTemplates.5.0
      Version: 1.0.2-beta4.20176.1
      Author: Microsoft
    Templates:
      Unit Test Project (mstest) C#
      Unit Test Project (mstest) F#
      Unit Test Project (mstest) VB
      xUnit Test Project (xunit) C#
      xUnit Test Project (xunit) F#
      xUnit Test Project (xunit) VB
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Test.ProjectTemplates.5.0

  Microsoft.DotNet.Web.ItemTemplates
    Details:
      NuGetPackageId: Microsoft.DotNet.Web.ItemTemplates
      Version: 5.0.0-preview.4.20257.10
      Author: Microsoft
    Templates:
      Protocol Buffer File (proto)
      Razor Component (razorcomponent) C#
      Razor Page (page) C#
      MVC ViewImports (viewimports) C#
      MVC ViewStart (viewstart) C#
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Web.ItemTemplates

  Microsoft.DotNet.Web.Spa.ProjectTemplates.5.0
    Details:
      NuGetPackageId: Microsoft.DotNet.Web.Spa.ProjectTemplates.5.0
      Version: 5.0.0-preview.4.20257.10
      Author: Microsoft
    Templates:
      ASP.NET Core with Angular (angular) C#
      ASP.NET Core with React.js (react) C#
      ASP.NET Core with React.js and Redux (reactredux) C#
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Web.Spa.ProjectTemplates.5.0

  Microsoft.Dotnet.WinForms.ProjectTemplates
    Details:
      NuGetPackageId: Microsoft.Dotnet.WinForms.ProjectTemplates
      Version: 5.0.0-preview.4.20251.2
      Author: Microsoft
    Templates:
      Windows Forms (WinForms) Application (winforms) C#
      Windows Forms (WinForms) Application (winforms) VB
      Windows Forms (WinForms) Class library (winformslib) C#
      Windows Forms (WinForms) Class library (winformslib) VB
    Uninstall Command:
      dotnet new -u Microsoft.Dotnet.WinForms.ProjectTemplates

  Microsoft.AspNetCore.Components.WebAssembly.Templates
    Details:
      NuGetPackageId: Microsoft.AspNetCore.Components.WebAssembly.Templates
      Version: 3.2.1
      Author: Microsoft
    Templates:
      Blazor WebAssembly App (blazorwasm) C#
    Uninstall Command:
      dotnet new -u Microsoft.AspNetCore.Components.WebAssembly.Templates
pranavkm commented 4 years ago

Looks like your web project templates are really old:

Microsoft.DotNet.Web.ProjectTemplates.5.0 Details: NuGetPackageId: Microsoft.DotNet.Web.ProjectTemplates.5.0 Version: 5.0.0-preview.4.20257.10

I wonder if it's just a bad installation. Could you try repairing your SDK install? Alternatively you could install manually install the latest SDK.

dotnet new --install Microsoft.DotNet.Web.ProjectTemplates.5.0::5.0.0-preview.8.20414.8

ndepend commented 4 years ago

Thanks I did dotnet new --install Microsoft.DotNet.Web.ProjectTemplates.5.0::5.0.0-preview.8.20414.8 and it worked.

Then I upgraded to latest VS 2019 16.7.2 and I have installed [.NET 5.0 RC1 SDK] and VS 2019 16.7.2 doesn't know anymore about .NET 5.0 projects. I have the target framework net5.0-windows in WindowsForm and WPF projects and I get the error: NETSDK1013 The TargetFramework value 'net5.0-windows' was not recognized. It may be misspelled. If not, then the TargetFrameworkIdentifier and/or TargetFrameworkVersion properties must be specified explicitly

image

I've installed VS2019 16.8.0 Preview3 and can indeed compile such net5.0-windows project. But VS2019 16.7.2 doesn't know about .NET 5.0 despite I installed from https://dotnet.microsoft.com/download/dotnet/5.0 ( Windows 64bits )

image

Here are installed versions:

The system cannot find the path specified.

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community>dotnet new -u
Template Instantiation Commands for .NET Core CLI

Currently installed items:
  Microsoft.DotNet.Common.ProjectTemplates.3.0
    Details:
      NuGetPackageId: Microsoft.DotNet.Common.ProjectTemplates.3.0
      Version: 2.0.0-preview8.19373.1
      Author: Microsoft
    Templates:
      Class library (classlib) C#
      Class library (classlib) F#
      Class library (classlib) VB
      Console Application (console) C#
      Console Application (console) F#
      Console Application (console) VB
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Common.ProjectTemplates.3.0

  Microsoft.DotNet.Common.ProjectTemplates.2.1
    Details:
      NuGetPackageId: Microsoft.DotNet.Common.ProjectTemplates.2.1
      Version: 1.0.2-beta3
      Author: Microsoft
    Templates:
      Class library (classlib) C#
      Class library (classlib) F#
      Class library (classlib) VB
      Console Application (console) C#
      Console Application (console) F#
      Console Application (console) VB
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Common.ProjectTemplates.2.1

  Microsoft.DotNet.Test.ProjectTemplates.2.1
    Details:
      NuGetPackageId: Microsoft.DotNet.Test.ProjectTemplates.2.1
      Version: 1.0.2-beta4.20105.2
      Author: Microsoft
    Templates:
      Unit Test Project (mstest) C#
      Unit Test Project (mstest) F#
      Unit Test Project (mstest) VB
      xUnit Test Project (xunit) C#
      xUnit Test Project (xunit) F#
      xUnit Test Project (xunit) VB
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Test.ProjectTemplates.2.1

  Microsoft.DotNet.Web.ProjectTemplates.3.0
    Details:
      NuGetPackageId: Microsoft.DotNet.Web.ProjectTemplates.3.0
      Version: 3.0.0
      Author: Microsoft
    Templates:
      Blazor Server App (blazorserver) C#
      ASP.NET Core Empty (web) C#
      ASP.NET Core Empty (web) F#
      ASP.NET Core gRPC Service (grpc) C#
      Razor Class Library (razorclasslib) C#
      ASP.NET Core Web App (webapp) C#
      ASP.NET Core Web App (Model-View-Controller) (mvc) C#
      ASP.NET Core Web App (Model-View-Controller) (mvc) F#
      ASP.NET Core Web API (webapi) C#
      ASP.NET Core Web API (webapi) F#
      Worker Service (worker) C#
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Web.ProjectTemplates.3.0

  Microsoft.DotNet.Web.ProjectTemplates.2.1
    Details:
      NuGetPackageId: Microsoft.DotNet.Web.ProjectTemplates.2.1
      Version: 2.1.14
      Author: Microsoft
    Templates:
      ASP.NET Core Empty (web) C#
      ASP.NET Core Empty (web) F#
      Razor Class Library (razorclasslib) C#
      ASP.NET Core Web App (razor) C#
      ASP.NET Core Web App (Model-View-Controller) (mvc) C#
      ASP.NET Core Web App (Model-View-Controller) (mvc) F#
      ASP.NET Core Web API (webapi) C#
      ASP.NET Core Web API (webapi) F#
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Web.ProjectTemplates.2.1

  Microsoft.DotNet.Web.Spa.ProjectTemplates.2.1
    Details:
      NuGetPackageId: Microsoft.DotNet.Web.Spa.ProjectTemplates.2.1
      Version: 2.1.14
      Author: Microsoft
    Templates:
      ASP.NET Core with Angular (angular) C#
      ASP.NET Core with React.js (react) C#
      ASP.NET Core with React.js and Redux (reactredux) C#
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Web.Spa.ProjectTemplates.2.1

  Microsoft.AspNetCore.Components.WebAssembly.Templates
    Details:
      NuGetPackageId: Microsoft.AspNetCore.Components.WebAssembly.Templates
      Version: 3.2.1
      Author: Microsoft
    Templates:
      Blazor WebAssembly App (blazorwasm) C#
    Uninstall Command:
      dotnet new -u Microsoft.AspNetCore.Components.WebAssembly.Templates

  Microsoft.DotNet.Common.ProjectTemplates.3.1
    Details:
      NuGetPackageId: Microsoft.DotNet.Common.ProjectTemplates.3.1
      Version: 3.1.6
      Author: Microsoft
    Templates:
      Class library (classlib) C#
      Class library (classlib) F#
      Class library (classlib) VB
      Console Application (console) C#
      Console Application (console) F#
      Console Application (console) VB
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Common.ProjectTemplates.3.1

  Microsoft.DotNet.Test.ProjectTemplates.3.0
    Details:
      NuGetPackageId: Microsoft.DotNet.Test.ProjectTemplates.3.0
      Version: 1.0.2-beta4.19354.2
      Author: Microsoft
    Templates:
      Unit Test Project (mstest) C#
      Unit Test Project (mstest) F#
      Unit Test Project (mstest) VB
      xUnit Test Project (xunit) C#
      xUnit Test Project (xunit) F#
      xUnit Test Project (xunit) VB
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Test.ProjectTemplates.3.0

  Microsoft.DotNet.Web.ProjectTemplates.3.1
    Details:
      NuGetPackageId: Microsoft.DotNet.Web.ProjectTemplates.3.1
      Version: 3.1.6
      Author: Microsoft
    Templates:
      Blazor Server App (blazorserver) C#
      ASP.NET Core Empty (web) C#
      ASP.NET Core Empty (web) F#
      ASP.NET Core gRPC Service (grpc) C#
      Razor Class Library (razorclasslib) C#
      ASP.NET Core Web App (webapp) C#
      ASP.NET Core Web App (Model-View-Controller) (mvc) C#
      ASP.NET Core Web App (Model-View-Controller) (mvc) F#
      ASP.NET Core Web API (webapi) C#
      ASP.NET Core Web API (webapi) F#
      Worker Service (worker) C#
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Web.ProjectTemplates.3.1

  Microsoft.DotNet.Web.Spa.ProjectTemplates.3.0
    Details:
      NuGetPackageId: Microsoft.DotNet.Web.Spa.ProjectTemplates.3.0
      Version: 3.0.0
      Author: Microsoft
    Templates:
      ASP.NET Core with Angular (angular) C#
      ASP.NET Core with React.js (react) C#
      ASP.NET Core with React.js and Redux (reactredux) C#
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Web.Spa.ProjectTemplates.3.0

  NUnit3.DotNetNew.Template
    Details:
      NuGetPackageId: NUnit3.DotNetNew.Template
      Version: 1.8.1
      Author: akharlov
    Templates:
      NUnit 3 Test Project (nunit) C#
      NUnit 3 Test Item (nunit-test) C#
      NUnit 3 Test Project (nunit) F#
      NUnit 3 Test Item (nunit-test) F#
      NUnit 3 Test Project (nunit) VB
      NUnit 3 Test Item (nunit-test) VB
    Uninstall Command:
      dotnet new -u NUnit3.DotNetNew.Template

  Microsoft.DotNet.Common.ItemTemplates
    Details:
      NuGetPackageId: Microsoft.DotNet.Common.ItemTemplates
      Version: 5.0.0-rc.1.20431.3
      Author: Microsoft
    Templates:
      dotnet gitignore file (gitignore)
      global.json file (globaljson)
      NuGet Config (nugetconfig)
      Solution File (sln)
      Dotnet local tool manifest file (tool-manifest)
      Web Config (webconfig)
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Common.ItemTemplates

  Microsoft.DotNet.Common.ProjectTemplates.5.0
    Details:
      NuGetPackageId: Microsoft.DotNet.Common.ProjectTemplates.5.0
      Version: 5.0.0-rc.1.20431.3
      Author: Microsoft
    Templates:
      Class library (classlib) C#
      Class library (classlib) F#
      Class library (classlib) VB
      Console Application (console) C#
      Console Application (console) F#
      Console Application (console) VB
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Common.ProjectTemplates.5.0

  Microsoft.DotNet.Test.ProjectTemplates.3.1
    Details:
      NuGetPackageId: Microsoft.DotNet.Test.ProjectTemplates.3.1
      Version: 1.0.2-beta4.20176.1
      Author: Microsoft
    Templates:
      Unit Test Project (mstest) C#
      Unit Test Project (mstest) F#
      Unit Test Project (mstest) VB
      xUnit Test Project (xunit) C#
      xUnit Test Project (xunit) F#
      xUnit Test Project (xunit) VB
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Test.ProjectTemplates.3.1

  Microsoft.DotNet.Web.ProjectTemplates.5.0
    Details:
      NuGetPackageId: Microsoft.DotNet.Web.ProjectTemplates.5.0
      Version: 5.0.0-rc.1.20451.17
      Author: Microsoft
    Templates:
      Blazor Server App (blazorserver) C#
      Blazor WebAssembly App (blazorwasm) C#
      ASP.NET Core Empty (web) C#
      ASP.NET Core Empty (web) F#
      ASP.NET Core gRPC Service (grpc) C#
      Razor Class Library (razorclasslib) C#
      ASP.NET Core Web App (webapp) C#
      ASP.NET Core Web App (Model-View-Controller) (mvc) C#
      ASP.NET Core Web App (Model-View-Controller) (mvc) F#
      ASP.NET Core Web API (webapi) C#
      ASP.NET Core Web API (webapi) F#
      Worker Service (worker) C#
      Worker Service (worker) F#
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Web.ProjectTemplates.5.0

  Microsoft.DotNet.Web.Spa.ProjectTemplates.3.1
    Details:
      NuGetPackageId: Microsoft.DotNet.Web.Spa.ProjectTemplates.3.1
      Version: 3.1.6
      Author: Microsoft
    Templates:
      ASP.NET Core with Angular (angular) C#
      ASP.NET Core with React.js (react) C#
      ASP.NET Core with React.js and Redux (reactredux) C#
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Web.Spa.ProjectTemplates.3.1

  Microsoft.DotNet.Wpf.ProjectTemplates
    Details:
      NuGetPackageId: Microsoft.DotNet.Wpf.ProjectTemplates
      Version: 5.0.0-rc.1.20451.6
      Author: Microsoft
    Templates:
      WPF Application (wpf) C#
      WPF Application (wpf) VB
      WPF Class library (wpflib) C#
      WPF Class library (wpflib) VB
      WPF Custom Control Library (wpfcustomcontrollib) C#
      WPF Custom Control Library (wpfcustomcontrollib) VB
      WPF User Control Library (wpfusercontrollib) C#
      WPF User Control Library (wpfusercontrollib) VB
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Wpf.ProjectTemplates

  Microsoft.DotNet.Test.ProjectTemplates.5.0
    Details:
      NuGetPackageId: Microsoft.DotNet.Test.ProjectTemplates.5.0
      Version: 1.0.2-beta4.20420.1
      Author: Microsoft
    Templates:
      Unit Test Project (mstest) C#
      Unit Test Project (mstest) F#
      Unit Test Project (mstest) VB
      xUnit Test Project (xunit) C#
      xUnit Test Project (xunit) F#
      xUnit Test Project (xunit) VB
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Test.ProjectTemplates.5.0

  Microsoft.DotNet.Web.ItemTemplates
    Details:
      NuGetPackageId: Microsoft.DotNet.Web.ItemTemplates
      Version: 5.0.0-rc.1.20451.17
      Author: Microsoft
    Templates:
      Protocol Buffer File (proto)
      Razor Component (razorcomponent) C#
      Razor Page (page) C#
      MVC ViewImports (viewimports) C#
      MVC ViewStart (viewstart) C#
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Web.ItemTemplates

  Microsoft.DotNet.Web.Spa.ProjectTemplates.5.0
    Details:
      NuGetPackageId: Microsoft.DotNet.Web.Spa.ProjectTemplates.5.0
      Version: 5.0.0-rc.1.20451.17
      Author: Microsoft
    Templates:
      ASP.NET Core with Angular (angular) C#
      ASP.NET Core with React.js (react) C#
      ASP.NET Core with React.js and Redux (reactredux) C#
    Uninstall Command:
      dotnet new -u Microsoft.DotNet.Web.Spa.ProjectTemplates.5.0

  Microsoft.Dotnet.WinForms.ProjectTemplates
    Details:
      NuGetPackageId: Microsoft.Dotnet.WinForms.ProjectTemplates
      Version: 5.0.0-rc.1.20451.14
      Author: Microsoft
    Templates:
      Windows Forms (WinForms) Application (winforms) C#
      Windows Forms (WinForms) Application (winforms) VB
      Windows Forms (WinForms) Control Library (winformscontrollib) C#
      Windows Forms (WinForms) Control Library (winformscontrollib) VB
      Windows Forms (WinForms) Class Library (winformslib) C#
      Windows Forms (WinForms) Class library (winformslib) VB
    Uninstall Command:
      dotnet new -u Microsoft.Dotnet.WinForms.ProjectTemplates

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community>
ndepend commented 4 years ago

Btw, in the same vein (Runtime Target Name RTM matters) in a .NET 5.0 RC1 project created with VS2019 16.8.0 Preview, in the .deps.json file the runtimeTargets still mention .NET Core through ".NETCoreApp,Version=v5.0" I would expect ".NETApp,Version=v5.0", or even better "net5.0":

{
  "runtimeTarget": {
    "name": ".NETCoreApp,Version=v5.0",
    "signature": ""
  },
  "compilationOptions": {},
  "targets": {
    ".NETCoreApp,Version=v5.0": {
      "ConsoleApp61/1.0.0": {
        "runtime": {
          "ConsoleApp61.dll": {}
        }
      }
    }
  },
  "libraries": {
    "ConsoleApp61/1.0.0": {
      "type": "project",
      "serviceable": false,
      "sha512": ""
    }
  }
}
sfoslund commented 4 years ago

in the .deps.json file the runtimeTargets still mention .NET Core through ".NETCoreApp,Version=v5.0" I would expect ".NETApp,Version=v5.0", or even better "net5.0"

It's been decided to continue to use .NETCoreApp at the target framework identifier for .NET, since this value is mostly internal we feel it doesn't need to be updated with the new branding.

ndepend commented 4 years ago

Thanks @sfoslund as .NET tool developers this info helps us.

There is still this issue: I have installed [.NET 5.0 RC1 SDK] and VS 2019 16.7.2 doesn't know anymore about .NET 5.0 projects despite Environment > Use previews of the .NET Core SDK enabled. Thus I have the target framework net5.0-windows in WindowsForm and WPF .NET 5.0 RC1 projects and I get the error: NETSDK1013 The TargetFramework value 'net5.0-windows' was not recognized. It may be misspelled. If not, then the TargetFrameworkIdentifier and/or TargetFrameworkVersion properties must be specified explicitly

I've installed VS2019 16.8.0 Preview3 and can indeed compile such net5.0-windows project. But VS2019 16.7.2 doesn't know about .NET 5.0 despite I installed all pkg from https://dotnet.microsoft.com/download/dotnet/5.0 ( Windows 64bits ) and despite restart:

image

sfoslund commented 4 years ago

@psmacchia yes, this is expected. .NET 5 depends on components that are in VS 16.8 but not 16.7.

ndepend commented 4 years ago

Thanks @sfoslund this ticket is then now closed