Successfully reported this slideshow.
Your SlideShare is downloading. ×
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Upcoming SlideShare
Node and Azure
Node and Azure
Loading in …3
×

Check these out next

1 of 17 Ad

.NET6.pptx

Download to read offline

.NET 6 is the latest version of .NET that was released in Nov 2021. .NET 6 ecosystem offers simplifications on development, high performance, and ultimate productivity.

.NET 6 is the latest version of .NET that was released in Nov 2021. .NET 6 ecosystem offers simplifications on development, high performance, and ultimate productivity.

Advertisement
Advertisement

More Related Content

Similar to .NET6.pptx (20)

More from Udaiappa Ramachandran (20)

Advertisement

Recently uploaded (20)

.NET6.pptx

  1. 1. .NET 6 Deep Dive Udaiappa Ramachandran ( Udai ) https://udai.io
  2. 2. About me • Udaiappa Ramachandran ( Udai ) • CTO-Akumina, Inc. • Microsoft Azure MVP • Cloud Expert • Microsoft Azure, Amazon Web Services, and Google • New Hampshire Cloud User Group (http://www.meetup.com/nashuaug ) • https://udai.io
  3. 3. Agenda • .NET 6 • MAUI • Packages and Downloads • CLI Commands • IDEs • Language Features • .NET 6 ASP.NET Core • Blazor Web Assemblies • Distribution • Demo…Demo…Demo…
  4. 4. .NET 6 • .NET Framework(4.8), .NET Standard, .NET Core, .NET 5, .NET 6, … • Simplicity • Open Source • Easy to get started • Developer productivity • Modern and Code to Cloud concepts • Application runs on multiple OS and Architectures • Operating Systems • Windows, MacOS, Linux • Android, iOS, tvOS, watchOS • Everywhere • Web, Mobile, Desktop, AI/ML, Data, Gaming, IoT • ARM, Intel, AMD
  5. 5. .NET 6 … • .NET SDK / Runtime • Package runtime or user installed runtime • .NET SDK • The .NET CLI • The dotnet driver • .NET libraries • Runtimes • Long-Term Support Release • Languages • C#10, F#6 (released with .NET 6) • .NET Upgrade Assistant
  6. 6. .NET 6 Azure Supports • App Service • All regions • Windows and Linux • Static Web Apps • Blazor WebAssembly with AOT • .NET 6 Functions API • Functions • Functions runtime 4.0 • In-process and isolated models • Azure Container Apps - Preview
  7. 7. .NET MAUI (Multi-platform App UI) • Cross Platform (Android, iOS), native UI • Single Project Structure and codebase • Deploy to multiple devices, mobile and desktop • Desktop App: Android, iOS, macOS, Windows Native, Windows UWP • .NET for iOS does full Ahead of Time AOT) compilation • .NET for Android takes advantage of JIT & optimizes with full or partial AOT compilation
  8. 8. .NET 6 Downloads https://dotnet.microsoft.com/en-us/download/dotnet/6.0
  9. 9. CLI Commands • help • new • retore • build • run • publish • test • vtest • pack • clean • sln • Store • watch • workload
  10. 10. IDEs • Visual Studio • Visual Studio Code • Visual Studio for Mac • GitHub Codespaces • OmniSharp • JetBrains Rider • .NET CLI • Ionide https://dotnet.microsoft.com/en-us/platform/tools
  11. 11. Language Feature(s) • C#10 • F#6 • C++ • VB
  12. 12. .NET 6 ASP.NET Core • Reduced memory for idle TLS connections • Reduced memory allocations on HttpRequest.Cookies • SocketConnection overhead reduced 30% • 50% faster Get access (HttpRequestFeature, IHttpResponseFeature, etc.)
  13. 13. Blazor • Blazor WebAssembly released part of 3.1 core • WebAssembly JIT Compilation by default and .NET 6 adds Ahead-Of-Time (AOT) compilation using <RunAOTCompilation>true</RunAOTCompilation> • Query string enhancements • SVG support • Binding: option selection in <input> elemenets • Generate framework specific js components from Angular and React components
  14. 14. Demo • Colorize the Tab • .NET 6 Project file Change • Minimalized code • Program Vs Startup • File Scope namespace • Global using directives • String interpolation • Lambda Expressions • Distribution • RunToCursor/ForceToCursor
  15. 15. Demo • Temporary Breakpoint • FirstOrDefault, SingleOrDefault, LastOrDefault with defaultValue • DateOnly • TimeOnly • ArgumentNullException • HotReload – cs, cshtml, css • Dependency Injection- Constructor or Method • HttpLogging • IAsyncEnumerable • ParallelAsync • FileStream • PreviewFeatures • Package Validations
  16. 16. Distribution • True Single EXE • Everything loaded in Memory • IL Trimming • Compression (Startup time of application may be increased) • Publish with .NET Core runtime • dotnet publish -p:PublishSingleFile=true -r win-x64 -c Release --self-contained true -p:IncludeNativeLibrariesForSelfExtract=true - p:EnableCompressionInSingleFile=true -p:PublishTrimmed=true dotnet publish -p:PublishSingleFile=true -r win-x64 -c Release --self-contained false
  17. 17. Reference • What’s new in .NET6: https://docs.microsoft.com/en-us/dotnet/core/whats- new/dotnet-6 • https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-10 • https://devblogs.microsoft.com/dotnet/welcome-to-csharp-10/ • https://docs.microsoft.com/en-us/events/dotnetconf-2021/whats-new-in-c-10 • https://devblogs.microsoft.com/dotnet/whats-new-in-fsharp-6/ • Demo Samples: https://github.com/nhcloud/techtalk

Editor's Notes

  • Multi-Platform App UI (.NET MAUI)
  • comprehensive development platform
    25 Years of progress, .NET 6 (11/21),LTS(3 years)

    Dotnet –info

    ASP.NET Core 6, Entity Framework Core 6
    Other tools –VS2022

    app types=web apps, web apis microservices, serverless, cloud native apps

    uwp,wpf,windows forms,console app,windows services
  • Common base libraries
    CLI (commonad line interfaces) -developing, building,running and publishing application
    All CLI involves invoking .net driver to running fx dependent path or executing a command
    Within SDK .net libraries contains the essential for every .net application
  • https://docs.microsoft.com/en-us/azure/container-apps/overview
    JIT downloads the compiler and compiles code exactly before Displaying in the browser. AOT has already complied with the code while building your application, so it doesn't have to compile at runtime. Loading in JIT is slower than the AOT because it needs to compile your application at runtime

    Tighter integration with .net libraries and host process

    Benefits of running out-of-process
    When your .NET functions run out-of-process, you can take advantage of the following benefits:
    Fewer conflicts: because the functions run in a separate process, assemblies used in your app won't conflict with different version of the same assemblies used by the host process.
    Full control of the process: you control the start-up of the app and can control the configurations used and the middleware started.
    Dependency injection: because you have full control of the process, you can use current .NET behaviors for dependency injection and incorporating middleware into your function app.
  • Successor of Xamarin Forms
    .NET for iOS: does full Ahead of Time AOT) compilation to produce an ARM binary for Apple’s App Store
    .NET for Android takes advantage of JIT & optimizes with full or partial AOT compilation on the Android device
  • Dotnet workload install maui
    SDK – monolithick, workload adds based on the project needs
    Dotnet new –h
    Dotnet new console -0 ./console1 –lang f#
    Dotnet build
    Dotnet run
    Dotnet workload
    Dotnet workload list
    Dotnet workload search
    Dotnet workload install android
  • IDEs will also work with C++, TypeScript, JavaScript and Python
  • https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-10
    https://devblogs.microsoft.com/dotnet/welcome-to-csharp-10/
    https://docs.microsoft.com/en-us/events/dotnetconf-2021/whats-new-in-c-10
    https://devblogs.microsoft.com/dotnet/whats-new-in-fsharp-6/

    C++
    Debug on WSL2 withtou SSH connection
    Improved CMAKE support
    STL library improvements
    IntelliSense improvements
    Code linter (by default)
    Code analysis (return value function)

    VB
    IDE improvements
    Temporary breakpoint
    WinForms startup

  • .NET 6 ASP.NET CORE 6/EF CORE 6 continue to use Core
    App.UseHttpLogging

    Socket connections are web sockets over a protocol like http that runs over tcp/ip or plain socket that can be used for any kind of communication

  • JIT downloads the compiler and compiles code exactly before Displaying in the browser. AOT has already complied with the code while building your application, so it doesn't have to compile at runtime. Loading in JIT is slower than the AOT because it needs to compile your application at runtime
  • Explain the Proj file format
    ImplicitUsing: C:\Users\udaia\source\repos\NET6DeepDive\Net6WebApi\obj\Debug\net6.0\ProjectName.GlobalUsings.g.cs
    Nullable: reference type nullable disabled by default, all reference type continue to be nullable. .net 6 enabled by default it forces nullable annotation context

    Colorize the templates
    Walk through the minimalized
    Walk through the program vs startup module
    File Scope namespace, 1file scoped per file
    Global using directives -- imports in VB (references link), c# global using global using, global should be first
    String interpolation -https://devblogs.microsoft.com/dotnet/string-interpolation-in-c-10-and-net-6/
    Lambda expressions
  • DI:
    Transient objects are always different; a new instance is provided to every controller and every service.
    Scoped objects are the same within a request, but different across different requests.
    Singleton objects are the same for every object and every request.


    https://devblogs.microsoft.com/dotnet/date-time-and-time-zone-enhancements-in-net-6/
    https://devblogs.microsoft.com/dotnet/file-io-improvements-in-dotnet-6/#summary
    https://devblogs.microsoft.com/dotnet/preview-features-in-net-6-generic-math/
    https://devblogs.microsoft.com/dotnet/package-validation/

    Hot reload will not work when used isolated css

    LINQ Chunk
    LINQ Zip for tuples
    PriorityQueue
    Threading.periodictimer
    PeriodicTimer

    JSON Serializercontext
    Create a partial class (derived from JsonSerializercontext), Indiacte thetype to serialize/deserialize, Build project(which generates some partial classes), call JsonSerializer.Serialize(data,context), call JsonSerializer.Deserialize(data,context)

    Nonblocking filestream
    Updated nuget packages
    Random.shared (thread safe)
    Dropping support for old libraries .NET Fx 4.6.1, .NET Core 3.1, .NET Standard 2.0, Review the documentation
    Preview Feature(s)->.NET releases everywhere RequiresPreviewFeatures, by pass this as a <EnablePreviewFeatures>True<…>
    Git:Multiple Projects
    Nuget Package validator
    .net compliler platform (Roslyn), analysers
    EF Core 6
    Win Forms –accebile for everyone, assistive technology, color contrast,keyboard tooltipls, segoe UI is the deafault font

  • Previous Version: Single file application includes all .net runtime, is a self extracting .zip, issues on lockdown machine and security trimmed machine to extract the files
    Trimming is fully supported in .NET 6 and later versions. In .NET Core 3.1 and .NET 5, trimming was an experimental feature.
    Trimming is only available to applications that are published self-contained
    https://docs.microsoft.com/en-us/dotnet/core/deploying/trimming/trim-self-contained
  • https://devblogs.microsoft.com/dotnet/date-time-and-time-zone-enhancements-in-net-6/
    https://devblogs.microsoft.com/dotnet/file-io-improvements-in-dotnet-6/#summary
    https://devblogs.microsoft.com/dotnet/preview-features-in-net-6-generic-math/
    https://devblogs.microsoft.com/dotnet/package-validation/

×