.NET Framework 4.5

Visual Studio 2015 Update 3 – Download

June 27, 2016 .NET, .NET Core 1.0, .NET Framework, .NET Framework 4.5, .NET Framework 4.5.2, .NET Framework 4.6, ASP.NET, ASP.NET 5.0, ASP.NET Core 1.0, ASP.NET MVC, C#.NET, Community, JavaScript, Microsoft, MSDN, Trial Downloads, Updates, Visual Studio 2015, Visual Studio Code, Visual Studio SDK, VisualStudio, VS2015, WCF, Web API v2.0, Windows, Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Azure, Windows Azure Development, Windows Phone Development, Windows Phone SDK, Windows Store Development, WPF, WWF, XAML No comments

Today Microsoft has released Update 3 for Visual Studio 2015. Visual Studio 2015 Update 3 includes a variety of capability improvements and bug fixes. To find out what’s new, see the Visual Studio 2015 Update 3 Release Notes. For a list of fixed bugs and known issues, see the Visual Studio 2015 Update 3 MSDN Article.

Download:
Visual Studio Community 2015 with Update 3 – Web Installer –  ISO
Visual Studio Enterprise 2015 with Update 3 – Web Install –  ISO
Visual Studio Professional 2015 with Update 3 – Web Installer –  ISO
Visual Studio 2015 Update 3 – Web InstallerISO
Visual Studio Team Foundation Server 2015 with Update 3 – Web Installer –  ISO
Visual Studio Test Professional 2015 – Web InstallerISO
Visual Studio Express 2015 for Windows 10 – here
Visual Studio Express 2015 for Web – here
Visual Studio Express 2015 for Desktop – here

Back to Basics : Singleton Design Pattern using System.Lazy type

June 25, 2015 .NET, .NET Framework, .NET Framework 4.5, .NET Framework 4.5.2, .NET Framework 4.6, Back-2-Bascis, BCL(Base Class Library), C#.NET, Codes, Design Patterns, KnowledgeBase, Microsoft, Portable Class Library, Visual Studio 2013, Visual Studio 2015, VisualStudio, VS2010, VS2012, VS2013, VS2015, Windows No comments

This article takes you to a simpler/alternative approach in making a Singleton Design Pattern implementation using System.Lazy class rather that using our traditional approach.

Singleton Design Pattern implementation without lazy initialization:

  • This code is thread safe enabled

<br />
 /// &lt;summary&gt;<br />
    /// Singleton class<br />
    /// &lt;/summary&gt;<br />
    public class AppConfig<br />
    {</p>
<p>        private AppConfig()<br />
        {</p>
<p>        }</p>
<p>        /// &lt;summary&gt;<br />
        /// Gets the current date time.<br />
        /// &lt;/summary&gt;<br />
        /// &lt;value&gt;<br />
        /// The current date time.<br />
        /// &lt;/value&gt;<br />
        public DateTime CurrentDateTime<br />
        {<br />
            get<br />
            {<br />
                return DateTime.Now;<br />
            }<br />
        }<br />
        /// &lt;summary&gt;<br />
        /// The _config<br />
        /// &lt;/summary&gt;<br />
        private static AppConfig _config;</p>
<p>        /// &lt;summary&gt;<br />
        /// The pad lock for maintaining a thread lock.<br />
        /// &lt;/summary&gt;<br />
        private static readonly Object padLock = new object();</p>
<p>        /// &lt;summary&gt;<br />
        /// Gets the instance.<br />
        /// &lt;/summary&gt;<br />
        /// &lt;value&gt;<br />
        /// The instance.<br />
        /// &lt;/value&gt;<br />
        public static AppConfig Instance<br />
        {<br />
            get<br />
            {</p>
<p>                if (_config == null)<br />
                {<br />
                    lock (padLock) // making thread-safe<br />
                    {<br />
                        //{<br />
                        if (_config == null) //second level check to make sure, within the short span, another concurent thread didnt initialize the object.<br />
                        {<br />
                            _config = new AppConfig();<br />
                        }<br />
                    }<br />
                }<br />
                //}</p>
<p>                return _config;<br />
            }<br />
        }<br />
    }<br />

This approach ensures that only one instance is created and only when the instance is needed. Also, the variable is declared to be volatile to ensure that assignment to the instance variable completes before the instance variable can be accessed. Lastly, this approach uses a padLock instance to lock on, rather than locking on the type itself, to avoid deadlocks.

Another variant using Lazy initialization using static constructor and thread safe since initialization is handled during runtime within readonly variable declaration.  This will be thread-safe any ways.

<br />
 /// &lt;summary&gt;<br />
    /// a Simpler version of Singleton class with lazy initialization.<br />
    /// &lt;/summary&gt;<br />
    public class AppConfigLazy1<br />
    {<br />
        // static holder for instance, will not get initialized until first use, due to static contructor.<br />
        private static readonly AppConfigLazy1 _instance = new AppConfigLazy1();</p>
<p>        /// &lt;summary&gt;<br />
        /// Prevents a default instance of the &lt;see cref=&amp;quot;AppConfigLazy1&amp;quot;/&gt; class from being created.<br />
        /// &lt;/summary&gt;<br />
        private AppConfigLazy1()<br />
        {</p>
<p>        }</p>
<p>        /// &lt;summary&gt;<br />
        /// for Lazy Initializes the &lt;see cref=&amp;quot;AppConfigLazy1&amp;quot;/&gt; class.<br />
        /// &lt;/summary&gt;<br />
        static AppConfigLazy1()<br />
        {</p>
<p>        }</p>
<p>        public static AppConfigLazy1 Instance<br />
        {<br />
            get<br />
            {<br />
                return _instance;<br />
            }<br />
        }<br />
    }<br />

Now with .NET 4.0 onwards there is a better way of doing this using .NET Runtime methods using System.Lazy type. System.Lazy type is mainly used in Entity Framework context, but we can use the same in implementing lazy loading where ever we have to deal with memory intensive object or collection of objects.

System.Lazy type  guarantees thread-safe lazy-construction. (By default, all public and protected members of the Lazy class are thread safe and may be used concurrently from multiple threads.)

.NET Framework Support in: 4.6, 4.5, 4

<br />
/// &lt;summary&gt;<br />
    /// a Simpler version of Singleton class with lazy initialization.<br />
    /// &lt;/summary&gt;<br />
    public class AppConfigLazy2<br />
    {<br />
        // static holder for instance, need to use lambda to construct since constructor private<br />
        private static readonly Lazy&lt;AppConfigLazy2&gt; _instance = new Lazy&lt;AppConfigLazy2&gt;(() =&gt; new AppConfigLazy2());</p>
<p>        /// &lt;summary&gt;<br />
        /// Prevents a default instance of the &lt;see cref=&amp;quot;AppConfigLazy2&amp;quot;/&gt; class from being created.<br />
        /// &lt;/summary&gt;<br />
        private AppConfigLazy2()<br />
        {</p>
<p>        }</p>
<p>        public static AppConfigLazy2 Instance<br />
        {<br />
            get<br />
            {<br />
                return _instance.Value;<br />
            }<br />
        }</p>
<p>        /// &lt;summary&gt;<br />
        /// Gets the current date time.<br />
        /// &lt;/summary&gt;<br />
        /// &lt;value&gt;<br />
        /// The current date time.<br />
        /// &lt;/value&gt;<br />
        public DateTime CurrentDateTime<br />
        {<br />
            get<br />
            {<br />
                return DateTime.Now;<br />
            }<br />
        }<br />
    }</p>
<p>

That’s more than one way doing Singleton Pattern Implementation right?, hope that was helpful to you  Some reference links are given below:

Visual Studio 2013 Update 5 (2013.5) RC–Released

May 5, 2015 .NET, .NET Framework, .NET Framework 4.5, .NET Framework 4.5.2, ASP.NET, ASP.NET 4.5, ASP.NET MVC, BCL(Base Class Library), KnowledgeBase, Microsoft, Microsoft SDKs, Portable Class Library, Visual Studio 2013, VisualStudio, VS2013, Windows, Windows 7, Windows 8, Windows 8.1, Windows Phone, Windows Phone 8 No comments

Microsoft has released an release candidate version for VS2013 Update 5 (short: 2013.5).

This update is the latest in a cumulative series of technology improvements and bug fixes for Visual Studio 2013.

What’s new in Visual Studio 2013 Update 5
  • Current iteration query token
  • Team Project Rename support for Local Workspaces : –  [ability to update local workspaces after a team project is renamed. Performing a get or check-in will automatically correct the workspace mapping so that it uses the new team project name.]

WARNING: All prior releases of the Tools for Apache Cordova are incompatible with Update 5. If you have previously installed a Tools for Apache Cordova CTP extension, you must uninstall that extension before installing Visual Studio 2013 Update 5.

Download: Visual Studio 2013 Update 5 (2013.5) RC

KB – https://support.microsoft.com/en-us/kb/3021976?wa=wsignin1.0 

https://www.visualstudio.com/news/vs2013-update5-vs

NuGet Package – Unity.WebAPI

January 5, 2015 .NET, .NET Framework, .NET Framework 4.5, .NET Framework 4.5.2, ASP.NET, ASP.NET 4.5, ASP.NET MVC, Microsoft, NuGet, Package Manager, VisualStudio, VS2010, VS2012, VS2013, Web API No comments

Today I came across this interesting Nuget Package for creating ASP.NET Web API project with Microsoft Unity Dependency Injection container.

  • It is pretty simple to configure and install on your existing Web API project or new ones.

Inorder to use it, use the respective NUGET package from below links:

To install Unity.WebAPI, run the following command in the Package Manager Console

PM> Install-Package Unity.WebAPI -Version 0.10.0

To install Unity.WebAPI, run the following command in the Package Manager Console

PM> Install-Package Unity.WebAPI

You can find out more about Unity.WebAPI by visiting – http://devtrends.co.uk/blog/introducing-the-unity.webapi-nuget-package

Visual Studio 2012 Update 4–Released

November 13, 2013 .NET, .NET Framework, .NET Framework 4.5, Microsoft, Updates, VisualStudio, VS2012 No comments

Microsoft has today released the final RTW(Release-To-Web) version of Visual Studio 2012 Update 4 .  This update is the latest in a cumulative series of feature additions and bug fixes for Visual Studio 2012.

Download:  Visual Studio 2012 Update 4 ( Web Install | Offline ISO )

Visual Studio Team Foundation Server 2012 with Update 4

Visual Studio Team Foundation Server Express 2012 with Update 4

For information about the update see the  Visual Studio Update KB Article.

Download Visual Studio 2013 Trial (Web Install/Offline ISO)

November 7, 2013 .NET, .NET Framework, .NET Framework 4.5, ASP.NET, ASP.NET 4.5, ASP.NET MVC, Microsoft, Trial, Trial Downloads, Updates, Visual Studio 2013, VisualStudio, VS2013, WCF 3 comments

Microsoft has released Visual Studio 2013 few weeks back and this article gives you enough information to obtain Trial versions of Visual Studio 2013 for your evaluation and development.

Visual Studio Trial Editions  (30 days validity after install  and  90 days validity if you login with a Microsoft Account in VS2013)

Express Editions (Limited Features, Free for Use)