Monday, 28 March 2016

How to Check Which Version of Microsoft .NET Framework is Installed in Windows?

There are 3 easy way to find out the version of .NET Framework installed in your system:
  • Using Windows Explorer
  • Using Registry Editor
  • Using Command Prompt


Method 1: Using Windows Explorer

All Microsoft .NET Framework versions are installed in following directory:

%windir%\Microsoft.NET\Framework\


Where "%windir%" represents "Windows" directory present in the system drive where Windows is installed in your system e.g. C:\Windows\.
So just type the above mentioned path in RUN dialog box or in Windows Explorer address bar and press Enter. It'll open the directory as shown in following screenshot:


Here in this folder, you can find out which versions are installed.


Method 2: Using Registry Editor

You can also find out .NET Framework version using Registry Editor:
1. Type regedit in RUN or Start Menu search box and press Enter. It'll open Registry Editor.
2. Now go to:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP
3. Under this key, you'll see separate keys for each .NET Framework version installed in your system.


Method 3: Using Command Prompt

Here is another method to find out all Microsoft .NET Framework versions installed in your Windows:
1. Open Command Prompt from Start Menu and execute any of following commands:
wmic /namespace:\\root\cimv2 path win32_product where "name like '%%.NET%%'" get version
dir %windir%\Microsoft.NET\Framework /AD
You can copy the above mentioned command and then open Command Prompt, right-click on its titlebar and select "Edit -> Paste" option. It'll quickly paste the whole command.
2. Wait for a few seconds and it'll show a list of all .NET Framework versions installed in your system as shown in following screenshot:




Sunday, 13 March 2016

Visual Studio 2015 Update 2 RC Announced



The Release Candidate (RC) of Visual Studio 2015 Update 2 has been announced. The release focuses on the feedback given by developers across the globe on RTM and Update 1 and responds to it. It also focuses on stability and also includes enhancing performance and responsiveness.
 
Here are some significant changes.
 
Visual Studio Tools for Apache Cordova
 
The new release includes Visual Studio Tools for Apache Cordova Update 5 and brings several bug fixes, command line integration for project creation, and iPhone 6s simulator support.
 
Visual C++: Compiler and IDE
 
The C++ compiler and standard library is updated with improved support for C++11 and C++14 features. Also, more than 300 compiler bugs are fixed.
 
With Update 2, new Visual Studio installations use the new database engine introduced in Update 1 by default.
 
For upgrading from Update 1 to Update 2, you’ll continue to use whatever engine you already had selected. You can select the engine via Tools, Options, Text Editor, then click C/C++ > Experimental as in the following:




.NET Framework 4.6.1 - ClickOnce Bootstrapper package
 
In the new update, the .NET Framework 4.6.1 ClickOnce Bootstrapper package for Visual Studio 2015 in Update 2 has been added.
 
Visual Studio IDE - TextMate Snippet Support
 
Now support is provided for consuming tmSnippet files by placing them into a snippet folder and accessible through the IntelliSense completion.
 
Team Explorer and Git Updates
 
Now, opening Team Explorer and browsing work item queries in Visual Studio is faster with update 2.
 
There are some Git updates also:
 
Git SCC status to the status bar have been added, including the number of modified files and unpushed commit.
 
Visual Studio is now compatible with Git repos that are configured to use Git LFS (Large File Storage).
 
The Changes page now supports staging, with simple actions—such as double-click—to stage all and view diffs for changed files.




SQL Server Data Tools
 
Visual Studio 2015 Update 2 includes the latest updates of SQL Server Data Tools. This enables support for the most recent features in Azure SQL Database and SQL Server 2016.
 
TypeScript
 
Visual Studio 2015 Update 2 includes the 1.8.1 release of TypeScript. It addresses bug fixes for publishing web applications and enhanced compiler performance. 
 


Tuesday, 8 March 2016

.NET Development

You can use the .NET Framework to develop apps for the desktop, web, and mobile devices, including Windows Store and Windows Phone Store apps:

  • The .NET Framework can be used with such core app development technologies as Windows Presentation Foundation (WPF), Windows Communication Foundation (WCF), and Windows Workflow Foundation (WF).
  • To read about creating Windows 8.x Store apps in Windows 8 Windows 8.1 and Windows 10, see the Windows Dev Center.
  • To read about creating Windows Phone apps, see the Windows Phone Dev Center.
  • For information about creating portable .NET Framework assemblies that work without modification on Windows,Windows Phone, and other platforms, see Cross‐Platform Development with the .NET Framework.
  • For additional information about developing apps, visit the Windows desktop apps and web development sections of the MSDN Library.
  • You can use Visual Studio for your development tasks and select from a wide range of programming languages



The .NET Framework also releases out‐of‐band packages with new functionality and improved cross‐platform support. For information about these, see The .NET Framework and Out‐of‐Band Releases.

You can extend the capabilities of your apps with the following .NET Framework technologies:

Silverlight
A cross‐browser, cross‐platform implementation of the .NET Framework for building media experiences and rich interactive apps for the web, desktop, and phone.

WCF Data Services
A technology that enables you to create services that use the Open Data Protocol (OData), which exposes and consumes data over the web or intranet by using the semantics of representational state transfer (REST).

Entity Framework
A technology that supports the development of data‐oriented software applications. The Entity Framework enables developers to work with data in the form of domain‐specific objects and properties, without having to concern themselves with the underlying database tables and columns where this data is stored. With the Entity Framework, developers can work at a higher level of abstraction when they deal with data, and can create and maintain data‐oriented applications with less code than in traditional applications.

Reactive Extensions
A library for composing asynchronous and event‐based programs for the .NET Framework, Silverlight, and Windows Phone 7 by using observable sequences and LINQ‐style query operators.

Microsoft Surface
A development platform that helps you create interactive Microsoft Surface apps by using the .NET Framework. This technology supports high‐end graphics and multiuser interaction through natural gestures, touch, andphysical objects.

Windows Identity Foundation (WIF)
A set of .NET Framework classes that help you build claims‐aware,relying party applications and security token services. In the .NET Framework 3.5 SP1 and the .NET Framework 4, the WIF runtime was downloaded separately. Beginning with the .NET Framework 4.5, WIF is fully integrated into the .NET Framework, and WIF content is available in the .NET Framework documentation set.

Windows Server AppFabric
A set of integrated technologies that make it easier to build, scale, and manage web and composite apps that run on Internet Information Services ﴾IIS﴿.


.NET Framework Class Library

The .NET Framework class library is a library of classes, interfaces, and value types that provide access to system functionality. It is the foundation on which .NET Framework applications, components, and controls are built. The namespaces and namespace categories in the class library are listed in the following table and documented in detail in this reference. The namespaces and categories are listed by usage, with the most frequently used namespaces appearing first.


Namespaces

System
The System namespace contains fundamental classes and base classes that define commonly used
value and reference data types, events and event handlers, interfaces, attributes, and processing exceptions.

System.Activities
The System.Activities namespaces contain all the classes necessary to create and work with activities in Window Workflow Foundation.

System.AddIn 
The System.AddIn namespaces contain types used to identify, register, activate, and control addins, and to allow add‐ins to communicate with a host application.

System.CodeDom
The System.CodeDom namespaces contain classes that represent the elements of a source code document and that support the generation and compilation of source code in supported programming languages.

System.Collections
The System.Collections namespaces contain types that define various standard, specialized, and generic collection objects.

System.ComponentModel
The System.ComponentModel namespaces contain types that implement the run‐time and design‐time behavior of components and controls. Child namespaces support the Managed Extensibility Framework ﴾MEF﴿, provide attribute classes that define metadata for ASP.NET Dynamic Data controls, and contain types that let you define the design‐time behavior of components and their user interfaces.

System.Configuration
The System.Configuration namespaces contain types for handling configuration data, such as data in machine or application configuration files. Child namespaces contain types that are used to configure an assembly, to write custom installers for components, and to support a pluggable model for adding functionality to, or removing functionality from, both client and server applications.

System.Data 
The System.Data namespaces contain classes for accessing and managing data from diversesources. The top‐level namespace and a number of the child namespaces together form the ADO.NET architecture and ADO.NET data providers. For example, providers are available for SQL Server, Oracle, ODBC, and OleDB. Other child namespaces contain classes used by the ADO.NET Entity Data Model ﴾EDM﴿ and by WCF Data Services.

System.Deployment
The System.Deployment namespaces contain types that support deployment of ClickOnce applications.

System.Device.Location
The System.Device.Location namespace allows application developers to easily access the computer's location by using a single API. Location information may come from multiple providers, such as GPS, Wi‐Fi triangulation, and cell phone tower triangulation. The System.Device.Location classes provide a single API to encapsulate the multiple location providers on a computer and support seamless prioritization and transitioning between them. As a result, application developers who use this API do not need to tailor applications to specific hardware configurations.

System.Diagnostics
The System.Diagnostics namespaces contain types that enable you to interact with system processes, event logs, and performance counters. Child namespaces contain types to interact with code analysis tools, to support contracts, to extend design‐time support for application monitoring and instrumentation, to log event data using the Event Tracing for Windows ﴾ETW﴿ tracing subsystem, to read to and write from event logs and collect performance data, and to read and write debug symbol information.

System.DirectoryServices
The System.DirectoryServices namespaces contain types that provide access to Active Directory from managed code.

System.Drawing
The System.Drawing parent namespace contains types that support basic GDI+ graphics functionality. Child namespaces support advanced two‐dimensional and vector graphics functionality, advanced imaging functionality, and print‐related and typographical services. A child namespace also contains types that extend design‐time user‐interface logic and drawing.

System.Dynamic
The System.Dynamic namespace provides classes and interfaces that support Dynamic Language Runtime.

System.EnterpriseServices
The System.EnterpriseServices namespaces contain types that define the COM+ services architecture, which provides an infrastructure for enterprise applications. A child namespace supports Compensating Resource Manager (CRM), a COM+ service that enables non‐transactional objects to be included in Microsoft Distributed Transaction Coordinator ﴾DTC﴿ transactions. Child namespaces are described briefly in the following table and documented in detail in this reference.

System.Globalization
The System.Globalization namespace contains classes that define culture‐related information, including language, country/region, calendars in use, format patterns for dates, currency, and numbers, and sort order for strings. These classes are useful for writing globalized (internationalized) applications. Classes such as StringInfo and TextInfo provide advanced globalization functionalities, including surrogate support and text element processing.


System.IO 
The System.IO namespaces contain types that support input and output, including the ability to read and write data to streams either synchronously or asynchronously, to compress data in streams, to create and use isolated stores, to map files to an application's logical address space, to store multiple data objects in a single container, to communicate using anonymous or named pipes, to implement custom logging, and to handle the flow of data to and from serial ports.

System.Linq 
The System.Linq namespaces contain types that support queries that use Language‐Integrated

Query (LINQ)
This includes types that represent queries as objects in expression trees.

System.Management
The System.Management namespaces contain types that provide access to management information and management events about the system, devices, and applications instrumented to the Windows Management Instrumentation ﴾WMI﴿ infrastructure. These namespaces also contain types necessary for instrumenting applications so that they expose their management information and events through WMI to potential customers.

System.Media 
The System.Media namespace contains classes for playing sound files and accessing sounds provided by the system.

System.Messaging
The System.Messaging namespaces contain types that enable you to connect to, monitor, and administer message queues on the network and to send, receive, or peek messages. A child namespace contains classes that can be used to extend design‐time support for messaging classes.

System.Net 
The System.Net namespaces contain classes that provide a simple programming interface for a number of network protocols, programmatically access and update configuration settings for the System.Net namespaces, define cache policies for web resources, compose and send e‐mail, represent Multipurpose Internet Mail Exchange ﴾MIME﴿ headers, access network traffic data and network address information, and access peer‐to‐peer networking functionality. Additional child namespaces provide a managed implementation of the Windows Sockets ﴾Winsock﴿ interface and provide access to network streams for secure communications between hosts.

System.Numerics
The System.Numerics namespace contains numeric types that complement the numeric primitives, such as Byte, Double, and Int32, that are defined by the .NET Framework.

System.Printing
The System.Printing namespaces contain types that support printing, that provide access to the properties of print system objects and enable rapid copying of their property settings to another object of the same type, and that support the interconversion of managed System.PrintTicket objects and unmanaged GDI DEVMODE structures.

System.Reflection
The System.Reflection namespaces contain types that provide a managed view of loaded types, methods, and fields, and that can dynamically create and invoke types. A child namespace contains types that enable a compiler or other tool to emit metadata and Microsoft intermediate language (MSIL)

System.Resources
The System.Resources namespaces contain types that enable developers to create, store, and manage an application's culture‐specific resources.

System.Runtime
The System.Runtime namespaces contain types that support an application's interaction with the common language runtime, and types that enable features such as application data caching, advanced exception handling, application activation within application domains, COM interop,
distributed applications, serialization and deserialization, and versioning.

Advanced Reading for the .NET Framework.




Dynamic Programming in the .NET Framework

Provides information about reflection, reflection emit, the dynamic language runtime ﴾DLR﴿, dynamic source code generation and compilation, and the Code Document Object Model (CodeDOM).

Add‐ins and Extensibility
Provides information about using the add‐in model for extensible applications.

Managed Extensibility Framework (MEF)

Describes the basics of using the Managed Extensibility Framework ﴾MEF﴿ to enable extensible applications.

Interoperability

Describes services provided by the .NET Framework for interaction with COM components, COM+ services, external type libraries, and many operating system services.

Memory Management and Garbage Collection in the .NET Framework

Discusses how the garbage collector manages memory and how you can program to use memory more efficiently.

Unmanaged API Reference

Includes information on unmanaged APIs that can be used by managed‐code‐related applications, such as runtime hosts, compilers, disassemblers, obfuscators, debuggers, and profilers.

XAML Services
Discusses System.XAML, which is an assembly that implements XAML services for the .NET Framework.

Wednesday, 2 March 2016

.NET Back to Basics: The String Class

Last month, we went back to basics with the Int class. This month, we look at the textual equivalent, the string class.
The String & Int data types, single-handed, are the two most used data in the .NET platform. Between them, they handle about 90% of all the data we use.
Strings are nothing complex; they are just simple sequences of characters that make up words and sentences. The string class exists to allow us to chop up these sentences, replace parts of them, search them, and a whole bunch of other things that make handling strings of text easier for us as developers.



So, what can a string do?
The string class has a phenomenal amount of functionality in it, all of which is grouped into about three categories as follows:

  • String tests
  • Searching
  • String modification and building

We'll start with "String Tests."
When we talk about string tests, we are in fact talking about checking to see if a string is present, or if that string has a certain sub string contained within it.
Many developers will instantly recognize that, in this case, an appropriate test would be:

if (myname == "shawty") { }

String, like most classes that are also basic data types, implements the equality operator, allowing you to perform simple straight-forward tests like this inline in your application code.
There is, however, a number of useful specialist tests too. Consider this fragment of code:

if (myname == "" && myname == null) { }

In language terms, we are saying, IF the variable myname has no contents, that is it is empty and if it is null, that is devoid of any value, then consider our decision logic to be true.
The string class makes this much easier with a static method called 'IsNullOrEmpty'

if (String.IsNullOrEmpty(myname)) { }

To me, the string method version reads much better, and makes better sense from a syntax point of view because the name of the expression tells you the exact test you're performing.
Other tests are usually performed as an extension to the string itself. For example 'contains':

string myname = "shawty";
 if (myname.Contains("shaw")) { }

Will pass, because 'shawty' does contain 'shaw'.

      string myname = "shawty";
      if (myname.Contains("peter")) { }

will, however, fail. Rather than looking in the string, if you're looking for prefixes or suffixes, 'StartsWith' and 'EndsWith' have your back covered.

      string myname = "Mr Peter Shaw";
      if (myname.StartsWith("Mr") &&
         myname.EndsWith("Shaw")) { }

will become true if the first two characters are equal to "Mr" AND the last four are equal to "Shaw" but won't care about any of the other contents in the string. It's also a point to note that the test IS case sensitive, so "Mr" will never match "mr." I soon will show you a way to deal with this, however.
All of these tests can also be negated, so to test if a string does NOT start with "Mr" it's as simple as prefixing the method call with an exclamation mark.

      string myname = "Mr Peter Shaw";
      if (!myname.StartsWith("Mr")) { }

Wednesday, 24 February 2016

Difference Between Java and .NET

Java vs .NET
In the world of technology and computers, man is going deeper and deeper inside the heart of learning it and is making it easier for common people. Everything in application and software development is coded and compiled by us. Almost everything in computers and applications needs some commands to work properly. So here comes the topic of computer languages. A computer language is a set of different command lines given to the computer to get the desired output.
The most popular computer languages are: C++, C#, Java, .NET, and HTML with C++ being the most powerful. However, we will be discussing about the differences between “Java” and “.NET” further in this article.


Java
Java was developed at Sun Microsystems by James Gosling. It derives its most syntax from the popular languages C and its predecessor C++. Java is a simple but powerful language used in mobile, enterprise, and other high-end applications as well. It is basically a language plus a runtime. Java is simple and runs nearly on all platforms like Microsoft Windows, SunOS, Mac, and Linux. It uses third-party tools and servers making it very vast and effective.
Java on mobile platforms works very quickly and efficiently. The most popular platform includes the J2ME platform which uses basic Java to GUID conversion. First launched on the Nokia platform, Java is a virus-free, fast, easy-to-use application language. Java is currently the most popular computer language as it delivers more flexibility and stability than any other language.
.NET
.NET is a programming language which appeared on February 13th, 2002. This framework was produced by Microsoft Corporation. It is made to run only on the Microsoft Windows platform. It basically includes codes from C-Sharp (C#), J-Sharp (J#) and Visual Basic.NET. .NET is also a quite powerful language but, unlike Java, it does not support multiple platforms and is only compiled in Windows. It has only a runtime environment and gets its derived tools only from Microsoft Corporation making it strict and non-flexible unlike Java. .NET has a very fast and efficient architecture which is very powerful in itself. It has a superior development environment.
Summary:
1.Java was developed by Sun while .NET was developed by Microsoft.
2.Java is platform independent which runs on different operating systems like Windows, Linux, and Mac while .NET is for Windows.

Tuesday, 23 February 2016

What is the .NET architecture?

Microsoft .NET consists of four major components:
  • Common Language Specification (CLS)
  • Framework Class Library (FCL) 
  • Common Language Runtime (CLR)
  • .NET Tools 

Common Language Specification (CLS)

The CLS is a common platform that integrates code and components from multiple .NET programming languages. In other words, a .NET application can be written in multiple programming languages with no extra work by the developer (though converting code between languages can be tricky).

.NET includes new object-oriented programming languages such as C#, Visual Basic .NET, J# (a Java clone) and Managed C++. These languages, plus other experimental languages like F#, all compile to the Common Language Specification and can work together in the same application.

Framework Class Library (FCL)

The FCL is a collection of over 7000 classes and data types that enable .NET applications to read and write files, access databases, process XML, display a graphical user interface, draw graphics, use Web services, etc. The FCL wraps much of the massive, complex Win32 API into more simple .NET objects that can be used by C# and other .NET programming languages.

Common Language Runtime (CLR)

The CLR is the execution engine for .NET applications and serves as the interface between .NET applications and the operating system. The CLR provides many services such as:

Loads and executes code
Converts intermediate language to native machine code
Separates processes and memory
Manages memory and objects
Enforces code and access security
Handles exceptions
Interfaces between managed code, COM objects, and DLLs
Provides type-checking
Provides code meta data (Reflection)
Provides profiling, debugging, etc.

.NET Tools

Visual Studio .NET is Microsoft’s flagship tool for developing Windows software. Visual Studio provides an integrated development environment (IDE) for developers to create standalone Windows applications, interactive Web sites, Web applications, and Web services running on any platform that supports .NET.

In addition, there are many .NET Framework tools designed to help developers create, configure, deploy, manage and secure .NET applications and components.

Some .NET Framework 4 Versions Losing Product Support Next Month

Microsoft issued a reminder to organizations today that it will be ending product support next month for .NET Framework versions 4, 4.5 and 4.5.1.



Starting on Jan. 12, 2016, those versions of the product will become unsupported software. As a consequence, they won't get future updates from Microsoft, including security patches. The lack of patch support could pose risks for organizations continuing to run the software.

The January deadline maybe will come as a surprise for some organizations because Microsoft accelerated its traditional product support deadlines for those .NET Framework versions. Previously, the .NET Framework product lifecycles had been associated with underlying Windows product lifecycles. Instead, Microsoft switched to a more arbitrary January deadline for versions 4, 4.5 and 4.5.1. The policy change was announced in August of last year.

Microsoft made the change in order to "invest more resources towards improvements of the .NET Framework," per its announcement.

Microsoft is claiming that organizations can simply install .NET 4.5.2 or higher versions and most things will work. The most recent version of the product is .NET Framework 4.6.1.

The newer versions of the .NET Framework will install as "in-place" upgrades, which means that older versions don't have to be uninstalled first. The .NET Framework versions from 4.5.2 and newer will support applications that used the older .NET Framework versions in most cases, Microsoft has indicated. However, it's still up to organizations to test their applications first and see if they'll be compatible.

Microsoft's announcement today explained that .NET Framework 4.5.2 and higher versions have a so-called "quirking" feature. This quirking feature "maintains the semantics of earlier versions" of the .NET Framework, assuring compatibility.

Microsoft is also claiming that developers likely won't have to recompile or rebuild their applications after upgrading the .NET Framework -- at least when using .NET Framework versions 4.5.2, 4.6 and 4.6.1.

One exception to this accelerated product lifecycle pertains to .NET Framework 3.5 Service Pack 1. Its lifecycle is still based on the product lifecycle of the underlying Windows version used, according to this Microsoft FAQ. Depending on the Windows version used, it'll still be supported after the January deadline.

The Jan. 12, 2016 deadline for .NET 4, 4.5 and 4.5.1 coincidentally is also the same accelerated product support deadline for organizations to move to the latest version of Internet Explorer. For most organizations, this policy change means that they must have migrated to using IE 11 by that Jan. 12 date or they'll lose IE product support. However, the policy just states that organizations need to use the latest version of IE per supported Windows version, so it's a little nuanced. For example, Vista users can still continue to use IE 9 and have a supported browser since IE 9 is the most current browser for that Windows operating system. Those details and more are explained in this IE lifecycle FAQ.

Why we use .net and Why develope .net framework?

In the Old Days when you wrote an application, you started with a blank
sheet of paper and maybe a couple of routine you had written before and
knew worked. As a result it took a long time to get anything done, it all had
to be tested individually, and anyone new coming into the project had a
massive learning curve before they could do anything useful.

Slowly, the situation improved, with first function libraries, then class libraries ,
then a Foundation Class framework. Each iteration moved more and move
routine stuff into a set of objects that were pre‐written and pre‐tested.



The .NET framework is a big, powerful iteration of this: providing classes,
objects, methods and all the supporting bits and bobs which mean that
developers can concentrate on they application specific design, rather than
having to build their own Collections, Buttons, SerialPorts, Sockets,
WebBrowsers, etc., etc..

It speeds up development as a whole, makes it more reliable, and means the
new project members only need to learn the project specific parts.

ASP.Net was developed to make use of OOP﴾Object Oriented Programming﴿
which eases the development process. And the idea of .NET framework is the
ability of gather every module developed using a .net supported language.
﴾for example you can have a VB page and a C# one in the same application
because both is compiled to an IL‐Intermediate language﴿

The other reason .NET doesn't relay on the machine capability, instead it is
running using a framework running on the machine﴾just like Java Run‐time
Environment‐JRE﴿.

Thursday, 18 February 2016

WHAT IS .NET FRAMEWORK ?

.NET is a software development platform developed by Microsoft. It runs on Microsoft Windows OS. .NET provides tools and libraries that allow developers to develop applications and services much easily, faster and secure by using a convenient way. t


.NET is a programming framework created by Microsoft that developers can use to create applications more easily. "a framework is just a bunch of code that the programmer can call without having to write it explicitly."

In a perfect world, you wouldn't need .NET Framework. The makers of all your crucial applications would have the time and resources to fully patch together their applications into self-contained packages, because developing for Windows would be an intuitive, mostly high-level process that independent developers could nail down in fairly quick order. So nobody besides developers would need a package like .NET, which provides applications with an orderly way to access databases, web services, and other communication tools.



 

Copyright @ 2013 DotNet.