MEDC 2007: Six loaded reasons to attend

Sat, March 31, 2007, 02:18 AM under Events
This year's Mobile and Embedded Developers Conference is promising to be the best ever. Now, anybody that knows the passion I have for this stuff may be thinking "Yeah, you would say that though, wouldn't you?". So don't take my word for it, think about it based purely on facts (in random order):
1. MEDC 2007 is the first major event since the launch of Windows Embedded 6.0 and .NET MicroFramework. Just imagine the content that will be available there on those two products and don't forget XP Embedded!
2. MEDC 2007 has tons of content for Vista on the Mobile PC story (including SideShow) and also on the next web platform from Microsoft: LIVE (you didn't think LIVE was irrelevant to devices did you?!)
3. MEDC2007 is the first developer event since the launch of Windows Mobile 6. While the WM6 SDK is available, for MEDC there will be an update to it and I am hopeful for what will be included from a managed developer's perspective :-)
4. MEDC 2007 is the first time we will get an in-depth look at .NET Compact Framework 3.5 and at Visual Studio for Devices in "Orcas".
5. MEDC 2007 is in the coolest city on the planet: Las Vegas! And if you are not into all the glitch and partying, there is one awesome reason to visit the area. Take an extra day (e.g. Sunday or Friday) and visit the Grand Canyon next door - it is simply breath taking (or Hoover Dam just a short drive away).
6. MEDC 2007 is hosted during the exact same period and at the exact same hotel as MIX 07. Not only you can get a huge discount if you attend both conferences (plus a copy of Vista Ultimate at MIX), but just imagine what happens when a whole bunch of mobile and embedded geeks are collocated with a bunch of web and designer geeks. Only goodness can come out of that :-)

No excuses dudes (and dudettes), just go register first and seek permission later!

I'll be on stage every day at least once, but don't let that put you off :)

Vista native stuff for WPF

Fri, March 30, 2007, 11:11 AM under Vista | Windows
When I do my talk showing how to call Vista-only native APIs to enhance your Windows Forms applications on Vista, occasionally someone asks about achieving the same in Windows Presentation Foundation (WPF). My answer is always the same of course: "WPF does not include any Vista-only APIs so you still have to pinvoke for the features that I demonstrate."

For example, many features rely on overriding the WndProc method to hook into the main message loop and deal with some windows message (WM_):
  protected override void WndProc(ref Message m)
{
// e.g. deal with message for
// composition changed, power state notification, restart manager aware etc
}
In WPF you can achieve that with code like this:
       void Window1_Loaded(object sender, RoutedEventArgs e)
{
source = HwndSource.FromHwnd(new WindowInteropHelper(this).Handle);
source.AddHook(new HwndSourceHook(WndProc));
}

private static IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
{
// TODO handle WM_
}
While the previous statement/reply/example is true, some of the things I show in my talk rely on using a control's handle. For example, adding a shield to a button (for UAC), the new button style known as CommandLink, TextBox cue banner, Vista TreeView etc. In those cases, for WPF you can't use pinvoke to SendMessage or subclass the control (Get/SetWindowLong etc) since the WPF controls are drawn from scratch. Instead, you have to manually draw the effect you are after. The Windows SDK has an example of a CommandLink fully drawn for WPF but I couldn't see any of the others (e.g. a button with a shield) so this is a great opportunity for a WPF developer to flex their creativity muscles and create the Vista control behaviours/appearances for WPF (since pinvoking doesn't help there). Be sure to let me know if you get round to implementing anything like that in the public domain...

Photoshop Preview Handler

Fri, March 30, 2007, 09:51 AM under Windows | Vista
Regular readers will recall my blog entries about managed preview handlers on Vista. Rajesh dropped me a comment pointing to his codeproject article. Let him know what you think.

One of the aspects I like about his preview handler is that it uses a tooltip to offer more info. Regardless of how easy/hard the visualization of a file is, adding a tooltip for extra info is a simple yet awesome idea IMO - good job!

Orcas for Web developers

Wed, March 28, 2007, 11:25 AM under Orcas | VisualStudio
My colleague MikeO looks after the web space here in the UK and he started a list of what is new in Orcas here.

Inspired by his list I searched the blogosphere (yeah that word makes me cringe too...) and found more on the three things that caught my eye:
1. Script intellisense (here)
2. New web form designer (here)
3. Better CSS support (here)

If you are a web dev, stay tuned for more Orcas goodness by following those 4 blogs above...

Of course other generic aspects of Orcas apply equally to the web story such as multi-targetting and LINQ.

UK User Groups

Wed, March 28, 2007, 10:14 AM under Events
I love it when I can answer two questions with a single answer (it's all about reuse :-)).

Delegates at our MSDN events sometimes ask about how to find local groups where they can attend technical events, not necessarily organised by Microsoft. Also speakers from other countries often ask me about speaking opportunities when they visit the UK. To both I say, visit the UK User Groups list here. Follow the links to see what type of events each user group usually holds, locations they cover (usually more than one) and get in touch with the UG leader - simple.

If you currently run a user group in the UK and you are not listed on the page above, take action now. If you are listed on the page above and are looking for a Microsoft speaker to come to your event, take action now. In both cases the same action should be taken: email our lovely leader of community leaders, Clare Parr (clarepa at microsoft dot com).

An example of a user group not listed up there yet, is a spanking brand new one holding its first meeting next month: .NET Developer Network.

Visual Studio for Devices features in Orcas

Wed, March 28, 2007, 09:35 AM under MobileAndEmbedded
While we looked at new features in NETCF 3.5 for the device developer, there are also tons of improvements in the IDE (VSD "Orcas"), the top 5 IMO being:

1. Unit Testing for Devices
Note that this also works for v2.0 device projects in Orcas too, yay!

2. New Project dialog

3. Device Emulator v3
This has all the goodness of Device Emulator v2.0 plus it can be automated/scripted via COM - the clue is the DEMComInterface.idl file in your DE installation directory.

4. Device Configuration Manager & Device Certificate Manager
Previously available as a powertoy for WM5. To see them in action, from your VS Orcas Tools menu, select Device Security Manager:


5. Windows Mobile 5 SDKs and .NET Compact Framework v2.0 SP2 in the box. No more need for separate downloads :)

New project dialog for VSD in Orcas

Wed, March 28, 2007, 09:16 AM under MobileAndEmbedded
UPDATE: After Beta 1 I updated the text below with a new addition/screenshot and struck out the inapplicable text (bug fixed).

Nick blogged about this first, and Neil followed. Both have screenshots on their blogs so check them out.


If you ask me, we needed this simplicity for newbies to device development because the old approach was way too confusing. Having said that, previously I could create any project type in two clicks and now I need a lot more; so penalising the expert user is definitely the case here IMO. Rule number one of UI development: less clicks is good. Rule number two: offer two navigation paths: one for the novice, one for the expert.

Regardless of the above, before Orcas RTMs, we have to fix the combobox behaviour: When I select NETCF version 2.0 in the bottom combobox and then select a platform in the top, why the heck does the value in the bottom combobox revert to the default of 3.5? Rule number three of UI development: If I have made selection, don't revert it based on another selection on the same dialog! What makes it worst in this instance is that when selecting something in the top combobox, the bottom combobox is hidden out of view so the change goes unnoticed unless you are looking for it.

Also, again regardless to the above, I would expect those combobox values to be remembered between different launches but unfortunately they are not (yet?).

As of Beta 1, the dialog has a new addition at the bottom: a hyperlink to get new SDKs (e.g the WM6 SDKs).

html Save As in IE7 produces htm

Wed, March 28, 2007, 08:05 AM under IE7 RSS
A couple of people had trouble recreating my sample gadget and it turns out that the issue was with the HTML file I posted. In IE7 when right clicking on the link and selecting "Save As", the dialog that comes up saves it as HTM. This of course will not work since the manifest file that you download points to an HTML file, not an HTM file. So please rename the file to its full extension after downloading. Note to self: always upload HTM files rather than HTML files to help IE7's "issue".

One reader also got a corrupt manifest XML file somehow and the culprit there was the embedded copyright symbol that I have now removed from the file even though it hadn't caused me any issues…

Please use the Restart API to its full potential

Tue, March 27, 2007, 02:10 PM under Windows | Vista
I've been meaning to rant about this and Sahil gave me the incentive with his wish list for IE8 and Vista.

The 2nd wish item on his list for Internet Explorer is:
"When IE crashes, there should be an option for it to restore state, i.e. re-open the tabs I had opened when it crashed."
IE7 has crashed on me in the past and I do recall the behaviour that Sahil is referring to which, for those of you not running Vista, is that IE7 restarts so you don't have to restart it yourself :-). Cool, but IE7 restarts with the default home page(s), instead of opening my last browsed tabs and that is not cool. The reason this really gets to me is that I know it is so darn easy to implement the feature!

In fact, the Restart API is an area where unfortunately I am seeing a pattern of our product teams taking advantage of only half the feature (the restart bit, without the restoring state bit). The Visual Studio Codename Orcas March CTP is an application that made me smile in a very positive way when it crashed on Vista (where it is not supported) and I observed that it restarted after sending the error report. But again to my dismay, it simply restarted and left it at that. Hopefully by the time it ships, the team will implement the rest of the feature so when it restarts it also attempts to open the last solution I was working on.

Now, there is a (weak) argument either of the teams above can make that goes as follows: "If when we restart, after a crash, we try to restore the last opened tab/project, then we run the risk of ending up in a cyclical restart". This is a weak argument for two reasons:
1. The API can protect you against cyclical restarts (look at the 2nd parameter of the function from the link above and also the 60 second rule I describe in the video linked above)
2. I would expect dialog that has words to this effect: "We are sorry you experienced an issue with this application, an error report has been sent. Would you like to open the last solution/web page you were looking at? NOTE: This may cause the application to crash again!". And after displaying that message, if the user chooses to continue and they crash again, the next time don't put up the dialog and don't try to restore state.

This isn't rocket science. We have a fantastic feature in Vista; the teams have started to take advantage of it but just falling short in the end. IE7 has shipped of course, but I remain hopeful for "Orcas" to be smarter about this by RTM...

Camtasia now works on Vista

Sat, March 24, 2007, 09:57 AM under Links
The baby of our team (sorry Mark :-)), just dropped me a line to point to an official version of Camtasia that works on Vista.

This is great news, I can now resume to producing some screencasts, which is something I haven't done for a while. If you are new to this blog, check out my previous screencasts on channel9 and on the MSDN nuggets page and stay tuned for some Orcas recordings.

i-mate SideShow Debugger

Mon, March 19, 2007, 05:26 AM under SideShow
I haven't played with this yet but it looks promising for anyone with SideShow interest.

See announcement in SideShow forums and also the download site.

PeerToPeer in Orcas

Mon, March 19, 2007, 12:37 AM under dotNET | Orcas
In the "Orcas" framework, another green assembly is the System.Net.dll that contains all the new PeerToPeer classes (spread over 3 namespaces: System.Net, System.Net.PeerToPeer and System.Net.PeerToPeer.Collaboration). I saw a nice demo of this by the dev on the team back at TechReady3. In terms of explaining the library, once again the product team are "getting in there" first, so no point duplicating what they have already written. Check out the first post and stay tuned on the p2p blog for more... I've captured a class diagram of 3 key classes here for my future reference...

FileAs in Windows Mobile 6

Sun, March 18, 2007, 04:41 AM under MobileAndEmbedded
Whinge and you shall receive. 18 months ago I moaned about the lack of FileAs in Windows Mobile 5.0 and showed how to achieve that programmatically . WM6 offers it out of the box in the UI as you can see below :)

GCCollectionMode and GCSettings.LatencyMode in Orcas

Sat, March 17, 2007, 05:00 PM under dotNET | Orcas
Some blogs have reported that there are performance improvements in the Garbage Collector that ships with Orcas. That is slightly inaccurate. What is new is the ability to have finer control over the GC, including the ability to suggest to it that it should not run during the execution of a time critical phase (e.g. code block) of your choice (I know some guys that would love that in the .NET Compact Framework but this is a full framework feature only).

I was going to do a proper write up on the additions (1 method, 1 property and 1 enumeration) but Chris beat me to it and, given that he officially tests the feature, he certainly knows a lot more about it than me so go read about the new GC collection modes here and the new GC latency modes here.

Do you read abstracts of sessions?

Fri, March 16, 2007, 06:37 AM under Events
Planning for Tech Ed 2007 has started. As one of the largest dev conferences, in each timeslot there is a lot of choice and attendees sometimes make the wrong choice (and then score the session badly of course because it wasn't what they wanted). This is a genuine problem with technical events and is not specific to Tech Ed.

Dave is looking for ideas on how to improve the session descriptions and has some radical propositions for changes. Go give him your feedback.

In my opinion, no amount of shortcuts is going to tell me what the session is going to be like other than the abstract. I really don't understand why people don't read the abstracts carefully before going into a session. If everybody read the 7 line paragraph and made their decision based on that, then we could work on speakers writing accurate abstracts. As an example consider my session description here. After the session, one of the delegates came up to me and said, "I enjoyed your session but was a little disappointed as I was expecting you to cover what was coming in Orcas for Vista development". At first I was baffled why he would think that, but then I guessed what happened: the guy read the title and nothing else. Again, please read my abstract and see if it was not clear what the session was about. There is an argument here for better titles, but how can you capture a 75' session in 7 words?

If you are one of the delegates that do not read abstracts and just turns up at sessions based on the title alone, let us know why and maybe tell us what is it we can do to incentivise you to read those abstracts.

ETW in Orcas framework

Wed, March 14, 2007, 03:53 PM under dotNET | Orcas
If you are not familiar with the new Event Tracing for Windows in Vista then read this article. You'll then no doubt be asking yourself "what about access from managed code?". For the answer, go read this blog post.

What a great way to leverage the Restart Manager

Wed, March 14, 2007, 03:50 PM under Windows | Vista
While I have previously described Restart Manager, I never thought to use it in this cool way even though the question definitely is something I have asked myself in the past! Keep reading...
Question: When my application attempts to access a file, I get access-denied errors because the file is in use by another application. In the past, I've used tools from Sysinternals (microsoft.com/technet/sysinternals) to figure out what that other application is, but I'd like to be able to discover this programmatically from within my application. Is there a way to programmatically determine what processes are currently using a specific file?

Answer: Stephen to the rescue!

New Security stuff in Orcas framework

Wed, March 14, 2007, 03:45 PM under dotNET | Orcas
I was going to point to the new crypto algorithms on Shawn's blog, but actually if security floats your boat, just read his entire Orcas category.

If you prefer exploring these things directly in Visual Studio look at the classes in the System.Security.Cryptography namespace in Core.

Office Compatibility Pack

Wed, March 14, 2007, 03:37 PM under Links
Office 2007 introduces a new file format, which you will have at least heard of e.g. PowerPoint files are now pptx, Word files are docx and Excel files are xlsx. Not everybody has made the switch to the new Office suite and I know that because I keep getting requests to provide my slides in the old format. Please open the files in the new format with the legacy version that you are using - just download the Office Compatibility Pack.

MVP Summit 2007

Sun, March 11, 2007, 02:09 PM under Random
One of the perks of being an MVP (and the perk I miss the most!) is attending the global MVP summit in Seattle (and I did that in 2005). Having been to plenty of public conferences and also to internal Microsoft conferences (MGX, TechReady), let me share with you that the MVP summit tops them all. It is simply the one to be at! To everyone out there this coming week, have one on me :-)

I was going to try and make it there this year, in a different capacity of course, but my speaking schedule got in the way :(

Installation of March CTP on Vista

Sat, March 10, 2007, 04:02 PM under Orcas | VisualStudio
The point of this post is: do not install the Orcas March CTP side by side with VS2005 on Windows Vista.

This CTP is not meant to be installed directly on Windows Vista. It can happily be used in a VPC on Vista and it is also meant to be installed directly on XPSP2 or WS2K3. Given that Virtual PC 2007 is now free and is supported on Vista, just install it in there or grab the VPC image already built for you. You'll love it. Obviously the final version of Orcas will be supported directly on Vista and indeed so is the plan for the next Orcas drop whenever that comes. Furthermore, the final version of Orcas will side-by-side with VS2005 and while this March CTP does side-by-side, it does have some issues so, again, I would not recommend the side by side thing yet.

Now, given what I just said, you won't be wrong to call me a "fool" for actually installing Orcas on my Vista machine to side by side with my VS2005 installation. This has caused me at least 3 issues:
1. Getting NETCF installed needed some manual help from me, my device forms do not render in the designer and I also had some WM5 SDK conflict issues. If you are not doing device development, these won't affect you of course.
2. My existing installation of Visual Studio 2005 Tools for Office Second Edition broke by the Orcas install e.g. my VS2005 excel add-in projects fail with weird compile errors. I fixed this by repairing the VSTO 2005 SE installation.
3. My Orcas properties grid is broken.
4. I haven't had this issue but others have: "Orcas" Web applications fail on Vista.

On the flip side, all my LINQ demos work great!

Once again, best option is to use the VPC image in our free VPC2007 software. Equally good option is that you install it yourself on a non-Vista machine without VS2005. Remember, it *is* a Community Technology Preview!

NETCF SP2 ships

Fri, March 9, 2007, 08:40 AM under MobileAndEmbedded
I am late with this news (stuck in a place with no network connection).

Build 7045 (ie 2.0.7045.0) of the .NET Compact Framework is out of the door. No need to copy/paste here what is fixed since it is described on the download page.

One of the big ones is new diagnostics (that finally work on Vista) and, as usual, Steven has all the details.

equals versus ==

Thu, March 8, 2007, 03:09 AM under Orcas | LINQ
At a recent event where I was presenting on LINQ, I showed a query with a join, similar to the following:
      var results =
from p in Process.GetProcesses()
join p2 in MyProccess.GetMyProcList()
on p.ProcessName equals p2.MyProcName
where p.Threads.Count > 14
orderby p.ProcessName descending
select new { p2.MyProcDescription, ThreadCount = p.Threads.Count, p.Id };
After the session one of the delegates asked me: "Why do we have to use the equals keyword and not just ==". In other words he would have preferred to type:
on p.ProcessName == p2.MyProcName
I didn't have a good answer but promised to look into it.

Looking into it involved pinging the product team and Matt Warren (C# software architect) came up with the reply, which I include unedited, warts and all :-)
"The reason C# has the word ‘equals’ instead of the ‘==’ operator was to make it clear that the ‘on’ clause needs you to supply two separate expressions that are compared for equality not a single predicate expression. The from-join pattern maps to the Enumerable.Join() standard query operator that specifies two separate delegates that are used to compute values that can then be compared. It needs them as separate delegates in order to build a lookup table with one and probe into the lookup table with the other. A full query processor like SQL is free to examine a single predicate expression and choose how it is going to process it. Yet, to make LINQ operate similar to SQL would require that the join condition be always specified as an expression tree, a significant overhead for the simple in-memory object case."
Makes sense!

UPDATE: Vladimir Sadov from the Visual Basic team told me that VB also uses Equals for pretty much the same reasons.

VS2005 SP1 Update for Vista

Tue, March 6, 2007, 03:34 PM under Windows | Vista
Following the SP1 for VS2005, the update for Windows Vista is now also available. Get it here (especially if you are doing web development on Vista).

This is what my VS about box looks like after I installed it:


Also see Soma's relevant Q&A.

NetFx support in VS Orcas

Tue, March 6, 2007, 04:55 AM under Orcas | VisualStudio
UPDATE: After Beta 1 I updated the screenshot below (you can still view the old one here).

As you know, Orcas is the codename for both the next version of Visual Studio and the next version of the .net framework (v3.5). The great news is, that VS "Orcas" not only lets you create projects that target v3.5 but it can also target v3.0 and v2.0 as the following screenshot shows:


If you pick the wrong template (which I am guessing many will since the version dropdown is in a non-obvious place IMO), then you can change the platform later via the project properties under the Application tab:

In VB, the option to change it later is via the Advanced Compile Options under the Compile tab.


Some will say "at last", all I can say is... "Cool!"

Embedding manifests in Orcas

Tue, March 6, 2007, 04:45 AM under Orcas | VisualStudio | UAC
The first thing you should do with your applications on Windows Vista (and indeed a logo certification requirement) is embed a manifest in your application that effectively tells Windows that your app is aware of User Account Control. I have explained how to do this with VS2005 here. Also Catherine listed a few ways here. Bottom line: create a manifest like this, and embed it in your project with a post-build command: "$(DevEnvDir)..\..\Common7\Tools\Bin\mt.exe" -manifest "$(ProjectDir)$(TargetName).exe.manifest" –outputresource:"$(TargetDir)$(TargetFileName)";#1

In VS Orcas C# projects, life becomes slightly easier. Effectively, there is a combobox under the Application tab in the project properties that allows you to point to a manifest and then it will embed it in the application. I cannot find this option in VB projects yet.

To me, there isn't much difference between pasting the command line from further above in the post build box and instead choosing a combobox item. However the latter does have the advantage of being more discoverable :-)

UPDATE: FYI, I got the below from Saurabh Jain (a dev on the team responsible) with regards to the March CTP:
"There is more support for manifests then you might see.

Firstly, the compilers have new switches for manifest, so there is no post build event.

C:\>csc.exe /? | findstr -i man
/win32manifest:<file>   Specify a Win32 manifest file (.xml)
/nowin32manifest        Do not include the default Win32 manifest
Secondly, if you have a .manifest file in your project, that file will appear in the dropdown. You can then select the file, and it will be passed to compiler. This is how one can add a custom manifest file."

Microsoft.VisualStudio.Shell.WindowPane.OnCreate

Tue, March 6, 2007, 04:21 AM under Orcas | VisualStudio
"An error occurred trying to load the page." is what I encounter in my "Orcas" installation whenever I try to open the project properties grid/designer as captured in the following image:


In case you are facing this too, it is a side by side issue with VS2005. If you've only installed Orcas on your box without VS2005 (or downloaded the VPC image) then you will not have this issue. Sorry, no workaround for now, but fixed for future builds.

This blog entry also explains why some screenshots of the property pages that I am about to post are from my VPC WS2K3 Orcas installation rather than my Vista installation like my other screenshots :)

Automatic properties in C#3

Mon, March 5, 2007, 04:36 AM under Orcas | VisualStudio
I was looking at Ander's slides from Tech Ed Europe and he had one about automatic properties but watching the video he did not cover that in his session. It is the simplest concept imaginable and hence it deserves a simple short blog entry.

In C#3, you can write code like this:
        public string Name
{
get;
set;
}
The compiler generates code like this:
        private string XX;
public string Name
{
get { return XX; }
set { XX = value; }
}
, where XX is not directly accessible to you in code of course. This only works for properties with both getter and setters.

Get the March CTP to try it out yourself.

Administrator in VS Orcas title bar

Mon, March 5, 2007, 04:11 AM under Orcas | VisualStudio | UAC
Anyone running on Vista knows about the new security feature of UAC. A known trick is to right click on a command window shortcut and select "Run As Administrator" to get an elevated command window.


Following that, anything you launch from the elevated cmd will also be elevated. Of course this can be dangerous so when a command window is elevated, it is prefixed with the word "Administrator" (so you can distinguish it from non-elevated command windows).


No other window on Vista will tell you in its caption that it is running as administrator. The reason for that is that you will not typically run an interactive process elevated for a long period of time plus most apps cannot do the accidental damage that an elevated cmd window can. Of course each application developer can decide for their own app what they want to do.

The VS Orcas team decided that they wanted to differentiate an elevated VS instance from a non-elevated instance. They do this by appending a "(Administrator)" string on the title as the following screenshot shows:


I like this, although I would have also liked some consistency between cmd and VS and in fact maybe some official Windows guideline that all apps follow.

lambda vs lamda

Mon, March 5, 2007, 04:01 AM under Random
With all this talk of lambda expressions, I should point out that whoever decided to spell the Greek letter using characters from the latin alphabet has done it incorrectly. Spelling LAMBDA with a 'b' is simply wrong. The correct way to spell it is LAMDA. The Greek spelling of lamda uses 5 characters that each map exactly to the latin counterparts: ΛΑΜΔΑ. In case that doesn't render as it should for you, look at the following image:

Each letter in one alphabet is equivalent to the other (they sound the same, the keyboard maps them the same, they just *are* the same!). Whose bright idea was it to introduce a 'B' where it didn't belong?! When you read the word out loud, how do you change your pronunciation between the incorrect way LAMBDA and the correct way LAMDA? If you pronounce the 'B' I can tell you that that is not the way Greeks pronounce it.

To be quite honest, if you wanted to get as close to the real pronunciation as possible, then it should be written as lamtha where the 'th' is read in the same way as 'th' in the words 'there', 'the', 'though' etc.

Rant over.

Ctrl+Tab in VS Orcas

Sun, March 4, 2007, 09:46 AM under Orcas | VisualStudio
UPDATE: After Beta 1 I updated the screenshot below (you can still view the old one here).

A cute feature introduced in Visual Studio 2005 was that Ctrl+Tab didn't just cycle through the open windows but it also brought up a dialog that let you see what the next window would be (much like Alt+Tab does on Windows XP).

VS "Orcas" builds on that feature by offering a sneak image preview of the next window (much like Alt+Tab does on Windows Vista). Try Ctrl+Tab in your Orcas installation and you should get a window like the following:

Like I always say, the devil is in the details :-)

System.AddIn

Fri, March 2, 2007, 03:47 PM under dotNET | Orcas
Anybody that has built an application that supports AddIns (aka add-in, plug-in, etc) knows that there are many design decisions to make and quite a few subtleties in implementing those decisions in particular when it comes to discovering addins, version resiliency, isolation from the host etc.

In NetFx 3.5 (part of "Orcas"), a whole bunch of classes do all this work on your behalf and all you have to do is make simple method calls to configure the behaviour. These new types are in the following namespaces: System.AddIn, System.AddIn.Hosting, System.AddIn.Pipeline and System.AddIn.Contract.

The implementation was part of System.Core.dll in early CTPs; starting with the March CTP they reside in their own assembly: System.AddIn.dll (be sure to reference the System.AddIn.dll from v3.5 residing in "C:\Windows\Microsoft.NET\Framework\v3.5.20209", not the one from v2.0 that appears in the References dialog by default).

To learn more about how to use the new AddIn model, please read the two part msdn magazine article (part one and two). Also check out the AddIn blog where you can learn about internal implementation decisions that could help you with the add-in infrastructures that you build today! For a real example of the AddIn classes, see this blog series that describes how Paint.NET is being refactored to take advantage of the new plumbing.

Code metrics in VS "Orcas"

Thu, March 1, 2007, 03:28 PM under Orcas | VisualStudio
One of the new menus I noticed when right clicking on the project menu was one titled "Generate Code Metrics".

I played with it and just before writing a long blog entry, I found that the feature team have done that already so to avoid duplication please go read all about it on the fxcop blog (plenty of screenshots there). The title of the menu gives away what it does but to whet your appetite, if you try to add/remove columns from the code metrics window you get the following dialog:

Now all we need is to make that dialog resizable :)

Some .NET Framework 3.5 features

Thu, March 1, 2007, 02:02 PM under dotNET | Orcas
Thom has a table of .NET Framework 3.5 features and Matt talks about new WCF and WF bits in 3.5 - both well worth a read!

VS "Orcas" uses the new CommonFileDialog

Thu, March 1, 2007, 05:21 AM under Windows | Vista | Orcas | VisualStudio
Whenever I see an application on Vista that shows the old file dialog, I cringe (sorry, it is true). So given that I "live" in VS2005, it is the one that irritates me the most every day in that respect. It is easy to show it from native code and I have talked about the managed wrapper in VistaBridge before.

I've been waiting for a VS "Orcas" build that uses the new CommonOpenFileDialog when running on Vista and the March CTP does just that. All I can say is "WOO HOO".