Saturday, June 20, 2015

error 0152: No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'. Make sure the provider is registered in the 'entityFramework' section of the application config file.

Have you encountered this error?

error 0152: No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'. Make sure the provider is registered in the 'entityFramework' section of the application config file. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information.


Is this error keep on destroying your life and blowing your mind?

Don't worry, you are not alone!

It turns out that you just need to configure your cs project because you have relied too much with the Nuget Package Manager.

The Entity Framework 6 is a cool tool that all of us wanted to use. Through the Nuget, the EF will be added to your project. However, it turns out, the Copy Local property of the reference to these files:

EntityFramework.dll
EntityFramework.SqlServer.dll

are not set to true.



The tricky part is that even though the Visual Studio (2013 in my case) shows in the Property Window that the Copy Local is equal to True, the project file does not.

To fix this, set the Copy Local to False, save the project,  and then set back to True.

I found from the Stackoverflow, that you may also need to put this line inside your DBContext's initialize method of your Data Entities project.

var ensureDLLIsCopied = System.Data.Entity.SqlServer.SqlProviderServices.Instance;





Saturday, June 13, 2015

How To Turn off Start up Applications in Windows

This procedure helps you turn off unwanted applications during Windows Start up.

The steps below demonstrates how to do it in Windows 7.

1. Go to Start .
2. Type MSCONFIG.

3. The System Configuration tool will be launched. In that tool, go to Startup tab, and uncheck the applications that you don't want to load during start up.


4. Click ok once you are done.
5. Click the restart button to apply the changes.