Andrew Arnott

News from my corner of the Visual Studio Project & Build team, programming tips, and solutions to common programming issues.

Posts
  • Andrew Arnott

    Why .NET Compact Framework fails to call some HTTPS web servers

    • 39 Comments
    A bug was discovered recently in the .NET Compact Framework version 2.0 (SP2 and earlier) and 3.5 that causes HttpWebRequest's directed at some HTTPS servers to fail with this error: (for web services) System.Net.WebException: Unable to read data from...
  • Andrew Arnott

    The WCF subset supported by NetCF

    • 23 Comments
    Many people have been asking about what subset of .NET 3.0's Windows Communication Foundation (WCF) will be supported by the .NET Compact Framework 3.5. In this post I present a table with an outline of WCF features and what NetCF supports....
  • Andrew Arnott

    Visual Studio trick to quickly find any file in solution

    • 21 Comments
    You know that Find text box in the toolbar of Visual Studio?  Those of us who are keyboard-inclined probably never use it because Ctrl+F is quicker than moving your hand to the mouse.  But there is a hidden gem of a feature inside it that really...
  • Andrew Arnott

    Simple immutable objects

    • 21 Comments
    We’re all familiar with immutable collections now. But immutability is only as immutable as it is deep. And an immutable collection of mutable objects may not provide the depth you’re looking for. So how can one create an immutable object...
  • Andrew Arnott

    Calling WCF services from NetCF 3.5 using Compact WCF and NetCFSvcUtil.exe

    • 20 Comments
    The .NET Compact Framework 3.5 adds a subset of the Windows Communication Foundation (WCF or "Indigo") to smart devices, allowing them to communicate with desktop WCF components with all the flexibility of multiple, interchangeable service bindings and...
  • Andrew Arnott

    An impressive Silverlight Slideshow control

    • 9 Comments
    I recently discovered a very impressive (and free) Silverlight slideshow control. I would recommend it over any Flash-based slideshow controls that I've seen so far (because this one's better--not just because I work here <g>) Here's a sample: Watch...
  • Andrew Arnott

    Why double-clicking on an .SLN file doesn't always launch Visual Studio

    • 9 Comments
    Well this is my first post as a member of the Visual Studio Platform & Ecosystem team.  My second full day on the job, and I've found some less-than-ideal areas of Visual Studio that I'm eager to improve for myself and for you, our customers...
  • Andrew Arnott

    Enable C++ and Javascript project system tracing

    • 9 Comments
    I’ve previously posted on how to enable logging in the C++ project system in Visual Studio 2010 . In Visual Studio 2012 we’ve changed the way the Common Project System (aka “CPS”) emits trace messages so below I introduce an updated...
  • Andrew Arnott

    What do you think of the new WCF 'Store and forward' Mail Transport?

    • 7 Comments
    With the .NET Compact Framework 3.5 release which comes with Visual Studio 2008, a new Windows Communication Foundation transport is introduced that uses email as the communication mechanism. Others have already blogged about this new transport including...
  • Andrew Arnott

    How to sort the console output of a hashtable in PowerShell

    • 7 Comments
    Hashtables are inherently unsorted, but when you're printing a hashtable's contents to the console, it can certainly be helpful to sort its contents by key. Although it's not obvious, the way to do it is pretty easy. Let's start with defining a hashtable...
  • Andrew Arnott

    Immutable collections with mutable performance

    • 5 Comments
    In my last post , I detailed the differences among read/write, read only, frozen and immutable collection types.  I described how immutable collections come with a hit to the garbage collector due to the garbage they generate during mutations. ...
  • Andrew Arnott

    Reflections on having multiple versions of NetCF on your device

    • 4 Comments
    The .NET Compact Framework has had several releases: V1 + 4 service packs, V2 + 2 service packs, V3.5 (to date just betas). Which of these are installed on your device? Can you have multiple versions installed simultaneously? Which version will run your NetCF app if multiple versions are installed? This post addresses all these questions....
  • Andrew Arnott

    Where are the InfoCard sites?

    • 4 Comments
    InfoCard is the greatest invention since the web browser! In my opinion anyway. If you don't agree or you haven't heard of InfoCard, please read from the www.identityblog.com , and in particular the post on the Laws of Identity . It's really quite impressive...
  • Andrew Arnott

    Using the XmlSerializer as an XmlObjectSerializer with WCF

    • 3 Comments
    The Windows Communication Foundation introduced the new DataContractSerializer to replace the XmlSerializer in many scenarios.  The DataContractSerializer is faster than the XmlSerializer, but has certain limitations.  For example it does not...
  • Andrew Arnott

    Why you should never use TCHAR in C++ header files

    • 3 Comments
    In C++, TCHAR, LPCTSTR, CString, and other types discretely change to their char/WCHAR, CStringA/CStringW counterparts depending on whether UNICODE is defined in your source code.  Cool.  By conscientiously using _countof(x) instead of sizeof...
  • Andrew Arnott

    Read only, frozen, and immutable collections

    • 3 Comments
    [Update: a more recent post with new data on attainable performance of immutable collections ] The topics of immutability and functional programming has fascinated me lately. Mostly because of my work on the Visual Studio Common Project System (CPS...
  • Andrew Arnott

    Immutable Object Graph updates

    • 2 Comments
    In my last post , I introduced a T4 template that constructs efficient and quite capable immutable objects based on the simplest mutable type definition. I also mentioned that the published sample is (necessarily, ala T4 style) open source and hosted...
  • Andrew Arnott

    Recommended patterns for CancellationToken

    • 2 Comments
    Whether you're doing async work or not, accepting a CancellationToken as a parameter to your method is a great pattern for allowing your caller to express lost interest in the result. Supporting cancelable operations comes with a little bit of extra...
  • Andrew Arnott

    So many exceptions… but only one can throw

    • 2 Comments
    When a method may throw for more than one reason, the thoughtful programmer might ask “which exception should be thrown?” Consider a method which performs argument validation, is cancelable, and also might throw based on the state of the object. What...
  • Andrew Arnott

    If the MS Office team wrote Visual Studio

    • 2 Comments
    Some humorous pros and cons to Visual Studio, if the Microsoft Office team were ever to take over. (disclaimer: this is a tongue in cheek post.  No offense -- only laughs intended) Visual Studio 2008 would be able to load VC7 projects, modify them...
  • Andrew Arnott

    Why your Visual Studio add-in fails to load with error 0x80004005

    • 2 Comments
    Writing Visual Studio add-ins gives you the power to do some impressive things within the IDE to enhance your productivity.  Unfortunately getting your add-in to load into Visual Studio can sometimes be a pain.  Here's just a tip you should...
  • Andrew Arnott

    My favorite Live Writer plug-ins

    • 2 Comments
    Disclaimer: some or all of these plug-ins are not Microsoft created or endorsed, and my pose a security risk by installing them without verifying their source. Paste From Console - automatically formats and colorizes text copied from a console window...
  • Andrew Arnott

    How to find the focused ListBoxItem in WPF

    • 2 Comments
    One would expect that the WPF ListBox control would have some kind of FocusedIndex property to find out which item has the keyboard focus (and that dashed border around it) -- but it's not there. It seems the workaround requires a few lines of code, which...
  • Andrew Arnott

    How to (not) write an especially precarious app on .NET (Compact Framework)

    • 2 Comments
    As the .NET Compact Framework developers work to add features, fix bugs, and refactor code, we often have to determine whether a given change could break existing customer code. The ideal is that NetCF 3.5 will run all apps that ran on NetCF 2.0 and 1.0. We run hundreds of apps and many, many tests before shipping each product to check backward compatibility. The .NET Framework (both desktop and CF) makes heavy use of internal classes to allow us the freedom to change the internals of the framework without breaking customer code. But there are still ways that customers can write apps that may break on future versions. This post covers these topics....
  • Andrew Arnott

    Getting doskey macros to work in PowerShell

    • 2 Comments
    As much as I love to work with PowerShell, it was hard to give up the doskey macros I had defined for CMD.exe. But I just found out that doskey can work all its magic for PowerShell too, so here's the trick... Doskey defaults to working only with cmd...
Page 1 of 2 (48 items) 12