Scott Hanselman

Top 10 Tips Working Developers Should Know about Windows 7

August 09, 2009 Comment on this post [36] Posted in Win7
Sponsored By

Windows 7 Logo I've been tweeting about Windows 7 lately but I had a flash tonight that I should write some of this stuff down. Here's my list of the Top 10 Things Working Developers Should Know about Windows 7. I say "working developers" because if you're a .NET developer you either have run into these questions or you will, so why not put them in one place.

These are in no particular order. Also, in case it's not clear, each heading here is a link.

Windows 7 includes .NET 3.5SP1

If you're developing apps for Windows using .NET you'll be happy to hear that Windows 7 comes with .NET 3.5SP1 already installed. It's in the box, so one less thing to install for you.

Visual Studio 2008 works great on Windows 7

Have no fear. I run VS2008SP1 all day long on my Windows 7 machines (4 of them now) and it works fine*. Remember also that even though you're running Windows 7 and .NET 3.5 SP1, you can still compile for and target .NET 2.0 and Windows Vista or Windows XP clients.

You can write a single app for XP, Vista and Windows 7

...and that single EXE can "light up" on the newer OS's. I'm going to blog more about this soon, but there's a great Reference App called "PhotoView" (yes, I know, another photo app, but at least it's not Northwind). The point is that this managed WPF application runs nicely on XP, but if you run it on Vista you get Windows Search and UAC, and if you run it in Windows 7 you get Taskbar Integration, Transactional File System, Libraries, etc. One app on three Windows, working well and looking nice on all of them.

You can code to Windows 7 features today using the .NET Framework

There's a great Windows API Code Pack for the .NET Framework that's a library of source code that lets .NET folks access these new features even though they're not baked into the framework. That means .NET 3.5 SP1 developers can be writing Windows 7 apps today. This includes all the new shell features, search, the new Explorer Browser, new Dialogs and controls, and hundreds of new APIs. Check out the Windows 7 Developer Guide as well. Also, if that's not enough details there's dozens and dozens of new Win32 Samples and articles to go with them in the newly released and plainly named Windows SDK for Windows 7 and .NET Framework 3.5 SP1.

PowerShell is built-into Windows 7

You don't need to wonder if a machine has PowerShell. If it's running Windows 7, it's there and it's PowerShell 2.0. This not only means you can use PowerShell Scripts to automate things in your development process, but you can also use the PowerShell scripting engine in your apps without installing anything extra.

There's an extensive Windows 7 UX Guide

 Also available as a PDF, this guide helps you design your User Experience such that it fits into Windows 7 seamlessly. This includes guides for resolution, DPIs, windows sizing, alignment and control spacing. There's a great section on aesthetics as well.

There are Free Book Chapters for Upcoming Windows 7 Books

There will no doubt be a flood of Windows 7-specific books coming out soon. For now, there's a bunch of free chapters for "Windows 7 Inside Out," "Windows 7 Resource Kit" and "Windows 7 for Developers" that you can download now in PDF or XPS.

Windows 7 Training Kit for Developers

This is a nice rolled-up download of presentations, hands-on-labs and demos. It's got examples on how to use  new Windows 7 features like the Taskbar, Libraries, Multi-Touch, Sensors/Location, Ribbon Controls, and more.

There's a new "Windows on Channel 9" Site

This is a whole new section of Channel9 on MSDN that's dedicated to Windows 7 content. There are dozens of great videos, in-depth interviews with folks like Larry Osterman (the guy that makes Windows go beep) and Mark Russinovich. There's a Programming Windows 7 area with video deep drives on the new Sensor and Location Platform, Multi-Touch, Animation, and the new Graphics Architecture.

Boot to VHD Saves You Time

I'm going to beat this drum until everyone is booting to VHD. For my development machine, I'm running Windows 7 and VS2008 on my C: drive, but I sometimes boot into a Windows 7 and VS2010 Beta running on a VHD. Not a VM, no, they're too slow for me, but the Hard Drive is virtualized on the VHD. It's a nice way to keep crazy (or old) stuff in a separate place without fear of messing up partitions or my main machine! Here's a video demonstration and how to turn your Windows 7 media into a VHD ready for booting.

Did I miss anything?

Related Links

* If you install SQL2008, you'll get a compatibility warning during install. Keep installing, then just get SQL2008 SP1 and you'll be all set on Windows 7.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
August 09, 2009 15:01
Do you know if Windows Server 2008 R2 also ships with .net 3.5 SP1? The "old" Server 2008 came with 3.0 SP1, but I don't know if Microsoft sees R2 as a major release or more like a glorified service pack.

Very useful list!
August 09, 2009 17:44
Many developers will be installing software from MSDN distributed as .iso files. Can you recommend a tool for mounting .iso files that is known compatible with Win7? I know there is native support for burning, and 7zip will let me extract, but mounting as a drive is much faster.
(And if you ever get a chance to talk to someone in Windows file system, can you find out why this still isn't natively supported?)
August 09, 2009 17:56
I can quickly answer Joshua. I'm using PowerISO on Win7. Trial will do for mounting the iso. Also the new version of daemon tools supports win7 but I think only the paid version is supported STPD 1.6 is the key.

On a side note why not just run all of your installed machines from .vhd. I know it is not necessarily supported but that is how I have my Win7 installed on my tablet. Is there any statistics on how much performance you lose. My guess would be the main loss could possibly be in disk I/O. I suppose if I had the time I could do a native install also and run some performance against my machine.

So far though I haven't noticed a difference from my previously native Win7 RC install and my newly installed Win7 RTM. Even muilti-touch works. This is brillaint. I want to look into copying it to multiple machines are running SysPrep because I would love not to have to install all of my dev tools on my multiple machines manually.
August 09, 2009 22:16
Joshua Flanagan:

I've been using Virtual CloneDrive: http://www.slysoft.com/en/virtual-clonedrive.html
Fast, no-nonsense: associate with ISO files and you can just double-click to immediately mount them, no need to mess around. Saves a lot of time when you're sitting with a big pile of MSDN ISOs to install...
August 10, 2009 0:24
I installed VS2008, VS2008SP-1, then Team Explorer. When I then went to install SQLServer2008 (Dev edition), I got the error that I couldn't install it until I installed VS2008Sp-1 (which I had already done). Turns out that when I installed Team Explorer, it installed the Shell Integration for Visual Studio, which is apparently also used by SQLServer2008. I uninstalled that one component (with the SQL Install waiting in the background), clicked the re-test button in the SQL install dialog, and SQLServer finished installing, AND it reinstalled the Shell Integration.

After I installed Sp-1 for SQL2008, it gave me an error about invoking without a control (which I *never* do in my own code, of course), so I'm not sure whether it finished successfully or not. Seems to work, so I'm assuming...
August 10, 2009 0:30
Great!! I love the 1&3 the most.
August 10, 2009 0:54
> Windows 7 includes .NET 3.5SP1
Unfortunately, that nasty OOM bug in MSBuild is still there, and the hotfix don't want to install on Windows 7.
August 10, 2009 1:47
I'd like to second Virtual Clone Drive. It's fantastic and no-nonsense.
August 10, 2009 1:58
Hi Scott,

The question I'm interested in is should I go x64 Win 7. What if any are the pitfalls for a developer.

Thanks and congrats on the promotion.

David
August 10, 2009 2:34
One other feature that I really find useful is the ease of working with virtual machines. It allows me to try stuff quickly on a VM, Windows manages them nicely.
August 10, 2009 4:55
The pdf version of the UX guide seems to be outdated. It's says 'vista' and lists november 2008 as the update date. The web site version is up to date.
August 10, 2009 5:09
Andrew: This might be the latest (the web version, not the PDF). Not sure if its the same, but seems updated June 30th.

http://msdn.microsoft.com/en-us/library/aa511258.aspx

(from: http://www.istartedsomething.com/20090726/windows-ux-guidelines-updated-for-windows-7/)
August 10, 2009 6:12
One thing about the boot to VHD functionality. I am pretty sure the functionality is only available in Windows 7 Ultimate, which is a bit of a buzz-kill. Do a lot of SharePoint development and live in VHDs :)

August 10, 2009 7:23
Which edition of Win 7 would folks recommend that I install on a netbook? I've got an MSI Wind 300. My thinking is I'd want the largest edition that makes sense for a netbook, figuring I don't want to have to reinstall a bigger edition later. Thoughts?
August 10, 2009 11:33
Nice overview.
Looking forward to the article regarding cross-version projects.

<nitpick>
Where it says " in a separate place with fear of messing up partitions" I'm guessing that should have been "without fear"?
</nitpick>
August 10, 2009 16:15
@jptacek

For SharePoint wouldent you be using W2k8 R2 boot to VHD, I havent tryed it but this shouldent conflict with your primary win 7 install. Currently booting to ether Win 7 RC off C: or W2k8 R2 RC off a VHD and havent had any problems, though the 7 RC is Ultimate (Yes i need to pave for RTM just no time)
August 10, 2009 17:35
hey, my name's scott too!

anyways, this is a nice article, but did you ever consider the multitouch side of windows 7?

if you don't know that much, you can check out microsoft surface/windows 7 <a href="http://www.surfacehq.com/content/will-microsoft-surface-upgrade-windows-7>here</a>.

oh and don't mind the out of place header, i'm getting that fixed asap.
August 10, 2009 22:27
The only PDF version of the UX Guide I have been able to find is the Vista on. The link from this blog and also the link within the MSDN article both link to the Vista UX Guide. If anybody knows where to get a printable version of the Windows 7 UX Guide, please post the information.
August 11, 2009 20:40
I liked the last point. I would add the performance of Win 7 for those Vista developers is something worth mentioning. Win 7 better manages CPU, RAM, and HD in comparison with its predecessor.
August 11, 2009 20:42
Question: Does the VHD install of Windows 7 need an additional license key, or will the same key work for it?
August 11, 2009 21:42
AndrewS and Mike Berger - I just talked to the Win7 documentation team and they are updating the PDF. Thanks!

R. Bemrose - I'm not sure. I haven't even activated one in the VHD. I don't put in a key and just use them for a month or two, before activation is a problem.

Stuart Celarier - You can use any version on a Netbook. I run Ultimate on mine, but if you don't need the bells and whistles, just get the features you need. Maybe Pro?
August 12, 2009 19:20
A single app for XP onwards is still my favourite. This included 32 and 64 bit versions for the most part, I have occasional trouble with external dependencies and have to remember to set my programs to compile to 32 bit versions (which will still run in 64 anyway).

Boot to VHD is cool but I still think most of my testing will be done in normal virtual machines.

While i'm posting Scott you did a podcast with the developer of Banshee a while back. Any idea when the windows version talked about is going to be available?
August 13, 2009 6:20
Please provide Slipstream Sql Server 2008 + SP1, so that it will not throw errors or wanrings in Windows 7 OS.
bmn
August 13, 2009 6:25
Since .net framework 3.5 SP1 is preinstalled in windows 7, does it mean IIS is installed with asp.net preconfigured by default.
bmn
August 13, 2009 17:31
i believe it is still necessary to install Visual Studio 2008, Team Explorer 2008, then SP1. There is a problem with Team Explorer if it is installed after SP1, causing potential errors when creating new team projects.

anyway, if .NET 3.5 SP1 is already built in, what effect would there be when installing Visual Studio and SQL Server 2005 on a clean OS?
August 17, 2009 5:28
My strong recommendation is that any developer using VS2008 should stay away from Win 7 unless you want to share my experience which has been anything but satisfactory. I've now wasted an entire week of 20 hour days trying to get VS2008 SP1 installed, what a nightmare.

Sure, VS2008 installs fine on Weven but wait until you try getting VS2008 SP1 installed! I need to get this running so I can install Silverlight Tools for VS2008 SP1.

Initially after repaving for W7 X64, I installed a browser, office and a few other apps including VS2008. Then tried VS2008 SP1 both the web based and downloading the ISO and trying from there. I have tried everything to no avail, removed all patches etc. etc. Get out your browser and search for the W7 and VS2008 SP1 and you will see many people have had problems and some anger.

Eventually I thought I would repave W7 again and only install the browser and VS2008 then try VS2008 SP1, I mean literally all I have installed now is W7 x64, IE8 and VS2008, but no way can I install SP1. I doesnt even rollback properly. What really cracks me up is that VS2008 SP1 falls over in different places each time despite manually rolling back the patches and using the patch removal tool. I dread to think what would happen if I went and installed my full developer load i.e Team DB edition, Architect Edition, Expression 3 etc.

Not sure where to go from here, I guess back to Vista or maybe even XP 64, progress eh!

I could go on, I've just got fed up of now putting in approx 120 hours this week to get VS2008 installed on W7 and am no further along other than concluding that if I get over this hurdle that others await further down the road. I reckon wait for Windows 7 SP3 and VS2010 SP5 and take an oath to self about considering early adopter in future.
August 17, 2009 6:30
I have had no problem installing VS2008 SP1. I did a clean install on Win 7 Ultimate yesterday on my desktop and went on to install VS2008 SP1, SQL Server 2008 SP1 and Expression Blend Studio. Today I installed the same config on my laptop, again no problem at all.
August 17, 2009 8:04
Kieran - Wow, I've installed VS2008SP1 on 6 machines with no trouble. I've never heard of this. I'll forward your story right away to some folks who can look into this. Can you send me more details?
August 17, 2009 13:21
Hi Scott, thanks for replying. Yeah no problem, I'll zip up the last set of logging from app data/local/temp folder and send it to you - my last attempt was to try manually install and apply the individual components of SP1.

I'm not entirely sure why but I'm going to try this one more time, clear down the pc and do a clean install of W7 Ultimate x64 and again only install the browser. I am going to install the full team suite i.e. VS2008 plus DB and Architect editions before applying SP1 as I have to know that the full suite will be ok. If (when??) I run into problems I'll also zip up app data/local/temp folder and send it on, after that its back to Vista.

You might let me know where you'd like me to email the logging attachments
August 18, 2009 20:41
I too have done a successfull Win7 pave and installed VS2008SP1 just fine...only difference on my end was I used the MSDN media containing the SP1...but that honestly shouldn't be important.

One other thing I did do (based on the experience a co-worker had with his new Win7 spontaneously restarting) was flash my Motherboard bios... I know it doesn't sound rational to think that a bios issue could be the culprit...but I didn't think the bios flash for my co-worker would fix his issue either since his box had been fine with Vista for a year.
August 24, 2009 16:14
No problem installing VS2008 SP1 at all
August 26, 2009 2:39
I've been running Win7 Ult x64 RTM, with VS2008SP1 Pro and SQL2008 Enterprise x64, smooth and no issues.

I did have some oddities during the installs however. SQL and VS were the very first things I installed. The SQL installer (and SP1 isntaller) would crash at random stages (during several attempts) with "Invoke or BeginInvoke cannot be called on a control until the window handle has been created"

Becuase I'm paranoid and OCD about initial installs on an important workstation, I wiped the machine and reloaded Win7. I made sure there were no other apps/windows running during the installs and kept my hands off the machine and it seemed to help, only saw the error once during the prereq scan, restarted it and it went through. Since then everything has been good.

Also boooting a Win7 Ult x86 to VHD so I can run Cisco IPSec 5.x client, for when I don't feel like dealing with a VM. (Installed the Citrix DNE update before Cisco)
August 31, 2009 6:56
The 2009-08-27 PDF version of the Windows 7 UX guidelines is now available at http://www.microsoft.com/downloadS/details.aspx?FamilyID=e49820cb-954d-45ae-9cb3-1b9e8ea7fe8c&displaylang=en
September 19, 2009 23:56
greate post thanks you much please tell me when windows 7 come final , i'm using windows 7 7100 :( trial
October 02, 2009 18:49
Thanks for the article Scott. Followed a link from Visual Studio Magazine.

Thanks for the updated WIn7 UX link devstuff.

October 26, 2009 11:19
Some good information. It's going to be interesting making use of some of the new features in 7. I'm glad in comes with .NET Framework 3.5 SP1!

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.