Skip to main content

VS/TFS 11 Announcement Crib Notes

1680.SolutionExplorer-2The last few hours have been a buzz of excitement for .NET developers as the covers have been lifted for the next releases of TFS, VS & .NET 4.5 – however there is a problem. There is SO much info wrapped in nice marketing & business talk you will spend hours trying to get through it all, so here are the crib notes. Following each note is a number in braces, this is the number of the source so you can go to it for more info if you wish:

  • .NET 4.5, VS 11 & TFS 11 beta’s will be available on the 29th Feb. [1]
  • You can use the products in production from beta (technically called a go-live licence) [2]
  • Visual Studio 11 has had a UI polish, similar layout but less toolbars by default, less colours (icons are monotone) & a touch of Metro like thinking (white space & typography) [2]
  • Five editions (or SKUs) of Visual Studio will ship: Express, Test Pro, Pro, Premium & Ultimate. Same as we have in 2010. [3]
  • TFS will have at least two editions, Express (think TFS basic but FREE) and another edition. We may have more than that. [8]
  • Visual Studio Professional and up will include Lightswitch! [3]
  • The architecture tool diagrams can now be read in professional & premium versions too (in 2010 it was premium only). Creation still requires ultimate. [4]
  • IntelliTrace is supported in production (still an ultimate only feature). [4]
  • Windows Phone 7 tools included with professional and higher editions of Visual Studio 11. [4]
  • Express will have two versions: Windows (WPF, WinRT, etc..) & Web (ASP.NET, MVC etc…). [5]
  • There are two themes for Visual Studio: Light (pictured above) & Dark which feels like a Expression Blend style. [6]
  • Quick launch is a new search feature allows you to search for any command or option in Visual Studio. [6]
  • Search has been added to most used tool windows, like solution explorer. [6]
  • ASP.NET MVC 4 has a bunch of evolutionary improvements, nothing to wet your pants on IMHO. [7]
  • ASP.NET Web API is a big new feature for both MVC & WebForms for building API’s for the web. Think services like WCF but built for the modern web. [9]
  • Visual Studio 11 is a code name – expect a name change by release. [10]
  • Workflow hubs in Visual Studio 11 allows you to focus on a task in a single place, rather than have to move around multiple windows. [11]
  • Preview tabs allow you to sneak a peek at documents without needing to actually open them. [10]
  • C# 5 (yes, it is version 5 of C# that is shipping with .NET 4.5 – who says this is confusing) has support for async. [10]
  • New code compare tool & UI that doesn’t suck. [11]
  • New code review tool support in TFS & Visual Studio. [12]
  • New mock up design tool that ships with Visual Studio/TFS that allows you to build mock user interfaces in Powerpoint. Think Sketchflow without the code or Balsamiq. [13]
  • New Visual Studio METRO’d logo [14]: VS11-Beta_h_c

Want to see some pictures of all of this? http://www.microsoft.com/presspass/presskits/developer/imagegallery.aspx

 

Sources

  1. http://blogs.msdn.com/b/somasegar/archive/2012/02/23/the-road-to-visual-studio-11-beta-and-net-4-5-beta.aspx
  2. http://blogs.msdn.com/b/jasonz/archive/2012/02/23/sneak-preview-of-visual-studio-11-and-net-framework-4-5-beta.aspx
  3. http://www.microsoft.com/visualstudio/en-us/products/beta-products
  4. http://www.microsoft.com/visualstudio/en-us/products/features-chart
  5. http://www.microsoft.com/visualstudio/en-us/products/beta-express
  6. http://blogs.msdn.com/b/visualstudio/
  7. http://weblogs.asp.net/scottgu/archive/2012/02/19/asp-net-mvc-4-beta.aspx
  8. http://blogs.msdn.com/b/bharry/archive/2012/02/23/coming-soon-tfs-express.aspx
  9. http://weblogs.asp.net/scottgu/archive/2012/02/23/asp-net-web-api-part-1.aspx
  10. http://www.microsoft.com/presspass/features/2012/feb12/02-23VisualStudioBetaPreview.mspx
  11. http://www.microsoft.com/presspass/ImageGallery/ImageDetails.mspx?id=2c8135ad-fefd-48c2-888f-83b6987a4e87
  12. http://www.microsoft.com/presspass/ImageGallery/ImageDetails.mspx?id=2a0b1cf8-9d74-4603-a2d1-03d8ef989a8c
  13. http://www.microsoft.com/presspass/ImageGallery/ImageDetails.mspx?id=240cbb53-9dd5-4262-b0cc-cdb9a57485d3
  14. http://www.microsoft.com/presspass/imagegallery/images/products/developer/vs/logo_vs11beta_print.jpg

Windows Phone: Icons not loading, Internet Explorer just black, performance poor

My Windows Phone the other day started acting badly, any icon from an application that I installed refused to load, Internet Explorer would just show a black screen and the performance on the phone was VERY poor. The cause? I use this awesome device too much and I had run out of space:

oops

Using the Zune software is the only way to see that!

What had happened is that I hadn’t installed new apps, but I had done a bunch of updates the day it started and so it seems the updates filled it up. Once I cleaned up some apps & games I don’t use I freed up a few gigs and all started working fantastically again!

Want awesome banners for your Windows Phone Apps? Nokia to the rescue!

-nokia-lumia-800-13Check out that great banner to the right for my Windows Phone App, FireFly. It looks so professional (right fonts, my icon is there), plus it is on the gorgeous Nokia Lumia device in it!

How did I create it? With a FREE tool from Nokia that allows you to create banners for Windows Phone apps and Symbian Apps! You can access the tool at: http://snac.nokia.com/2/omt

It took about 5 minutes to do it and in the end I got 14 banners generated for me in all different shapes and sizes. Thanks Nokia for the great tool!

Here are some more samples:

 

-nokia-lumia-800-10-nokia-lumia-800-4-nokia-lumia-800-2-nokia-lumia-800-0

Silverlight - When does it REALLY end?

imageWhen you ask Microsoft, “Microsoft WTF is going on with Silverlight 5? Is it the last version of Silverlight? Will you support more versions?”, you get given a link to the Silverlight Product Support Lifecycle Page (this has happened more than once to me). This page lists when Microsoft will support Silverlight until, and you will see that for releases 1 through 4 it was between two & three years. For Silverlight 5 it is a DECADE. This implies that this release will be with us for some time, so it is a good bet that it will be the last one. Before I continue this post is about Silverlight on the desktop not Silverlight on the phone which is a different thing all together, I have very different views to Silverlight on the phone.

So what does that REALLY mean to us? Mainstream support will end in 2021. Does that mean browsers will work & Visual Studio will work? Maybe is the real answer. Mainstream support (as defined on the Microsoft website) means

  • You can contact Microsoft and ask for help. You may get this for free or pay for it. I’ve used this in the past and gotten hotfixes and general installation help on other products. It is GREAT!
  • Security patches.
  • The ability to request non-security hotfixes (i.e. you find a bug, you log it with support, you wait a while, you get a fix).

It does not mean tools or browsers will support it! Both are listed on the Silverlight page so they have given us this info too. Tooling is promised for a minimum of 12 months after release which means that Visual Studio & Blend releases 12 months following the release of Silverlight 5 will support it. This means we can expect Visual Studio 11 and Blend 5 to support it. However there is NO promise for further tooling updates, which means that VS 11 & Blend 5 are likely the last releases to support Silverlight. Visual Studio has a trend of 5 years support so expect bugs in tooling to no longer be fixed after that. The other tool we must consider is Lightswitch, which is based on Silverlight. What is it’s life? It is listed as 2017! So do not expect you current Lightswitch projects to continue until then!

In reality those are tools, we can continue to use them long after end of life (as the SQL team forces ANYONE who wants to create reports for SQL 2000 or 2005 will know). The real concern must be out customers and their interface to Silverlight, the browser. The support lifecycle page links to a page with supported browsers and has an interesting note. They will support those browsers until end of mainstream Silverlight support (2021) or until the browsers own support ends WHICH EVER IS SHORTER!  So that means if IE ends of life sooner, they get to stop supporting it sooner. So when will that really end? The latest browser on the list is IE 9, so looking that up gives us nothing – it is a component and thus it’s lifecycle is linked to it’s parent product Windows 7 which ends of life in 2015!  I am running the Windows 8 beta and I know Silverlight 5 does run on it with Internet Explorer 10, so if we assume that they follow the same lifecycle and this is the last release to support it that means we can expect browser support only until 2017!

So the reality is that your operating system, your browser & your tools all stop supporting it in 2017 – that is the real end of life to me, and that is 5 years away! Sure you can get security hotfixes for another 4 years after that, but really what good are those when your tools, OS & browser can not be fixed. So for me the real end of life is 2017.

Finally let be clear, there is assumptions and estimations based on previous support life cycle numbers. Microsoft could be preparing something and just not communicating it and this could all be wrong, but as Microsoft is not communicating this is all we have to go on anyway. There is another Silverlight, that one powers Windows Phone apps – I view these are two completely separate products (similar features but not the same, but different tools and different requirements) with the same name so my view here does not imply ANYTHING to Windows Phone 7 – I do believe that Silverlight will be with us for much longer.

How different is WinRT really?

Update 29 Feb 2012: There is now a post covering the Consumer Preview/Beta changes: How different is Metro Style (WinRT) development really? The beta post

Note: Before you read this post, it is using the public technical preview of Windows 8, VS 11 & .NET 4.5, so I expect some issues will likely be resolved in later releases. Check the site out for more info!

Recently I have been working on a MVVM framework (it’s the new Hello World project for developers) and I wanted to make sure it worked with WPF, Silverlight & the new hotness: WinRT (or Metro or Windows 8 depending on who you ask). So I started to retrofit the framework and build a demo application at the same time to show it off. I quickly found a bunch of issues that you need to take care of when moving to WinRT.

Namespaces

It has been mentioned since //Build that we will have new namespaces so this should not be a surprise. In my MVVM framework it looks like this:

#if WINRT
    using Windows.UI.Xaml;
    using Windows.UI.Xaml.Controls;
    using Windows.UI.Xaml.Input;
    using Windows.UI.Xaml.Controls.Primitives;
    using Windows.UI.Core;
    using Windows.UI.Xaml.Data;
#else
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Input;
    using System.Windows.Controls.Primitives;
    using System.ComponentModel;
#endif

You should be able to spot almost a one to one mapping there, except for the last few, but we will get to those.

Duplication of INotifyPropertyChanged, ICommand & INotifyCollectionChanged

home-simpson-fire-cereal-epic-failThis issue will affect EVERY developer in WinRT and it is a MASSIVE fail on Microsoft’s part. The INotifyPropertyChanged, ICommand & INotifyCollectionChanged that are used in every XAML based system are not the ones used in WinRT XAML based systems. In fact the framework has TWO of each – one in the old namespace and one in the new namespace. So you will find your databinding just broken with no compiler errors! To solve this you have to switch the namespaces.

ObservableCollection<T> is broken

doublefacepalmHand in hand with the previous one is that the trusted ObservableCollection<T> no longer works either! It implements the old (wrong INotifyCollectionChanged) and thus all bindings to it are broken. You need to bind to a class that implements IVectorCollection<T>. One problem, the framework doesn’t ship with an implementation! So to bind to collections, you need to build your own collection class or grab a shim (as I chose to).

Proxies & WebRequest

Smile Smile I used WebRequest in the demo to pull images from Flickr and you know what just worked – proxy settings. The first time ever in .NET! I hope who ever decided that proxies should just work gets an award! Smile Smile

Reflection has added a whole new layer

In non-WinRT we can get all kinds of info on a type directly by working with that type (i.e. Type.GetType). However in WinRT that is not the case! Type.GetType is no longer enough, when you have gotten the type you need to call GetTypeInfo on that to get to all the information on the type. Why this extra layer is here is beyond me.

#if WINRT
                if (control != null && typeof(ButtonBase).GetTypeInfo().IsAssignableFrom(control.GetType().GetTypeInfo()))
#else
#if SILVERLIGHT
                if (control != null && typeof(ButtonBase).IsAssignableFrom(control.GetType()))
#else
                if (control != null && control is ICommandSource)
#endif
#endif

MIA Types & Methods

For a MVVM framework you will have a bit of reflection and so the first thing I noticed is the super handy Types.EmptyTypes is gone! So to have as close to a single code base I am doing this nonsense now Sad smile

#if (WINRT)
        private readonly Type[] EmptyTypes = new Type[] { };
#else
        private readonly Type[] EmptyTypes = Type.EmptyTypes;
#endif

There is a fair bit of these missing properties & methods like Type.GetType is missing some of the overloads I have come to love:

#if WINRT
            var viewType = Type.GetType(viewName);
#else
            var viewType = Type.GetType(viewName, true, true);
#endif

Lastly do not expect the trusted methods like GetConstructor, GetMethod or GetProperty to exist. Now we have collections we can iterate over. I admit this is a better option, but some helper methods here would've been useful.

public static MethodInfo GetMethod(this Type type, string methodName, Type[] parameters)
{
    var results = from m in type.GetTypeInfo().DeclaredMethods
                  where m.Name == methodName
                  let methodParameters = m.GetParameters().Select(_ => _.ParameterType).ToArray()
                  where methodParameters.Length == parameters.Length &&
                        !methodParameters.Except(parameters).Any() &&
                        !parameters.Except(methodParameters).Any()
                  select m;

    return results.FirstOrDefault();
}

So be aware when working in reflection be aware that it will work differently.

User Controls must be created on the main thread!

This I do not get at all, but in WPF & Silverlight a background thread can create a user control and pass the content to a Window on the main thread. This is SUPER useful for the creation of content and then when needing popping it into the foreground almost instantly! However WinRT has different ideas, all user controls MUST BE created on the main thread – YUCK!

#if (WINRT)
                Window.Current.Dispatcher.Invoke(CoreDispatcherPriority.High, (s, e) =>
                    {
#endif
                        shell = (IShell)typeof(TShell).GetConstructor(EmptyTypes).Invoke(null);
#if (WINRT)
                    }, this, null);
#endif

Simpson Fail Image from: http://www.thebuzzmedia.com/creator-of-wikipedia-fail-fast-fail-often/

Double face palm image from: http://tvtropes.org/pmwiki/pmwiki.php/Main/FacePalm

The MVP award

WP_000575Being a MVP gets you very little, some status boost in those who misunderstand it (MVPs are not awarded for technical skill & a lot of people think MVP = expert), a MSDN subscription, a lot of paperwork (including multiple NDA’s), some access to product teams (this varies from product team to product team – some have great interactions others are poor) and a trophy.

To the right is my MVP trophy (as well as ALM Rangers award and MVP of the year cube) and I think it looks pretty awesome but how does it get to me?

In this post I want to take a slightly tongue in cheek look at the box the MVP award comes in and what it is saying about MVP’s.

WP_000576WP_000577WP_000578

Above you can see the three years of the trophy box. So lets analyse those box covers. I am assuming that the person on the box is supposed to represent MVP’s.

  • MVP’s are dress smart casual always – chinos & a blue shirt are required. Hah, not likely.
  • MVP’s have neck problems causing them to tilt their heads. This is likely true from all the time people spend at their machines.
  • MVP’s always have their laptops with them. Also likely true. Next year he better have a Windows 8 tablet though.
  • Interesting that 2010 guy got one cover while 2011 guy got to come back in 2012. Guess 2010 guy wasn’t re-awarded Winking smile
  • 2011 guy has gotten smaller in 2012 – are we shrinking away or did Mr 2011 not do enough work?
  • In 2010 and 2011 the ghosts of MVP’s past are clearly standing in support for the MVP. In 2012 they aren’t concerned anymore and just chatting with each other.

What would I do differently? Easily, take a photo from MVP summit with real MVP’s engaging with each other and put that on the cover. What may be nice is to have new 2012 MVP’s (i.e. first timers) get together to pose for it and so there is extra incentive for 2013 – a box with real MVP’s that could include you.

You never debug standing up

humility_road_signBeing a professional developer means following standards, standards that are set by smart people (smarter than me at least) and when you start to break those standards will wrong. I know this! However this past Friday I broke many a rule and failed, because thought I knew better this one time. So this post is a retrospective of what went wrong, so that I never forget again.

The project is a fairly complex backend system for a special mobile device, and when I mean complex I mean in size and scope. We have VB.NET, C#, Java, JavaScript and a ton of inline SQL! The work itself is done by three different companies with three different agreements, policies and methodologies! That sounds like a recipe for disaster but it isn’t – we have exceeded every goal! That is until Friday.

On Friday we get told the customer is coming at 9am on Monday for a demo! We have 8 hours to get ready for it! The software is in a state between alpha and beta and we have known issues that need resolving by the demo. So we worked hard and make great headway until about 3pm. Then we hit an issue everyone in the room thought was on the mobile device. The first problem is the mobile dev company isn’t onsite today, so we are really guessing at the issue.

confidenceWe start experimenting at fixes, pushing 7 builds to QA in an hour (in reality we are lucky if get 5 build to QA in a day). At the same time we are adding bug fixes and tweaks for other items too! Then the answer comes in the mobile device developer – they breaking because their expectation of the spec is not the same as ours. More fixes and adjustments and then the server just stops.

At this point, I am looking at my watch, I have a two year old son sitting at school and it is almost time to pick him up. tick tock. Being a single parent means I MUST leave and soon. The mobile guys have gone offline completely. Another dev from the third company is needing to go and propose (she said yes Smile)! We are all rushing, skipping testing, skipping building locally before checkins… I even checked code in without comments! NOTHING, no matter what I try it keeps breaking, tick tock, same error every time, tick tock, I can’t find it, tick tock, the PM is looking worried and looking at me to solve it, tick tock. OUT OF TIME.

I apologise and leave, feeling crap. I failed. I let a client down.

Saturday, I sit down to dig into the code. Now without the time pressure, and I read the stack trace properly for the first time (stopped assuming what it was saying as I was when I was rushed) and quickly found the issue and resolved it. One code checkin (built first locally, with check in comment, and assigned to work items etc…) and it is working. The test client works too!

In retrospect what should I have done is simple: We knew there is a demo, it was late notice but we had chance to choose what to show to the customer. We should’ve set a cut off time after lunch for fixes and changes and then just not included broken things in the demo. Rather have taken that after lunch time and made sure the demo showed 80% and that 80% worked 100% than rush to get 100% to show and in the end break it all.

I should’ve also stepped back earlier and done something else for a second – get coffee or something. Just to clear my mind and calm myself. Stepping back always helps, just think of how many times you ask someone for help and in explaining it you solve it yourself.

Finally skipping the standards that make us professional leads to disaster and I should’ve made sure the following standards were kept!

  • make sure it builds locally before checkin
  • check in comments
  • assign each checkin to a work item
  • test locally before checkin
  • If we have a deadline, then we get everyone in the room to make it happen. We win and lose as a team.
  • The more detailed the spec is, the better for everyone.
  • Do one thing per checkin (keep those checkins small and focused)

Monday has come and gone, the customer loves it and the demo was great. We succeeded. It required sacrifice from the team of some of their weekend, a sacrifice that if we have acted more professionally and clear headed could’ve been avoided. This doesn’t happen often to me, as I am often surrounded by professionals and when one of us loses it the rest helps push that one back into place, so this post really is a reminder why we do that for each other and what others can learn.

Management is doing things right; leadership is doing the right things – Peter Drucker

Presentation Dump - End 2011: Azure, Windows 8, Lightswitch, Visual Studio Tools, TFS & Roslyn

With 2011 finally done and dusted it is time for the bi-annual presentation dump, where I upload most of the slides I have done in the last six months to share with you! I say most, as some presentations are NDA and those, unfortunately, I can’t share out – but where I can upload slides I do!

In this presentation dump we have:

  • Windows Azure Platform Overview: This is a talk I gave at the ImagineCup to faculty members about what Microsoft Azure can offer!
  • Windows 8: A brief introduction shortly after the //Build conference to help share what information we had on Windows 8
  • Lightswitch: The latest iteration of my Lightswitch talk contains a structure overview before the demo and then goes into detail on the themes and extension model in the product.
  • Developer Productivity Tools: A session that looks at FIVE FREE tools for Visual Studio that will assist in the productivity of any Microsoft .NET developer in Visual Studio. Tools covered are fxCop, StyleCop, Pro Power Tools, CodeRush Xpress & Nuget.
  • An Introduction to TFS: The target audience for this is someone or company who is using another source control (like VSS) and is thinking about moving to TFS but isn’t sure where to start. This BRIEF introduction tries to provide a high level view that TFS is not just source control it is a LOT of more and thus has a lot more power. It also mentions migration from VSS and provides guidance for success.
  • Roslyn: This is an early look at Roslyn

It is definitely a quieter period than most, in terms of number of unique slide shows and I think a lot of that comes out of the information black out from Microsoft prior to //Build, but it was still a very period with me presenting Lightswitch NUMEROUS times and also Tech·Ed Africa where I did four presentations!

You can get all the slides and details by clicking “read more” below!

Windows Azure Platform Overview

Windows 8

Lightswitch

Developer Productivity Tools

An Introduction To TFS

Roslyn

MVP for a third time :)

mvp

364 days ago & 829 days ago, I blogged about being awarded a MVP from Microsoft and I am proud to announce that I have been awarded a MVP for a THIRD time!

Thank you to all that were part of making this happen, I am very honoured by all of you.

What is an MVP? In short it is a thank you for helping Microsoft communities. The long version can be found here.

Portal 2: Lab Rat

If you do not know what Portal is, then you are dead to me! DEAD! But since I know everyone knows of Portal that won’t be an issue. What you may not have known is that Valve created a comic book that chronicles the gap between the end of Portal 1 and the beginning of Portal 2, and your character (Chell) ends up back inside the facility.

This comic is called Lab Rat and you can view it in super great details at http://www.thinkwithportals.com/comic/

But what about when you are travelling this festive season and want to read it quickly, or show your family so they can be caught up before you take them through Portal 2 on Christmas day? Well, for my seventh WP7 app (yes, I have build 7 Windows Phone apps this year!) let me introduce Lab Rat.

In addition to offering the comic in your pocket you can save any page, with or without text, to your phone for use as a login screen or any such thing! AWESOME!

In no way should you think this is an alternative to going online though, the detail of this comic should be seen at the BEST resolution possible – but this makes a good companion experience.

screenshot-v1.0_12-9-2011_14.18.5.10screenshot-v1.0_12-9-2011_14.18.8.170screenshot-v1.0_12-9-2011_14.18.27.813screenshot-v1.0_12-9-2011_14.18.29.695