Geeks With Blogs

News



Microsoft Store

Support This Site


AddThis Social Bookmark Button

Locations of visitors to this page

Subscribers to this feed

TwitterCounter for @sdorman

Creative Commons License


Scott Dorman Microsoft MVP, Software Architect, Developer, Author .NET (General) General .NET 2.0 related topics.

Favorite Visual Studio Extensions
The Visual Studio Gallery is the best place to find tools, controls, and templates to help make your life as a developer easier and more productive. Every so often, I publish my personal list of favorite extensions. This is something I started back when Visual Studio 2010 was first released. A lot has changed since then. I have already published my favorites list for Visual Studio 2013 several times. As new extensions are released, old ones updated or removed, the list does change a bit from time ......

Posted On Sunday, October 5, 2014 11:10 AM

Cloud hosted CI for .NET projects
Continuous integration (CI) is important. If you don’t have it set up…you should. There are a lot of different options available for hosting your own CI server, but they all require you to maintain your own infrastructure. If you’re a business, that generally isn’t a problem. However, if you have some open source projects hosted, for example on GitHub, there haven’t really been any options. That has changed with the latest release of AppVeyor, which bills itself as “Continuous integration for busy ......

Posted On Monday, June 2, 2014 9:26 AM

Windows Phone Marketplace Requests Custom Statuses
Thanks to the UserVoice team for enabling custom statuses on Windows Phone Marketplace Requests! I have added a few additional statuses (I’m still working out exactly what makes the most sense), but the biggest change is to the Declined status. Previously, when a request was marked as Declined, all voting was closed. I was using this status for several different reasons: To show that the request was off-topic, either because it belonged on the Windows Phone Suggestion Box or because it was a feature/enhancement ......

Posted On Monday, February 20, 2012 4:17 PM

Visual Studio Extensions
As a product, Visual Studio has been around for a long time. In fact, it’s been 18 years since the first Visual Studio product was launched. In that time, there have been some major changes but perhaps the most important (or at least influential) changes for the course of the product have been in the last few years. While we can argue over what was and wasn’t an important change or what has and hasn’t changed, I want to talk about what I think is the single most important change Microsoft has made ......

Posted On Friday, October 18, 2013 2:22 PM

MVP Spotlight
Each week, the different MVP Leads send out an email communication to their MVPs letting us know about upcoming events and other things relevant to us. As part of that newsletter, an individual MVP is often highlighted. This week, I’m the featured MVP! Thanks, Heather, for spotlighting me and the Windows Phone Marketplace Requests site ......

Posted On Friday, February 17, 2012 7:42 PM

Strings in .NET are Enumerable
It seems like there is always some confusion concerning strings in .NET. This is both from developers who are new to the Framework and those that have been working with it for quite some time. Strings in the .NET Framework are represented by the System.String class, which encapsulates the data manipulation, sorting, and searching methods you most commonly perform on string data. In the .NET Framework, you can use System.String (which is the actual type name or the language alias (for C#, string). ......

Posted On Sunday, September 30, 2012 2:09 PM

TechEd for Novices, 2012 Edition
In 2007, Microsoft created a "Tips for the Newbie" page for TechEd (which is apparently no longer available) and I created a follow-on post called Tech·Ed for Novices. I created a similar post in 2008 as well. With TechEd 2012 around the corner, I thought it would be good to bring it back. TechEd is a huge event, topping out at over 14000 people (usually), with an equally huge amount of content. This post is designed to give first time TechEd attendees a fighting chance of finding their way around. ......

Posted On Friday, February 24, 2012 10:06 AM

Light Blogging Activity
Regular readers may have noticed that my blogging activity has slowed down considerably. I’m hoping to pick back up and start posting more soon, but until then I wanted to make sure everyone knows that I am still active…there have been other things that have been consuming my time. First, my Sams Teach Yourself Visual C# 2010 in 24 Hours book came out, officially on the shelves in August although content was complete in late February. Shortly after the book came out, I started working on an article ......

Posted On Saturday, October 9, 2010 11:53 AM

Code Camps and Speaker Feedback
Code camps are a great resource for the local development community. They provide developers and speakers (who are almost always local developers as well) a way to interact and learn about topics they otherwise might not have an opportunity. As a speaker, it is always great to see new people in my talks and answer questions since in almost every talk, someone asks a question I haven’t heard before. One of the things that most speakers, including myself, like getting is feedback. We want to know what ......

Posted On Saturday, September 18, 2010 11:09 PM

Providing Feedback for Speakers
As most of you know, I do a lot of presentations each year, mostly at local code camps. As a speaker, it is always great to see new people in my talks and answer questions since in almost every talk, someone asks a question I haven’t heard before. One of the things that most speakers, including myself, like getting is feedback. We want to know what you thought of the presentation, both the material and the delivery. It used to be that most code camps passed out evaluation forms to provide this feedback. ......

Posted On Tuesday, September 7, 2010 11:02 AM

Determining if a type is defined in the .NET Framework
There have been several questions on StackOverflow about how to determine if a type is defined in the .NET Framework or is a third-party or custom type. Based on the answers provided to these questions, this can be accomplished using some reflection to retrieve the public key token of the assembly in which the type is defined and compare it to a public key token known to be used by Microsoft to sign the .NET Framework assemblies. Update: Based on some additional research and a Twitter conversation ......

Posted On Saturday, September 4, 2010 10:24 PM

Interesting .NET Framework 4 Statistics
Last September while I was working on my Teach Yourself Visual C# 2010 in 24 Hours book for Sams Publishing, I posted some interesting statistics for the .NET Framework 3.5 SP1. Now that the .NET Framework 4.0 has been released, I thought I would update these statistics (and thanks to Lisa for asking about them). There were a total of 44,346 types (loaded from 130 assemblies), with 33,152 classes, 2,398 interfaces, 4,828 enums, and 8,796 value types. The complete breakdown is shown below. Of the ......

Posted On Saturday, July 10, 2010 10:39 PM

Favorite Visual Studio 2010 Extensions, Update
With the release of the Visual Studio Pro Power Tools (and many other new extensions having been released), my list of favorite Visual Studio extensions has changed. All of these extensions are available in the Visual Studio Gallery. Here is the list of extensions that I currently have installed and find useful: Bing Start Page CodeCompare Collapse Selection In Solution Explorer Collapse Solution Color Picker Completion Extension Analyzer Find Results Highlighter Find Results Tweak (Available from ......

Posted On Friday, June 11, 2010 10:08 PM

The Dispose Pattern (and FxCop warnings)
[This is actually a response to Bill’s blog post, but since it isn’t possible to leave this as a comment on his blog it’s a post here.] There are many different ways to implement the Dispose pattern correctly. Some are (in my opinion) better than others. In Bill’s blog post he presents a particular pattern, which is an excerpt from his book (Effective C#). The issue centers around the fact that a reader took the code sample presented in the book and ran FxCop (Code Analysis) on it, which generated ......

Posted On Tuesday, May 25, 2010 10:40 AM

Retrieving Custom Attributes Using Reflection
The .NET Framework allows you to easily add metadata to your classes by using attributes. These attributes can be ones that the .NET Framework already provides, of which there are over 300, or you can create your own. Using reflection, the ways to retrieve the custom attributes of a type are: System.Reflection.MemberInfo public abstract object[] GetCustomAttributes(bool inherit); public abstract object[] GetCustomAttributes(Type attributeType, bool inherit); public abstract bool IsDefined(Type attributeType, ......

Posted On Sunday, May 16, 2010 12:56 PM

CLR 4.0: Corrupted State Exceptions
Corrupted state exceptions are designed to help you have fewer bugs in your code by making it harder to make common mistakes around exception handling. A very common pattern is code like this: public void FileSave(String name) { try { FileStream fs = new FileStream(name, FileMode.Create); } catch (Exception e) { MessageBox.Show("File Open Error"); throw new Exception(IOException); } The standard recommendation is not to catch System.Exception but rather catch the more specific exceptions (in this ......

Posted On Monday, May 3, 2010 10:58 AM

Microsoft StyleCop is now Open Source
I have previously talked about Microsoft StyleCop. For those that might not know about it, StyleCop is a source analysis tool (different from the static analysis that FxCop performs) that analyzes the source code directly. As a result, it focuses on more design (or style) issues such as layout, readability and documentation. In an interesting move (and one that I am happy to see), Microsoft has decided to make StyleCop an open source project (under the MS-PL license) available on CodePlex. (The project ......

Posted On Saturday, April 24, 2010 1:19 PM

Visual Studio, .NET Framework, and language versions
Every so often a question comes up about how Visual Studio, the .NET Framework, and a .NET programming language relate to each other. Mostly, these questions have to do with versions. The reality is that these are actually three different “products” that are versioned independently of each other but are related. Looking at how Visual Studio, the .NET Framework version, and the CLR versions relate to each other results in the following: Visual Studio CLR .NET Framework Visual Studio .NET (Ranier) ......

Posted On Friday, April 23, 2010 4:03 PM

Visual Studio 2010 and Target Framework Version
Almost two years ago, I wrote about a Visual Studio macro that allows you to change the Target Framework version of all projects in a solution. If you don’t know, the Target Framework version is what tells the compiler which version of the .NET Framework to compile against (more information is available here) and can be set to one of the following values: .NET Framework 2.0 .NET Framework 3.0 .NET Framework 3.5 .NET Framework 3.5 Client Profile .NET Framework 4.0 .NET Framework 4.0 Client Profile ......

Posted On Wednesday, April 21, 2010 10:03 PM

String.IsNullOrWhiteSpace
An empty string is different than an unassigned string variable (which is null), and is a string containing no characters between the quotes (""). The .NET Framework provides String.Empty to represent an empty string, and there is no practical difference between ("") and String.Empty. One of the most common string comparisons to perform is to determine if a string variable is equal to an empty string. The fastest and simplest way to determine if a string is empty is to test if the Length property ......

Posted On Saturday, March 13, 2010 1:10 PM

Enum.HasFlag
An enumerated type, also called an enumeration (or just an enum for short), is simply a way to create a numeric type restricted to a predetermined set of valid values with meaningful names for those values. While most enumerations represent discrete values, or well-known combinations of those values, sometimes you want to combine values in an arbitrary fashion. These enumerations are known as flags enumerations because the values represent flags which can be set or unset. To combine multiple enumeration ......

Posted On Saturday, March 13, 2010 12:56 PM

Microsoft MVPs on Twitter
Following last years post of people at MVP Summit 2009 on Twitter, I’m getting a bit of a head start and using the new Twitter Lists feature to create a list of all Microsoft MVPs that I know (or know of). I’ve started this list with the same people from last years blog post. The plan is for this list to be a complete list (or at least as complete as I can make it) of Microsoft MVPs. If you are an MVP and want to be included or if you know of any MVPs that should be included, please let me know. ......

Posted On Sunday, January 3, 2010 3:59 PM

MVP Award Renewed
Woke up this morning to an email letting me know that I’ve been renewed as an MVP in C# again this year! Almost didn’t see it as my junk mail filters kicked in and delivered it to my junk folder. Need to fix those rules. :) This makes the third year in a row that I’ve been an MVP. It seems like it was just yesterday when I received that first email. The last year (especially the last half) has been very busy working on the book and my blogging and discussion board activity have slowed down a lot. ......

Posted On Friday, January 1, 2010 10:11 AM

Sams Teach Yourself Visual C# 2010 in 24 Hours
I have previously mentioned that I’m working on the upcoming Sams Teach Yourself Visual C# 2010 in 24 Hours book. Things are progressing nicely, if a bit slower than I’d prefer. I have the draft for the cover art, which looks really good. I’m also very pleased to announce my technical editors – Claudio Lasaala and Eric Lippert. Claudio is a Senior Developer at EPS Software Corp. He has presented several lectures at Microsoft events such as PDC and various other Microsoft seminars, as well as several ......

Posted On Thursday, November 5, 2009 10:01 PM

Visual Studio 2010 Beta 2
Visual Studio 2010 Beta 2 is now available for MSDN subscribers, and generally available on October 21. I haven’t had a chance yet to play around with it, but some of the CLR changes that are very exciting to hear about are: The new String.IsNullOrWhiteSpace method indicates whether a string is null, empty, or consists only of white-space characters. New overloads have been added to the String.Concat and String.Join methods that concatenate members of an IEnumerable<T> collections. The String.Concat<T> ......

Posted On Monday, October 19, 2009 1:09 PM

Interesting .NET Framework Statistics
I’ve been very “heads down” working on my upcoming book from Sams Publishing, Teach Yourself C# 2010 in 24 Hours, so I haven’t been blogging as much as I usually do. In doing some research for the book, I’ve been taking an in-depth look at the .NET Framework and thought I would share some interesting statistics. There are 18,435 total types in the .NET Framework 3.5 SP1, with 13,995 classes, 1,216 interfaces, 2,100 enums, and 1,124 structs. The complete breakdown is shown below. Of the 13,995 classes, ......

Posted On Sunday, September 20, 2009 8:15 PM

Code Contracts in .NET
I have previously talked about code contracts in .NET 4.0, and while .NET 4.0 isn’t out yet you can work with them now in Visual Studio 2008 through MSDN DevLabs. In case you aren’t familiar with code contracts in .NET, this is a feature that was actually built by the .NET CLR team to provide a language-agnostic way to express code assumptions in the form of pre-conditions, post-conditions, and object invariants. There are currently two tools provided: Runtime Checking, which uses a binary rewriter ......

Posted On Monday, March 2, 2009 6:44 PM

MVP Summit 2009 Twitters
If you’re at MVP Summit 2009 (or not at Summit) and trying to find people to follow I’ve started putting together a list of MVPs and Microsoft employees that I know who are here. Everyone should be using the #mvp09 hashtag for their tweets, so you can follow the conversations using #hashtags, Twitter Search, Twopular, TweetScan, or any other twitter search sites. If you want to be included in this list (or have updates to your information), leave a comment or message me on Twitter. Microsoft MVPs ......

Posted On Sunday, March 1, 2009 5:45 PM

Visual Studio 2008
Now that Visual Studio "Orcas" finally has an official name, it's time to clear up the new confusion surrounding the different versions of the .NET Framework that will be available. Daniel Moth has an excellent post describing what he calls the Visual Studio 2008 stack that includes this graphic. The important thing that can be seen from this slide is that the CLR engine is the same in v2.0, v3.0, and v3.5 of the Framework. The major difference is the language enhancements (C# 3.0 and VB9), while ......

Posted On Tuesday, June 12, 2007 10:16 PM

Implementing IDisposable and the Dispose pattern
I just posted a new article on Code Project that explains the proper way to implement the IDisposable interface and the Dispose pattern. Implementing IDisposable is something that often times gets skipped over and when it does get implemented, it is usually implemented simply by following the interface template. Unfortunately, this doesn't cover all of the situations where the class's resources should be released. This article hopes to dispel some of the myths around implementing the Dispose pattern ......

Posted On Sunday, August 27, 2006 8:34 PM

URL File Downloader for .NET

I recently needed the ability to download a file from an arbitrary URL using .NET that was compatible in both .NET 1.1 and .NET 2.0. What I found didn't meet all of my needs, so I decided to write my own.

As a result, I also posted my first Code Project article that contains the full details plus the source code. Please check it out and let me know what you think.

Posted On Friday, August 25, 2006 1:47 PM

Premature optimization is the root of all evil
I’ve lost count how many times I’ve heard that quote. It’s a great quote said by one of the leading minds in computer programming and formal mathematics, Donald Knuth. The problem with this quote is that, like so many other things, people have only remembered (or only quote) a small portion of the entire thing. To read the full quote, you need to look at a paper published in December 1974 titled Structured Programming with go to Statements in Computing Surveys. The full quote is this (in reference ......

Posted On Friday, August 28, 2009 10:24 PM

Visual Studio 2010 Beta 1
I’m still waiting for an “official” announcement, but if you are an MSDN subscriber you will be able to download Visual Studio 2010 Beta 1 later today (May 18), probably around 12:00 PM (PST). If you aren’t an MSDN subscriber, you will be able to download Beta 1 on May 20 through Microsoft Downloads. Technorati Tags: Visual Studio 2010 ......

Posted On Monday, May 18, 2009 9:55 AM

Visual Studio 2008 Debugging – The Watch Window
The Watch window (actually there are four different Watch windows you can use) is easily the most powerful aspect of the Visual Studio debugger and the underlying technology it uses actually surfaces in several places: Watch Autos Locals Quick Watch “Data Tips” (the debugging tool tips that appear when you hover over a code element) The thing that most people might not realize is that you can actually call methods in the Watch window. This is useful because it allows you to see data structures that ......

Posted On Saturday, February 14, 2009 8:23 PM

Visual Studio 2008 Debugging – Advanced Tricks
We previously talked about the Location, Condition, Hit Count, Filter, and When Hit modifiers for breakpoints. These are great advanced breakpoints that will really make your debug sessions much more useful, but there are also some other advances in Visual Studio that go beyond these breakpoint modifiers. The first advance is the idea of advanced location breakpoints. How many times have you been debugging an issue and as you’re looking at the call stack you realize that you want to set a breakpoint ......

Posted On Saturday, February 14, 2009 6:45 PM

Visual Studio 2008 Debugging Tricks – Tracepoints
We have talked about the Location, Condition, Hit Count, and Filter modifiers for breakpoints which only leaves the When Hit modifier. Using the When Hit modifier allows you to change your breakpoint to a tracepoint. What is a tracepoint? Simply put, it is a breakpoint that continues execution. Why would this be interesting or even important? Tracepoints are great when you want to trace a particular path of execution, such as OnDeserialized events in your WCF DataContract classes. You are interested ......

Posted On Saturday, February 14, 2009 4:17 PM

Visual Studio 2008 Debugging Tricks – Advanced Breakpoints
The most basic aspect of any debugging session is the use of breakpoints, which allows you to specify a location in your application (a line of code) where program execution will stop (break) and allow you to inspect the internal state of the application at that exact moment. This is a pretty cool feature, but Visual Studio allows you to do even more with advanced breakpoints. Put simply, an advanced breakpoint is a breakpoint with one or more modifiers applied. A modifier allows you to change the ......

Posted On Saturday, February 14, 2009 4:16 PM

Windows Live Sync
I have talked about Windows Live FolderShare in the past and have always really liked what it offers. As part of the new Windows Live Wave 3 release, although not an official part of the release yet, is the fact that FolderShare is being renamed and rebranded as Windows Live Sync. As I said, its not part of the beta releases today, but you can download the beta if you want an early look. This is looks like it is still an early beta, so a lot of features don’t appear to be working and I can’t get ......

Posted On Thursday, September 18, 2008 10:26 AM

.NET Memory Management – Resources
I present at a lot of the local Florida code camps (and some out of state ones as well) and have a set of presentations that I do which focus on .NET memory management, specifically a "deep dive" on how the GC works and another presentation which talks about how to implement the Dispose pattern properly. I was doing some additional research today to update my list of resources in the presentations and decided to publish that list here as well. This is not an exhaustive list, but it is a subset of ......

Posted On Sunday, September 14, 2008 4:16 PM

Adding custom assertions to MSTest
In my last post I talked about migrating from NUnit to MSTest and mentioned that there were some Assert methods that NUnit provided which did not have corresponding methods in MSTest. For reference, those unavailable Asserts are: Assert.IsNaN Assert.IsEmpty Assert.IsNotEmpty Assert.Greater Assert.GreaterOrEqual Assert.Less Assert.LessOrEqual Assert.IsAssignableFrom Assert.IsNotAssignableFrom CollectionAssert.IsEmpty CollectionAssert.IsNotEmpty StringAssert.AreEqualIgnori... StringAssert.IsMatch ......

Posted On Saturday, January 31, 2009 9:10 PM

Migrating from NUnit to MSTest
I have been writing a lot of unit tests over the past month using the Microsoft Test (MSTest) unit testing framework that is now part of Visual Studio 2008 Professional Edition (and higher SKUs). Currently I have about 223 unit tests covering 39 classes (about 18K lines of code, 325 methods and 176 properties) with a code coverage percent of 97%. The classes that I’m testing previously had NUnit tests (although not as many as I currently have) and used NCover and NCover Explorer for my code coverage ......

Posted On Saturday, January 31, 2009 12:39 PM

Upcoming Code Camps for the South East
I’m trying to put together my speaking schedule for upcoming code camps in the South East region. Right now I just want to know when the upcoming code camps are so I can determine which ones might best fit my schedule. I only know of a few, so if you know of others please let me know. Date Title Speaking? 1/24/2009 New England Data Code Camp4 N 1/31/2009 Alabama Code Camp1 N 2/6/2009 South Florida Code Camp Y 3/7/2009 Roanoke Code Camp N 3/14/2009 Atlanta Code Camp2 N 3/28/2009 Orlando Code Camp3 ......

Posted On Tuesday, January 20, 2009 12:19 AM

How to unit test this code?
This question is for all of the TDD and unit test folks, so I’m hoping someone comes up with an answer. I’ve been writing unit tests and analyzing code coverage for one of my libraries for about a week now and I’m starting to see the end, at least for this particular library. However, I’ve run in to a problem trying to ensure as close to 100% code coverage as possible. This exists in several methods in a few different classes, but I’ll take the simplest one for illustration purposes. I have cod that ......

Posted On Saturday, January 17, 2009 10:35 PM

Unit Testing and Expected Exceptions
When writing unit tests that cover methods that can throw known exceptions, you generally want to make sure that your tests actually test the conditions that can cause the exception and that you do, in fact, throw the correct exception. Most unit test frameworks, including MSTest and NUnit, use an ExpectedExceptionAttribute to decorate the test method. There are actually several problems with using ExpectedExceptions that make it more difficult to write good unit tests. The first problem is the fact ......

Posted On Saturday, January 17, 2009 1:20 PM

Microsoft Test and Code Coverage
I have been writing a lot of unit tests lately using Microsoft Test. This included converting a bunch of old NUnit tests to the MS Test format, which was relatively painless. While examining the code coverage results (after all, what good are unit tests if you don’t know what portions of the code are being tested and not tested), I have noticed that the results sometimes lie. For example, I have a class that contains some extension methods for manipulating enums. One of those methods takes an enum ......

Posted On Saturday, January 17, 2009 12:30 PM

Reading all bytes from a Stream
I was working on some Stream extensions today and added a method which will read all of the data from a stream in to a byte array. Some of the classes which derive from Stream provide a similar method (MemoryStream, for example, provides a GetBuffer() method to do this). The drawback here is that the base Stream class doesn’t provide an abstract GetBuffer() method; instead it’s up to each individual derived class to implement such a method. This is perfectly reasonable as a stream may not have an ......

Posted On Saturday, January 10, 2009 3:24 PM

XML Comments: filterpriority
I am a big fan of using XML comments in code and actually have a few Visual Studio macros which allow me to “inherit” the documentation from an overridden member. Every once in a while, I end up pulling in a comment with a filterpriority XML tag. This tag is very prevalent in the BCL but I have never been able to find documentation on what it actually means. To see what I mean, let’s take a look at part of the definition for System.Object. In the XML comments, you will see that the class itself has ......

Posted On Thursday, January 8, 2009 8:55 PM

Tampa Code Camp Sessions
Tampa Code Camp is this weekend and I’m presenting 3 sessions: Understanding Lambda Expressions Lambda expressions are an integral part of LINQ and a powerful new feature of .NET 3.0. We will explore the history of lambda expressions and how they operate in .NET, and how they can dramatically simplify your code.Lambda expressions are an integral part of LINQ and a powerful new feature of .NET 3.0. Memory Management Fundamentals – Garbage Collection Deep Dive Memory management in .NET is one of the ......

Posted On Tuesday, December 2, 2008 8:28 PM

.NET Lambda Expressions – Resources
I present at a lot of the local Florida code camps (and some out of state ones as well) and have a presentation that focuses on understanding Lambda expressions in .NET. This is not an exhaustive list, but it is a subset of the books, articles, blogs, and presentations that I used to form the content of my presentation. Books Essential C# 3.0: For .NET Framework 3.5 (2nd Edition) (Microsoft .Net Development Series) (Paperback) (Mark Michaelis) The C# Programming Language (3rd Edition) (Microsoft ......

Posted On Friday, November 28, 2008 11:58 AM

Silverlight 3
Silverlight 2 was just released a few short months ago, but ScottGu is already providing hints at what we will see in Silverlight 3 which is supposed to be out sometime next year and will be a major update. Some of the major enhancements and improvements are: media enhancements (including H.264 video support) graphics improvements (including 3D support and GPU hardware acceleration) application development improvements (including richer data-binding support and additional controls) To go along with ......

Posted On Sunday, November 23, 2008 12:51 PM

Generics in C#
Generics in C# have been around for a while (the concept of generics has been around even longer) but there are still a lot of developers who don’t have a good understanding of what they are or how to use them. Looking at the direction C# 4.0 is taking, generics are becoming more and more important and if you don’t make them a natural part of your programming tool belt you are going to find yourself falling behind the curve. Karl Seguin at CodeBetter.com has an excellent post that explains generics ......

Posted On Sunday, November 23, 2008 12:20 PM

Tampa Code Camp
Tampa Code Camp is coming up in just two weeks, so be sure to register now if you plan to attend. The speaker bios and full agenda haven’t been published yet, but the list of sessions is now available. If you’re going, be sure to check out my sessions: Coding Style and Standards (chalk talk) Code standards and styles are one of those topics that you either love or hate. Join your fellow developers as we talk about what our experiences have been, what worked, what didn't, and why having them is a ......

Posted On Sunday, November 23, 2008 11:57 AM

Test Driven Development Firestarter
Event Date: Saturday, January 19, 2009 Event Time: 08:30 (registration), 09:00 – 17:00 Event Location: Microsoft Tampa Office If you want to learn what TDD is all about, this is the event to attend. It’s a day-long event where you will go from start to finish with a sample domain problem and learn how to write tests to drive functionality of the system. This promises to be an excellent event and will be good for both beginners and those experienced with TDD. There will be two tracks running simultaneously, ......

Posted On Sunday, November 23, 2008 11:39 AM

CodeRush Xpress for C#
Developer Express, the makers of CodeRush, have teamed up with Microsoft to make a scaled down version available for free called CodeRush Xpress. This is exclusively for C# developers working in Visual Studio 2008 and includes a selection of hand-picked features from CodeRush and Refactor! Pro. A few important things to point out are that CodeRush Xpress: does not support the Visual Studio Express Editions cannot be installed side-by-side with other CodeRush or Refactor! editions There are about ......

Posted On Sunday, November 23, 2008 11:07 AM

Tampa Code Camp 2008
Normally the Tampa Code Camp has already come and gone by this time of the year. This year, however, it’s being held on December 6. The official website and list of sessions has not been published, but it should be available soon. Be sure to register now if you plan to attend. Last year attendance was capped at 600 and we’re in a different location this time so I don’t know what the limit will be. When & Where: Saturday, December 6, 2008 Kforce Corporate Headquarters 1001 East Palm Avenue Tampa, ......

Posted On Saturday, November 15, 2008 9:12 AM

MSDN Developer Conference: The Best of PDC 2008
Did you miss PDC this year? Don’t want to watch the recorded sessions? Then register today for an MSDN Developer Conference near you! The MSDN Developer Conference (MDC) brings you the best content of the PDC presented by your local field evangelists and community influentials (mostly Microsoft MVPs). The conference is broken down in to 3 tracks: Azure Services Platform Client and Presentation Tools, Languages, and Framework The MDC is a one-day “best of” conference that costs $99.00. If you didn’t ......

Posted On Saturday, November 15, 2008 8:41 AM

CLR 4.0: Native-Managed Interoperability Improvements
Exposing a native application to a managed application hasn’t always been the easiest experience. The good news is that there are some significant improvements in the interoperability story between native and managed code. In the current versions of the .NET Framework, the process starts with running the tlbimp tool to create an interop assembly. The problem here is that tlbimp doesn’t always get everything right so you have to fix the assembly by running ildasm and then hand modify the IL or write ......

Posted On Monday, November 10, 2008 11:20 AM

Visual Studio user settings per project/solution
Last April I talked about the need to have the Visual Studio editor settings (like tab size, curly brace location, etc.) stored with each solution as well as globally. This was spurred by an email thread between some of the Subtext developers and myself. The end result was a feature request being submitted on Microsoft Connect. That feature request ended up being closed because it was submitted too late in the Orcas (Visual Studio 2008) cycle. I just received an update from the Connect site, and ......

Posted On Monday, February 18, 2008 10:47 PM

CLR 4.0: In Process Side-by-Side CLR Hosting
The CLR is the core set of APIs that make up the .NET Framework. Each release of the CLR has added functionality, with the most functionality being added in the .NET 3.0 and .NET 3.5 releases. These releases used a “layer cake model” This model works reasonably well for solving application compatibility issues but does restrict the kinds of functionality that can be added. The other problem with this approach is that the hosting process (any application that hosts an instance of the .NET Framework ......

Posted On Monday, November 10, 2008 10:43 AM

Release builds are not Debug builds
Scott Hanselman has an excellent post on his blog where he talks about the differences between release builds and debug builds. Just to reiterate what should be obvious, as Scott points out: Release builds are optimized for speed and debug builds are optimized for, well, debug-ability. However, most of the optimizations in managed code are done by the JIT compiler rather than the language compiler. If you want to know about some of the real difference between release and debug builds, including C# ......

Posted On Thursday, October 25, 2007 7:22 PM

Model View Controller vs Model View Presenter
You've probably heard all of the buzz around Microsoft's new ASP.NET MVC Framework. This is a framework methodology that divides an application's implementation into three component roles: models, views, and controllers. You've probably also heard about a slightly different approach called Model View Presenter (MVP). If you ever wanted to know the difference between the MVC and MVP patterns and why you should use one over the other, Todd Snyder from Infragistics has an excellent explanation. He sums ......

Posted On Friday, October 19, 2007 9:24 PM

CLR 4.0: Managed Languages
Over the years .NET has been a great platform for multiple languages, and actually launched with support for 16 different languages. Up until recently, however, it has been difficult (but not impossible) to create functional and dynamic languages for .NET. With the release of CLR 4.0, Microsoft is officially releasing IronPython, IronRuby, F#, and several other functional or dynamic languages. In order to do this, the CLR is gaining support for a few language features that are common in these types ......

Posted On Monday, November 10, 2008 10:26 AM

CLR 4.0: Corrupted State Exceptions

This post has been moved.

Posted On Friday, November 7, 2008 3:19 PM

CLR 4.0: Debugging Improvements
Debugging in .NET 4.0 has become a bit easier as well thanks to better support for dump debugging through Visual Studio. This means that dump debugging now has support via ICorDebug, which is the same API that is used to enable live debugging and will also allow you to debug Windows Error Reporting mini-dumps in Visual Studio. If you develop 64-bit applications, 64-bit mixed-mode debugging now supports both live and dump debugging. There are also new APIs to do lock inspection, which allows you to ......

Posted On Friday, November 7, 2008 3:05 PM

Data Binding an Enum with Descriptions on Code Project
I decided to turn my blog post on data binding an enum into an article on Code Project as well. I did this for two reasons: It gives the topic a much wider audience It provides a ready to use solution with the source code so you don't have to copy & paste it from the blog entry This article (or blog post) should provide a clean and simple way to allow you to bind an enumerated type with support for custom and localizable descriptions to any UI element that supports data binding ......

Posted On Sunday, August 12, 2007 10:47 PM

CLR 4.0: Code Contracts
If anyone is familiar with the Microsoft Research (MSR) project Spec# you will be familiar with the idea of contract based programming. CLR 4.0 takes the idea of contract based programming (and more specifically code contracts to ensure code validity) from Spec# and adds it to the CLR. This now means that code contracts are available to any .NET language. The premise behind code contracts is that you (the programmer) know a lot about your code, including when input arguments should and shouldn’t ......

Posted On Friday, November 7, 2008 2:58 PM

Visual Studio 2008 Code Editor Improvements
Scott Guthrie has a great blog post about some really cool editor improvements in Visual Studio 2008. As Scott points out, one of the big annoyances with VS2005 as the fact that the intellisense window obscures any code behind it. In VS2008, if you hold down the "Ctrl" while the Intellisense window is visible it will switch to a semi-transparent mode that allows you to see the code beneath it. When you release the "Ctrl" key, it switches back to normal. There are a lot of improvements for VB developers, ......

Posted On Wednesday, August 8, 2007 9:16 PM

Referenced on Wikipedia
I periodically look at my blog statistics, more out of idle curiosity than anything else. As part of that, I look at the referrers to the various blog posts. Today, as I was browsing my referrer list, I noticed that one of the referrers was Wikipedia. Intrigued, I took a look at the entry, and my blog post about the Visual Studio 2008 launch date was listed as a reference ......

Posted On Tuesday, August 7, 2007 7:48 PM

Visual Studio "Rosario" CTP is here
I blogged a few days ago about the upcoming release of the August CTP for Visual Studio "Rosario". It seems I was just a day too soon. The CTP was released on Saturday as a Virtual PC (VPC) image. The majority of new features that are part of the CTP are centered around improvements in Team System, most notably in the areas of quality and testing. From Brian Harry's blog, This CTP delivers a mix of features supporting both scenarios - including an update MSF CMMI template, user definable links types, ......

Posted On Tuesday, August 7, 2007 7:26 PM

CLR 4.0: Garbage Collection Changes
The .NET garbage collector is one of the areas of the .NET Framework that is extremely important and probably one of the least understood. There are a lot of articles written about it and there have been very few changes since .NET 1.0 was first released. (There have been changes with almost each release, but they have been relatively minor.) With .NET 4.0, however, there are some fairly substantial changes to the GC that will have some interesting performance implications (in a good way). For a ......

Posted On Friday, November 7, 2008 2:37 PM

New .NET Logos
Just in time for PDC, Microsoft has unveiled new logos for the .NET Framework. According to Chris Keonig’s blog post about the new logos, the change was made because We [Microsoft] needed a logo that was in sync with the key values that we want .NET to stand for: consistency, robustness and great user experiences. We also wanted a logo that conformed to the design principles that are driving Microsoft’s brand identity evolution and is reflected in newer brands such as Silverlight, Surface and more. ......

Posted On Friday, October 24, 2008 11:06 PM

Visual Studio Macro to Collapse Extra Vertical Space
A few days ago in one of the CodeProject disucssion forums someone was looking for a way to easily remove the extra vertical whitespace in a file. This is really handy if you copy and paste code from the web or otherwise have a file that has multiple consecutive blank lines that you want to consolidate to a single blank line. A solution was presented that used a Visual Studio macro, but that macro used pattern matching with find and replace, so it didn’t feel very stable. Taking the opportunity to ......

Posted On Thursday, September 18, 2008 12:06 PM

Southwest Florida Code Camp
It looks like the first code camp to be held in the “swamp coast” of Southwest Florida was a huge success. I think John and the rest of the crew that put this together did an excellent job. I haven’t heard final numbers yet, but they had 175 registered with 26 sessions and a morning of Open Space sessions. As always, I presented two sessions on .NET Memory Management (thank you to the handful of people that attended and apologies for doing the sessions in the opposite order to how they were listed ......

Posted On Sunday, September 14, 2008 4:15 PM

Jacksonville Code Camp 2008 Presentations
For those of you attending the Jacksonville Code Camp 2008, the presentations for my sessions are available on my public Windows Live SkyDrive folder. My sessions are: Memory Management Fundamentals – IDisposable and the Dispose Pattern 8:30 AM– 9:30 AM Code Styles & Standards (Open Space/Chalk Talk) 9:40 AM – 10:40 AM Memory Management Fundamentals – Garbage Collection Deep Dive 2:15 PM – 3:15 PM Unfortunately, it looks like most of the sessions that I want to see are at the same time as mine, ......

Posted On Saturday, August 23, 2008 1:43 AM

Visual Studio and Code Analysis
Even with the newest releases of StyleCop, FxCop, and Visual Studio 2008, there is still a lot of room for improvement in the suite of technologies and products that make up what should probably be termed “Microsoft Source Analysis”. I know that calling StyleCop that name caused a lot of confusion since it was being compared to the built-in source analysis features of Visual Studio (at least the Team Edition SKUs of Visual Studio). I think the real heart of the problem is that Visual Studio comes ......

Posted On Tuesday, August 19, 2008 1:04 PM

StyleCop 4.3 Released
A while ago I talked about a new tool from Microsoft called StyleCop. Since then, there was a lot of confusion surrounding the tool and it has undergone a lot of changes both internally and externally. Both Jason and Brian do an excellent job explaining the context behind some of the discussions and decisions leading up to these changes, but the biggest one is that the tool has been officially renamed as “StyleCop” to prevent any confusion with the built-in Visual Studio Code Analysis packages. I’m ......

Posted On Tuesday, August 19, 2008 10:25 AM

Jacksonville Code Camp IV – Hotel and Weather Information
For any one who is going to the Jacksonville Code Camp 2008 (Jax Code Camp IV) and is traveling be sure to keep an eye on the weather and on tropical storm Fay. It is supposed to be hitting Florida as early as Tuesday, but the forecasts don’t yet know exactly where. If you book a hotel through Hotwire (the only 4-star listed on Hotwire for downtown Jacksonville is the Hyatt) be sure to purchase the travel protection (it’s only about $8) since it covers natural events like hurricanes. Otherwise, you ......

Posted On Monday, August 18, 2008 12:25 AM

Southwest Florida Code Camp
Another Florida Code Camp, this time in Southwest Florida (which is the Naples area). This is the first code camp for Southwest Florida, so be sure to register. When you register, you can sign up as a speaker as well if you want to get more involved in the community…speaking at Code Camp is a great way to get started as a speaker. I’ll be there speaking and possibly attending some sessions as well, depending on when things get scheduled. Here are the details: When: September 13, 2008 - 8:00am to ......

Posted On Wednesday, August 13, 2008 3:04 PM

Jacksonville Code Camp 2008
I just found out about this a few days ago, but I’ll be speaking. Seating is limited to 300 people, so be sure to register. Technorati Tags: CodeCamp ......

Posted On Sunday, August 10, 2008 1:18 PM

Windows Vista UX Guidelines and Visual Studio
Whether you like Vista or not, the user interface aspects of the operating system are here to stay. Overall, I think Microsoft did a good job with the core interface guidelines, as presented in the Windows Vista User Experience Guidelines. From the guidelines, The goals for these official Windows Vista® User Experience Guidelines (or "UX Guide" for short) are to: Establish a high quality and consistency baseline for all Windows Vista-based applications. Answer your specific user experience questions. ......

Posted On Friday, July 25, 2008 9:50 AM

When Should You Use WPF?
It’s pretty clear that Windows Presentation Foundation (WPF) is here to stay. In fact, use of WPF is becoming more popular and frequent, particularly now that Silverlight 2.0 is on the horizon. The problem is that there has been very little guidance available to help you decide when to use the various UI technologies available. There is however, some unofficial help in the form of this blog post and this white paper. Here is the comparison matrix from Michael’s blog post: WPF WPF XBAP Silverlight ......

Posted On Sunday, July 20, 2008 1:52 PM

Historical Evolution of C# Code Style
Jason Allor, the developer behind the Microsoft StyleCop tool has an excellent blog post about the historical evolution of C# code style. The post came about largely in response to some criticisms about the code style enforced by StyleCop and how it doesn’t match C/C++ style or that it differs in some areas with the Framework Design Guidelines. As Jason points out, most of the differences are historical and are there because the of two reasons: The original development team for the CLR consisted ......

Posted On Sunday, July 20, 2008 1:32 PM

Shared Projects and Solutions between Visual Studio 2008 and 2005
There are still a large number of developers that have both Visual Studio 2005 and 2008 installed on the same machine and probably an even larger number of development teams that use a mixture of VS 2008 and 2005. DJ Park, one of the PM's on the Visual Studio team has a great blog post that explains the possibilities and limitations of using solutions and projects between both versions of Visual Studio. To quickly summarize: Solutions created in Visual Studio 2008 cannot be opened in Visual Studio ......

Posted On Sunday, July 20, 2008 12:17 PM

Visual Studio 2008 and TargetFrameworkVersion
A question was asked yesterday in one of the CodeProject discussion forums by someone looking for a way to easily change the Target Framework version of all projects in a solution. If you don’t know, the Target Framework version is what tells the compiler which version of the .NET Framework to compile against (more information is available here) and can be set to one of the following values: .NET Framework 2.0 .NET Framework 3.0 .NET Framework 3.5 This can be easily accomplished by editing the project ......

Posted On Friday, July 18, 2008 12:36 PM

Standard and Custom Format Strings
I was recently asked by a co-worker what the format string was for formatting a DateTime object in an ISO 8601 format. The way to do this is passing a format string to the ToString() method on the DateTime object. The question becomes, what is that format string? There are two ways to do this: DateTime.Now.ToString(“yyyy... DateTime.Now.ToString(“o”) At this point, you might ask how you would know to use the “o”. This information is available through MSDN, but it ......

Posted On Friday, July 11, 2008 2:57 PM

Developer Tools
I recently went through the exercise of reinstalling all of my developer tools on my home development system. This involved uninstalling everything, including Visual Studio and SQL and then reinstalling. While this wasn’t exactly a painless experience, it was good to get back to a relatively clean slate and re-evaluate all of the various tools and add-ins I’ve accumulated. I posted a similar list about 2 1/2 years ago, so it’s interesting to see what’s changed in that time. This time, I’m just listing ......

Posted On Thursday, July 17, 2008 12:05 AM

Null Object pattern follow up
My earlier post on the Null Object pattern led to a few critiques about the fact that I was presenting an extension method to do what is essentially a very simple logical test, and, as a result, doesn’t provide much value. For reference, here is the original extension method from that post public static class NullObjectExtenstions { public static bool IsNull(this object source) { return (source == null); } } Yes, this is an extremely simple method and performs a very basic logical test. However, ......

Posted On Friday, July 4, 2008 9:51 AM

What is “Defensive Programming”?
My post on the Null Object pattern has generated some interesting dialog. One of the trends that I have seen is the idea that defensive programming means your code should fail as early as possible. I couldn’t agree less. According to Wikipedia, Defensive programming is a form of defensive design intended to ensure the continuing function of a piece of software in spite of unforeseeable usage of said software. The idea can be viewed as reducing or eliminating the prospect of Murphy's Law having effect. ......

Posted On Friday, July 4, 2008 9:26 AM

Null Object pattern
I've been trying to catch up on my reading and came across this post by Fredrik Normén where he raises the question about returning null or using the Null Object pattern. Interestingly enough, last month while I was in Seattle for the 2008 MVP Summit I had a very similar discussion. The end result of that discussion was that null objects, and nullability in general, ideally should be treated as a "first-class" citizen in the CLR. This means that if you try to execute a method on a null object you ......

Posted On Sunday, May 25, 2008 6:28 PM

MVP Summit 2008
I just got back from attending my first MVP Summit and have to say the level of access we received to the product teams and other people within Microsoft was outstanding. Since this was my first Summit, I don't really have a frame of reference to know how it compares to previous years, but it did quickly become apparent to me that Microsoft really does listen to community as much as they are able. Obviously some groups and products are better able to do this than others, but that seems to be mostly ......

Posted On Saturday, April 19, 2008 1:05 PM

Book Review: ASP.NET Data Presentation Controls Essentials
If you are an ASP.NET developer or want to become one, there are numerous books available that talk about the ASP.NET framework and/or how to build web sites using ASP.NET. Pact Publishing has a book that focuses specifically on the data presentation controls that are available in ASP.NET, including ASP.NET 3.5 called ASP.NET Data Presentation Controls Essentials by Joydip Kanjilal. The book provides a good introduction to the basics of how data binding in ASP.NET works and then expands on that introduction ......

Posted On Friday, March 28, 2008 6:52 PM

Orlando Code Camp 2008 - Thanks!
I just got back from Orlando Code Camp 2008 and wanted to thank everyone who was involved in organizing it and everyone who came out to attend sessions. I believe there were about 250 people attending with about 40 speakers presenting on over 50 topics. For those of you who attended my talks on memory management fundamentals - "Thank you!". I had a great turnout at both sessions, with about 18 people at each. I got a lot of great questions from everyone and some really good feedback as well. If you ......

Posted On Sunday, March 23, 2008 7:58 PM

New Lineup of SlickEdit Tools
I have talked about the SlickEdit Tools and Gadgets in the past (here and here) and have always been impressed with both of them. Previously, the SlickEdit Tools were only available for Visual Studio 2005. Now that Visual Studio 2008 is here, SlickEdit has released an update that works with both VS2005 and VS2008. The catch here is that this is much more than a simple update. The major difference is that the tools have been organized into two products: the Editing Toolbox (datasheet), which contains ......

Posted On Thursday, March 20, 2008 4:18 PM

How big is the .NET Framework?
No, this question isn't asking how much disk space is required by the Framework. It's really asking "How complex is the .NET Framework for developers?" As you might guess, the answer is: It's pretty complex. All joking aside, this is neither an uncommon nor unreasonable question and answer. The reality of it is that the .NET Framework is a very complicated application programming interface (API) but is designed in such a way to expose that complexity gradually (at least in most cases). Brad Abrams ......

Posted On Tuesday, March 18, 2008 11:44 PM

NameValueCollection and .NET Configuration Files
I spent most of yesterday trying to figure out how to make use of a NameValueCollection in a .NET configuration file. After wasting almost the entire night fighting with this problem, I thought I would let everyone know that it is possible, and easier than you might think. (By the way, this was a clear case of working too long on the problem. After a good nights sleep, I solved this in under 5 minutes.) At this point you might wonder why this was so difficult. The largest and most significant problem ......

Posted On Sunday, March 16, 2008 8:00 PM

Code Signing
Ever since the .NET Framework was first release, Microsoft has always recommended that your code be signed. Windows Vista drives this point home even more with UAC and the Windows Error Reporting (WER) features, not to mention the fact that it's a requirement for Vista logo certification. John Robbins from Wintellect provides an excellent explanation of how to sign your code. As it turns out, it's a lot easier than many of you may have thought ......

Posted On Friday, February 29, 2008 9:59 PM

The additive nature of the .NET Framework
Also from Paul's blog post and the .NET Framework Namespace poster is an excellent diagram that shows the relationship between the .NET Framework 3.5 release and the other versions of the Framework. This clearly shows the additive nature of both the .NET 3.0 and 3.5 releases ......

Posted On Friday, February 29, 2008 9:37 PM

.NET Framework 3.5 Namespace poster
Now that .NET Framework 3.5 has been officially released, you can download a PDF of the commonly used types and namespaces. Be sure to check out Paul Andrew's blog post for full details ......

Posted On Friday, February 29, 2008 9:30 PM

WPF Application Quality Guide
Since WPF was released it has seen a fairly rapid adoption but not much in the way of guidance. The WPF team at Microsoft is hoping to change that with the release of the WPF Application Quality Guide. The guide is going to be released in stages and will be updated based on feedback provided by the community. While the first release is still missing a lot, it does provide some good tips on setting up your application for automated testing. They also provide a good list of tools for performance profiling: ......

Posted On Friday, February 29, 2008 8:39 PM

Framework Engineering: Architecting, Designing, and Developing Reusable Libraries
At TechEd 2007, Krzysztof talked about building reusable libraries. The session abstract is below. You can download the presentation as an XPS file. The presentation was also recorded, and the WMV file can be downloaded from here. This session covers the main aspects of reusable library design: API design, architecture, and general framework engineering processes. Well-designed APIs are critical to the success of reusable libraries, but there are other aspects of framework development that are equally ......

Posted On Friday, February 29, 2008 8:27 PM

CodeCampServer
It's beginning to look like the start of the Code Camp Season, with at least 12 scheduled over the next 4 months. If you are organizing a code camp, there is a new open source project that Jeffery Palermo has started called CodeCampServer. The project aims to provide a solution that can server as the web site for a code camp and will be able to track and manage multiple conferences for a single user group. The project will use the ASP.NET MVC Framework and the MvcContrib. The project hasn't had their ......

Posted On Friday, February 29, 2008 8:15 PM

Book Review: LINQ Quickly
I was recently introduced to a UK based publisher called Pact Publishing. They are a UK based publisher and have a book focused on the new Language Integrated Query (LINQ) features available in .NET 3.5 called LINQ Quickly: A practical guide to programming Language Integrated Query with C# by N Satheesh Kumar. The book provides a good overview of LINQ and it's supporting language features, such as anonymous types, implicit typing, object initializers, extension methods, and expressions. It then builds ......

Posted On Sunday, February 24, 2008 7:40 PM

What's Important at Code Camp...clarifications
It seems my earlier post about "What's Important at Code Camp?" might have touched a few nerves and may not have been as clear as I would have liked, so here are a few clarifications. I wasn't implying in any way that sponsors aren't important. In fact, it really was the other way around. As I mentioned, Code Camp is free to the attendees but there is still a cost to the organizers. That cost is defrayed as much as possible by support from Microsoft and other sponsors. Without the sponsors, it would ......

Posted On Tuesday, February 12, 2008 4:42 PM

Visual Studio Color Schemes
There is always a lot of interest around my desk at work any time I change the color schemes in Visual Studio. I usually bounce between the default "light" color scheme and a "dark" scheme, mostly depending on much actual coding I'm doing at the moment, but sometimes just because I want a change. It isn't always easy to come up with a good color scheme and there isn't a good location online to collect the various color schemes people have created. Today, I came across a link on Charlie Calvert's ......

Posted On Monday, December 24, 2007 9:44 PM

OpenGauntlet Project
One of the new features that will be available as part of the Visual Studio "Rosario" release is called "Gated Checkin". This is based on an internal tool that Microsoft uses called Gauntlet. Gauntlet was originally created in 1996 by the IE team, but is now used fairly widely in a few different variations. The idea behind gated checkin is that it helps prevent build breaks by verifying the changes before the checkin occurs and rejecting them if something fails. Continuous integration also provides ......

Posted On Wednesday, December 19, 2007 9:12 PM

DLLImport Consistency and Performance
Daniel Moth has an interesting post that talks about performance and the DllImport attribute. The underlying theme to his post is that you should define a convention for how the DLL name is specified in the attribute. This actually has a significant enough impact that it really should become one of the rules in your coding standards documents. If we take an example, all of the following are valid and will work at runtime without any problems: 1: [DllImport("kernel32.dll")] 2: static extern ...; 3: ......

Posted On Wednesday, December 19, 2007 8:53 PM

Visual Studio 2008 and .NET Framework 3.5 November Release

During the keynote address at Microsoft TechEd Developers 2007 in Barcelona, Microsoft officially announced that Visual Studio 2008 and the .NET Framework 3.5 will be released by the end of November 2007. The .NET Framework 3.5 will also be available separately from Microsoft Update. The global launch event is still scheduled for February 27, 2008.

Posted On Tuesday, November 6, 2007 11:02 AM

MSDN Code Gallery
Late last month, Soma announced the new MSDN Code Gallery site for sharing samples from both Microsoft and the community at large. When I saw this announcement, I was a little surprised that Microsoft was creating yet another community-type samples site so close on the heals of the GotDotNet (GDN) shutdown. Granted, MSDN Code Gallery isn't exactly what GDN was, but between Code Gallery, CodePlex and MSDN Downloads it starts to get confusing. Charlie Calvert posted a good explanation of the three ......

Posted On Saturday, February 9, 2008 2:20 PM

South Florida Code Camp
The South Florida Code Camp was today and there were around 600 people who showed up. I moderated a round-table discussion on code style and standards and presented an in-depth talk on memory management in .NET. For those who attended either one of my sessions (or just want to take a look at the slides) you can download copies from my SkyDrive public folder. I only managed to attend a few sessions, but talking with people at the after-party it sounds like everyone had a great time and was able to ......

Posted On Saturday, February 2, 2008 10:13 PM

FxCop Rules
Earlier this month, the Code Analysis Team talked about which code analysis rules shipped in what version of Visual Studio and FxCop. There is a great spreadsheet that shows all of the rules and in which versions they are available. Here is the list of rules that are different or removed in Visual Studio 2008 and FxCop 1.36: Removed due to removal of data flow engine: CA1062 ValidateArgumentsOfPublicMe... CA1303 DoNotPassLiteralsAsLocalize... CA2100 ReviewSqlQueriesForSecurity... ......

Posted On Friday, January 18, 2008 1:16 AM

Debugging the .NET Framework Library Source Code
A while ago, I talked about Microsoft releasing the source code for the .NET Framework in order for you to debug it through Visual Studio 2008. Just a few days ago, it was finally released. Shawn Burke has an excellent and detailed post explaining how to set this up and also has a trouble shooting section. Currently, the following libraries have been released: NET Base Class Libraries (including System, System.CodeDom, System.Collections, System.ComponentModel, System.Diagnostics, System.Drawing, ......

Posted On Friday, January 18, 2008 12:06 AM

Why NAnt Is Almost Better Than MSBuild
Earlier this week, Travis Illig wrote about Why NAnt Is Better Than MSBuild. It seems he is taking the opposite position that I have been lately. He makes some interesting and valid points in this post that I wanted to address. NAnt lets you run tasks before any targets run; MSBuild doesn't. I commonly have some "setup" actions that need to happen before anything else in a build script happens. Stuff like registering NCover or starting up TypeMock. It's stuff that needs to happen once, before any ......

Posted On Friday, January 11, 2008 10:30 PM

Porting an NAnt Task to MSBuild
I have been working and talking a lot about MSBuild over the last few months. As part of that work, I have implemented several custom tasks for MSBuild. Most of those tasks were ones that I had written as part of an NAnt based build system while others were part of the NAntContrib project. There is a very good basic explanation of how to write a task on MSDN, so instead I will cover how to port a task from NAnt to MSBuild. To keep things simple, I'm going to focus on creating an MSBuild v3.5 task ......

Posted On Wednesday, January 9, 2008 9:37 AM

Windows Live Tools December 2007 CTP
I just noticed this announcement from last month, but if you are doing any Windows Live development you should check out the latest CTP release.The biggest improvement is that the CTP is now compatible with Visual Studio 2008 and the ASP.NET 3.5 Extension Preview. There are a lot of other changes in the CTP so be sure to check out the release notes ......

Posted On Sunday, January 6, 2008 2:39 PM

MSBuild or NAnt?
For the last 4 years or so I have been involved, either directly or indirectly, with creating standardized build systems that run on the Microsoft platform. Before that I was actually a Unix admin and developer and was very proficient in writing makefiles. When I first got involved in build systems for the Microsoft platform, it seemed like there were very few build script technologies available that were worth using. The best one available was the combination of NAnt and NAntContrib. There are many ......

Posted On Monday, December 24, 2007 1:06 PM

Free Day of Patterns and Practices Tampa 2008 Roadshow
Tampa 2008 Roadshow January 31, 2008, 8:30am - 4:00pm Microsoft - Tampa, Florida Register Join new and experienced Microsoft WinForms and Web developers for a day long FREE Developer Event covering Enterprise Library, Software Factories, and proven practices from Microsoft Patterns and Practices. Learn to increase developer productivity and application quality using Enterprise Library building blocks, code generation, and proven practices for Smart Clients, Web Clients, and Web Services. Learn how ......

Posted On Wednesday, December 19, 2007 10:10 PM

Visual Studio 2008 Rhythm Training Kit
If you are doing any work with any of the following technologies: LINQ, .NET 3.5 (C# 3.0, VB 9) WCF WPF WF CardSpace Silverlight ASP.NET Ajax .NET Compact Framework 3.5 VSTO 3.5 Visual Studio Team System and Team Foundation Server You should download the free Visual Studio 2008 Rhythm Training Kit (125MB). The training kit contains 5-days of technical content including 20 hands-on labs, 28 presentations, and 20 scripted demos ......

Posted On Wednesday, December 19, 2007 9:20 PM

Visual Studio 2008 for Architects
Jeff Barnes has made his extended talk (think "deep dive") on the following topics available: NET 3.5, Visual Studio Enhancements Lifecycle tools ALM, C#, VB9, Interop, LINQ ParallelFX PLINQ Services (WCF, WF, CardSpace) Windows Applications Web Applications Office Applications Mobile Applications Synch Services for ADO.NET Orcas_For_Architects_Jbarnes - Part_1.zip - 3.6 MB Orcas_For_Architects_Jbarnes - Part_2.zip - 4.8 MB Orcas_For_Architects_Jbarnes - Part_3_Links And Resources.zip 188 KB ......

Posted On Wednesday, December 19, 2007 9:16 PM

.NET Framework v2.0 and v3.0 SP1
Now that Visual Studio 2008 and the .NET Framework v3.5 have shipped, you may have noticed that Service Pack 1 for .NET Framework 2.0 and Service Pack 1 for .NET Framework 3.0 also shipped at the same time. Both are automatically installed with .NET Framework v3.5, Windows Server 2008 and Windows Vista Service Pack 1. For Windows XP and Windows Server 2003 they are available as a standalone update. Daniel Moth has an excellent post that describes what is actually in the service packs. Here is the ......

Posted On Wednesday, December 19, 2007 8:38 PM

FxCop Spell Checking Rules
I just came across this post by Travis Illig, one of the Subtext developers, that brings up an interesting issue with FxCop 1.35. Apparently, FxCop 1.35 uses the Office 2003 spell checker for the spelling rules. If you don't have Office 2003 (and it must be Office 2003) installed, the spell check rules will fail. Travis isn't the first person to document this problem. This problem is known and will be fixed in newer versions of FxCop. Visual Studio 2008 code analysis tools have spelling rules built ......

Posted On Wednesday, December 19, 2007 8:22 PM

ASP.NET Extensions - MVC Framework
The much-talked about MVC Framework that Microsoft is working on was released last week as part of the ASP.NET 3.5 Extensions. It also has some other pretty cool stuff, including Dynamic Data controls, Ajax history support, ADO.NET Data Services, updated support for Silverlight and the ADO.NET Entity Framework. Once you download it, here are some great resources to check out: Scott Guthrie's 4 part tutorial on building an MVC based application Phil Haack (the PM for the MVC Framework) Rob Conery ......

Posted On Wednesday, December 19, 2007 8:05 PM

Ajax and .NET Developers
My friend Simone has created an interesting survey focused on .NET developers and Ajax. It's a more focused response to this survey on the Ajaxian blog. As of 2 AM (in Italy), there have been 415 responses: ASP.NET Ajax: 80% AJAX Control Toolkit: 17% JQuery: 13% raw Ajax: 12% If you are a .NET developer and are working with Ajax be sure to take the survey ......

Posted On Tuesday, December 18, 2007 8:39 PM

ASP.NET 3.5 Extensions Release
Now that Visual Studio 2008 and .NET 3.5 have officially shipped, it's time to start looking at the additional products and tools that build on top of that foundation. Scott Guthrie has an excellent post that details the roadmap for the Web related products. The biggest announcement is that the ASP.NET 3.5 Extensions will have it's first public preview available sometime next week. If you don't know what the ASP.NET 3.5 Extensions are, here is the list (taken from Scott's post): ASP.NET MVC: This ......

Posted On Friday, November 30, 2007 10:24 AM

Multi-component Installers
With the deluge of blog posts talking about the recently releases of Visual Studio 2008 and the .NET Framework 3.5, Scott Guthrie talks about the steps to uninstall the Visual Studio 2008 Beta 2 release you should follow before installing the final release. It's great that Scott has put together this list since it not only tells you all of the components that are installed when you install Visual Studio 2008 Beta 2 but also tells you the order to uninstall them. This post also indirectly brings to ......

Posted On Thursday, November 22, 2007 12:18 AM

Microsoft Sync Framework
The first CTP of the Microsoft Sync Framework was announced during the keynote at Microsoft TechEd Developers 2007 in Barcelona. The Microsoft Sync Framework is a comprehensive synchronization platform enabling collaboration and offline for applications, services and devices with support for any data type, any data store, any transfer protocol, and network topology. Building on the synchronization functionality that is already available in Visual Studio 2008, the Sync Framework will allow developers ......

Posted On Tuesday, November 6, 2007 11:11 AM

Hyperlink your source code
If you're diligent about putting meaningful comments in your source code (and if you're not, you should be!) you have probably wanted the ability to have a comment link to another method or another area of code. Using XML comments, it is relatively easy to link to other code elements using the <see> or <seealso> tags. However, if you want to have this same ability in normal comments, you were out of luck. However, a new Visual Studio Add In available on CodePlex is changing that. This ......

Posted On Sunday, October 28, 2007 2:08 PM

WPF Virtual Bootcamp
I just came across a post by Tim Sneath announcing the WPF Virtual Bootcamp. This is a three-day virtual training course that covers all aspects of WPF as part of MIX University. The best part about this bootcamp is that it's completely free. This was originally delivered on the Redmond campus earlier this year to a small invited audience and features: A keynote from Ian Ellison-Taylor, the general manager responsible for WPF, Silverlight and client platform tools. Introductory sessions on core WPF ......

Posted On Friday, October 26, 2007 10:01 PM

Debugging Finalizers
For the last few years, I've tried to make more .NET developers aware of the IDisposable interface, the Dispose pattern, and the importance of having at least a basic understanding of how the Garbage Collector works. I have one article on The Code Project and various blog posts (see here, here, here, or here) that talk about these topics. I have also presented an advanced Memory Management presentation at various Code Camps. In the November 2007 issue of MSDN Magazine, Stephen Toub presents a solution ......

Posted On Thursday, October 25, 2007 10:24 PM

FxCop 1.36 Beta
I just came across this post the other day by the Visual Studio Code Analysis Team talking about the latest beta release of FxCop. There are a lot of changes since the FxCop 1.35 release, which was a while ago. Some of the changes are: Over 200 bug fixes that reduce the amount of noise, missing analysis, and rule crashes. Support for analyzing anonymous methods and lambda expressions. New globalization, design, and usage rules. Better support for C++/CLI and the .NET Compact Framework. Performance ......

Posted On Friday, October 19, 2007 12:48 PM

Standalone FxCop Multi-Targeting Rules
Last week, I talked about a new FxCop rule that Krzysztof released to help deal with some issues around multi-targeting. In one of the comments to this post, I was asked to add this rule to the Subtext FxCop rule set. As I started working on this, I discovered that the sample project Krzysztof provided was compiled against the .NET Framework 3.5 and would not load with the stand-alone version of FxCop. I spent a little bit of time reviewing the code in the sample project and, with only a few minor ......

Posted On Tuesday, October 9, 2007 11:47 PM

Multi-Targeting FxCop Rules
Last month, I talked about multi-targeting, one of the new features in Visual Studio 2008. According to Krzysztof, the idea of Red and Green bits made this possible. Everything sounds good, so far. However, there is a very limited number of APIs that have been added to the Red bits that the multi-targeting system isn't able to detect. What this means is that if you set the target to the .NET Framework 2.0 and use one of these new changes, the compiler will not issue a warning or an error. The application ......

Posted On Friday, October 5, 2007 1:32 AM

Visual Studio "Rosario" CTP
Short on the heals of the Visual Studio 2008 Beta 2 release, we will soon have the first public Community Technology Preview (CTP) of Visual Studio "Rosario". According to Brian Harry, Microsoft product unit manager for Team Foundation Server, Microsoft has been working on Rosario since September of last year. The result should be a shorter time period between the 2008 release and the Rosario release. There aren't many details about what will be included in the Rosario release, but the CTP should ......

Posted On Friday, August 3, 2007 12:00 AM

Visual Studio 2008 release date
At the Microsoft® Worldwide Partner Conference today, Microsoft Chief Operating Officer Kevin Turner announced that Windows Server® 2008, Visual Studio® 2008 and Microsoft SQL Server™ 2008 will launch together at an event in Los Angeles on Feb. 27, 2008, kicking off hundreds of launch events around the world. Also in the works is Beta 2 for Visual Studio 2008, which should be available as a free download in the next three weeks and will also support a go-live license ......

Posted On Tuesday, July 10, 2007 3:47 PM

Tampa Code Camp Session Calendar
In keeping with the work I did for Tech·Ed 2007 to create Internet Calendars for the different technical tracks, I have created a similar calendar for Tampa Code Camp. The calendar is available from Microsoft Office Online as an Outlook 2007 Internet Calendar Subscription. If you are still using Outlook 2003, there is an open-source add-in that allows you to work with Internet Calendars ......

Posted On Tuesday, July 10, 2007 12:16 PM

.NET Framework Library Source Code
I'm sure most of you are familiar with Reflector. If you're not you should download it immediately and become familiar with it. It is an invaluable tool for looking at .NET assemblies and decompiling them to C#, Visual Basic or even IL. I have used both Reflector and Rotor extensively to investigate how the .NET runtime is actually doing things. I have done this for various reasons, including trying to track down bugs in my code. Why would I need to look at what the runtime is doing to find a bug ......

Posted On Friday, October 5, 2007 12:00 AM

VSTS Resources and TeamBuild targets Maps
Clark Sells, whom I believe is part of the VSTS team, has created an excellent "mind map" around all of the VSTS resources available online. This map shows bloggers, tools, MSDN references, and other community pages. Along with the VSTS Resources map, he has also created a map that shows the target stack for the TeamBuild targets. If you do anything with VSTS, these are excellent resources ......

Posted On Monday, October 1, 2007 2:12 PM

Migrating from Visual Studio 2003 to 2008
For those of you who are still developing with Visual Studio 2003 and .NET 1.x and want to take advantage of the enhancements in Visual Studio 2008 may have thought they were out of luck. There are breaking changes between the versions of the CLR and the Framework itself. Daniel Moth provides an excellent post that describes some of the issues facing you and provides a list of resources to help with the migration, including some lists of breaking changes between .NET 1.1 and 2.0 ......

Posted On Monday, October 1, 2007 9:50 AM

Visual Studio 2008 Multi-targeting
One of the new features in Visual Studio 2008 is the ability to target a project to any version of the .NET Framework from 2.0 and up. This is an excellent feature as it allows the entire development team to work with the same version of the IDE. Since it's a project based setting, it also allows you to mix projects in the same solution. The interesting thing about multi-targeting is that it potentially allows developers to share projects across different versions of the IDE as well. Starting with ......

Posted On Sunday, September 30, 2007 11:24 AM

Catching (Handling) Exceptions in .NET
It seems there is a lot of confusion on how to properly catch exceptions in .NET, especially among newer developers. There are a lot of good references available on MSDN and on the web, but a lot of these are either very advanced or just hard to follow. I'm not going to discuss the CLR exception classes and go into the internals of how the .NET runtime generates exceptions. I don't want to discount this information, as it is helpful to know, but it isn't essential to understanding how to properly ......

Posted On Wednesday, September 26, 2007 5:42 PM

Ignore spaces in declaration statements
One of the new features coming up in Visual Studio 2008, is the ability to ignore spaces in declaration statements. This was a bug opened on the Microsoft Connect site a long time ago and it is finally getting some work done to fix it. Unfortunately, even in Visual Studio 2008, we won't have full alignment options like the ability to control how individual symbols are aligned in the editor, but there will be some help for aligning declaration statements. This isn't in the Beta 2 release, but it will ......

Posted On Wednesday, September 26, 2007 12:28 PM

The history of C#
I just came across a very interesting post from James Kovacs that describes how C# and .NET evolved. I had blogged about this almost a year ago, but James' post adds some additional background. Around 1997, Microsoft started a project that was internally known as Project Lightning (and also known as Project 42). The name "Project 42" was most likely because DevDiv (the Microsoft Developer Division) is in Building 42, which (as James points out) is probably an homage to The Hitchhiker's Guide to the ......

Posted On Wednesday, September 26, 2007 12:13 PM

Generic Enum Parsing with Extension Methods
Not too long ago, I talked about Extension Methods in .NET 3.5 and also about a way to provide data binding an enum type with descriptions. Today, Simo talked about how often he forgets the syntax of parsing a string value to it's Enum value. In his post, he refers to a generic Enum parse method that Scott Watermasysk created just over a year ago (in 2006). In Scott's post, Kenny Kerr points back to his article (from 2005) about how to create a generic parse method in C++/CLI. Reading through all ......

Posted On Tuesday, September 25, 2007 3:32 PM

TFS Adoption at Microsoft
Brian Harry just released new statistics on Microsoft's internal adoption of TFS as they passed some fairly major milestones this month. Apparently, the adoption continues to grow at a fairly rapid pace, and there are now 1,160 Team Projects in production with 1,023,088 work items across all of the TFS instances. Not only has the Developer Division adopted TFS, but also the Office and Windows divisions. Both Office and Windows have adopted early Rosario builds and are working through some installation ......

Posted On Friday, September 21, 2007 9:33 PM

Parallel FX Library
In the latest online edition of MSDN magazine, there are two articles describing some upcoming additions to the .NET Framework that will add support for parallel processing. These additions are part of what is called the Parallel FX Library, which is currently in development. A CTP should be released sometime by the end of this year. The two areas of the Parallel FX Library are the Task Parallel Library (TPL) and Parallel LINQ. The Task Parallel Library provides optimized managed code for multi-core ......

Posted On Friday, September 21, 2007 8:16 PM

Add vs. AddRange
It was recently pointed out to me that not many developers are familiar with the TreeNodeCollection.AddRange method and how it differs from the TreeNodeCollection.Add method. Even though I am focusing specifically on the methods available through the TreeNodeCollection, exposed by the TreeView.Nodes property, the concepts apply equally to any of the collections that expose both an Add and an AddRange method. Looking at the MSDN documentation, AddRange "adds an array of previously created tree nodes ......

Posted On Friday, September 21, 2007 4:55 PM

Data Binding an Enum with Descriptions Article Update for .NET 3.5
Recently, I posted an article on Code Project about data binding an enumerated type with support for custom and localizable descriptions to any UI element that supports data binding. It was pointed out in the article comments that this class is a perfect candidate for .NET 3.5 extension methods. I have just updated the article to show how easy it is to convert the methods to be extension methods ......

Posted On Sunday, August 26, 2007 1:00 PM

Jacksonville Code Camp Sessions
If you're going to the Jacksonville Code Camp 2007, be sure to check out my sessions. I'm giving two talks: Garbage Collection in .NET, Room 140/141, 10:20 AM - 11:30 AM Code Styles and Standards (Chalk Talk), Room 102, 1:50 PM - 3:00 PM Jacksonville Folder Jacksonville If you make it and go to my sessions (or even if you don't), the presentations are available for download on Windows Live SkyDrive in the Jacksonville Code Camp folder ......

Posted On Friday, August 24, 2007 11:28 PM

C# 3.0 Extension Methods Follow Up
As I mentioned in my previous post, if you create an extension method with the exact same signature as an existing method your extension will be ignored. However, one thing that I didn't mention is that if the extension method has a different signature, it will show up in that methods overload list. To make this a little bit clearer, if you create the following extension method 1: namespace DataValidationHelpers 2: { 3: public static class DataValidation 4: { 5: public static string ToString(this ......

Posted On Monday, August 20, 2007 12:05 PM

Difference between "throw" and "throw ex" in .NET
Exception handling seems to be a common problem for .NET developers, particularly younger developers. We pretty much all know that you should wrap operations that have the potential for failing in a try/catch block if you are interested in being able to do something about the error that occurred. I'm not going to talk about the rules and guidelines for using exception handling. Instead I'm going to focus on a particular aspect of exception handling, which I tend to call exception bubbling. Exception ......

Posted On Monday, August 20, 2007 11:26 AM

C# 3.0 Extension Methods
At one time or another most of us have wished we could add functions to one of the intrinsic .NET classes. The solution has always been to either create a static (or sealed) class that contains these "helper" functions or derive a new class that adds the desired functionality. A good example of this is testing a string to see if it contains only alphanumeric characters. In order to do this, we need to define a helper class: 1: namespace DataValidationHelpers 2: { 3: public static class DataValidation ......

Posted On Sunday, August 19, 2007 1:06 AM

.NET 3.5 changes to GC.Collect
During my talk on Garbage Collection in .NET at the Jacksonville Code Camp 2007, Joe Healy mentioned that I should take a look at the changes made to the GC in the .NET Framework 3.5 release. (This is based on the Beta 2 release, but it should be pretty stable at this point.) After doing some research using the SSCLI 2.0 code base to look at the GC class as it exists in .NET 2.0 and Reflector to look at it in .NET 3.5, I found the single change that was made. (For those of you wondering why I used ......

Posted On Sunday, August 26, 2007 11:27 AM

SlickEdit Gadgets for Visual Studio 2008
While I was getting the Code Project Add-in for Visual Studio working on Visual Studio 2008 Beta 2, I decided to see if I could get the SlickEdit Gadgets for Visual Studio 2005 working as well. It turns out, with a little bit of registry tweaking, they work under Visual Studio 2008 Beta 2 without any problems (so far). This is by no means a supported configuration from SlickEdit and requires modifying the registry, so you should do so only after making the necessary backups and any other precautions ......

Posted On Wednesday, August 15, 2007 9:43 PM

The Code Project Browser Add-in for Visual Studio
I received an email today through my blog from one of the developers at SlickEdit, who also happens to be a member of The Code Project community, letting me know about a new Visual Studio Add-in they have developed. You may remember I blogged about the free SlickEdit Gadgets, a really great set of Add-ins for Visual Studio. Since I am also a member of The Code Project community, I spend a lot of time on the web site answering forum questions and reading the articles posted. I also spend a lot of ......

Posted On Wednesday, August 15, 2007 8:29 PM

MZ-Tools 6.0
In case you don't know about MZ-Tools, it is easily the best Visual Studio .NET add-in available. This started in 2000 as an add-in for the Visual Basic 6 IDE, which is where I was first introduced to it. Since then, I have followed it's evolution into a Visual Studio .NET add-in for all four VS.NET releases. MZ-Tools has just released version 6, which provides support for all of the VS.NET releases, including Visual Studio 2008, into a single add-in. There were a few minor bug fixes and enhancements ......

Posted On Thursday, August 2, 2007 11:42 PM

Data Binding an Enum with Descriptions
Every once in a while I need to bind an enumerated type to a Windows Forms control, usually a ComboBox. The simplest is to use the Enum.GetValues() method, setting its result to the DataSource property of the ComboBox. If you have the following enum: 1: public enum SimpleEnum 2: { 3: Today, 4: Last7 5: Last14, 6: Last30, 7: All 8: } You can bind it to a ComboBox like this: 1: ComboBox combo = new ComboBox(); 2: combo.DataSource = Enum.GetValues(typeof(Simpl... While this does work, there are ......

Posted On Thursday, August 2, 2007 12:21 AM

C# 3.0 Language Specification

The C# Unified Language Specification is now available for review. If you are wondering why it is called the "Unified" language specification, it pulls together information from the C# 1.1, 2.0 and 3.0 specifications into a single unified document.

Posted On Saturday, July 28, 2007 9:57 AM

ASP.NET Futures and Silverlight
To go along with the release of Visual Studio 2008, Microsoft has also released the Release Candidate (RC) 1 of Silverlight 1.0 and a refresh for Silverlight 1.1. You can get more information about the releases on Tim Sneath's blog. If you install both Silverlight 1.1 and Visual Studio 2008, be sure to check out the Microsoft Silverlight Alpha Tools for Visual Studio 2008 Beta, which is an add-on for Visual Studio to provide a Silverlight project system for developing Silverlight applications in ......

Posted On Saturday, July 28, 2007 9:37 AM

Visual Studio 2008 Beta 2 - Now Available
Visual Studio 2008 Beta 2 has been officially released as both disc images and Virtual PC (VPC) images. After the installation has finished, you should run this script to ensure that the installation of .NET Framework 3.5 Beta 2 will not affect the development of ASP.NET AJAX 1.0 applications. To go along with this, the Microsoft .NET Framework 3.5 Beta 2 is also available and includes a go-live license. The Framework is expected to be released near the end of 2007. It will be included in Visual ......

Posted On Saturday, July 28, 2007 9:19 AM

Using Garbage Collection in .NET
Garbage collection is one of the most fundamental aspects of the .NET Common Language Runtime (CLR) and is available to all .NET programming languages. Unfortunately, it also seems to be one of the more difficult concepts to understand correctly, both how it works and how to use it. Understanding how the garbage collection system in .NET works is important, but it isn't as important as understanding how to use it correctly. Think about your car...we generally don't have intimate knowledge of how ......

Posted On Saturday, July 21, 2007 7:06 PM

New Chief Architect for Visual Studio
While it probably won't have much real impact of Visual Studio 2008, Rico Marianai just recently announced that he is moving into the role of Chief Architect for Visual Studio. A lot of the performance improvements in VS 2008 are a result of Rico's involvement. It will be interesting to see how this impacts the next release ......

Posted On Sunday, July 15, 2007 10:31 AM

Only Chalk Talk at Tampa Code Camp
As I was building the Internet Calendar for Tampa Code Camp, I realized that I have the dubious distinction of being the only Chalk Talk session. I am a little bit surprised since this format (which is very similar to the Birds of a Feather session format from Tech·Ed) provides a good round-table interactive discussion on the topic. If you are going to Tampa Code Camp, be sure to check out my session on Code Style and Standards. The session is scheduled at 10:50 AM in Room 451. As a teaser to get ......

Posted On Tuesday, July 10, 2007 8:52 PM

Understanding the .NET Framework 3.5
Daniel Moth has an excellent post that explains what makes up the .NET Framework 3.5. This post also sparked a very good discussion on The Code Project. There are two elements that make up version 3.5 of the Framework: the "green bits" and the "red bits". This model is aimed at minimizing the impact of delivering new features and functionality. The red bits are those parts of the Framework that exist in release today, which include the .NET Framework 2.0 and 3.0 releases. The green bits are brand ......

Posted On Tuesday, June 12, 2007 9:59 PM

Microsoft patterns & practices
I hope by now everyone has heard of the Microsoft patterns & practices group. If you haven't heard of p&p, hopefully you've heard of the Enterprise Library. Just in case you haven't heard of either, Microsoft patterns & practices are Microsoft's recommendations for how to design, develop, deploy, and operate architecturally sound applications for the Microsoft application platform. The patterns & practices Enterprise Library is a library of application blocks designed to assist developers ......

Posted On Sunday, June 10, 2007 10:48 PM

Tampa Code Camp 2007
Tampa Code Camp for 2007 has just been announced. Registration just opened on June 4, 2007 so there is still plenty of room, but there is a maximum attendance of 400 people so space will fill up quickly. This year, the event has moved to the St. Petersburg College (ICOT Center) in Largo, Florida and will be held on July 14, 2007. The new location promises larger rooms and state of the art AV equipment. If you have never attended Code Camp or don't know what it is, Code Camp is a free one day event ......

Posted On Wednesday, June 6, 2007 12:18 AM

Debugging in Visual Studio 2005 with a Symbol Server
We have all had the experience of debugging an application in Visual Studio and run into the problem of not having the debugging symbols or having incorrect symbols. This is particularly true when you need to step into .NET CLR code to track down a problem. Microsoft maintains a public symbol server that provides symbols for the different Windows operating system versions, MDAC, IIS, ISA, and the .NET Framework. This server is for symbol downloads only and is not browseable. In addition to the Microsoft ......

Posted On Wednesday, May 23, 2007 4:21 PM

IronPython Running on Mono
When Microsoft announced the Dynamic Language Runtime (DLR) at MIX07, it was an interesting concept. Now, thanks to some very hard work by some of the talented people on the Mono project, it only took 16 days to get Microsoft’s IronPython running with DLR on Mono. This means that IronPython can now run: In the Silverlight browser plugin Natively on Windows Vista On Windows XP with WinFx On Linux, BSD, and OSX with Mono It also means that the other dynamic languages (IronRuby, VBx, Smalltalk/DLR, ......

Posted On Saturday, May 19, 2007 10:50 AM

Mindscape BrainDump
My friend Simone, from Subtext and the creator of the CCNET monitor gadget for Vista, was just interviewed for the first Mindscape BrainDump video blog post. Check out the full video at: BrainDump #1 - Simone Chiaretta. Congratulations, Simone ......

Posted On Friday, May 18, 2007 1:24 PM

Visual Studio "Orcas" Beta 1
Microsoft has just released Beta 1 of Visual Studio "Orcas". For those that don't know, "Orcas" is the next generation development tool for Windows Vista, the 2007 Office System, and the web. The Beta 1 release consists of multiple products including Visual Studio Professional Edition, Visual Studio Team Suite and Visual Studio Team Foundation Server, which are available as ISO images. You can also download VPC images with the software pre-installed. To download either the ISO images or the VPC images, ......

Posted On Friday, April 20, 2007 10:44 PM

C# 3.0 Anonymous Types
Anonymous types are a new language feature introduced in the C# 3.0 release. For those that remember your set theory, an anonymous type is described as a tuple type that is automatically inferred and created from its object initializer. An object initializer specifies the values from one or more fields (or properties) of an object. Another way to look at this is that the object initializer specifies the named parameters that passed to an object. All of this happens at compile time, so anonymous types ......

Posted On Friday, April 6, 2007 1:29 PM

C# 3.0 Type Inference
One of the new language features of the C# 3.0 language release is type inference. Wikipedia has an excellent discussion on type inference, including a non-technical and technical explanation. C# 3.0 introduces the concept of type inference with the var keyword. At first glance, this looks a lot like the old Variant keyword of Visual Basic. It isn't! One of the compelling features of C# is that it is a strongly typed language whose variables are statically typed. The var keyword doesn't change this; ......

Posted On Friday, April 6, 2007 12:32 PM

Detecting if IIS is installed and ASP/ASP.NET is registered - Article
I have finally turned my previous post in to a new article on Code Project. This article provides a definitive way to determine which version of IIS is installed, what IIS subcomponents are installed, and also if ASP or ASP.NET has been registered with IIS. This article provides a single class that encapsulates the various methods required for determining this information ......

Posted On Friday, April 6, 2007 11:47 AM

Detecting installed .NET Framework versions and service packs, update

I have updated my article on Code Project for detecting what versions and service packs of the .NET Framework are installed. This is a relatively minor update that fixes a few typos I discovered while writing my latest article.

Posted On Friday, April 6, 2007 11:43 AM

Expression products now part of MSDN
When Microsoft announced the new Expression product line, a decision was made to keep these out of the MSDN subscriptions. The theory behind this was that these tools are designed for graphics designers and didn't have a place in the MSDN subscriptions. This decision was widely criticized by the development community and Microsoft has finally realized their mistake and announced that Expression Web and Expression Blend will now be available at no extra charge to all MSDN Premium Subscribers, including ......

Posted On Wednesday, April 4, 2007 8:19 AM

DinnerNow
Microsoft has a released a new technology showcase site called Dinner Now. From the website: DinnerNow is a fictious [sic.] marketplace where customers can order food from local restaurants for delivery to their home or office. This sample is designed to demonstrate how you can develop a connected application using several new Microsoft technologies. The demo utilizes several technologies including: IIS7, ASP.NET Ajax Extensions, Linq, Windows Communication Foundation, Windows Workflow Foundation, ......

Posted On Sunday, March 18, 2007 9:16 AM

Visual J# Retiring
I'm sure there's a clearer explanation somewhere, but reading the announcement on the J# home page is just a bit confusing. So far, what I've been able to piece together is that Visual J# 2.0 Redistributable will still be released sometime in Q2 of 2007 and support for English locales will continue through 20017. Along with this, the Visual J# 2.0 Redistributable Second Edition will also be released that will enable Visual J# code to run natively on 64-bit versions of Windows and the .NET Framework, ......

Posted On Sunday, March 4, 2007 12:24 PM

Detecting if IIS is installed and ASP/ASP.NET is registered
Recently, someone sent me an email about my post on using managed code to detect the installed Framework versions and services packs. The posts were really just pointers to my article on The Code Project, but it did bring up an interesting topic. The question at hand really boils down into two separate issues: How to detect if Internet Information Services (IIS) is installed. How to detect if ASP and/or ASP.NET is registered with IIS. The best way to detect if IIS is installed is to look for the ......

Posted On Thursday, March 1, 2007 11:06 PM

Detecting installed .NET Framework versions and service packs
I have just posted a new article on Code Project that provides the definitive way to determine which versions and service packs of the .NET Framework are installed on the client computer. This article provides a single class that encapsulates the various methods required for determing the version and service pack of the various .NET Framework releases and is based on information available on MSDN and Aaron Stebner's WebLog ......

Posted On Saturday, February 3, 2007 5:52 PM

February was busy!
All I can say is, "Wow!" I just looked at my blog and realized that I posted 34 posts for last month. I'm sure some of you may not think this is a large amount, but for me it represented the single busiest month of blogging since I started almost a year ago. I don't know how busy I'll be blogging this month, but I know I will be busy. Here is my current list of projects (outside of real work, that is): Update my File Downloader component with asynchronous download support. Update my Framework Version ......

Posted On Thursday, March 1, 2007 10:21 PM

Visual Studio Code Metrics
Visual Studio will finally get built-in support for generating code metrics for project and solutions. Unfortunately, we'll have to wait until Orcas officially ships, but it is part of the latest March CTP release (Virtual PC image or self-extracting install). Again, as with the integrated FxCop analysis, this will only be available with the Visual Studio Team Developer and Team Suite editions. I still think Microsoft is doing the development community a huge injustice with this decision, but I'm ......

Posted On Thursday, March 1, 2007 9:47 PM

GotDotNet shutting down!
The Microsoft sponsored GotDotNet developer community site is shutting down! All of the functionality will be phased out by July 2007, so there isn't much time left. According to the announcement, Microsoft is phasing out GotDotNet for the following reasons: Eliminate redundant functionality between GDN and other community resources provided by Microsoft Traffic and usage has significantly decreased over the last 6 months Reinvest the resources in new and better community features The phase out schedule ......

Posted On Wednesday, February 28, 2007 9:22 PM

"WPF/E"
Microsoft has just announced a new CTP available called "WPF/E", which is the codename for a new web presentation technology. I am guessing that the "E" stands for "Everywhere" since this is being created to run on a variety of platforms. According to the documentation, It enables the creation of rich, visually stunning, and interactive experiences that can run everywhere: within browsers, and on multiple devices and desktop operating systems (such as the Apple Macintosh). It is consistent with WPF ......

Posted On Monday, December 4, 2006 11:56 PM

Developer Tools
As a developer I use a lot of additional tools to get my work done in the most efficient and accurate way possible. That involves a lot of things, such as unit testing, code analysis and additional productivity inside the Visual Studio 2005 IDE. I have seen a lot of blog posts extolling the virtues of one tool or another, but there were not many (at least that I could find) that provided a semi-comprehensive list. (I say "semi-comprehensive" because there is always going to be a new tool available ......

Posted On Sunday, December 3, 2006 9:48 AM

Enterprise Library v3: Validation Application Block
I just received an email pointing to Tom Hollander's blog posting "Validation Application Block- Revealed!". (For those of you who don't know, Tom is a Product Manager for the patterns & practices group.) The new Validation Application Block sounds very promising, allowing validation rules to be specified through the Configuration console (config files), as attributes in the code, as custom code, or any combination of the three. The time frame hasn't been announced yet when we will have a source ......

Posted On Monday, November 27, 2006 3:15 PM

Daylight Savings Time for Developers
I know several other people who received an email from Microsoft late last week titled "Important Daylight Savings Time Update for Developers". As far as I know, none of us are exaclty sure why we recieved these emails but we all figured that at some point we signed up for something .NET and developer related with Microsoft. Just in case you didn't "get the memo", here are the relevant parts: Developers who use the .NET Framework may find their applications affected if the application uses the time ......

Posted On Tuesday, February 27, 2007 11:08 PM

WPF Reflection control
One of the cooler "eye-candy" type effects possible with WPF is the ability to create reflections. Reflections can be made of pretty much anything and are relatively simple to create. There is a good tutorial on creating reflections using Visual Studio and Microsoft Expression Blend. The drawback to creating reflections is that you have to repeat the steps for every reflection. Fortunately, one of the developers at Infragistics has created a custom control that allows you to easily create reflections. ......

Posted On Tuesday, February 6, 2007 9:59 PM

WPF Datagrid control
Anyone who has been using WPF has, by now, realized that one of the most versatile controls in Windows Forms is missing! I'm referring to the DataGridView. The WPF ListView does have a very powerful Grid View mode that can be used to get around this limitation for a lot of situations. However, for those times when you really do need the power and flexibility of a true data grid, you were out of luck unless you wanted to host the Windows Forms control. All of that changed at the end of January when ......

Posted On Tuesday, February 6, 2007 8:59 PM

Detecting installed .NET Framework versions and service packs, update
Based on some of the article comments, I have just posted an update to this article on Code Project. The update includes support for the January CTP of Orcas, currently called .NET Framework v3.5 and also adds methods to get the actual version number and the Windows Foundation library (WPF, WCF, WF, and CardSpace) information. I have also changed the title to "Using managed code to detect what .NET Framework versions and service packs are installed". Hopefully the title change won't cause any problems ......

Posted On Sunday, February 4, 2007 12:28 PM

SlickEdit Gadgets
Since I've been looking into writing a custom Visual Studio package, I came across a nice set of free "gadgets" from SlickEdit. These can only be described as a set of very cool power toys for Visual Studio. These gadgets will only work with Visual Studio 2005, but should work with any of the Visual Studio 2005 editions except the Express Editions. I think these gadgets are aimed at creating more business for the Tools v1.1 for Microsoft Visual Studio 2005 product, which also has some very nice features ......

Posted On Sunday, February 18, 2007 6:04 PM

Visual Studio 2005 Professional Edition and FxCop Integration
I don't know about you, but I have always felt that Microsoft did a huge injustice to the development community by leaving the Static Code Analysis capability out of Visual Studio 2005 Professional Edition. Just in case you don't know what this is, it is an integrated version of FxCop that allows you to configure Code Analysis and view the results from within Visual Studio. I'm not going to go into details about why Code Analysis is beneficial (perhaps I'll save that for another post), but having ......

Posted On Sunday, February 18, 2007 3:28 PM

The Birth of the CLR
I recently came across the blog of Patrick Dussud, who is the lead architect of the CLR/UIFX group. His first (and currently only post) discusses his role in the birth of the .NET CLR. There is a link to a mailing list archive that also gives some more background. In a nutshell, the CLR was born out of the COM+ team, created by merging the MTS and COM teams, and some of the people from the JVM team. The COM+ team was working on the next generation of COM, then called COM 2.0 and the JVM guys were ......

Posted On Monday, November 27, 2006 1:37 PM

.NET Framework 3.0 is here
Earlier today Microsoft released the newest version of the .NET Framework. If you have any previous beta versions installed, you must uninstall them before installing the final release. Make sure to install the Visual Studio 2005 extensions for .NET Framework 3.0 (WCF & WPF), November 2006 CTP as well. The earlier builds will not recognize the release version of the framework ......

Posted On Tuesday, November 7, 2006 3:22 PM

Flaw found in Visual Studio 2005
And you thought it would never happen... Secunia, a Danish security vendor, has found a vulnerability in the WMI Object Broker ActiveX Control (WmiScriptUtils.dll) that allows an attacker to gain access to the system. If the attack is successful, the attacker would have the same rights as the local user. Read the full Computerworld Security article for more details. Advisory References:Microsoft:http:/... VU#854856:http://www.kb.cer... ......

Posted On Thursday, November 2, 2006 9:14 AM

Are you running Debug or Release mode bits?
Have you ever wanted to know if a compiled assembly was compiled in Debug or Release mode? I know I have. I came across a post on Computer Zen today that shows exactly how to do this. There is also a similar tool written by Jeff Key, called IsDebug. For my part, I always make sure that the following snippet of code is in my AssemblyInfo.cs#if (Debug || DEBUG) [assembly: AssemblyConfiguration("Debu... #else [assembly: AssemblyConfiguration("Rele... #endif This attribute doesn't show up in the ......

Posted On Saturday, September 2, 2006 12:02 PM

SafeHandle and Constrained Execution Regions
As a follow up to my Implementing IDisposable and the Dispose pattern article, I have posted a new one on SafeHandles and Constrained Execution Regions (CERs). This article explains the new SafeHandle class, introduced in .NET 2.0, and how to use it. I also cover CERs and how they are used. [Update, 22-Jan-2008: Updated the article link for Code Project.] ......

Posted On Saturday, September 2, 2006 11:30 AM

Implementing IDisposable and the Dispose pattern, take 2
My article on how to properly implement the IDisposable interface and the Dispose pattern has been very well received. There have been several comments that prompted me to review the article against the Framework Design Guidelines, and specifically against the updates made by Joe Duffy. In doing this, not only have I learned a few new things about how the whole garbage collection process works, but I also discovered that some of the statements made in my article were incorrect. This is discouraging ......

Posted On Friday, September 1, 2006 8:08 AM

Tampa Code Camp
If you want to improve your skills unlike this poor soul get to Code Camp we will even supply the food for lunch. Mark your calendars for July 15. I can't attend this one since I already have plans for the weekend that take me out of town, but if you are in Florida and want to go you should check it out. Just incase you forgot Code Camp is FREE, and its the only place you can learn from the best out there under one roof. If you program in Visual Studio.NET you need Code Camp. If you use ASP.NET you ......

Posted On Friday, July 14, 2006 7:41 AM

.NET 3.0 - The next revolution
Since last years TechEd everyone has been hearing about .NET 3.0 and the cool features of LINQ, lambda expressions, and all of the other cool new language features. I don't know about you, but I was definitely looking forward to them. We were also hearing about WinFx and “Avalon“ and “Indigo“, InfoCard, Windows Workflow Foundation (WWF) and the other new technologies that looked like they would only be part of Vista. Fast-forward a year to this years TechEd and we're still hearing about .NET 3.0, ......

Posted On Sunday, June 18, 2006 4:55 PM

Copyright © Scott Dorman | Powered by: GeeksWithBlogs.net