20 September 2011

Observations and Contemplation with Windows 8

Like most people who downloaded the Windows 8 Developer Preview last week, I’ve have only a short amount of time to play around with the bits.  During that time I’ve hit several speed bumps and have scratched my head a bit while attempting to figure out a few (seemingly simple) tasks.  What I’ve listed below are just a few of my observations and moments of contemplation that I’ve had over the past few days.

  1. How do I shut down my Windows 8 machine?  This is one of those functions that is so completely obvious that you don’t realize it’s even there until someone moves it from the place it’s lived in for the past 16, or so, years.  Like a lot of people, I installed the Windows 8 Developer Preview bits, played around for a while only to realize it was the middle of the night.  So I decided to power off my laptop and go to bed.  However, I no longer had a “Shut down'” option under my Start menu.  In fact, all my Start menu seemed to do was toggle between the two most recent apps.  So, I had to do some digging.

    There are several options, none of which were immediately obvious to me, for powering down your Windows 8 machine.  Although there may be other options that I’m no yet aware of, I’ve included the ones I’ve discovered below.  Some of these are more convenient than others but I’ve listed them all for completeness:
    1. On the Start screen, press Windows+I to display the Settings panel and then click on the Power icon at the bottom and select Shut down.
    2. Press Ctrl+Alt+Del and then click on the Power icon at the bottom and select Shut down.
    3. Go to the Control Panel (e.g. from the Start screen type ‘con’ and press Enter) and select More settings.  Click on Power Options and then ‘Choose what the power buttons do’.  Set the ‘When I press the power button’ option to Shut down.  Then simply press the power button to turn off your machine.
    4. You can also create a Shut Down Live Tile for your start screen.  Instructions are here.
    5. Press Windows+R, enter ‘CMD’ and press Enter.  Type ‘Shutdown /s’ (no quotes) and press Enter.
  2. Keyboard Shortcuts.  If you’ve been using Windows 7 (or prior versions) for a while then you may already be used to many of the standardized Windows keyboard shortcuts.  For example, pressing Windows+E will display the Windows Explorer.  Most of these shortcuts still work in Windows 8 but there is also a new set of keyboard shortcuts for the new Metro-style Start screen.  Rather than list them all here check out this post.
  3. Windows Phone 8.  Although I didn’t attend last week’s //Build/ conference, I have watched the keynotes as well as several other sessions.  One topic I didn’t really hear/see any information on was that of Windows Phone 8 (codename “Apollo”).  I’ve seen various speculation (e.g. here and here and others) that Windows 8 would eventually run on Windows Phone but I didn’t see anything to substantiate that during the conference.  It only makes sense for Microsoft to head that direction, I just suppose it’s a little too early to talk about it with Windows Phone 7.5 (“Mango”) due to be officially released (by the carriers) any time now.
  4. .NET Framework.  It’s certain that the .NET Framework is not going anywhere anytime soon.  I do have to wonder, however, just how long will the .NET Framework be around?  With the introduction of the new Windows Runtime (WinRT) used to develop Windows 8 Metro applications the .NET Framework is now used to develop non-Metro apps (including Silverlight-based applications).  Will WinRT eventually be used to build all applications for Windows 8?  I suppose that until all supported versions of Windows support WinRT Microsoft will have to continue support for the .NET Framework.  Only time will tell but I’m sure someone in Microsoft has seen the super-secret roadmap and knows where all of this is heading.
  5. Silverlight.  There was a lot of speculation around the demise of Silverlight prior to the //Build/ conference.  It was widely rumored (and somewhat stated) that HTML5/CSS and JavaScript were to be the languages of choice for writing Metro applications in Windows 8.  A lot of questions were asked about the future of Silverlight if HTML5/CSS+JavaScript were to become the cross-platform technology of choice.

    Although I did not see it directly addressed, it’s fairly clear now (after the conference) that Silverlight is very much alive and that the HTML5/CSS+JavaScript solution, when utilizing WinRT, really only applies to Windows 8 Metro apps – not cross-platform apps (like those that you might build with Silverlight).

    So, from my simplistic point of view, if you want to build “fully immersive”, Metro-style applications in Windows 8 then HTML5/CSS+JavaScript over WinRT is a valid option (as is C/C++, VB, or C#).  However, if you want to build a business application (or even a non-business application) that runs across multiple versions of Windows and/or other operating systems then Silverlight is still a great choice (as is HTML5/CSS+JavaScript sans WinRT).
  6. What Gets “Metro-fied”?  If you’ve used Windows 8 for more than a few minutes on a non-tablet PC (i.e. a desktop or laptop) then you surely have been forced into the non-metro bowels of Windows.  For example, if you start Windows Explorer (Windows+E) it will open in the “desktop” shell.  If you want to change your power settings (as described above), you will have to do that from the old-school desktop.  In fact, the majority of Windows features do not run within the new Metro-based Start screen.  So, as Windows 8 marches its way toward RTM, exactly which applications will be metrofied?

    I don’t know the answer to this question but it seems logical that any application that you might want to make use of on a tablet PC would be a great candidate for metrofication.  For example, the calculator app that ships with Windows 8 is currently not metrofied (i.e. it opens up on the desktop when you run it).  I would imagine that a calculator app might be useful on a tablet PC so I could see this app being metrofied by the time Windows 8 finally ships.
  7. Your Mouse is Not a Finger.  Unfortunately, I was not at the //Build/ conference this year so I did not receive one of the ultra-cool Samsung Windows 8 Tablet PCs (or whatever they called them).  Therefor, I installed Windows 8 on an old Dell Inspiron 9300 that does not have a touch screen.  Once I logged on I was greeted by the beautiful, new Metro Start screen.  Naturally, the first thing I did was to attempt to left-click and drag my mouse cursor across the screen in an attempt to scroll through the applications.  To my surprise, nothing happened.  It turns out that there is a really big (and ugly) scrollbar at the bottom of the screen that you have to use to manipulate the app list with the mouse.  Why?  Why not treat the mouse as a single touch point when left-clicking on the background?  If your computer is locked (e.g. when you first power up) you can slide the lock screen up with the mouse.  Why not the application list?  Maybe this is something that will be worked into a future version (possibly as a configuration option that can be turned on/off).  If not, maybe there will be enough extensibility in the platform such that a 3rd party provider can create some type of add-on to provide this type of functionality.
  8. Closing an Application.  Much like with Windows Phone 7/7.5 it appears you don’t really have to think a whole lot about closing (Metro) applications in Windows 8.  In fact, none of the Metro applications that ship with the Windows 8 Developer Preview appear to have any sort of “close” functionality.  When you’re finished with an app, you simply swipe from the right to display the “charms” (see below) and click on the Windows icon (or press the Windows key).  At some point Windows will suspend and, eventually, terminate the application process(es).  The specifics of how all this works is still a bit of a mystery to me (e.g. at what point is an application suspended?  At what point does it get terminated?) but I’m sure the answers are out there somewhere – I just haven’t come across them yet.
  9. Charms?  Really?  If you have a touch-based system running Windows 8 and you swipe from the right (or press Windows+I on a non-touch-based system) a vertical row of five icons are displayed (Settings, Devices, Share, Search, and Start).  These icons are called, according to Microsoft, Charms.  In fact, Microsoft has filed for a trademark for the term “charm”.  I’ve always thought of charms as those small, shiny, jingly things my daughter wears on her bracelet.  I suppose I’ll just have to get used to this one :-)
  10. There is no 10 (at least not yet :-).  For the sake of not creating yet another top ten list I am intentionally stopping at number nine above.  However, as I spend more time with Windows 8 (and Visual Studio 11) over the coming weeks, I am sure I will uncover more questions and hopefully even more answers.  One thing I am sure of is that it is going to be a fun time digging into all that is new with Windows 8.

13 September 2011

//build/ Observations from the Outside–Day 1

Like so many others, I was not able to attend the //build/ conference (formerly known as the Professional Developers Conference or PDC).  However, I did have the opportunity to watch the streaming keynote live and I’ve also spent a good portion of the day watching various twitter, Facebook, and blog posts from those who are attending.  With so much coming out of Microsoft in one day it’s hard to keep up with everything being announced and talked about so I thought I’d put a few notes together around today’s event.

The word of the day is BOLD

I didn’t actually count the number of times the word “bold” was used during the keynote session earlier today but I can safely say it was used a lot.  In general, it was used in reference to Microsoft making a “bold, no compromises move”.  I have to admit, after seeing the various demonstrations from the keynote, I agree that Microsoft is making a bold move and rethinking Windows as a platform.  A quick (non-complete) list of some of the things demonstrated include:

  • The new Windows 8 Metro-style UI
  • Windows 8 running on multiple form factors including desktop PCs and various tablet PCs (running ARM-based processors)
  • Internet Explorer 10 Platform Preview 3
  • Visual Studio “11” (v.Next) Express
  • A new framework for developing software for Windows
  • Windows Application Store
  • Windows 8 using less memory with fewer (default) processes than Windows 7
  • Picture-based login
  • Support for inter-application integration provided directly within Windows 8
  • Spell checking at the OS level (i.e. spell checking everywhere)
  • Fast boot

Developing for Windows 8

With Windows 8 Microsoft introduce a new programming platform known as the Windows Runtime – or WinRT.  Developers can now utilize their language of choice when building applications targeted against Windows 8.  Regardless of which language you choose, which now includes JavaScript, the WinRT APIs will be reflected into your language of choice and made available for use.

One thing to note is that Silverlight (or WPF for that matter) was only mentioned during the keynote as a “legacy” technology (in not so many words).  They did demonstrate running a Silverlight application running on Windows 8 and was able to “Metro-fy” it with a minimal amount of code modification.  It seems that the rumors of HTML5/CSS + JavaScript being the preferred approach for developing Metro-style applications rather than Silverlight have been verified.

A pre-release version of Visual Studio “11” was also demonstrated and used for the various coding examples.  The keynote did not go into the details of what’s new in Visual Studio so I will post more details on Visual Studio as they are made clear.

A new (pre-release) version of Expression Blend 5 was demonstrated now with support for HTML and CSS!  That is an awesome addition to the Microsoft development tools suite.

Head in the Cloud

Windows Live integration is front and center in Windows 8.  Modifying your applications to interact with SkyDrive, for example, requires minimal coding and is supported directly by Windows 8.  Windows Live integration is present throughout Windows 8 with my favorite feature (although it wasn’t directly demonstrated) being the ability to synchronize your various settings (e.g. history, passwords, themes, etc.) via the cloud so they follow you around from device-to-device.

The “Giveaway”

If you’ve followed the PDC for the last couple of years you know that Microsoft has given some type of hardware to each of the (paying) attendees to help gain developer support.  A couple of years ago, at PDC10, it was an Acer Table PC.  Last year, it was a Windows Phone 7 device (I happened to be there and received an LG-900 Windows Phone 7 device).  Once again, this year Microsoft did not disappoint and provided each of the attendees with a Samsung Windows 8 Developer Tablet (or PC as Microsoft calls it).  To add to the already great gift, AT&T threw in a year of free 3G service (2GB/month)!  Not a bad deal for the attendees!

That’s Awesome!  When Can I Have It?

In typical Microsoft fashion, no release dates were announced.  However, they did provide the “Path to ‘RTM’” as shown in the slide below:

Although we don’t know yet when the final bits will be made available for download, you can download the Windows 8 Developer Preview now.  There are three flavors of Windows 8 downloads available:

  • Windows Developer Preview with Developer Tools – English, 64-bit (x64) – 4.8GB
  • Windows Developer Preview – English, 64-bit (x64) – 3.6GB
  • Windows Developer Preview – English, 32-bit (x86) – 2.8GB

You can download any or all of the above releases here.

More to Come!

Keep in mind that my observations below are a small part of what was seen and demonstrated today.  I’m looking forward to the next few days of the //build/ conference and probably a few nights of little sleep :-)  I have the preview version of Windows 8 downloaded and am preparing to install it as I type this post (I’m currently creating a bootable USB drive for the image).  I have no doubt that I, along with thousands of others, will be blogging their experiences over the next days, weeks, and months ahead.  It is going to be a fun ride!

24 August 2011

Team Explorer Profile Manager–Take 1

If there is one thing I can generally count on doing at least once a day it’s firing up Visual Studio 2010.  Along with Visual Studio 2010 I am also a heavy user of Team Foundation Server 2010.  I use it at my “day job” as well as at home on “side” projects.  At work, I switch among multiple Team Project Collections and Team Projects relatively frequently.  At home, more so because I tend to work with several CodePlex projects as well as local TPCs and Team Projects on my development laptop.

[UPDATE: A new release is available – see Update History below…]

If this sounds like you then you’ve no doubt experienced the pain of having to continually switch TPCs in Visual Studio Team Explorer.  It goes something like this:

  1. Fire up Visual Studio 2010
  2. Click on the Team Explorer tab only to realize that the project you need is in another TPC
  3. Click on the “Connect to Team Project” icon and switch TPCs and select the desired Team Projects
  4. Click the confirmation dialog warning you that connecting to another TPC will close all queries, etc.
  5. While working, you decide to open another instance of Visual Studio to take a look at a different project
  6. You click on the Team Explorer tab only to realize, that once again, you’re connected to the wrong TPC so you repeat steps 2 – 4
  7. And so on…

Wouldn’t it be nice if you could simply launch Visual Studio and have it connect to the TPC and Team Projects you need from the start?  Well, that’s where the Team Explorer Profile Manager (TEPM) comes in.  I wrote this utility to handle exactly this scenario.

What Is TEPM?

Once you run TEPM it sits in the Windows “system tray” area waiting for you to right-click on it.  Once you do, you will see a menu structure something like this:

image

Based on the menu items seen above you might have guessed that TEPM works on the basis of “profiles”.  A profile is simply a snapshot of the Team Explorer settings taken at a given time.  Here’s how it works:

  1. Fire up Visual Studio 2010 (TEPM currently works only with Visual Studio 2010)
  2. Connect to the desired TPC and select the active Team Projects you wish to work with
  3. Right-click on the TEPM icon to get the above menu and select “Manage Profiles”.  This will display the following dialog allowing you to name the profile for the current Team Explorer settings:

    image
  4. Once you’ve entered a profile name (using only valid filename characters) click on the Copy button to create the profile.

Repeat the above steps for the various TPCs and Team Projects you regularly work with.

Now, when you right-click on the TEPM icon to get the above menu, hover over the Launch Saved Profile menu option to display a list of profiles.  For example:

image

Notice in the screenshot above, I have six profiles configured.  Selecting a profile will launch Visual Studio 2010 with the correct Team Explorer settings.  So the next time you need to fire up Visual Studio 2010 to work in a TPC different from what you’re currently working in simply right-click and launch!

Some Other Info

TEPMAboutLogo2This is a “v1.0” product.  It works (at least for me) and should work for you.  You may encounter bugs and, if you do, I would really like to know about them so I can fix them.  The first time you run TEPM it will create a “baseline” profile that matches your current settings.  You can revert to this baseline at any time by selecting the Launch Baseline Profile menu item.  You can also reset the baseline to a specific profile by clicking on the Create Baseline button in the “Manage Profiles” dialog shown above.

Currently, there is no option for running this utility when you first logon to Windows.  I plan to add this soon but just haven’t done it yet.[done]  If there are any other options that you’d like to see, please let me know.

There is also no installation package at this time (e.g. no MSI).  I plan to add that soon as well but for now, the download is simply a ZIP file that contains a single EXE.  Copy the EXE to the desired location on your machine and double-click it to run it.[done]

Download

Eventually, this will be hosted on the Visual Studio Code Gallery.  Until I get it there, you can download the ZIP file from here.

Please let me know if you have any questions, suggestions, criticisms, etc.

Update History

  • 30 August 2011 – Miscellaneous updates, including:
    • Now packaged as a setup file.  You no longer need to manually copy the file to a directory to install it.
    • Added a Settings dialog with the option to automatically run TEPM on startup
    • Double-clicking the TEPM icon will now launch Visual Studio 2010 using the current profile
    • Removed the “Copy Current Profile” menu option and merged into “Manage Profiles”
  • 24 August 2011 – Version 1.0 Published

16 August 2011

Indent Guides in Visual Studio 2010

A short while back, I blogged about some of my favorite Visual Studio extensions.  Recently, I discovered another (free) extension that I’ve really learned to love – the Indent Guides extension.  This extension does exactly what it says, it provides visible “indent guides” within the Visual Studio source code editor allowing you to easily track various levels of indentation throughout your source code.

My favorite feature of the extension is the ability to modify the look of the indent guide lines at each level of indentation.  As you can see in the screenshot below, I’ve modified the guide lines for the 2nd level of indentation to be a red, dashed line (instead of a teal, dotted line).  This allows me to easily see the “top” level of the current method I’m currently modifying even if I can’t see the top or bottom curly braces for the method.

image

There are various other options that you can play with as well.  Just go to Tools->Options and select Indent Guides.  This is a basic extension but is very well done and the author has been very responsive to questions posted on the Visual Studio Gallery link.

Read more about this extension and/or download it here.

09 August 2011

.NET Framework 4 Update (KB2468871)

Microsoft has released a GDR (General Distribution Release) update (KB2468871) that rolls all previous hotfixes – or QFEs (as of a couple of months ago) – into a single update.

This update replaces the following hotfixes:

  • 2183292 "Failure sending mail" error message when you send an email message by using a .NET Framework 4-based application that uses the "System.Net.Mail.SmtpClient" class if the email attachment is larger than 3 MB
  • 2413613 A shortcut menu may appear far away from the mouse pointer when you run a Windows Presentation Foundation application that is based on the .NET Framework 4
  • 2298853 Visual Studio 2010 error: "Error 1 error MSB4014: The build stopped unexpectedly because of an internal failure"
  • 2461678 A .NET Framework 4-based WPF application crashes if the source object of a data binding in a control is an element that is defined outside the name scope of the control

There are also several other issues that have been resolved in this GDR which are covered here.

Get this update here and/or read more about it on Buck Hodges’ blog here.

03 August 2011

Version Control Changes Coming to TFS v.Next

For many of using Team Foundation Server on a daily basis, living with the TFS workspace has been a love/hate (mostly hate?) relationship.  A simplistic definition, if you’re not familiar with TFS’ workspace, is that it is a mapping of a selection of files within TFS version control to their corresponding destination on your local file system along with various related status information.  This workspace mapping is stored on the server – not the client (i.e. server workspace).

The down side is that it is relatively easy to get your local file system out of sync with what TFS thinks it knows (about the status of the mapped files).  If you delete a file on your local file system, TFS has no idea that the file has been deleted.  If you modify a file on your local file system (assuming you remove the “read only” attribute) then TFS has no idea about that change.  These examples, along with others not listed, adds to some of the greatest confusion when learning to use TFS version control for the first time.

On the up-side, the beauty of the server workspace is that TFS will send down only the files necessary based upon your request (i.e. “Get Latest”).  This can be very useful if you’re working across a WAN/VPN connection where bandwidth is at a premium.

Enough about the current state of affairs.  Now, the good part… Brian Harry has posted some details around some of the enhancements being made to version control with the next release of Team Foundation Server (a.k.a. “Dev11”).  In this post, he discusses the addition of the “Local Workspace” which allows you to make changes directly to the files within your file system and TFS will automagically recognize and handle those changes.  This will provide SVN-style version control capabilities with TFS.  Server workspaces will still exist but the local workspace will become the default.

Check out Brian’s post for all the nitty gritty details.

26 July 2011

Visual Studio LightSwitch 2011 Released

Today, Visual Studio LightSwitch 2011 has been released for download from the MSDN Subscribers site.  General availability for download will start this Thursday, July 28th.

From Jason Zanders’ blog post:

Visual Studio LightSwitch 2011 is a simplified, self-service development tool that enables you to create business applications quickly and easily for the desktop and cloud. I first announced LightSwitch at the VS Live conference in August 2010 and have since written a few posts including detailed tutorials. For those of you unfamiliar with it, it starts with the premise that most business applications consist of data and the screens that users interact with. LightSwitch simplifies attaching to data with data source wizards or creating data tables with table designers. It also includes screen templates for common tasks so you can create clean interfaces for your applications without being a designer. Basic applications can be written without a line of code. However, you can add custom code that is specific to your business problem without having to worry about setting up classes and methods.

Read the full details on Jason’s blog here.

19 July 2011

Be Heard: UserVoice Site for Visual Studio/ALM

Recently, Brian Harry blogged about a set of two new UserVoice sites: One for Visual Studio and one for Visual Studio ALM.  However, just about as quickly as the two sites were created, they were merged – one site to rule them all!  The merged site is available here.

The intent of this site is to provide a forum where you can provide suggestions and ideas for future anything that lives within the Visual Studio brand – e.g. Visual Studio, Visual Studio ALM, Team Foundation Server, Test and Lab Management, etc.  So, if you have any ideas that you’d love to see within Visual Studio, be sure to post them and then build support for your idea by getting others to vote for it.

Keep in mind that if you need to file information regarding a bug you should continue to use Microsoft’s Connect site.

The Visual Studio UserVoice link again is: http://visualstudio.uservoice.com/forums/121579-visual-studio

23 June 2011

Visual Studio 2010 Extensions

Visual Studio 2010 is a great integrated development environment (IDE) for developing all types of applications in multiple programming languages.  One of the (many) advantages of using a mature IDE like Visual Studio is that it is highly extensible.  Visual Studio has had a great community of developer-built extensions for a long time now.  However, until recent times, it wasn’t always easy to locate and install the extensions you needed or simply wanted.  This has changed.

About two and a half years ago (give or take – my history is a little fuzzy) Microsoft introduced the Visual Studio Gallery.  This on-line “store” for Visual Studio provides “quick access to tools, controls, and templates to help you get the most out of Visual Studio”.  With the gallery came not only the ability to easily search for extensions and install them but also the ability to easily upload new extensions that you build yourself.  There are now over 2,500 extensions available for download in the Visual Studio Gallery – some free and some commercial (i.e. not free).  If you’re looking to extend Visual Studio for a specific scenario, check the gallery first because you just might find what you’re looking for.

With that said, there is a set of extensions that I always go back and install any time I spin up a new developer machine.  I’ve listed these below in case you see something that you’re not familiar with and want to give it a try.

I actually have several other extensions installed, but the ones I’ve listed above are the ones that I make sure I put back on every time.  If you’re not familiar with the above extensions, click on the link and check them out.  You just may find them to be as useful as I do.

If there is a favorite extension that you can’t live without, tell us about it in the comments section below.  It may turn out to be one that I can’t live without.

22 June 2011

Web Standards Update for Visual Studio 2010 SP1

If you are using Visual Studio 2010 to create HTML 5 applications then you will appreciate the recently released Web Standards Update for Visual Studio 2010 SP1.  This update brings IntelliSense and validation to Visual Studio, based on the W3C specification, for HTML 5 and CSS3.

As reported by Scott Hanselman, this update provides you with IntelliSense and validation for:

HTML 5 features

Browser APIs

  • Geo-Location - Location aware websites are a clear, growing trend and now you've got full IntelliSense and validation within Visual Studio. For a nice sample, view source on the IE9 test drive demo.
  • Local Storage – IE has been supporting local storage from IE8, so now Visual Studio will provide you with full-fidelity IntelliSense to create sites which can save state within the browser. For sample of this, do a view source on HTML5 Demo Site

CSS3

You can read the full details from his blog posts here.

You can download the update (~1MB) here.  A few people have had issues with the update claiming they need to install Visual Studio 2010 SP1 when, in fact, they already have SP1 installed.  If you have a similar experience, you might try the solution provided by Wouter vanEck on the Reviews tab, summarized here:

  • Download and install the ORCA tool from Microsoft (this is a MSI editor)
  • Once installed, start ORCA and open the downloaded Web Standards Update.msi package
  • In Tables, select the "CustomAction" entry
  • Once selected, in the right pane, select the "VSDCA_VsdLaunchConditions" line, right-click and select "Drop Row"
  • Save the package and run it