프로젝트

일반

사용자정보

통계
| 브랜치(Branch): | 개정판:

markus / packages / EntityFramework.4.3.1 / tools / install.ps1 @ 3e55f781

이력 | 보기 | 이력해설 | 다운로드 (1.11 KB)

1 787a4489 KangIngu
param($installPath, $toolsPath, $package, $project)
2
3
$invoker = @"
4
public class ConnectionFactoryConfiguratorInvoker
5
{
6
    public static void Invoke(string assemblyPath, object project)
7
    {
8
        var appDomain = System.AppDomain.CreateDomain(
9
            "EntityFramework.PowerShell",
10
            null, 
11
            new System.AppDomainSetup { ShadowCopyFiles = "true" });
12
13
        appDomain.CreateInstanceFrom(
14
            assemblyPath, 
15
            "System.Data.Entity.ConnectionFactoryConfig.ConnectionFactoryConfigurator",
16
            false,
17
            0,
18
            null,
19
            new object[] { project },
20
            null,
21
            null);
22
23
        System.AppDomain.Unload(appDomain);
24
    }
25
}
26
"@
27
28
$version = (new-object System.Runtime.Versioning.FrameworkName($project.Properties.Item("TargetFrameworkMoniker").Value)).Version
29
30
if ($version -ge (new-object System.Version(4, 5)))
31
{
32
    $dte.ItemOperations.OpenFile((Join-Path $toolsPath 'EF4.3on.NET4.5Readme.txt'))
33
}
34
35
Add-Type -TypeDefinition $invoker
36
[ConnectionFactoryConfiguratorInvoker]::Invoke((Join-Path $toolsPath "EntityFramework.PowerShell.dll"), $project)
클립보드 이미지 추가 (최대 크기: 500 MB)