Contents tagged with .NET

  • Why you need to learn async in .NET

    I had an opportunity to teach a quick class yesterday about what’s new in .NET 4.0.  One of the topics was the TPL (Task Parallel Library) and how it can make async programming easier.  I also stressed that this is the direction Microsoft is going with for C# 5.0 and learning the TPL will greatly benefit their understanding of the new async stuff.  We had a little time left over and I was able to show some code that uses the Async CTP to accomplish some stuff, but it wasn’t a simple demo that you could jump in to and understand so I thought I’d thrown one together and put it in a blog post.

    Read more...

  • 2012 Begins

    It has become tradition for the past few years that my first blog post of the new year is to thank Microsoft for being recognized as an MVP.  This year is no different.  Once again, I’m honored to be recognized by Microsoft for my contributions to the community.  After visiting Redmond for the past 4 years, I’m going to be skipping the Summit this year.  I’ve got a client project that I really want to focus on and don’t want to push it out another week.

    Read more...

  • Changing the Default Install Location of an MSI

    A few months ago, I had to tweak an MSI installer.  It was installing into a specific directory (named the same as the application) underneath Program Files.  Since the location of Program Files can change from machine to machine, the MSI has a special token you can use for Program Files (as well as for the application name).  So the current value for “DefaultLocation” of the Application Folder was:

    Read more...

  • Xml Serialization and the [Obsolete] Attribute

    I learned something new today: Starting with .NET 3.5, the XmlSerializer no longer serializes properties that are marked with the Obsolete attribute.  I can’t say that I really agree with this.  Marking something Obsolete is supposed to be something for a developer to deal with in source code.  Once an object is serialized to XML, it becomes data.  I think using the Obsolete attribute as both a compiler flag as well as controlling XML serialization is a bad idea.

    Read more...