visualstudio2012-whatsnew-teched_v3-9

68
What’s new in Visual Studio 2012 Adam Cogan Chief Architect @ SSW and Microsoft Regional Director #DEV211 V3.9

Upload: ssw

Post on 13-Dec-2014

698 views

Category:

Business


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: VisualStudio2012-WhatsNew-TechEd_v3-9

What’s new in Visual Studio 2012

Adam CoganChief Architect @ SSW and Microsoft Regional Director

#DEV211

V3.9

Page 2: VisualStudio2012-WhatsNew-TechEd_v3-9

AgendaHistoryIDE Improvements

UISearch EverywherePerformance Tweaks

Developer GoodiesWeb developer friendlinessUnit TestingIntelliTraceMTM - Exploratory TestingFeedback ToolsStoryboarding

Page 3: VisualStudio2012-WhatsNew-TechEd_v3-9

About Adam

Chief Architect at SSWDeveloping custom solutionsPerform Software Audits

Microsoft Gold PartnerMicrosoft Regional DirectorASP InsiderALM MVP

MVP of the year

@AdamCogan

Page 4: VisualStudio2012-WhatsNew-TechEd_v3-9

VS 2002

Web FormsXML Web ServicesWindows Forms

Page 5: VisualStudio2012-WhatsNew-TechEd_v3-9

VS 2003

.NET 1.1Mobile Devices(ASP.NET)Compact FrameworkEnterprise Templates

Page 6: VisualStudio2012-WhatsNew-TechEd_v3-9

VS 2005

.NET 2.0ASP.NET 2.0GenericsLocal web serverClick once

Page 7: VisualStudio2012-WhatsNew-TechEd_v3-9

VS 2008

.NET 3.5LINQ, LINQ to SQLWPF/HTML DesignersJavaScript IntelliSense

Page 8: VisualStudio2012-WhatsNew-TechEd_v3-9

VS 2010

.NET 4.0F#Parallel ExtensionsQuick Search (Navigate to)IntelliTrace

* Resharper: Control+t

Page 9: VisualStudio2012-WhatsNew-TechEd_v3-9

VS 2012

.NET 4.5ASP.NET MVC 4HTML5Parallel Computing“Metro” AppsNew Solution ExplorerWeb SocketsPortable Class LibrariesUPPERCASE and more Grey

Page 10: VisualStudio2012-WhatsNew-TechEd_v3-9

VS 2012

Page 11: VisualStudio2012-WhatsNew-TechEd_v3-9

Metro

? The Metro lookThe Metro look“Modern UI Style” look

CTRL + SHIFT + H (Find and Replace All)e.g. http://www.theverge.com/2012/8/10/3232921/microsoft-modern-ui-style-metro-style-replacement

Page 12: VisualStudio2012-WhatsNew-TechEd_v3-9

VS 2012

Colour!

Page 13: VisualStudio2012-WhatsNew-TechEd_v3-9

VS 2012

Colour!

Page 14: VisualStudio2012-WhatsNew-TechEd_v3-9

In .NET 1.0 + 1.1 - ArrayLists(System.Collections) ArrayList greeks = new ArrayList();greeks.Add("Alexopoulos");greeks.Add("Gianopoulos");greeks.Add("Michaelides"); //andArrayList names = new ArrayList();foreach(string g in greeks){    if(g.IndexOf(“opoulos”) > -1)    {        

names.Add(g);    } }

Page 15: VisualStudio2012-WhatsNew-TechEd_v3-9

In .NET 2.0 - Generic Lists - enforces type, more OO, reduce code if different types(System.Collections.Generic) List<string> greeks = new List<string>();greeks.Add("Alexopoulos");greeks.Add("Gianopoulos");greeks.Add("Michaelides"); 

//andList<string> names = new List<string>();foreach(string g in greeks){    if(g.Contains(“opoulos”))    {        

names.Add(g);    }}

Page 16: VisualStudio2012-WhatsNew-TechEd_v3-9

In .NET 3.5 - Iqueryables - nicer to query(System.Linq) List<string> greeks = new List<string>();greeks.Add("Alexopoulos");greeks.Add("Gianopoulos");greeks.Add("Michaelides");  //andIEnumerable<string> opoulos = greeks.Where(x => x.Contains(“opoulos”));

Page 17: VisualStudio2012-WhatsNew-TechEd_v3-9

In .NET 4.0  (thread safe)(System.Collections.Concurrent) public class ConcurrentBag<T> : IProducerConsumerCollection<T>,         

IEnumerable<T>, ICollection, IEnumerable  // Represents a thread-safe, unordered collection of objects.   static void Main()    {        // Construct and populate the ConcurrentBag        ConcurrentBag<string> cb = new ConcurrentBag<string>();        cb.Add("Alexopoulos");        cb.Add("Gianopoulos");        cb.Add("Michaelides");         // Consume the items in the bag         int item;        while (!cb.IsEmpty)        {            if (cb.TryTake(out item))               

Console.WriteLine(item);            else               

Console.WriteLine("TryTake failed for non-empty bag");        }         // Bag should be empty at this point         if (cb.TryPeek(out item))           

Console.WriteLine("TryPeek succeeded for empty bag!");    }

Page 18: VisualStudio2012-WhatsNew-TechEd_v3-9

In .NET 4.5   (casting backwards - read only)(System.Collections.Generic)

public class Greek : Person{..} List<Greek> greeks = new List<Greek>(){    new Greek() { LastName  = "Alexopoulos" },   

new Greek () { LastName = "Gianopoulos" },    new Greek () { LastName  = "Michaelides" },};

// IReadOnly

//List supports covarianceIReadOnlyList<Person> people = greeks;Person first = people[0];

Page 19: VisualStudio2012-WhatsNew-TechEd_v3-9

Search is Everywhere!

You can search for items in most windowsSolution ExplorerTeam ExplorerAdd New ItemsAdd References…

Page 20: VisualStudio2012-WhatsNew-TechEd_v3-9

Solution Explorer

Page 21: VisualStudio2012-WhatsNew-TechEd_v3-9

Team Explorer

Page 22: VisualStudio2012-WhatsNew-TechEd_v3-9

Add New ItemsCtrl+E (grr)

Page 23: VisualStudio2012-WhatsNew-TechEd_v3-9

Add References

Page 24: VisualStudio2012-WhatsNew-TechEd_v3-9

Example notation: Go to “Team Explorer” and then click the “Work Items” hub, this will open the “Work Items” page. Then in the Queries section, expand “Current Sprint” and open the Test Cases Query

Hubs, Pages, Sections, and Actions

Page 25: VisualStudio2012-WhatsNew-TechEd_v3-9

ITeamExplorerPage Page – Plugin that provides a TE page. ITeamExplorerSectionSection – Plugin that provides a section that extends a TE page. ITeamExplorerNavigationItem Navigation items are plugins that take you to a primary feature area page like My Work, Pending Changes, Work Items, etc.  ITeamExplorerNavigationLink Child links underneath an ITENavigationItem on the Home page (ex:  Request Code Review, SCE, New Query).

Building Team Explorer plugins?Hubs, Pages, Sections, and Actions

Page 26: VisualStudio2012-WhatsNew-TechEd_v3-9

The things you never want to do (as a developer)…

Hit F1Click on the COM tab in Add ReferencesClose a solution…

Remember the ~30 seconds of unresponsiveness when closing a large solution in Visual Studio 2010 SP1

Page 27: VisualStudio2012-WhatsNew-TechEd_v3-9

Alt-F12object viewer

F1help

Page 29: VisualStudio2012-WhatsNew-TechEd_v3-9

Add References

Superfast

Page 30: VisualStudio2012-WhatsNew-TechEd_v3-9

Developer Goodies

Web Developer friendlyCSS & HTML5…Debug in any other browser other than IE…Page Inspector…

Page 31: VisualStudio2012-WhatsNew-TechEd_v3-9

HTML & CSS

HTML5 validation Better IntelliSenseColor picker...

Page 32: VisualStudio2012-WhatsNew-TechEd_v3-9

HTML & CSS

HTML5 validation Better IntelliSenseColor picker

Images taken from http://www.hanselman.com/blog/VisualStudio2012RCIsReleasedTheBigWebRollup.aspx

When coding HTML5, CSS styles show in IntelliSense

Page 33: VisualStudio2012-WhatsNew-TechEd_v3-9

Better Debugging tools

Launch in IE, Chrome, Firefox, Safari and others?Page Inspector…

Page 34: VisualStudio2012-WhatsNew-TechEd_v3-9
Page 35: VisualStudio2012-WhatsNew-TechEd_v3-9

Shows you the razor source

Select DOM elements like Firebug

Shows you the HTML output

Page 36: VisualStudio2012-WhatsNew-TechEd_v3-9

Suggestion

Page Inspector should put the more specific CSS styles up the top instead of the most general onesThe general styles at the top doesn’t help me solve any issues

Page 37: VisualStudio2012-WhatsNew-TechEd_v3-9

Suggestion

Chrome and Firefox both show the more specific style first.

Page 38: VisualStudio2012-WhatsNew-TechEd_v3-9
Page 39: VisualStudio2012-WhatsNew-TechEd_v3-9

Page Inspector <> GlimpseClient side <> Server side

Glimpse <> FiddlerServer side <> Listener

Page 40: VisualStudio2012-WhatsNew-TechEd_v3-9

Suggestion: Dim the built in Microsoft records

Page 41: VisualStudio2012-WhatsNew-TechEd_v3-9

Better Debugging tools

Scenario #1: The DatePicker is not showing on my MVC page for a date field

1st – Page Inspector to see which view is rendering the field2nd – Use Glimpse to see which controllers are being hithttp://rules.ssw.com.au/SoftwareDevelopment/RulesToBetterMVC/Pages/Do-you-use-Glimpse.aspx

3rd – Set a good old Breakpoint to step through the C# code

Scenario #2: The page is showing a photo for a person when you have not logged in

Page Inspector (N/A) because the wrong data has already been returned1st – Use Glimpse to see which controllers are being hit2nd – Set a good old Breakpoint to step through the C# code

Page 42: VisualStudio2012-WhatsNew-TechEd_v3-9

The Visual Studio 2012 Unit Testing experience is focused

on developers writing and running unit tests while they

write their code.

Page 43: VisualStudio2012-WhatsNew-TechEd_v3-9

Developer Focused Unit Test Experience

Red-Green Bar

Most important

tests shown first

Timings

Shows tests from any

framework

Search

Run Details

Page 44: VisualStudio2012-WhatsNew-TechEd_v3-9

IntelliTrace in Production

No more unreproduceable bugs!!!!!!Run IntelliTrace collector on production machine Load the .iTrace file onto a dev machine:

Locate the source of the errorInspect variables at the time of the errorCheck SQL queries

http://msdn.microsoft.com/en-us/library/hh398365(v=vs.110).aspx

Page 45: VisualStudio2012-WhatsNew-TechEd_v3-9
Page 46: VisualStudio2012-WhatsNew-TechEd_v3-9

Expand the IntelliTraceCollection.cab

Page 47: VisualStudio2012-WhatsNew-TechEd_v3-9

Import IntelliTrace PowerShell module and start collecting

Page 48: VisualStudio2012-WhatsNew-TechEd_v3-9

Browse the website

Page 49: VisualStudio2012-WhatsNew-TechEd_v3-9

Stop IntelliTrace Collection

Page 50: VisualStudio2012-WhatsNew-TechEd_v3-9

View the iTrace file

Page 51: VisualStudio2012-WhatsNew-TechEd_v3-9

The error we saw

The callstack

Page 52: VisualStudio2012-WhatsNew-TechEd_v3-9
Page 53: VisualStudio2012-WhatsNew-TechEd_v3-9

The customer or address is probably null

Page 54: VisualStudio2012-WhatsNew-TechEd_v3-9

IntelliTraceBug or Task? ArbitraryRocks?

Page 55: VisualStudio2012-WhatsNew-TechEd_v3-9

IntelliTrace (daily workflow in context)

(What we’ve had for years)VS 2010 + Test Manager 2010 (IntelliTrace for testers)

Testers would report bugs with an .iTrace fileWork Item createdDevelopers then open and double click .iTrace file

Page 56: VisualStudio2012-WhatsNew-TechEd_v3-9

IntelliTrace (serious problem in context)

VS 2010 + Test Manager 2010 (IntelliTrace for testers)But what happens in rare cases that Testers cannot repro…Check the logs eg. EventLogAsk developers why they are not using ELMAHe.g. http://www.ssw.com.au/ssw/standards/rules/rulestobettererrorhandling.aspx#EMAB

Turn off Custom ErrorsAsk for Remote Debugging

VS 2012 gives us the final solution

(if they say ‘yes’ then report them to be sacked)

Page 57: VisualStudio2012-WhatsNew-TechEd_v3-9

Exploratory Testing

Page 58: VisualStudio2012-WhatsNew-TechEd_v3-9

Feedback Tools

Request feedback

Page 59: VisualStudio2012-WhatsNew-TechEd_v3-9

Feedback Tools

Request feedback

Page 60: VisualStudio2012-WhatsNew-TechEd_v3-9

PowerPoint Storyboarding

Page 61: VisualStudio2012-WhatsNew-TechEd_v3-9

Lots more…VS 2012 + TFS 2012 + .NET Framework 4.5 are now in RTM and available to download! (or TFSPreview)Windows 8 and Windows Phone 8 project templates now come out of the boxVS comes with tools to help you deploy to AzureTFS 2012 is much better with offline workspaces and useful web access for managing your projectsLightSwitch Better SharePoint development tools Backlog tools (web UI / TFSPreview)My WorkSuspend / ResumeJavascript debugging improvements (http://blogs.msdn.com/b/visualstudio/archive/2012/04/10/javascript-debugging-enhancements.aspx)Extensions for PowerShell development (http://powerguivsx.codeplex.com/)Tools for Code and Architecture Reviews*

Page 62: VisualStudio2012-WhatsNew-TechEd_v3-9

Track Resources

http://rules.ssw.com.au/

Report a bug – VS Feedback Tool

Suggestions – User Voice

http://tv.ssw.com

Page 63: VisualStudio2012-WhatsNew-TechEd_v3-9

SummaryHistoryIDE Improvements

UISearch EverywherePerformance Tweaks

Developer GoodiesWeb developer friendlinessUnit TestingIntelliTraceMTM - Exploratory TestingFeedback ToolsStoryboarding

Cheers Slideshare: http://www.slideshare.net/SSWconsulting/visual-studio2012-whatsnewteched

Page 64: VisualStudio2012-WhatsNew-TechEd_v3-9

Thank You

Sydney | Melbourne | Brisbane | Adelaide

[email protected]

Adam Cogan

Page 65: VisualStudio2012-WhatsNew-TechEd_v3-9

Win a Sculpt Touch Mouse!Complete your session evaluation on Schedule Builder for your chance to win a Sculpt Touch Mouse.

Windows 8, Windows RT & Windows 7

BlueTrack Technology

4-way touch scrolling for navigation

Designed for comfort and portability

Page 66: VisualStudio2012-WhatsNew-TechEd_v3-9

Keep learning and connecting. Download the TechEd resources:australia.msteched.com/techedresources/

Channel 9

Page 67: VisualStudio2012-WhatsNew-TechEd_v3-9

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the

part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Page 68: VisualStudio2012-WhatsNew-TechEd_v3-9

Take to the cloud…with the Windows Server 2012

Tweet I want a ride in the #WinServ Heli at #auteched coz…..

Terms and Conditions available at all Information Desks