public void AssemblyLoader_passed_non_WebsiteProject_can_find_correct_paths_to_DLLs() { const string vsInstallPath = @"C:\My\Test\VS\InstallPath"; const string projectPath = @"C:\My\Test\ProjectPath"; var project = MockDTE.CreateProject( new[] { MockDTE.CreateReference3( "EntityFramework", "6.0.0.0", "EntityFramework", Path.Combine(projectPath, "EntityFramework.dll")), MockDTE.CreateReference3( "EntityFramework.SqlServer", "6.0.0.0", "EntityFramework.SqlServer", Path.Combine(projectPath, "EntityFramework.SqlServer.dll")), MockDTE.CreateReference3( "EntityFramework.SqlServerCompact", "6.0.0.0", "EntityFramework.SqlServerCompact", Path.Combine(projectPath, "EntityFramework.SqlServerCompact.dll")), MockDTE.CreateReference3( "My.Project.Reference", "6.0.0.0", "My.Project.Reference", Path.Combine(projectPath, "My.Project.Reference.dll"), true) }); var assemblyLoader = new DatabaseGenerationAssemblyLoader(project, vsInstallPath); // assert that the DLLs installed under VS are resolved there Assert.Equal( Path.Combine(vsInstallPath, "EntityFramework.dll"), assemblyLoader.GetAssemblyPath("EntityFramework")); Assert.Equal( Path.Combine(vsInstallPath, "EntityFramework.SqlServer.dll"), assemblyLoader.GetAssemblyPath("EntityFramework.SqlServer")); Assert.Equal( Path.Combine(vsInstallPath, "EntityFramework.SqlServerCompact.dll"), assemblyLoader.GetAssemblyPath("EntityFramework.SqlServerCompact")); // assert that other project references are resolved to wherever their reference points to Assert.Equal( Path.Combine(projectPath, "My.Project.Reference.dll"), assemblyLoader.GetAssemblyPath("My.Project.Reference")); }