Saturday, March 28, 2020

Visual Studio code debugging guide

Visual Studio code debugging guide

Below are the some useful tricks that's change developer life while debugging code.

1. Fast forwarding code in debug mode.   

This is mainly used to execute code till particular line without set any breakpoints. It will execute all the code till selected line.

Below example demonstrate how we can use this in our regular life cycle.


2. Back-warding code in debug mode or Set Next Statement.

This is mainly used to back-ward code to particular line to recheck statement execution flow.

Below example demonstrate how we can use this in our regular life cycle.



Back-warding code execution is possible in another way as well to using Set Next Statement functionality of Visual Studio.
For this user need to right click on selected line and select Set Next Statement. Shortcut key is Ctrl+Shift+F10.

Below example demonstrate how we can use this in our regular life cycle.




3. Visual Studio BreakPoints.

  • How to add New Breakpoint in Visual Studio?
Using F9 shortcut key visual studio allow user to add breakpoint.
  • How to Delete Breakpoint in Visual Studio?
Debug tab -> Delete All Breakpoints option is using for delete all breakpoints in project. Ctrl+Shift+F9 shortcut key also doing same.

Below example demonstrate how we can use this in our regular life cycle.


  • How to disable Breakpoint in Visual Studio?
        1. Disable Single Breakpoint in Project.
            Shift+Mouse left key is using for disabling single breakpoint.

Below example demonstrate how we can use this in our regular life cycle.



        2. Disable All Breakpoints in Project.
            Debug tab -> Disable All Breakpoints option is using for disabling all breakpoints in project temporary without removing breakpoints in code.

Below example demonstrate how we can use this in our regular life cycle.


Friday, March 6, 2020

ASP .NET Core


ASP.NET Core Introduction


ASP .NET Core is an open-source, free, general-purpose development platform that maintained by Microsoft and also the GitHub .NET community. ASP .NET code framework is rewrite from scratch in sequence to build cross-platform, open source and modular programming.
It’s initially launched with the name of ASP .NET 5 but after its changed with ASP .NET Core.
ASP .NET core basically supporting Windows OS, Mac OS, and Linux OS and will be generally accustomed build device, cloud and IoT applications.
It’s an open source framework that supported by Microsoft and the GitHub community, so you will also download/contribute the application source code from the specific repositories on Github community.

ASP.NET Core Versions History



Characteristics of .NET Core



1. Open source

  • .NET Core allows open source implementation, using Apache 2 and MIT licenses.
  • .NET Core is a .NET Foundation project and it is available on GitHub community.
  • As .NET Core is an open source project, it allows and promoting transparent development processing, active and engaged community.

2. Cross-platform

ASP.NET Core applications can run on Windows OS, Linux OS, and Mac OS. So you do not required to build individual applications for various type of platforms using different kind of frameworks.

3. Flexible deployment

There are two styles of deployments that .NET Core applications allows:
  • Framework-dependent deployment
  • Self-contained deployment

With use of framework-dependent deployment, your applications depend upon a system-wide version of .NET Core on which your application and third-party dependencies are installed.


With use of self-contained deployment, the .NET Core version helping to build your application is it additionally deployed together with your application and third-party dependencies and many more to run side-by-side with other versions.

4. Command-line tools

All product scenarios is exercised at the command-line.

5. Compatible

.NET Core compatible with Microsoft .NET Framework, Mono and Xamarin, via the .NET Standard Library.

6. Modular

  • .NET Core technology is released through NuGet in small-scale assembly packages.
  • .NET Framework is one large assembly which contains most of the all core functionalities.
  • .NET Core is created available as smaller feature-centric packages.
  • This modular approach enables the developers to optimize their application by including just those NuGet packages which they have in their applications.
  • The smaller application benefits is extent include tighter security, improved performance, reduced servicing, and also decreased costs during a paying for your using model.

Components of .NET Core


The below figure demonstrate the .NET Core components.




As demonstrate in above figure, .NET Core technology involve .NET Compiler platform Roslyn, .NET Core framework CoreFX, .NET Core runtime CoreCLR and ASP.NET Core. ASP.NET Core is fragment of .NET Core SDK, so you don't required to install ASP.NET Core separately. ASP.NET Core and .NET Core is a fragment of .NET Foundation.

.NET Core technology comes under MIT or Apache 2 licenses. Visit .NET Core repository on Github to contribute or download the application source code.

Why ASP.NET Core?

1. Supports Multiple Platforms

ASP.NET Core applications can run on Windows OS, Linux OS, and Mac OS. So you do not required to build various applications for various platforms using wide range of frameworks.

2. Fast

ASP.NET Core is no more depends on System.Web.dll for browser-server communication. ASP.NET Core allows us to incorporate packages which we want for our application. Its reduces the requesting pipeline and improving the performance and scalability of application.

3. IoC Container

It's include built in IoC container to automatic dependency injection that make it maintainable and testable.

4. Integration with Modern UI Frameworks

It's allow you to use and manage modern UI frameworks like ReactJS, AngularJS, Bootstrap, Umber etc. using Bower (a package manager for the web applications).

5. Hosting

ASP.NET Core web application is hosted on multiple platforms like IIS web server, Apache web server etc. It's not dependent only on IIS as a typical .NET Framework.

6. Code Sharing

It allows you to create/build a class library which is used with other .NET frameworks like .NET Framework 4.x or Mono. Thus a one code based is shared across frameworks.

7. Side-by-Side App Versioning

ASP.NET Core technology runs on .NET Core which supports concurrent running of multiple versions of applications.

8. Smaller Deployment Footprint


ASP.NET Core application running on .NET Core technology that is smaller than full .NET Framework. So applications that using only a fragment of .NET CoreFX can have smaller deployment size. This reduces the deployment foot print.

What is the difference between ASP .NET Core and .NET Core?

  • Peoples are untidy between ASP.NET Core and .NET Core. Please note that ASP.NET Core and .NET Core don't seem to be the identical. It's different, a bit like ASP.NET and .NET Framework are different.
  • .NET Core is a faster, lightweight, modular and open source framework for creating web applications and services that run on Windows, Linux and Mac. So, it's a platform on that ASP.NET Core applications runs.
  • .NET Core is called "Core" because it includes core features of the .NET framework. The objective of .NET Core is to build .NET framework open source, and cross-platform compatible so that it utilized in resource-constrained environments. It includes minimum features that are required to run a basic .NET Core applications and other advanced features that will be included as a package from NuGet.

Monday, March 2, 2020

Overview of the .Net Framework Versions


Overview of the .Net Framework Versions - .NET Revolution

.NET Framework is a software development framework for building and running applications on Windows platform. .NET Framework is part of the .NET platform, a collection of technologies for building apps for Windows, Linux, macOS, Android, iOS, and many more.

The .Net Framework, a programming model that developed by Microsoft supports building as well as running applications for Windows, Windows servers, XML Web services, and Microsoft Azure. The framework includes a large class library called Framework Class Library (FCL) as well as Common Language Interoperability (CLR) across different programming languages like C++, C#, VB.Net, and F#. So there are many version have made with .Net Framework for various features. Let us start with the journey of .Net framework versions and their features.

.Net Framework Timeline

.Net Framework Versions and its Features

Below is the list of .Net Framework version details with features:

.Net Framework 1.0

  • CLR Version: 1.0
  • IDE Released: Visual Studio .Net
The .Net 1.0 is the first version of .Net Framework and includes everything you require to run the .Net Framework applications. It includes the CLR, Class Library and ASP.Net.

Features of .Net Framework 1.0:

  • Introduced CLR 1.0
  • Use of DLL class Libraries
  • Support for Object-oriented web app development

.Net Framework 1.1

  • CLR Version: 1.1
  • IDE Released: Visual Studio .Net 2003
.Net Framework version 1.1 is the first major upgrade from its earlier version. This version comes with ASP.Net mobile controls that support mobile device development. It also includes ADO.net classes that aid communication using Oracle Databases and Database Connectivity (ODBC). This release has fixed some security issues discovered in the .Net Framework 1.0 and ensuring the code access security in your ASP.Net apps. It offers support for IPv6.

Features of .Net Framework 1.1:

  • Enhanced features with ADO.Net and ASP.Net
  • Security Enhancement along with secure coding guideline
  • Support for IPv6
  • Built-in support for databases and ODBC

.Net Framework 2.0

  • CLR Version: 2.0
  • IDE Released: Visual Studio .Net 2005
After the success of .Net Framework 1.1, Microsoft released the compact version of the framework and named as .Net Framework 3.0. This version focuses primarily on increasing the developer’s productivity. The version was updated with new features in ADO.NET like asynchronous database operations, XML data types, user-defined types (UDT), and snapshot isolation. In addition, it includes significant advancements in all areas of ASP.Net like new data controls, enhanced code-behind model, caching features and many more.

Features of .Net Framework 2.0:

  • Enhancements to ASP.Net & ADO.Net
  • Authenticated Stream
  • Trace Data Filtering
  • I/O enhancement
  • Access Control List Support
  • Data Protection APIs
  • Programmatic control of caching
  • EventLog Enhancement
  • Console Class addition
  • FTP Support
  • Generics & Generic Collection
  • Serialization

.NET Framework 3.0:

  • CLR Version: 2.0
  • IDE Released: Visual Studio .Net 2005
Microsoft .Net Framework 3.0 embraced rich GUI capabilities that ensured a user-friendly way of communication with the users. It serves as the managed programming model as it comprises new sets of managed code APIs, which are an integral part of Windows Server 2008 and Windows Vista. The four core components included in this version are as follows:
1. Windows Presentation Foundation (WPF): This component is mainly used for rich client applications and web application windows. It employs the Extended Application Markup Language (XAML) to build a rich user interface. This component supports to apply hardware accelerated and 2D & 3D graphics effects.
2. Windows Communication Foundation (WCF) – This component aims to develop service-oriented applications – the distributed applications that run between servers and clients. It was formerly known as Indigo.
3. Windows Workflow Foundations (WWF)– It provides an API, a rehostable designer and an in-process workflow engine to implement the process as workflow within your .Net apps.
4. Windows CardSpace – This component aids users to manage as well as control their personal information. It is client software intends to aid users in the web service or website authentication by offering a digital identity in a secure, trusted and simple way.

Other Features of .Net Framework 3.0

  • Implicit Typed local variable
  • Object and Collection Initializers
  • Extension Methods
  • Implicitly Typed Arrays
  • Lambda Expressions
  • Anonymous Types
  • Auto-Implemented

.Net Framework 3.5

  • CLR Version: 2.0
  • IDE Released: Visual Studio .Net 2008
The .Net Framework 3.5 is the next incarnation of the Windows programming environment. Extending its predecessor .Net 3.0, version 3.5 goal is to aid the building of modern applications. .Net Framework 3.5 comprises some useful additions that affect several areas of version 3.0. For instance – there are notable enhancements in WCF, WPF, and WF. In addition, ASP.Net received Ajax support, and LINQ (Language –Integrated Query) become accessible to ADO.Net. Moreover, base class library encompassed various additions like unordered gatherings of unique elements and enhanced encryption support. The version 3.5 runs only on Windows Server 2003, Windows Server 2008, Windows XP and Windows Vista.
Other additional features of .Net Framework 3.5
  • NET Ajax-enabled Websites
  • ThreadPool Performance Enhancement
  • LatencyMode in Garbage Collection
  • TimeZoneInfo
  • Cryptography Enhancements
  • Socket Performance Enhancements
  • Peer-to-peer networking
  • Web Service Interoperability

 .Net Framework 4.0

  • CLR Version: 4.0
  • IDE Released: Visual Studio .Net 2010
The new version of this Framework is not just an extension of features, but the .Net architecture has been examined and enhanced. The .NET 4.0 includes parallel extensions to enable parallel computing support that targets distributed or multi-core systems. This version is highly compatible with apps that are created with earlier versions, except for some modification that was done to enhance standard compliances, reliability, performance and correctness.

Features of the .Net Framework 4.0

  • Dynamic Language Runtime
  • Expanded Base Class
  • Parallel Computing
  • Managed Extensibility Framework
  • Covariance and Contravariance
  • BigInteger and Complex Numbers

.Net Framework 4.5

  • CLR Version: 4.0
  • IDE Released: Visual Studio .Net 2012
The .Net Framework version 4.5 is a highly compatible update to the .Net 4. By using this version together with programming languages like Visual Basic, C#, or F#, you can create your Windows applications. The .Net Framework 4.5 encompasses a significant framework and language enhancement for Visual Basic, C#, and F#. The version is also blended with control flow, web app scalability, and a responsive UI. The .Net 4.5 adds considerable expansions in other functional areas like Managed Extensibility Framework, ASP.NET, Windows Workflow Foundation, Windows Communication Foundation, and Windows Identity Foundation. This version provides better reliability, security, and performance.

Features of .Net Framework 4.5

  • Enhanced CLR 4.0
  • Support for Windows Store (Metro) application development
  • Built-in support to Async
  • Enhanced WPF, WCF, WWF
  • Native support for Zip compression
  • NET support enhanced

.Net Framework 4.5.1

The .Net Framework 4.5.1 was released on October 17, 2013, and here are the features added in this update:
  • Edit & Continue controls (64-bit)
  • Possibility to handle return values
  • Improved performance & reliability
  • Compact large object heaps
  • Trace & sample activities
  • Support for Automatic binding redirection
  • Expanded support for Windows store application development

.Net Framework 4.5.2

.Net 4.5.2 was released on May 5, 2014, and it includes the following additional features:
  • Enhancement for high DPI Scenarios
  • Expanded resizing Windows Forms controls
  • New Workflow features

.Net Framework 4.6

  • CLR Version: 4.0
  • IDE Released: Visual Studio .Net 2015
The .Net Framework 4.6 is an extremely compatible update to the .Net version 4, 4.5, 4.5.1 and 4.5.2. This version supports Windows Vista SP2, Windows 8, Windows 8.1, Windows Server 2012, Windows Server 2012 R2.

Features of .Net Framework 4.6

  • Introduced JIT compiler called RyuJIT
  • Supports Code page encodings
  • Includes open source .Net Framework packages
  • Event-tracking enhancement
  • HTTP/2 support

.Net Framework 4.6.1

.Net 4.6.1 was released on November 30, 2015, and here is the list of features added with this update:
  • Native Image Generator (NGEN) PDBs
  • Spell checking developments in WPF
  • Support for X509 certificates covering ECDSA

.Net Framework 4.6.2

.Net 4.6.2 was launched on August 2, 2016, and includes the following key features:
  • Element Initializers
  • Cryptography enhancements
  • Indexed Members
    • Collection initializers
    • Exception Filter
    • SignedXml support for SHA-2 hashing
    • Support for persisted-key symmetric encryption

.Net Framework 4.7

  • CLR Version: 4.0
  • IDE Released: Visual Studio .Net 2017
.Net Framework 4.7 is an in-place update of the earlier version .Net Framework 4.6.2; hence, applications compatible with the .Net 4.6.2 runs fine even after the upgradation to .Net 4.7. The version 4.7 adds Object Cache Extensibility with ASP.Net. This new addition offers developers tools, which replace default ASP.Net. Moreover, developers can replace memory monitoring, object cache store and memory limit reactions. The .Net framework 4.7 is equipped with reliability and performance enhancements.

Features of .Net Framework 4.7

  • Improved TLS (Transport Layer Security)
  • Enhanced Cryptography
  • More features for touch & style in WPF
  • Object Cache Extensibility
  • High DPI support
  • New implementation for WPF printing APIs

.Net Framework 4.7.1

This framework was released on October 17, 2017, and it includes the following features:
  • Performance improvement in garbage collection
  • Support for portable PDBs
  • Support for .NET Standard 2.0
  • Run-time feature detection
  • Support for read-only references

.Net Framework 4.7.2

.Net 4.7.2 was released on April 30, 2018, and it encompasses the following updates:
  • New overloads of DSA.Create and RSA.Create
  • Ephemeral keys Support
  • Support for same-site cookies
  • HttpClientHandler properties implementation

.Net Framework 4.8

The .Net Framework 4.8 extended on earlier versions of .Net 4.x by performing many fixes and including several additional features. Microsoft announced that the runtime of the version will be incorporated in the update of Window 10 2019. If you want to derive the advantages of this .Net latest version, you should install updated Windows 7 SPI on your machine.

Features of .Net Framework 4.8

  • JIT improvements
  • Updated ZLib
  • Reducing FIPS Impact on Cryptography
  • Antimalware Scanning for All Assemblies
  • Reducing FIPS Impact on Cryptography
  • Accessibility Enhancements
Since its first launch in 2002, the .Net Framework has developed into the leading platform for new Windows apps. Used widely by Microsoft, enterprises, and ISVs, the .Net Framework versions has proven their values. With all features, Microsoft .Net Framework represents the current state of the art in the development of applications.