Quick dev directory cleanup tip

When cleaning up drive space, the first thing I do is remove the ‘obj’, ‘bin’, and ‘packages’ directories from my development directories. They are temporary and will be rebuilt the next time I build the related project. Because I end up with a lot of little test & sample projects that I don’t refer to…

0

Asynchronous infinite loops instead of timers

Did it occur to you that an infinite loop, with async/await inside it, isn’t really an infinite loop? It looks like one (which is usually bad) but because of the asynchrony, we know that it isn’t executing the entire method at one time. Part executes now, then sometime later it periodically resumes – that sounds kind…

2

Waaaaay oversimplified async/await plumbing

Often, when someone asks “how does this async await stuff actually work”? There is a lot of hand waving or someone says “just use reflection and look at it” but the real compiled code is a complex recursive state machine. So I want to show a (relatively) simplified example that isn’t the real thing but…

0

Windows Live Writer lives on as Open Live Writer!

I am happy to be posting this blog entry from the newly announced Open Live Writer! The most excellent blogging tool has not been actively developed for some time. But efforts have been made and now a fork of that well loved application is now provided as the open source project Open Live Writer under…

0

Tasks are (still) not threads and async is not parallel

I talk to a lot of developers who are either new to .NET or are moving from an older version to the newer platform and tools. As such I’m always trying to think of new ways to describe the nature of Tasks vs Threads and async vs parallel. Modern .NET development is steeped in the…

8

Visual Studio Tip #9: You can edit directly in the Diff tool

Here is one I just discovered just last week by accident. When you are doing a diff on a file to compare what has changed from the source control, the diff window can be used to edit the file directly. (works on both Git and TFS source control) I always assumed the window was just…

3

Visual Studio Tip #8: Adding existing files with Show All Files

Sometimes instead of adding a new file to your project, you need to reuse an existing file. That might be code, but often it is some sort of content like a bitmap or an xml document. I’ve seen new users copy that item into their project directory and then look at their project in Visual…

2

Visual Studio Tip #7: Whole line editing

OK here is a quick simple one. How do I move or edit entire lines of code? #1 Just don’t select anything. If you don’t have anything selected in your code window then the commands for copy, cut and paste work as if the entire line of code was selected. So if you need to…

5

Visual Studio Tip #6: Turn on those line numbers (with Quick Launch)

Writing code is very often a collaborative process and to discuss something you need to be able to refer to it. The simplest way to refer to a line of code is “look at line #26.” For some reason though, line numbers are not on by default. Before Visual Studio 2013 (which syncs your preferences…

2

Visual Studio Tip #5: Quickly adding a namespace “using” statement

One thing that slows down new C# users is the requirement to add “using” statements to the top of your file. This is because they just want to declare a variable and use it but aren’t necessarily familiar enough with the classes and namespaces to have predicted the need for the namespace when they were…

0