Statistics
| Branch: | Revision:

root / trunk / packages / Caliburn.Micro.1.2.0 / tools / install.ps1 @ 9bae55d1

History | View | Annotate | Download (1 kB)

1
param($rootPath, $toolsPath, $package, $project)
2

    
3
function get-content-path($contentRoot) {
4
	$moniker = $project.Properties.Item("TargetFrameworkMoniker").Value
5
	$frameworkname = new-object System.Runtime.Versioning.FrameworkName($moniker)
6

    
7
	$id = $frameworkname.Identifier
8

    
9
	if($id -eq ".NETFramework") { $relative = "NET40" }
10
	elseif($id -eq "Silverlight" -and $frameworkname.Profile -eq "WindowsPhone") { $relative = "SL40-WP" }
11
	elseif($id -eq "Silverlight" ) { $relative = "SL40" }
12
 
13
	[System.IO.Path]::Combine($contentRoot, $relative)
14
}
15
 
16
$contentSource = get-content-path($rootPath + "\tools")
17
$defaultNamespace = $project.Properties.Item("DefaultNamespace").Value
18

    
19
ls $contentSource | foreach-object { 
20
	$content = [System.IO.File]::ReadAllText($_.FullName)
21
	$content = $content.Replace('$safeprojectname$', $defaultNamespace)
22
	$content | out-file -Encoding UTF8 $_.FullName
23
	$project.ProjectItems.AddFromFileCopy($_.FullName)
24
}
25

    
26
$project.DTE.ItemOperations.Navigate('http://caliburnmicro.codeplex.com/wikipage?title=Nuget')