.NET Blog
Free. Cross-platform. Open source. A developer platform for building all your apps.
Featured posts

Announcing .NET 11
.NET 11 is here with C# 15, faster developer tools, runtime and library improvements, and new capabilities for web, mobile, desktop, and AI apps.
Latest posts
Package Restore and Consent
A little while back, our team had the pleasure of talking about NuGet with some privacy experts. These are folks who are passionate about your privacy and laws that protect your privacy. As we were describing NuGet's package restore feature, the privacy experts became interested in the details surrounding the package restore workflow – particularly the part where NuGet goes online to the NuGet gallery to fetch missing packages. Here’s the scenario that raised their interest: That last point is where the concern was raised. In this scenario, Developer B has never said to NuGet, "Sure, you ...
ConcurrentQueue holding on to a few dequeued elements
Since .NET 4’s release, I’ve received several questions about a peculiar behavior of ConcurrentQueue<T> having to do with memory management.With Queue<T>, List<T>, and other such data structures in the .NET Framework, when you remove an element from the collection, the collection internally wipes out its reference to the stored element, e.g. class MyQueue<T> { private T[] m_data; private int m_head; ... public T Dequeue() {  ...
Async Targeting Pack for Visual Studio 11 now available for .NET 4 and Silverlight 5
We’re happy to announce that you can now download an Async Targeting Pack for Visual Studio 11 that lets you target .NET 4 and Silverlight 5. The included DLLs address the previously discussed issue of the Visual Studio 11 Beta compilers being incompatible with the AsyncCtpLibrary* DLLs from the Async CTP; with this targeting pack, you can use the async/await keywords with Visual Studio 11 Beta to compile for .NET 4 and Silverlight 5. The DLLs are available via a NuGet package, with installation details available here. Enjoy!
Using await with WinRT async operations
Over on the Windows 8 app developer blog, I've written a blog post about using await with WinRT. I hope you enjoy it!
NuGet’s Sources Are Moving to Git
At the end of April, we'll be moving the NuGet sources hosted on CodePlex from a Mercurial repository to a Git repository. This won't impact or affect NuGet users, but NuGet contributors and those that follow NuGet's development might need to act before this move. Forks All of the current NuGet forks on CodePlex will be deleted as part of this move. If you have forked NuGet, and you need to keep that fork, you can clone the fork and keep it locally or you can find somewhere else to push it. Aren't DVCS great? Pull Requests The NuGet team will review all the currently active pull requests before we move to Git...
.NET for Metro style apps
.NET is now a core part of several Microsoft platforms, and each has focused on specific subset of APIs. A lot of thought has been put into crafting each API surface area. Many of you have asked how the .NET APIs available for Metro style apps were chosen. In the following post, Immo Landwerth – a program manager on the CLR’s Core Framework team – provides an answer to this question. -- Brandon Since the releases of the Windows 8 Consumer Preview and the Windows Developer Preview, developers have been busy exploring Windows 8, and many have asked questions about the subset of.NET Framework APIs that can be used ...
Should I expose synchronous wrappers for asynchronous methods?
In a previous post Should I expose asynchronous wrappers for synchronous methods?, I discussed “async over sync,” the notion of using synchronous functionality asynchronously and the benefits that doing so may or may not yield. The other direction of “sync over async” is also interesting to explore. Avoid Exposing Synchronous Wrappers for Asynchronous Implementations In my discussion of “async over sync,” I strongly suggested that if you have an API which internally is implemented synchronously, you should not expose an asynchronous counterpart that simply wraps the synchrono...
Async/Await FAQ
From time to time, I receive questions from developers which highlight either a need for more information about the new “async” and “await” keywords in C# and Visual Basic. I’ve been cataloguing these questions, and I thought I’d take this opportunity to share my answers to them.Conceptual Overviewhttps://msdn.com/async. To call out just a few specific resources, the October 2011 issue of MSDN Magazine included a trio of articles that provided a good introduction to the topic. If you read them all, I recommend you read them in the following order: The .NET team blog also inc...
Are deadlocks still possible with await?
Developers familiar with parallel programming are also familiar with a wide range of potential problems that can occur when practicing the art. One of the most well-known issues is “deadlock,” where two or more operations are waiting on each other to complete in a manner such that none of them will be able to complete.I’ve received a few times now a question along the lines of the following: “previously I was using synchronous blocking mechanisms, and I had to be careful to avoid deadlocks… now that I’m moving to more asynchronous mechanisms, do I still need to worry abo...