question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Opt-in Nullable Reference Types by default in templates

See original GitHub issue

Opt-in Nullable Reference Types by default

Nullable Reference Types is a significant feature to decrease the possibility of bugs and it can improve robustness. People who don’t follow the Microsoft DevBlogs even don’t know the existence of this feature, why not opt-in this feature in dotnet new template by default? If it was opted-in by default, new projects will consider the nullable issues, and in the future, most projects will not face the unexpected NullableReferenceException.

Solution

Make all existing templates in dotnet new opt-in Nullable Reference Types by default.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
vlada-shubinacommented, Nov 23, 2021

This was implemented in https://github.com/dotnet/templating/issues/3359, suggesting to close - let me know if you have any objections.

0reactions
terrajobstcommented, Nov 24, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

Nullable reference types
This article provides an overview of nullable reference types. You'll learn how the feature provides safety against null reference ...
Read more >
Opt-in Nullable Reference Types by default in templates
Solution. Make all existing templates in dotnet new opt-in Nullable Reference Types by default.
Read more >
Nullable Reference types in C# – Best practices
In this tutorial, I look at the state of the Nullable Reference Types feature in C#, one year after its initial release.
Read more >
c# - What's the goal of disable nullable and how do we use ...
First thing that I feel like needs clearing up is that nullable reference types being enabled will not impact if your code can...
Read more >
Strategies for Implementing Nullable Reference Types in .NET
Nullable reference types offer a way to explicitly declare whether a reference type can be null. In C#, this feature is compile-time only....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found