You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Please document how to change default console template. #26313
@Walluce If you want to suggest that the dotnet new console template should be changed, then the right repo would be dotnet/templating. There is already a somewhat related issue at dotnet/templating#3654.
If you think the whole feature of top-level programs should be removed, then in theory, the right repo would be dotnet/csharplang. But since that feature is not really new (it has been released in C# 9.0 almost a year ago), I don't think a vote against it would have any effect at this point.
@svick The article asks for feedback as up/down votes on this issue -- see the Template feedback section, The reference is to using top-level statements in the new-project template, not to the top-level statements feature itself.
Agreed. I suggest we redo the voting, in a new GitHub issue that does not conflict with the page asking for feedback. The page currently says "to voice your support for this feature", but this issue says "Could you please document how we can change the console template back to the 'classic' Program + Main". These votes are ambiguous.
This template is less usable, mainly because the arguments and return value are hidden.
I'm also concerned about the decision process at Microsoft, behind such a change making it into Visual Studio / .NET.
Reacted by symbiotic, Jeno, bar10dr, Artur Safiullin and Adam
The comment in the templates article has been changed from:
The top-level template is a new feature in .NET 6. Add an up or down vote GitHub issue #26313 to voice your support for this feature.
to:
Top-level statements is a new feature in .NET 6. Add an up or down vote in GitHub issue #26313 to let us know if you support the use of this feature in project templates.
@tdykstra I agree with @adegeo - there are up and down votes splattered across many of the posts to this string and I suspect there was a lot of confusion as to which choice people were making. Please start a new issue with an unequivocal question so that it is completely clear what one is voting for or against.
Activity
tdykstra commentedon Sep 30, 2021
@adegeo @BillWagner
KathleenDollard commentedon Sep 30, 2021
There is no direct way to do this in .NET 6. There are two approaches:
We want feedback. Voting on this issue is one of the ways folks can provide feedback.
@tdykstra @BillWagner would you update the docs to indicate this, and let me know if you need anything from me.
BillWagner commentedon Oct 1, 2021
For now, you can do this:
Or, any other older framework.
Then, you can change the TFM to .NET 6:
adegeo commentedon Oct 1, 2021
Use
This will generate the old-style template but force the framework in the project to net6.0
Walluce commentedon Oct 5, 2021
Can you please post a link to where I can vote against this new "feature"?
svick commentedon Oct 5, 2021
@Walluce If you want to suggest that the
dotnet new consoletemplate should be changed, then the right repo would be dotnet/templating. There is already a somewhat related issue at dotnet/templating#3654.If you think the whole feature of top-level programs should be removed, then in theory, the right repo would be dotnet/csharplang. But since that feature is not really new (it has been released in C# 9.0 almost a year ago), I don't think a vote against it would have any effect at this point.
tdykstra commentedon Oct 5, 2021
@svick The article asks for feedback as up/down votes on this issue -- see the Template feedback section, The reference is to using top-level statements in the new-project template, not to the top-level statements feature itself.
Walluce commentedon Oct 14, 2021
This doesn't work :(
40 remaining items
Kuinox commentedon Nov 30, 2021
Instead of "voting the new template", why can't we have both ?
symbiotic commentedon Dec 5, 2021
Agreed. I suggest we redo the voting, in a new GitHub issue that does not conflict with the page asking for feedback. The page currently says "to voice your support for this feature", but this issue says "Could you please document how we can change the console template back to the 'classic' Program + Main". These votes are ambiguous.
This template is less usable, mainly because the arguments and return value are hidden.
I'm also concerned about the decision process at Microsoft, behind such a change making it into Visual Studio / .NET.
tdykstra commentedon Dec 6, 2021
The comment in the templates article has been changed from:
to:
adegeo commentedon Dec 6, 2021
@tdykstra It may be better to open a new issue, I don't think any vote can be trusted 😁
rfvan commentedon Dec 6, 2021
@tdykstra I agree with @adegeo - there are up and down votes splattered across many of the posts to this string and I suspect there was a lot of confusion as to which choice people were making. Please start a new issue with an unequivocal question so that it is completely clear what one is voting for or against.
tdykstra commentedon Dec 6, 2021
See #27420
rhrytskiv commentedon Dec 7, 2021
Please just add an option to choose if I want old or new style template instead of sdk switching this is very annoying.
ahwm commentedon Dec 7, 2021
@rhrytskiv see #27420 (comment)
died commentedon Dec 13, 2021
try this
https://marketplace.visualstudio.com/items?itemName=Doomdied.ClassicConsole1
tonysneed commentedon Feb 12, 2022
Made a suggested change to the docs with #28223.
Earthman100 commentedon Feb 17, 2022
Name that Apptdykstra< Rest Api_curl -I https://api.github.com/users/octocat/orgs