Fix: Visual Studio Test project – The Entity Framework provider type ‘System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer’ registered in the application config

 

After installing the NugetPackage EntityFramework in a .NET 4.5.2 Visual Studio Test project, using an EntityFramework DbContext would throw an exception during test run:

 

The Entity Framework provider type ‘System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer’ registered in the application config file for the ADO.NET provider with invariant name ‘System.Data.SqlClient’ could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information.

 

This can be fixed, by touching the System.Data.Entity.SqlServer.SqlProviderServices.Instance in your test project, e.g. by adding a property that returns the System.Data.Entity.SqlServer.SqlProviderServices.Instance to the Test class.

 

[TestClass]

public class MyTest

{

 

public System.Data.Entity.SqlServer.SqlProviderServices SqlServerInstance { get { return System.Data.Entity.SqlServer.SqlProviderServices.Instance; } }

}

 

 

More information can be found at:

http://robsneuron.blogspot.com/2013/11/entity-framework-upgrade-to-6.html

 

 

Fix – Microsoft Visual Studio 2017 – v15.7.4 can’t checkout / switch to some git branches

I could checkout Dev, but I could not checkout master, but after some time, I could checkout the branches master, Acc and Test but not Dev.

When clicking on another branch name, Visual Studio wouldn’t do anything:

After unchecking the checkbox: “Checkout branches asynchronously when possible (Experimental)”, the problem was fixed and I could checkout all branches again.