Pages

Resolve the Visual Studio 2012 issue after updating or installing Visual Studio 2013

Sunday, November 17, 2013

If you have already installed VS2012 and at a later Update to new a Service Pack or Installing VS2013, when you load any project, you may get the following error:
---------------------------
Microsoft Visual Studio
---------------------------
The 'ProviderPackage' package did not load correctly.

The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by examining the file 'C:\Users\username\AppData\Roaming\Microsoft\VisualStudio\11.0\ActivityLog.xml'.

Continue to show this error message?
---------------------------
Yes   No   
---------------------------

Change Local Path after download files from Source Control

If you want to change the local path for the working directory of the Team Foundation Server (TFS), you should follow the following steps:
  1. Go to File -> Source Control -> Advanced->Workspaces

Attach a Database File to The SQL Server

Wednesday, November 13, 2013

You can attach a database file to an instance of SQL Server by using the SQL Server Management Studio tool. For example, if you have existing database files from an old installation of SQL Server, you can attach these files to a new installation or another instance of SQL Server. Likewise, if you want to restore a corrupt database from a backed-up copy, you can attach the backed-up database file.This topic describes how to attach a database in SQL Server 2012 by using SQL Server Management Studio or Transact-SQL. You can use this feature to copy, move, or upgrade a SQL Server database.

Prerequisites 

  • When you attach a database, all data files (MDF and NDF files) must be available. If any data file has a different path from when the database was first created or last attached, you must specify the current path of the file.

Add Custom Message to Unit Test Result

If you are using MS test for the Unit test of your code you may need to print some output on the Output window. You can use


System.Diagnostics.Trace.WriteLine("Hello World!!!!!");

To output whatever you'd like. It will show up in the full results of the test runner.


What is the difference between a Library and a Framework?

Tuesday, November 12, 2013

It is quite a common question in all of the software developers mind, what is the difference between a Library and a Framework? The two concepts are important but sometimes confusing.

Key Difference and Definition of Library and Framework

The most important difference, and in fact the defining difference between a library and a framework is Inversion of Control(IoC). When you call a method in a library, you are in control. But with a framework, the control is inverted: the framework calls you. This is pretty much the difference and definition of a framework. In the framework, all the control flow is already there, and there’s just a bunch of predefined white spots that you should fill out with your code.

A library is just a collection of class definitions. The reason behind is simple, i.e. get the code that has already been written by other developers. The classes and methods normally define specific operations in a certain area. Your code is in charge and it calls into the library when it sees fit. E.g., jQuery.

A framework is normally more complex. It defines a skeleton where the application defines its own features to fill out the skeleton. In this way, your code will be called by the framework when appropriately. The benefit is that developers do not need to worry about if a design is good or not, but just about implementing domain specific functions.

Awesome Code Syntax Highlighting in Blogger Post

If you want to share your code in the blog, you need to format the code snippet with proper syntax and highlighting. Blogger and Wordpress does not support code syntax highlighting by default. Fortunately an excellent open source and free code syntax highlighter tool called SyntaxHighlighter available in the web.

This is 100% JavaScript based SyntaxHighlighter tool to use in the web pages with out any dependency on other frameworks or third party tools. SyntaxHighlighter can be either downloaded & used on your own webserver or if you have a blog on Blogger, this can be directly used as well.