DeploymentItem breaks EntityFramework unit test in separate assembly

Problem is caused because the compiler doesn't output the EntityFramework.SqlServer.dll as it does not detect if it's used somewhere (it's only used through dependency injection). Simplest solution is to use one of the types of the assembly inside your test.

e.g. You can create a property or method (you don't need to use it, just exposing it as public is enough). To solve this problem I created a property inside a test helper:

public static System.Data.Entity.SqlServer.SqlProviderServices EnsureAssemblySqlServerIsCopied { get; set; }