Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Target frameworks in SDK-style projects" appears out of date for older versions of .NET Core #24544

Closed
brnhensley opened this issue Jun 7, 2021 · 5 comments · Fixed by #25603
Assignees
Labels
doc-enhancement Improve the current content [org][type][category] dotnet/svc Pri1 High priority, do before Pri2 and Pri3 standard-library/subsvc

Comments

@brnhensley
Copy link

With .NET 5.0 installed it doesn't appear I can use target frameworks older than netcoreapp3.1. I get an invalid parameter error when trying any of the older version listed as options.

$ dotnet new webapi -f netcoreapp3.0
Couldn't find an installed template that matches the input, searching online for one that does...
Error: Invalid parameter(s):
-f netcoreapp3.0
    'netcoreapp3.0' is not a valid value for -f (Framework).

net5.0 and netcoreapp3.1 work, but I get the same error for all of these:

netcoreapp1.0
netcoreapp1.1
netcoreapp2.0
netcoreapp2.1
netcoreapp2.2
netcoreapp3.0

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@dotnet-bot dotnet-bot added the ⌚ Not Triaged Not triaged label Jun 7, 2021
@PRMerger15 PRMerger15 added standard-library/subsvc dotnet/svc Pri1 High priority, do before Pri2 and Pri3 labels Jun 7, 2021
@gewarren gewarren added the support-request Support-style question;customer needs help solving a problem [org][type][category] label Jun 11, 2021
@dotnet-bot dotnet-bot removed the ⌚ Not Triaged Not triaged label Jun 11, 2021
@tdykstra tdykstra self-assigned this Aug 9, 2021
@tdykstra
Copy link
Contributor

@vlada-shubina To use dotnet new to create a project that targets an older unsupported version is there a template that you can install?

@tdykstra tdykstra added the waiting-on-feedback Waiting for feedback from SMEs before they can be merged label Aug 10, 2021
@vlada-shubina
Copy link
Member

@vlada-shubina To use dotnet new to create a project that targets an older unsupported version is there a template that you can install?

Yes, the web project templates are shipped in per SDK packages.

https://www.nuget.org/packages/Microsoft.DotNet.Web.ProjectTemplates.3.0/ - example package for netcoreapp3.0

It is possible to install it manually. For 2.1 user can also install .NET SDK 2.1 - then the netcoreapp2.1 TFM will be available.

@tdykstra
Copy link
Contributor

@vlada-shubina Thanks! I'm adding this information to the dotnet-new-sdk-templates article.

@tdykstra
Copy link
Contributor

@brnhensley Thanks or reporting this -- the explanation will be in a different article -- https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-new-sdk-templates

@tdykstra tdykstra added doc-enhancement Improve the current content [org][type][category] and removed waiting-on-feedback Waiting for feedback from SMEs before they can be merged support-request Support-style question;customer needs help solving a problem [org][type][category] labels Aug 11, 2021
@brnhensley
Copy link
Author

Thanks for looking into this @tdykstra

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-enhancement Improve the current content [org][type][category] dotnet/svc Pri1 High priority, do before Pri2 and Pri3 standard-library/subsvc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants