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.

Include `System.Threading.Tasks` to the standard namespaces

See original GitHub issue

It’s not convenient to create samples that use modern TAP based async work because the System.Threading.Tasks namespace is not included by default. That could lead people to use older APIs instead of the async and await based protocol.

I had a conversation on email about this with @TheRealPiotrP that this change would make the default interactive experience different than the local experience for Visual Studio or dotnet CLI users. Should this concept be expanded to update the default list of imported namespaces in the C# templates for Visual Studio and dotnet new. /cc @KathleenDollard @Pilchie

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
TyOverbycommented, Jan 10, 2018

@BillWagner It appears to work perfectly on the link that you gave me.

image

I get autocomplete and everything.

0reactions
BillWagnercommented, Jan 10, 2018

@TyOverby This works perfectly for the try.dot.net experience.

I’d like to have similar functionality for the docs.microsoft.com quickstart experience.

/cc @TheRealPiotrP @LadyNaggaga Is there a different location for this feature request?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Task Class (System.Threading.Tasks) - Microsoft Learn
The Task class represents a single operation that does not return a value and that usually executes asynchronously. Task objects are one of...
Read more >
Could not include namespace System.Threading.Tasks
Tasks in my project. The type or namespace name 'Tasks' does not exist in the namespace 'System. Threading' (are you missing an assembly...
Read more >
System.Threading.Tasks.Dataflow 7.0.0 - NuGet
TDF builds upon the APIs and scheduling infrastructure provided by the Task Parallel Library (TPL), and integrates with the language support for asynchrony ......
Read more >
.NET 4.0 and System.Threading.Tasks - Simple Thread
One of these tools is a new namespace within the System.Threading namespace which is called "Tasks". The Tasks in System.Threading.Tasks ...
Read more >
C# 10.0: Global Using Directives - Thomas Claudius Huber
C# 10.0: Global Using Directives – Make Important Namespaces Available in Your ... Threading; global using global::System.Threading.Tasks;.
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