Introduction to Productivity Extensions

The .NET Framework has been around since 2002. There are many common classes and methods that have been around a long time. The Framework and the languages used to develop on it have evolved quite a bit since many of these classes and their methods came into existence. Existing classes and methods in the base class library (BCL) could be kept up to date with these technologies, but it’s time consuming and potentially destabilizing to add or change methods after a library has been released and Microsoft generally avoids this unless there’s a really good reason. Generics, for example, came … Continue reading Introduction to Productivity Extensions

Win a free copy of Visual Studio 2010 Best Practices

Win A free copy of the ‘Visual Studio 2010 Best Practices’, just by commenting! We’re giving away two ebook editions of Visual Studio 2010 Best Practices. All you have to do to win is comment on why you think you should win a copy of the book. I’ll pick a winner from the most creative answers in two weeks. (function() { var po = document.createElement(‘script’); po.type = ‘text/javascript’; po.async = true; po.src = ‘https://apis.google.com/js/plusone.js’; var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(po, s); })();

Visual Studio 2010 Best Practices published

Most of my spare time in the last few months has been taken up by writing Visual Studio 2010 Best Practices.  This has now been published and is available through publisher (no longer pre-order) at http://bit.ly/Px43Pw.  The pre-order price is still available for a limited time.  Amazon still has it out of stock; but $39.99 at http://amzn.to/QDDmF7. The title of the book really doesn’t do the content justice.  Least of which is “Best Practices”.  Anyone who knows me should know I don’t really like that term.  But, hopefully those looking for best practices will read the book and learn from chapter … Continue reading Visual Studio 2010 Best Practices published

Developing Windows Services in Visual Studio

Inevitably distributed systems often need a Windows service or two for certain tasks.  The creation of a Windows service project and hooking up a project installer to the service is fairly straightforward; so, I’m not going to get into much detail about that stuff. The stuff that I find that isn’t well understood is how to debug and deploy these services in a development environment. First off, debugging.  A service is just an executable that is started up by the Windows service manager.  From a native application standpoint, it has some entry points in it that the service manager looks … Continue reading Developing Windows Services in Visual Studio

Unbind a Visual Studio 2010 Solution from Source Code Control

I was working with a solution that I got from someone else the other day.  When I loaded it up, Visual Studio 2010 informed me that it could not connect to a TFS server at some URL and will open the solution in offline mode (or something to that effect).  Of course, I have no access to this TFS server, so, I’m going to get this message every time I open this solution.  That’s going to get annoying pretty fast. So, I had a quick search on the Internet about removing source code control from a Visual Studio 2010.  I … Continue reading Unbind a Visual Studio 2010 Solution from Source Code Control

Visual Studio 2010, Enhance your Jedi Skillz

I’ve blogged about becoming a Jedi in Visual Studio 2008 before.  Being a Jedi in Visual Studio means you focus more on adding value to the software you’re working with and less on the process of the IDE you’re doing your work in. Visual Studio 2010 has some great features to allow you to do just that.  So much so, in fact, that I can’t possibly do them justice in a single post.  I’ll start with a few here and continue with a few posts on ways to get Visual Studio 2010 to let you write software faster. All of … Continue reading Visual Studio 2010, Enhance your Jedi Skillz

Using the dynamic Keyword in C# to Improve Object Orientation – A Follow-up

Based on some feedback, some clarification is warranted with regard to my previous post titled “Using the dynamic Keyword in C# to Improve Object Orientation”. As Jarek Kowalski correctly pointed out, the example code that I provided could have used the Visitor pattern instead to get the same result.  My impetus for using the dynamic keyword the way I did was slightly different from how I described my example—which was meant to be easier to read. I think it’s worthwhile describing the Visitor Pattern.  The Visitor pattern is a pattern used to separate the responsibility of an algorithm from the … Continue reading Using the dynamic Keyword in C# to Improve Object Orientation – A Follow-up

Using the dynamic Keyword in C# to Improve Object-Orientation

With polymorphism, object-oriented languages allow “…different data types to be handled using a uniform interface”.  Ad-hoc polymorphism is when you declare multiple methods of the same name but differ by the type of an argument.  For example: private static void Draw(Circle circle) { //… } private static void Draw(Square square) { //… } These are usually referred to as method overloads or method overloading.  Which Draw method that gets invoked would be decided upon at compile-time based on the type of the parameter passed to it. This is great, there are many situations where this is useful; but what about … Continue reading Using the dynamic Keyword in C# to Improve Object-Orientation

Refactoring with Visual Studio 2010

While putting some finishing touches on the book, the publisher has put details about the book on their website. https://www.packtpub.com/refactoring-with-microsoft-visual-studio-2010/book From the overview: Changes to design are an everyday task for many people involved in a software project. Refactoring recognizes this reality and systematizes the distinct process of modifying design and structure without affecting the external behavior of the system. As you consider the benefits of refactoring, you will need this complete guide to steer you through the process of refactoring your code for optimum results. This book will show you how to make your code base more maintainable by … Continue reading Refactoring with Visual Studio 2010

Modify VS 2010 Template to Reference System.Configuration

Almost every project I create in Visual Studio, I invariably have to add System.Configuration to the references for that project.  As soon as I want to do much with app.config, I need to use something in System.Configuration.  Well, rather than continue to add that reference to future projects, I’ve decided to change the project template so I don’t have to.  The following is a description of how to do that. The project templates are located at C:\Program Files\Microsoft Visual Studio 10.0\Common7\ide\ProjectTemplates\ (replace "Program Files" with "Program Files (x86)" if you’re using a 64-bit version of Windows).  For this example I’m … Continue reading Modify VS 2010 Template to Reference System.Configuration