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

WPF project templates use latest C# language idioms #4774

Closed
Tracked by #3359
DamianEdwards opened this issue Jun 29, 2021 · 9 comments
Closed
Tracked by #3359

WPF project templates use latest C# language idioms #4774

DamianEdwards opened this issue Jun 29, 2021 · 9 comments
Assignees
Labels
urgent status: This issue needs immediate attention User Story A single user-facing feature. Can be grouped under an epic.

Comments

@DamianEdwards
Copy link
Member

In .NET 6, the included C# project templates will use the latest language idioms.

See the parent Epic for details.

@OliaG

@DamianEdwards DamianEdwards added the User Story A single user-facing feature. Can be grouped under an epic. label Jun 29, 2021
@DamianEdwards DamianEdwards added this to the 6.0.0 milestone Jun 29, 2021
@vatsan-madhavan
Copy link
Member

@ryalanms @SamBent https://github.com/dotnet/wpf/tree/main/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates sought to unify/accommodate several nearly-identical templates across multiple TFM's - it wasn't designed to handle unification of disparate templates. This change will create a new template that will be a large departure from existing templates, I think.

I would highly recommend forking the template package at this time and starting a new line for .NET 6+ (and retain the .NET 5, .NET Core 3.x, .NET Framework support in the older package as-is).

@RussKie
Copy link
Member

RussKie commented Jul 7, 2021

You want to be aware of dotnet/sdk#18459 and implement global usings support once it is merged. I have dotnet/winforms#5183 waiting for it as well.

@DamianEdwards
Copy link
Member Author

@OliaG @vatsan-madhavan the SDK feature for global usings has now been merged. The epic has been updated with details of which namespaces are imported by which SDKs. Would appreciate you adding details for WPF at your convenience.

@DamianEdwards
Copy link
Member Author

@OliaG @ryalanms @SamBent @RussKie @vatsan-madhavan is there an update on the status of this for WPF?

@vatsan-madhavan
Copy link
Member

@DamianEdwards I’m just offering pointers from experience - it’s up to the team (@SamBent @ryalanms) to commit to specific timelines/plans.

@vlada-shubina
Copy link
Member

Just a hint since this repo is also using --langVersion: in project common templates we discovered issues to due to new features are only working in certain frameworks / language versions, so we are considering to conditionally enable features based on language version set by user (if set).
Draft PR on this is here: dotnet/templating#3454.

@ryalanms ryalanms added the urgent status: This issue needs immediate attention label Jul 27, 2021
@ryalanms ryalanms modified the milestones: 6.0.0, 6.0.0 RC2 Aug 17, 2021
@RussKie
Copy link
Member

RussKie commented Sep 5, 2021

@ryalanms you can use dotnet/winforms#5609 as a guide.

@ryalanms
Copy link
Member

ryalanms commented Sep 7, 2021

WPF included implicit namespace support and added nullable to the templates. Other updates will need to go in servicing.

@dipeshmsft
Copy link
Member

@DamianEdwards @OliaG @vlada-shubina Are we good to close this issue? We have enabled implit usings and file-scoped namespaces by deault in our templates, here is the corresponding PR #6973

@ghost ghost removed this from the .NET 7.0 milestone Mar 31, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Apr 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
urgent status: This issue needs immediate attention User Story A single user-facing feature. Can be grouped under an epic.
Projects
No open projects
Status: Done
Development

No branches or pull requests

8 participants