Presentation is loading. Please wait.

Presentation is loading. Please wait.

.NET 4.5.1, what’s up Doc? Jose Luis Latorre Millás Software Engineer

Similar presentations


Presentation on theme: ".NET 4.5.1, what’s up Doc? Jose Luis Latorre Millás Software Engineer"— Presentation transcript:

1 .NET 4.5.1, what’s up Doc? Jose Luis Latorre Millás Software Engineer
Roche Diagnostics

2 .NET ’ Developer Productivity 20’ Application Performance 10’ Continuous Innovation 15’ Conclusion 5’

3 Chapter 1/5 .NET 4.5.1

4 Quick Reminder – What Is .NET
Entity Frame-work ASP. NET WCF WPF Win Forms Work Flow And more! Base Class Libraries The CLR JIT & NGEN Garbage Collector Security Model Exception Handling Loader & Binder Profiling& Debugging APIs

5 .NET (A *Very* Simplified View)
Runtime Libraries Languages Tools .NET

6 .NET Evolution .NET 4.5.1 C# + VB 4.5 Asynchronous Programming
Dynamic + Language Parity C# VB 9.0 Language Integrated Query C# VB 8.0 Generics C# VB 7.0 3.5 Managed Code 3.0 4.5 .NET 1.0 .NET 1.1 .NET 2.0 .NET 4.0 2002 2003 2010 - Win8

7 .NET 4.5 is installed on 100+ million machines!
Build 2013 12/5/2018 First, a look at .NET 4.5 Client & Device Async – for UI responsiveness Windows Store apps -- WinRT Windows Phone apps .NET CF 3.9 Web & Cloud Async – for server scaling ASP.NET MVC4 ASP.NET Web API ASP.NET Web Pages Entity Framework Code-First WebSockets SignalR Windows Azure Cloud Services 4.5 Support Windows Azure Web Sites Fundamentals .NET Async (async + await) Many new async APIs WinRT interop Multi-core JIT MPGO – NGEN hot/cold splitting Performance improvements Reboot and reliability improvements to setup Support Windows RT GC Background GC LOH heap balancing LOH fragmentation reduction GC low latency mode GC awareness of NUMA and >64 processors >2GB arrays (or objects) Libraries Portable libraries update .NET Core Profile (Windows 8) Extension methods for WinRT streams and async NuGet Immutable collections Async for .NET 4 HttpClient for Portable .NET 4.5 is installed on 100+ million machines! © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.

8 .NET in A Nutshell Developer Productivity Application Performance Continuous Innovation

9 Developer Productivity
Chapter 2/5 Developer Productivity

10 In 2005, a *little* feature called Edit & Continue was introduced, but there was something missing….

11

12 We have been waiting for 8 years…

13 64-bit Edit and Continue is finally here!
Build 2013 12/5/2018 64-bit Edit and Continue is finally here! Number 9 all time requested feature on UserVoice! Works exactly the same as for 32-bit applications Client (WPF, WinForms, etc.), Store and ASP.NET WAP projects are supported For WAP projects, need to enable Edit & Continue in Project Properties © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.

14 Wait, there is more…

15

16 Method Return Value Inspection
Build 2013 12/5/2018 Method Return Value Inspection Now available for .NET! Access via Autos window or in the Immediate window ($ReturnValue) Can expand return value in the debugger © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.

17 Async Debugging Improvements
Common question: How did I get here? Supported for Store Apps, Web apps, Desktop apps in W8.1 Enhancements to the Call Stack and Tasks window Visual Studio 2012

18 Windows Store Development Improvements
Build 2013 12/5/2018 Windows Store Development Improvements Convert System.IO.Stream to IRandomAccessStream Allows much easier interop with existing .NET code Better exception support for WinRT APIs System.Exception.Message System.Exception.StackTrace WinRT type system enhancements Nullable value types in WinRT structs 64-bit Edit and Continue support Managed Return Value Inspection support Async debugging enhancedments © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.

19 Convert Stream to IRandomAccessStream
Build 2013 12/5/2018 Convert Stream to IRandomAccessStream From MSDN Forums… // EXAMPLE: Get image from URL var client = new HttpClient(); var stream = await client.GetStreamAsync(imgUrl); var memoryStream = new MemoryStream(); await stream.CopyToAsync(memoryStream); var bitmap = new BitmapImage(); bitmap.SetSource(memoryStream); <-- error CS1503: Argument 1: cannot convert from 'System.IO.Stream' to 'Windows.Storage.Streams.IRandomAccessStream‘ bitmap.SetSource(memoryStream.AsRandomAccessStream()); <-- .NET 4.5.1 In .NET 4.5.1: System.IO.WindowsRuntimeStreamExtensions.AsRandomAccessStream(Stream stream) © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.

20 Rich exception interop support for WinRT APIs
In Windows 8, error propagation for WinRT APIs is through HRESULT Important Exception information is lost unless a debugger is attached In Windows 8.1, additional error information is available via System.Exception properties: Message StackTrace Additional exception details from a C++ WinRT Component

21 WinRT Type System Enhancements
Build 2013 12/5/2018 WinRT Type System Enhancements Support Nullable value types in WinRT structs // Define the "titleAuthor" table of the Microsoft "pubs" database. public struct titleAuthor { // Author ID; format ###-##-#### public string au_id; // Title ID; format AA#### public string title_id; // Author ORD is nullable. public short? au_ord; // Royalty Percent is nullable. public int? royaltyper; } <-- error WME1060: 'System.Nullable<System.Int16>' is not a valid Windows Runtime field type. <-- error WME1060: 'System.Nullable<System.Int32>' is not a valid Windows Runtime field type. © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.

22 EF/ADO.NET Connection Resiliency
Build 2013 12/5/2018 EF/ADO.NET Connection Resiliency Provide reliable connection to Azure DB Automatically retry/reconnect broken connection Provides great experience for connected devices It Just Works! No code or configuration changes other than installing .NET 4.5.1 © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.

23 Application Performance
Chapter 3/5 Application Performance

24 Build 2013 12/5/2018 ASP.NET App Suspension Enables low latency, high density web sites for on-prem/private cloud Shipping as part of IIS 8.5 in Windows Server 2012 R2 Preview Provisioned through the Idle Worker Process Page-out capability in IIS Early Results from our Performance Lab © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.

25 ASP.NET App Suspension In IIS Settings, set Idle Time-out Action to Suspended

26 ASP.NET App Suspension

27 On-demand Large Object Heap Compaction
.NET GC is quite well-tuned In general, we should never have to use GC.Collect() CAUTION: With great power comes great responsibility! "Out of CPU, memory and disk, memory is typically the most important for overall system performance."  Mark Russinovich

28 On-demand Large Object Heap Compaction
Refresher Large objects (>85000 bytes) treated specially Very expensive to compact Collected with Gen 2 In .NET 4.5.1, you can now compact the Large Object Heap (LOH) to address heap fragmentation The LOH mode is part of GCSettings: public static class GCSettings { public static GCLOHCompactionMode LOHCompactionMode { get; set; } }

29 On-demand Large Object Heap Compaction
Two ways to use GC LOH API: Compact LOH right away Compact LOH with the next full blocking GC GCSettings.LOHCompactionMode = GCLOHCompationMode.CompactOnce; GC.Collect(); // Next full blocking GC happens at some point, it will be a compacting GC that compacts the whole heap including LOH. GCSettings.LOHCompactionMode = GCLOHCompationMode.CompactOnce;

30 Multi-Core JIT Improvements
15% improvement for cold startup Minimize application startup time on multi-core CPUs Now supported for ASP.NET web sites Enabled automatically for ASP.NET apps Performance data from our test labs

31 Consistent Performance Before & After Servicing .NET
Build 2013 12/5/2018 Consistent Performance Before & After Servicing .NET Servicing .NET Framework for 1B+ PCs is a very BIG deal! Today, servicing the .NET Framework can lead to degradation in app performance directly afterwards This is due to core .NET assemblies being JIT-compiled for a period of time after servicing In Windows 8.1, app performance remains consistent even after servicing the .NET Framework Results in much better user experience and better battery life on tablets © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.

32 Windows 8.1 Performance improvements
Build 2013 12/5/2018 Windows 8.1 Performance improvements Defer loading of resources Optimized XAML paths Precompiled XAML in XBF (XAML Binary Format) ListView & GridView Startup © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.

33 Continuous Innovation
Chapter 4/5 Continuous Innovation

34 Build 2013 12/5/2018 .NET Framework Updates Our goal is to keep the existing values of the .NET Framework while allowing for more agility and innovation Existing Values Great discoverability (all in in place) Known quality, maturity and compatibility level A single license and support policy Centralized patching for security issues *PLUS* New Values Faster release cadence with a tighter customer feedback loop Less friction with using features across .NET platforms © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.

35 Immutable Collections
NuGet Releases During .NET 4.5 two components were released via NuGet: MEF (Microsoft.Composition) for web and Windows Store apps TPL Dataflow (Microsoft.Tpl.Dataflow) These (and new packages) are treated as any other .NET 4.5 component, i.e. are fully supported System Composition TPL Dataflow Http Client Async Immutable Collections .NET (“in box”)

36 Announcing: .NET Framework NuGet Feed
Build 2013 12/5/2018 Announcing: .NET Framework NuGet Feed One-stop shopping for all of your .NET Framework NuGet packages released by Microsoft In Visual Studio 20[10,12,13] On the Web © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.

37 .NET Framework NuGet Feed
Already enabled in VS 2013 Preview In VS 20[10,12]: Tools.Options.Package Manager Name: .NET Framework Packages Source: Visual Studio 20[10,12]

38 PCL (Portable Class Library) on all platforms
Not only windows.. Opens path to third parties like Mono/Xamarin to produce portable libraries that can be used anywhere .NET or Mono is supported (Mac, Linux..)

39 Chapter 5/5 Conclusion

40 What’s New in .NET Development
Windows Server Management Marketing 12/5/2018 What’s New in .NET Development Developer Productivity Application Performance Continuous Innovation 64-bit Edit and Continue Method Return Value Inspection Async Debugging Enhancements Windows Store development improvements EF/ADO.NET Connection Resiliency ASP.NET application suspension Multi-core JIT improvements On-demand large- object heap compaction Consistent performance before and after servicing the .NET Framework .NET Framework updates NuGet releases Curated .NET Framework NuGet packages .NET delivers many new innovations while maintaining a high compatibility bar © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.

41 Jose Luis Latorre Blog:

42 12/5/2018 1:55 PM © 2013 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. © 2010 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.


Download ppt ".NET 4.5.1, what’s up Doc? Jose Luis Latorre Millás Software Engineer"

Similar presentations


Ads by Google