<commit_before>param($rootPath, $toolsPath, $package, $project)

function Get-ScriptDirectory {
  $Invoc = (Get-Variable MyInvocation -Scope 1).Value
  Split-Path $Invoc.MyCommand.Path
}

function get-content-source-from-frameworkname($frameworkname) {
  $id = $frameworkname.Identifier

  if($id -eq ".NETFramework") { $relative = "NET40" }
  if($id -eq "Silverlight" -and $frameworkname -eq "WindowsPhone") { $relative = "SL40-WindowsPhone" }
  if($id -eq "Silverlight" ) { $relative = "SL40" }
 
  [System.IO.Path]::Combine($root, $relative)
}
 
  $moniker = $project.Properties.Item("TargetFrameworkMoniker").Value
 
  $frameworkname = new-object System.Runtime.Versioning.FrameworkName($moniker)
 
  $contentSource = get-content-source-from-frameworkname $frameworkname

  ls $contentSource | foreach-object { $project.ProjectItems.AddFromFileCopy($_.FullName) }

  write-host "Source: " $contentSource  
  write-host "Identifier: " $frameworkname.Identifier  
  write-host "Version: " $frameworkname.Version 
  write-host "Profile: " $frameworkname.Profile

 
# WPF4 will be NETFramework,Version=v4.0,Profile=Client 
# SL4 will be Silverlight,Version=v4.0 
# WP7 will be Silverlight,Version=v4.0,Profile=WindowsPhone
<commit_msg>Moved framework name lookup into get-content-path<commit_after>param($rootPath, $toolsPath, $package, $project)

function Get-ScriptDirectory {
  $Invoc = (Get-Variable MyInvocation -Scope 1).Value
  Split-Path $Invoc.MyCommand.Path
}

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

  $id = $frameworkname.Identifier

  if($id -eq ".NETFramework") { $relative = "NET40" }
  if($id -eq "Silverlight" -and $frameworkname -eq "WindowsPhone") { $relative = "SL40-WindowsPhone" }
  if($id -eq "Silverlight" ) { $relative = "SL40" }
 
  [System.IO.Path]::Combine($root, $relative)
}
 
  $contentSource = get-content-path

  ls $contentSource | foreach-object { $project.ProjectItems.AddFromFileCopy($_.FullName) }

  write-host "Source: " $contentSource  
  write-host "Identifier: " $frameworkname.Identifier  
  write-host "Version: " $frameworkname.Version 
  write-host "Profile: " $frameworkname.Profile

 
# WPF4 will be NETFramework,Version=v4.0,Profile=Client 
# SL4 will be Silverlight,Version=v4.0 
# WP7 will be Silverlight,Version=v4.0,Profile=WindowsPhone

{'fraction_non_alphanumeric': 0.13815789473684212, 'fraction_numerical': 0.013157894736842105, 'mean_word_length': 5.022277227722772, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7425494', 'n_tokens_mistral': 814, 'n_tokens_neox': 772, 'n_words': 152}