{"action":"created","comment":{"url":"https://api.github.com/repos/nunit/nunit/pulls/comments/55113369","id":55113369,"diff_hunk":"@@ -0,0 +1,119 @@\n+Function Exec\n+{\n+    [CmdletBinding()]\n+    param (\n+        [Parameter(Position=0, Mandatory=1)]\n+        [scriptblock]$Command,\n+        [Parameter(Position=1, Mandatory=0)]\n+        [string]$ErrorMessage = \"Execution of command failed.`n$Command\"\n+    )\n+    $ErrorActionPreference = \"Continue\"\n+    & $Command 2>&1 | %{ \"$_\" }\n+    if ($LastExitCode -ne 0) {\n+        throw \"Exec: $ErrorMessage`nExit code: $LastExitCode\"\n+    }\n+}\n+\n+Function Bootstrap {\n+  [CmdletBinding()]\n+    Param()\n+\n+    Progress \"Bootstrap: Start\"\n+\n+    if(!(Test-Administrator)) \n+    {\n+        throw \"Current executing user is not an administrator, please check your settings and try again.\"\n+    }  \n+    Progress \"Adding GnuWin32 tools to PATH\"\n+    $env:PATH = \"C:\\Program Files (x86)\\Git\\bin;\" + $env:PATH\n+\n+    InstallCFTools\n+\n+    Progress \"Bootstrap: Done\"\n+}\n+\n+Function InstallCFTools {\n+  [CmdletBinding()]\n+  Param()\n+   $url= \"https://github.com/dicko2/CompactFrameworkBuildBins/raw/master/NETCFSetupv35.msi\";\n+    Progress (\"Downloading NETCFSetupv35 from: \" + $url)\n+    Invoke-WebRequest -Uri $url -OutFile NETCFSetupv35.msi\n+    \n+    $url= \"https://github.com/dicko2/CompactFrameworkBuildBins/raw/master/NETCFv35PowerToys.msi\";\n+    Progress (\"Downloading NETCFv35PowerToys from: \" + $url)\n+    Invoke-WebRequest -Uri $url -OutFile NETCFv35PowerToys.msi\n+    \n+    Progress(\"Running NETCFSetupv35 installer\")\n+  \n+    $msi = @(\"NETCFSetupv35.msi\",\"NETCFv35PowerToys.msi\")\n+    foreach ($msifile in $msi) \n+    {\n+    if(!(Test-Path($msi)))\n+    {\n+        throw \"MSI files are not present, please check logs.\"\n+    }\n+    Progress(\"Installing msi \" + $msifile )\n+    Start-Process -FilePath \"$env:systemroot\\system32\\msiexec.exe\" -ArgumentList \"/i `\"$msifile`\" /qn /norestart\" -Wait -WorkingDirectory $pwd  -RedirectStandardOutput stdout.txt -RedirectStandardError stderr.txt\n+    $OutputText = get-content stdout.txt\n+    Progress($OutputText)\n+    $OutputText = get-content stderr.txt\n+    Progress($OutputText) \n+    }\n+    if(!(Test-Path(\"C:\\Windows\\Microsoft.NET\\Framework\\v3.5\\Microsoft.CompactFramework.CSharp.targets\")))\n+    {\n+        throw \"Compact framework files not found after install, install may have failed, please check logs.\"\n+    }\n+    RegistryWorkAround\n+}\n+\n+Function Progress\n+{\n+    [CmdletBinding()]\n+    param (\n+        [Parameter(Position=0, Mandatory=0)]\n+        [string]$Message = \"\"\n+    )\n+    $ProgressMessage = '== ' + (Get-Date) + ': ' + $Message\n+\n+    Write-Host $ProgressMessage -ForegroundColor Magenta\n+}\n+\n+function Test-Administrator  \n+{  \n+    $user = [Security.Principal.WindowsIdentity]::GetCurrent();\n+    (New-Object Security.Principal.WindowsPrincipal $user).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)  \n+}\n+\n+function RegistryWorkAround\n+{\n+    ## http://community.sharpdevelop.net/forums/t/10548.aspx\n+    ## see above link for work around for error \n+    ## The \"AddHighDPIResource\" task failed unexpectedly.\n+    ## System.ArgumentNullException: Value cannot be null.\n+    ## Parameter name: path1 \n+    $registryPaths = @(\"HKLM:\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\Setup\\VS\",\"HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\VisualStudio\\9.0\\Setup\\VS\")\n+    ## not last reply in forum post about needing the entry in WOW is why there is two paths\n+    $Name = \"ProductDir\"\n+    $value = \"C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\"\n+    \n+    foreach($registryPath in $registryPaths)\n+    {\n+        If(!(Test-Path $registryPath))\n+        {\n+            New-Item -Path $registryPath -Force | Out-Null\n+        }\n+        If(!(Test-Path $registryPath+\"\\\"+$Name))\n+        {\n+        New-ItemProperty -Path $registryPath -Name $name -Value $value `\n+            -PropertyType String -Force | Out-Null\n+        }\n+        If(!((Get-ItemProperty -Path $registryPath -Name $Name).ProductDir -eq \"C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\"))\n+        {\n+            throw \"Registry path \" + $registryPath + \" not set to correct value, please check logs\"\n+        }\n+        else\n+        {\n+            Progress(\"Regsitrty update ok to value \" + (Get-ItemProperty -Path $registryPath -Name $Name).ProductDir)","path":"appveyor-tool.ps1","position":116,"original_position":116,"commit_id":"e8ae3e9207f0a5fb855bcded2cf1ef9d3163d191","original_commit_id":"e8ae3e9207f0a5fb855bcded2cf1ef9d3163d191","user":{"login":"CharliePoole","id":2678661,"avatar_url":"https://avatars.githubusercontent.com/u/2678661?v=3","gravatar_id":"","url":"https://api.github.com/users/CharliePoole","html_url":"https://github.com/CharliePoole","followers_url":"https://api.github.com/users/CharliePoole/followers","following_url":"https://api.github.com/users/CharliePoole/following{/other_user}","gists_url":"https://api.github.com/users/CharliePoole/gists{/gist_id}","starred_url":"https://api.github.com/users/CharliePoole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CharliePoole/subscriptions","organizations_url":"https://api.github.com/users/CharliePoole/orgs","repos_url":"https://api.github.com/users/CharliePoole/repos","events_url":"https://api.github.com/users/CharliePoole/events{/privacy}","received_events_url":"https://api.github.com/users/CharliePoole/received_events","type":"User","site_admin":false},"body":"Spelling. :-)","created_at":"2016-03-05T02:20:22Z","updated_at":"2016-03-05T02:20:22Z","html_url":"https://github.com/nunit/nunit/pull/1305#discussion_r55113369","pull_request_url":"https://api.github.com/repos/nunit/nunit/pulls/1305","_links":{"self":{"href":"https://api.github.com/repos/nunit/nunit/pulls/comments/55113369"},"html":{"href":"https://github.com/nunit/nunit/pull/1305#discussion_r55113369"},"pull_request":{"href":"https://api.github.com/repos/nunit/nunit/pulls/1305"}}},"pull_request":{"url":"https://api.github.com/repos/nunit/nunit/pulls/1305","id":61334178,"html_url":"https://github.com/nunit/nunit/pull/1305","diff_url":"https://github.com/nunit/nunit/pull/1305.diff","patch_url":"https://github.com/nunit/nunit/pull/1305.patch","issue_url":"https://api.github.com/repos/nunit/nunit/issues/1305","number":1305,"state":"open","locked":false,"title":"CF Build for Appveyor CI","user":{"login":"CharliePoole","id":2678661,"avatar_url":"https://avatars.githubusercontent.com/u/2678661?v=3","gravatar_id":"","url":"https://api.github.com/users/CharliePoole","html_url":"https://github.com/CharliePoole","followers_url":"https://api.github.com/users/CharliePoole/followers","following_url":"https://api.github.com/users/CharliePoole/following{/other_user}","gists_url":"https://api.github.com/users/CharliePoole/gists{/gist_id}","starred_url":"https://api.github.com/users/CharliePoole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CharliePoole/subscriptions","organizations_url":"https://api.github.com/users/CharliePoole/orgs","repos_url":"https://api.github.com/users/CharliePoole/repos","events_url":"https://api.github.com/users/CharliePoole/events{/privacy}","received_events_url":"https://api.github.com/users/CharliePoole/received_events","type":"User","site_admin":false},"body":"**Do Not Merge Yet - for discussion**\r\n\r\nI created this from PR #1304 incorporating @dicko2 's changes. It will be easier for us all to work with under the NUnit organization. See earlier comments on #1304.\r\n\r\nThis will fix #332 when merged. We won't merge it until after the 3.2 release, however.","created_at":"2016-03-02T00:43:17Z","updated_at":"2016-03-05T02:20:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"03dd88985111aa678f5d50a7466b0d21b81b6531","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nunit/nunit/pulls/1305/commits","review_comments_url":"https://api.github.com/repos/nunit/nunit/pulls/1305/comments","review_comment_url":"https://api.github.com/repos/nunit/nunit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nunit/nunit/issues/1305/comments","statuses_url":"https://api.github.com/repos/nunit/nunit/statuses/e8ae3e9207f0a5fb855bcded2cf1ef9d3163d191","head":{"label":"nunit:issue-332","ref":"issue-332","sha":"e8ae3e9207f0a5fb855bcded2cf1ef9d3163d191","user":{"login":"nunit","id":2678858,"avatar_url":"https://avatars.githubusercontent.com/u/2678858?v=3","gravatar_id":"","url":"https://api.github.com/users/nunit","html_url":"https://github.com/nunit","followers_url":"https://api.github.com/users/nunit/followers","following_url":"https://api.github.com/users/nunit/following{/other_user}","gists_url":"https://api.github.com/users/nunit/gists{/gist_id}","starred_url":"https://api.github.com/users/nunit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nunit/subscriptions","organizations_url":"https://api.github.com/users/nunit/orgs","repos_url":"https://api.github.com/users/nunit/repos","events_url":"https://api.github.com/users/nunit/events{/privacy}","received_events_url":"https://api.github.com/users/nunit/received_events","type":"Organization","site_admin":false},"repo":{"id":13692183,"name":"nunit","full_name":"nunit/nunit","owner":{"login":"nunit","id":2678858,"avatar_url":"https://avatars.githubusercontent.com/u/2678858?v=3","gravatar_id":"","url":"https://api.github.com/users/nunit","html_url":"https://github.com/nunit","followers_url":"https://api.github.com/users/nunit/followers","following_url":"https://api.github.com/users/nunit/following{/other_user}","gists_url":"https://api.github.com/users/nunit/gists{/gist_id}","starred_url":"https://api.github.com/users/nunit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nunit/subscriptions","organizations_url":"https://api.github.com/users/nunit/orgs","repos_url":"https://api.github.com/users/nunit/repos","events_url":"https://api.github.com/users/nunit/events{/privacy}","received_events_url":"https://api.github.com/users/nunit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nunit/nunit","description":"NUnit 3.0 framework, engine and console runner","fork":false,"url":"https://api.github.com/repos/nunit/nunit","forks_url":"https://api.github.com/repos/nunit/nunit/forks","keys_url":"https://api.github.com/repos/nunit/nunit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nunit/nunit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nunit/nunit/teams","hooks_url":"https://api.github.com/repos/nunit/nunit/hooks","issue_events_url":"https://api.github.com/repos/nunit/nunit/issues/events{/number}","events_url":"https://api.github.com/repos/nunit/nunit/events","assignees_url":"https://api.github.com/repos/nunit/nunit/assignees{/user}","branches_url":"https://api.github.com/repos/nunit/nunit/branches{/branch}","tags_url":"https://api.github.com/repos/nunit/nunit/tags","blobs_url":"https://api.github.com/repos/nunit/nunit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nunit/nunit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nunit/nunit/git/refs{/sha}","trees_url":"https://api.github.com/repos/nunit/nunit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nunit/nunit/statuses/{sha}","languages_url":"https://api.github.com/repos/nunit/nunit/languages","stargazers_url":"https://api.github.com/repos/nunit/nunit/stargazers","contributors_url":"https://api.github.com/repos/nunit/nunit/contributors","subscribers_url":"https://api.github.com/repos/nunit/nunit/subscribers","subscription_url":"https://api.github.com/repos/nunit/nunit/subscription","commits_url":"https://api.github.com/repos/nunit/nunit/commits{/sha}","git_commits_url":"https://api.github.com/repos/nunit/nunit/git/commits{/sha}","comments_url":"https://api.github.com/repos/nunit/nunit/comments{/number}","issue_comment_url":"https://api.github.com/repos/nunit/nunit/issues/comments{/number}","contents_url":"https://api.github.com/repos/nunit/nunit/contents/{+path}","compare_url":"https://api.github.com/repos/nunit/nunit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nunit/nunit/merges","archive_url":"https://api.github.com/repos/nunit/nunit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nunit/nunit/downloads","issues_url":"https://api.github.com/repos/nunit/nunit/issues{/number}","pulls_url":"https://api.github.com/repos/nunit/nunit/pulls{/number}","milestones_url":"https://api.github.com/repos/nunit/nunit/milestones{/number}","notifications_url":"https://api.github.com/repos/nunit/nunit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nunit/nunit/labels{/name}","releases_url":"https://api.github.com/repos/nunit/nunit/releases{/id}","deployments_url":"https://api.github.com/repos/nunit/nunit/deployments","created_at":"2013-10-18T23:43:29Z","updated_at":"2016-03-04T23:57:52Z","pushed_at":"2016-03-05T01:46:49Z","git_url":"git://github.com/nunit/nunit.git","ssh_url":"git@github.com:nunit/nunit.git","clone_url":"https://github.com/nunit/nunit.git","svn_url":"https://github.com/nunit/nunit","homepage":"http://www.nunit.org/","size":36182,"stargazers_count":566,"watchers_count":566,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":222,"mirror_url":null,"open_issues_count":208,"forks":222,"open_issues":208,"watchers":566,"default_branch":"master"}},"base":{"label":"nunit:master","ref":"master","sha":"4023dfcbaf731959293f0d44091932344d89fa85","user":{"login":"nunit","id":2678858,"avatar_url":"https://avatars.githubusercontent.com/u/2678858?v=3","gravatar_id":"","url":"https://api.github.com/users/nunit","html_url":"https://github.com/nunit","followers_url":"https://api.github.com/users/nunit/followers","following_url":"https://api.github.com/users/nunit/following{/other_user}","gists_url":"https://api.github.com/users/nunit/gists{/gist_id}","starred_url":"https://api.github.com/users/nunit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nunit/subscriptions","organizations_url":"https://api.github.com/users/nunit/orgs","repos_url":"https://api.github.com/users/nunit/repos","events_url":"https://api.github.com/users/nunit/events{/privacy}","received_events_url":"https://api.github.com/users/nunit/received_events","type":"Organization","site_admin":false},"repo":{"id":13692183,"name":"nunit","full_name":"nunit/nunit","owner":{"login":"nunit","id":2678858,"avatar_url":"https://avatars.githubusercontent.com/u/2678858?v=3","gravatar_id":"","url":"https://api.github.com/users/nunit","html_url":"https://github.com/nunit","followers_url":"https://api.github.com/users/nunit/followers","following_url":"https://api.github.com/users/nunit/following{/other_user}","gists_url":"https://api.github.com/users/nunit/gists{/gist_id}","starred_url":"https://api.github.com/users/nunit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nunit/subscriptions","organizations_url":"https://api.github.com/users/nunit/orgs","repos_url":"https://api.github.com/users/nunit/repos","events_url":"https://api.github.com/users/nunit/events{/privacy}","received_events_url":"https://api.github.com/users/nunit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nunit/nunit","description":"NUnit 3.0 framework, engine and console runner","fork":false,"url":"https://api.github.com/repos/nunit/nunit","forks_url":"https://api.github.com/repos/nunit/nunit/forks","keys_url":"https://api.github.com/repos/nunit/nunit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nunit/nunit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nunit/nunit/teams","hooks_url":"https://api.github.com/repos/nunit/nunit/hooks","issue_events_url":"https://api.github.com/repos/nunit/nunit/issues/events{/number}","events_url":"https://api.github.com/repos/nunit/nunit/events","assignees_url":"https://api.github.com/repos/nunit/nunit/assignees{/user}","branches_url":"https://api.github.com/repos/nunit/nunit/branches{/branch}","tags_url":"https://api.github.com/repos/nunit/nunit/tags","blobs_url":"https://api.github.com/repos/nunit/nunit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nunit/nunit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nunit/nunit/git/refs{/sha}","trees_url":"https://api.github.com/repos/nunit/nunit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nunit/nunit/statuses/{sha}","languages_url":"https://api.github.com/repos/nunit/nunit/languages","stargazers_url":"https://api.github.com/repos/nunit/nunit/stargazers","contributors_url":"https://api.github.com/repos/nunit/nunit/contributors","subscribers_url":"https://api.github.com/repos/nunit/nunit/subscribers","subscription_url":"https://api.github.com/repos/nunit/nunit/subscription","commits_url":"https://api.github.com/repos/nunit/nunit/commits{/sha}","git_commits_url":"https://api.github.com/repos/nunit/nunit/git/commits{/sha}","comments_url":"https://api.github.com/repos/nunit/nunit/comments{/number}","issue_comment_url":"https://api.github.com/repos/nunit/nunit/issues/comments{/number}","contents_url":"https://api.github.com/repos/nunit/nunit/contents/{+path}","compare_url":"https://api.github.com/repos/nunit/nunit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nunit/nunit/merges","archive_url":"https://api.github.com/repos/nunit/nunit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nunit/nunit/downloads","issues_url":"https://api.github.com/repos/nunit/nunit/issues{/number}","pulls_url":"https://api.github.com/repos/nunit/nunit/pulls{/number}","milestones_url":"https://api.github.com/repos/nunit/nunit/milestones{/number}","notifications_url":"https://api.github.com/repos/nunit/nunit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nunit/nunit/labels{/name}","releases_url":"https://api.github.com/repos/nunit/nunit/releases{/id}","deployments_url":"https://api.github.com/repos/nunit/nunit/deployments","created_at":"2013-10-18T23:43:29Z","updated_at":"2016-03-04T23:57:52Z","pushed_at":"2016-03-05T01:46:49Z","git_url":"git://github.com/nunit/nunit.git","ssh_url":"git@github.com:nunit/nunit.git","clone_url":"https://github.com/nunit/nunit.git","svn_url":"https://github.com/nunit/nunit","homepage":"http://www.nunit.org/","size":36182,"stargazers_count":566,"watchers_count":566,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":222,"mirror_url":null,"open_issues_count":208,"forks":222,"open_issues":208,"watchers":566,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nunit/nunit/pulls/1305"},"html":{"href":"https://github.com/nunit/nunit/pull/1305"},"issue":{"href":"https://api.github.com/repos/nunit/nunit/issues/1305"},"comments":{"href":"https://api.github.com/repos/nunit/nunit/issues/1305/comments"},"review_comments":{"href":"https://api.github.com/repos/nunit/nunit/pulls/1305/comments"},"review_comment":{"href":"https://api.github.com/repos/nunit/nunit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nunit/nunit/pulls/1305/commits"},"statuses":{"href":"https://api.github.com/repos/nunit/nunit/statuses/e8ae3e9207f0a5fb855bcded2cf1ef9d3163d191"}}}}