diff --git a/.gitignore b/.gitignore index 00cd02d504..9f7ec8f882 100644 --- a/.gitignore +++ b/.gitignore @@ -235,6 +235,5 @@ $RECYCLE.BIN/ AkavacheSqliteLinkerOverride.cs NuGetBuild WiX.Toolset.DummyFile.txt -nunit-UnitTests.xml -nunit-TrackingCollectionTests.xml +nunit-*.xml GitHubVS.sln.DotSettings diff --git a/Build-Solution.cmd b/Build-Solution.cmd deleted file mode 100644 index 822884e5cc..0000000000 --- a/Build-Solution.cmd +++ /dev/null @@ -1 +0,0 @@ -Powershell -ExecutionPolicy Unrestricted %~dp0Build-Solution.ps1 \ No newline at end of file diff --git a/Build-Solution.ps1 b/Build-Solution.ps1 deleted file mode 100644 index 5e78326dce..0000000000 --- a/Build-Solution.ps1 +++ /dev/null @@ -1,147 +0,0 @@ -param( - [ValidateSet('Full', 'Tests', 'Build', 'Clean')] - [string] - $build = "Build" - , - [ValidateSet('Debug', 'Release')] - [string] - $config = "Release" - , - [ValidateSet('Any CPU', 'x86', 'x64')] - [string] - $platform = "Any CPU" - , - [string] - $verbosity = "minimal" -) - -$rootDirectory = Split-Path $MyInvocation.MyCommand.Path -$projFile = join-path $rootDirectory GitHubVS.msbuild -$msbuild = "C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" - -function Die([string]$message, [object[]]$output) { - if ($output) { - Write-Output $output - $message += ". See output above." - } - Throw (New-Object -TypeName ScriptException -ArgumentList $message) -} - -function Run-Command([scriptblock]$Command, [switch]$Fatal, [switch]$Quiet) { - $output = "" - if ($Quiet) { - $output = & $Command 2>&1 - } else { - & $Command - } - - if (!$Fatal) { - return - } - - $exitCode = 0 - if (!$? -and $LastExitCode -ne 0) { - $exitCode = $LastExitCode - } elseif (!$?) { - $exitCode = 1 - } else { - return - } - - Die "``$Command`` failed" $output -} - -function Run-XUnit([string]$project, [int]$timeoutDuration, [string]$configuration) { - $dll = "src\$project\bin\$configuration\$project.dll" - - $xunitDirectory = Join-Path $rootDirectory packages\xunit.runner.console.2.1.0\tools - $consoleRunner = Join-Path $xunitDirectory xunit.console.x86.exe - $xml = Join-Path $rootDirectory "nunit-$project.xml" - $outputPath = [System.IO.Path]::GetTempFileName() - - $args = $dll, "-noshadow", "-xml", $xml, "-parallel", "all" - [object[]] $output = "$consoleRunner " + ($args -join " ") - - $process = Start-Process -PassThru -NoNewWindow -RedirectStandardOutput $outputPath $consoleRunner ($args | %{ "`"$_`"" }) - Wait-Process -InputObject $process -Timeout $timeoutDuration -ErrorAction SilentlyContinue - if ($process.HasExited) { - $output += Get-Content $outputPath - $exitCode = $process.ExitCode - } else { - $output += "Tests timed out. Backtrace:" - $output += Get-DotNetStack $process.Id - $exitCode = 9999 - } - Stop-Process -InputObject $process - Remove-Item $outputPath - - $result = New-Object System.Object - $result | Add-Member -Type NoteProperty -Name Output -Value $output - $result | Add-Member -Type NoteProperty -Name ExitCode -Value $exitCode - $result -} - -function Run-NUnit([string]$project, [int]$timeoutDuration, [string]$configuration) { - $dll = "src\$project\bin\$configuration\$project.dll" - - $nunitDirectory = Join-Path $rootDirectory packages\NUnit.Runners.2.6.4\tools - $consoleRunner = Join-Path $nunitDirectory nunit-console-x86.exe - $xml = Join-Path $rootDirectory "nunit-$project.xml" - $outputPath = [System.IO.Path]::GetTempFileName() - - $args = "-noshadow", "-xml:$xml", "-framework:net-4.5", "-exclude:Timings", $dll - [object[]] $output = "$consoleRunner " + ($args -join " ") - - $process = Start-Process -PassThru -NoNewWindow -RedirectStandardOutput $outputPath $consoleRunner ($args | %{ "`"$_`"" }) - Wait-Process -InputObject $process -Timeout $timeoutDuration -ErrorAction SilentlyContinue - if ($process.HasExited) { - $output += Get-Content $outputPath - $exitCode = $process.ExitCode - } else { - $output += "Tests timed out. Backtrace:" - $output += Get-DotNetStack $process.Id - $exitCode = 9999 - } - - Stop-Process -InputObject $process - Remove-Item $outputPath - - $result = New-Object System.Object - $result | Add-Member -Type NoteProperty -Name Output -Value $output - $result | Add-Member -Type NoteProperty -Name ExitCode -Value $exitCode - $result -} - -function Build-Solution([string]$solution) { - Run-Command -Fatal { & $msbuild $solution /t:Build /property:Configuration=$config /verbosity:$verbosity /p:VisualStudioVersion=14.0 /p:DeployExtension=false } -} - -Write-Output "Building GitHub for Visual Studio..." -Write-Output "" - -Build-Solution GitHubVs.sln - -$exitCode = 0 - -Write-Output "Running Unit Tests..." -$result = Run-XUnit UnitTests 180 $config -if ($result.ExitCode -eq 0) { - # Print out the test result summary. - Write-Output $result.Output[-1] -} else { - $exitCode = $result.ExitCode - Write-Output $result.Output -} - -Write-Output "Running TrackingCollection Tests..." -$result = Run-NUnit TrackingCollectionTests 180 $config -if ($result.ExitCode -eq 0) { - # Print out the test result summary. - Write-Output $result.Output[-3] -} else { - $exitCode = $result.ExitCode - Write-Output $result.Output -} -Write-Output "" - -exit $exitCode \ No newline at end of file diff --git a/GitHubVS.sln b/GitHubVS.sln index 7f6a1bbe38..5181df1986 100644 --- a/GitHubVS.sln +++ b/GitHubVS.sln @@ -29,30 +29,25 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Submodules", "Submodules", EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Modules", "Modules", "{8E1F1B4E-AEA2-4AB1-8F73-423A903550A1}" ProjectSection(SolutionItems) = preProject - script\Modules\BuildUtils.psm1 = script\Modules\BuildUtils.psm1 - script\Modules\Debugging.psm1 = script\Modules\Debugging.psm1 - script\Modules\Vsix.psm1 = script\Modules\Vsix.psm1 + scripts\Modules\BuildUtils.psm1 = scripts\Modules\BuildUtils.psm1 + scripts\Modules\Debugging.psm1 = scripts\Modules\Debugging.psm1 + scripts\Modules\Vsix.psm1 = scripts\Modules\Vsix.psm1 EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Script", "Script", "{7B6C5F8D-14B3-443D-B044-0E209AE12BDF}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Scripts", "Scripts", "{7B6C5F8D-14B3-443D-B044-0E209AE12BDF}" ProjectSection(SolutionItems) = preProject .gitattributes = .gitattributes .gitignore = .gitignore - script\Announce.ps1 = script\Announce.ps1 - script\Bootstrap.ps1 = script\Bootstrap.ps1 - build.cmd = build.cmd - script\Bump-Version.ps1 = script\Bump-Version.ps1 - script\cibuild.ps1 = script\cibuild.ps1 - script\common.ps1 = script\common.ps1 - script\Deploy.ps1 = script\Deploy.ps1 - script\Get-CheckedOutBranch.ps1 = script\Get-CheckedOutBranch.ps1 - script\Get-HeadSha1.ps1 = script\Get-HeadSha1.ps1 - script\HubotTell-NativeRoom.ps1 = script\HubotTell-NativeRoom.ps1 + scripts\build.ps1 = scripts\build.ps1 + scripts\Bump-Version.ps1 = scripts\Bump-Version.ps1 + scripts\common.ps1 = scripts\common.ps1 + scripts\Get-CheckedOutBranch.ps1 = scripts\Get-CheckedOutBranch.ps1 + scripts\Get-HeadSha1.ps1 = scripts\Get-HeadSha1.ps1 nuget.config = nuget.config - script\Require-CleanWorkTree.ps1 = script\Require-CleanWorkTree.ps1 - script\Run-NUnit.ps1 = script\Run-NUnit.ps1 - script\Run-XUnit.ps1 = script\Run-XUnit.ps1 - script\Upload-DirectoryToS3.ps1 = script\Upload-DirectoryToS3.ps1 + scripts\Require-CleanWorkTree.ps1 = scripts\Require-CleanWorkTree.ps1 + scripts\Run-NUnit.ps1 = scripts\Run-NUnit.ps1 + scripts\Run-Tests.ps1 = scripts\Run-Tests.ps1 + scripts\Run-XUnit.ps1 = scripts\Run-XUnit.ps1 EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{8A7DA2E7-262B-4581-807A-1C45CE79CDFD}" @@ -93,8 +88,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Splat-Portable", "submodule EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CredentialManagement", "src\CredentialManagement\CredentialManagement.csproj", "{41A47C5B-C606-45B4-B83C-22B9239E4DA0}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReactiveUI.Testing_Net45", "submodules\reactiveui\ReactiveUI.Testing\ReactiveUI.Testing_Net45.csproj", "{DD99FD0F-82F6-4C30-930E-4A1D0DF01D65}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TrackingCollectionTests", "src\TrackingCollectionTests\TrackingCollectionTests.csproj", "{7B835A7D-CF94-45E8-B191-96F5A4FE26A8}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.TeamFoundation.14", "src\GitHub.TeamFoundation.14\GitHub.TeamFoundation.14.csproj", "{161DBF01-1DBF-4B00-8551-C5C00F26720D}" @@ -114,354 +107,302 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU - Debug|x86 = Debug|x86 - Publish|Any CPU = Publish|Any CPU - Publish|x86 = Publish|x86 + DebugCodeAnalysis|Any CPU = DebugCodeAnalysis|Any CPU + DebugWithoutVsix|Any CPU = DebugWithoutVsix|Any CPU Release|Any CPU = Release|Any CPU - Release|x86 = Release|x86 + ReleaseWithoutVsix|Any CPU = ReleaseWithoutVsix|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {11569514-5AE5-4B5B-92A2-F10B0967DE5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {11569514-5AE5-4B5B-92A2-F10B0967DE5F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {11569514-5AE5-4B5B-92A2-F10B0967DE5F}.Debug|x86.ActiveCfg = Debug|Any CPU - {11569514-5AE5-4B5B-92A2-F10B0967DE5F}.Debug|x86.Build.0 = Debug|Any CPU - {11569514-5AE5-4B5B-92A2-F10B0967DE5F}.Publish|Any CPU.ActiveCfg = Release|Any CPU - {11569514-5AE5-4B5B-92A2-F10B0967DE5F}.Publish|x86.ActiveCfg = Release|Any CPU - {11569514-5AE5-4B5B-92A2-F10B0967DE5F}.Publish|x86.Build.0 = Release|Any CPU + {11569514-5AE5-4B5B-92A2-F10B0967DE5F}.DebugCodeAnalysis|Any CPU.ActiveCfg = DebugCodeAnalysis|Any CPU + {11569514-5AE5-4B5B-92A2-F10B0967DE5F}.DebugCodeAnalysis|Any CPU.Build.0 = DebugCodeAnalysis|Any CPU + {11569514-5AE5-4B5B-92A2-F10B0967DE5F}.DebugWithoutVsix|Any CPU.ActiveCfg = DebugWithoutVsix|Any CPU + {11569514-5AE5-4B5B-92A2-F10B0967DE5F}.DebugWithoutVsix|Any CPU.Build.0 = DebugWithoutVsix|Any CPU {11569514-5AE5-4B5B-92A2-F10B0967DE5F}.Release|Any CPU.ActiveCfg = Release|Any CPU {11569514-5AE5-4B5B-92A2-F10B0967DE5F}.Release|Any CPU.Build.0 = Release|Any CPU - {11569514-5AE5-4B5B-92A2-F10B0967DE5F}.Release|x86.ActiveCfg = Release|Any CPU - {11569514-5AE5-4B5B-92A2-F10B0967DE5F}.Release|x86.Build.0 = Release|Any CPU + {11569514-5AE5-4B5B-92A2-F10B0967DE5F}.ReleaseWithoutVsix|Any CPU.ActiveCfg = ReleaseWithoutVsix|Any CPU + {11569514-5AE5-4B5B-92A2-F10B0967DE5F}.ReleaseWithoutVsix|Any CPU.Build.0 = ReleaseWithoutVsix|Any CPU {596595A6-2A3C-469E-9386-9E3767D863A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {596595A6-2A3C-469E-9386-9E3767D863A5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {596595A6-2A3C-469E-9386-9E3767D863A5}.Debug|x86.ActiveCfg = Debug|Any CPU - {596595A6-2A3C-469E-9386-9E3767D863A5}.Debug|x86.Build.0 = Debug|Any CPU - {596595A6-2A3C-469E-9386-9E3767D863A5}.Publish|Any CPU.ActiveCfg = Release|Any CPU - {596595A6-2A3C-469E-9386-9E3767D863A5}.Publish|x86.ActiveCfg = Release|Any CPU - {596595A6-2A3C-469E-9386-9E3767D863A5}.Publish|x86.Build.0 = Release|Any CPU + {596595A6-2A3C-469E-9386-9E3767D863A5}.DebugCodeAnalysis|Any CPU.ActiveCfg = Debug|Any CPU + {596595A6-2A3C-469E-9386-9E3767D863A5}.DebugCodeAnalysis|Any CPU.Build.0 = Debug|Any CPU + {596595A6-2A3C-469E-9386-9E3767D863A5}.DebugWithoutVsix|Any CPU.ActiveCfg = Debug|Any CPU + {596595A6-2A3C-469E-9386-9E3767D863A5}.DebugWithoutVsix|Any CPU.Build.0 = Debug|Any CPU {596595A6-2A3C-469E-9386-9E3767D863A5}.Release|Any CPU.ActiveCfg = Release|Any CPU {596595A6-2A3C-469E-9386-9E3767D863A5}.Release|Any CPU.Build.0 = Release|Any CPU - {596595A6-2A3C-469E-9386-9E3767D863A5}.Release|x86.ActiveCfg = Release|Any CPU - {596595A6-2A3C-469E-9386-9E3767D863A5}.Release|x86.Build.0 = Release|Any CPU + {596595A6-2A3C-469E-9386-9E3767D863A5}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {596595A6-2A3C-469E-9386-9E3767D863A5}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU {346384DD-2445-4A28-AF22-B45F3957BD89}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {346384DD-2445-4A28-AF22-B45F3957BD89}.Debug|Any CPU.Build.0 = Debug|Any CPU - {346384DD-2445-4A28-AF22-B45F3957BD89}.Debug|x86.ActiveCfg = Debug|Any CPU - {346384DD-2445-4A28-AF22-B45F3957BD89}.Debug|x86.Build.0 = Debug|Any CPU - {346384DD-2445-4A28-AF22-B45F3957BD89}.Publish|Any CPU.ActiveCfg = Release|Any CPU - {346384DD-2445-4A28-AF22-B45F3957BD89}.Publish|x86.ActiveCfg = Release|Any CPU - {346384DD-2445-4A28-AF22-B45F3957BD89}.Publish|x86.Build.0 = Release|Any CPU + {346384DD-2445-4A28-AF22-B45F3957BD89}.DebugCodeAnalysis|Any CPU.ActiveCfg = DebugCodeAnalysis|Any CPU + {346384DD-2445-4A28-AF22-B45F3957BD89}.DebugCodeAnalysis|Any CPU.Build.0 = DebugCodeAnalysis|Any CPU + {346384DD-2445-4A28-AF22-B45F3957BD89}.DebugWithoutVsix|Any CPU.ActiveCfg = Debug|Any CPU + {346384DD-2445-4A28-AF22-B45F3957BD89}.DebugWithoutVsix|Any CPU.Build.0 = Debug|Any CPU {346384DD-2445-4A28-AF22-B45F3957BD89}.Release|Any CPU.ActiveCfg = Release|Any CPU {346384DD-2445-4A28-AF22-B45F3957BD89}.Release|Any CPU.Build.0 = Release|Any CPU - {346384DD-2445-4A28-AF22-B45F3957BD89}.Release|x86.ActiveCfg = Release|Any CPU - {346384DD-2445-4A28-AF22-B45F3957BD89}.Release|x86.Build.0 = Release|Any CPU + {346384DD-2445-4A28-AF22-B45F3957BD89}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {346384DD-2445-4A28-AF22-B45F3957BD89}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU {158B05E8-FDBC-4D71-B871-C96E28D5ADF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {158B05E8-FDBC-4D71-B871-C96E28D5ADF5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {158B05E8-FDBC-4D71-B871-C96E28D5ADF5}.Debug|x86.ActiveCfg = Debug|Any CPU - {158B05E8-FDBC-4D71-B871-C96E28D5ADF5}.Debug|x86.Build.0 = Debug|Any CPU - {158B05E8-FDBC-4D71-B871-C96E28D5ADF5}.Publish|Any CPU.ActiveCfg = Release|Any CPU - {158B05E8-FDBC-4D71-B871-C96E28D5ADF5}.Publish|x86.ActiveCfg = Release|Any CPU - {158B05E8-FDBC-4D71-B871-C96E28D5ADF5}.Publish|x86.Build.0 = Release|Any CPU + {158B05E8-FDBC-4D71-B871-C96E28D5ADF5}.DebugCodeAnalysis|Any CPU.ActiveCfg = DebugCodeAnalysis|Any CPU + {158B05E8-FDBC-4D71-B871-C96E28D5ADF5}.DebugCodeAnalysis|Any CPU.Build.0 = DebugCodeAnalysis|Any CPU + {158B05E8-FDBC-4D71-B871-C96E28D5ADF5}.DebugWithoutVsix|Any CPU.ActiveCfg = Debug|Any CPU + {158B05E8-FDBC-4D71-B871-C96E28D5ADF5}.DebugWithoutVsix|Any CPU.Build.0 = Debug|Any CPU {158B05E8-FDBC-4D71-B871-C96E28D5ADF5}.Release|Any CPU.ActiveCfg = Release|Any CPU {158B05E8-FDBC-4D71-B871-C96E28D5ADF5}.Release|Any CPU.Build.0 = Release|Any CPU - {158B05E8-FDBC-4D71-B871-C96E28D5ADF5}.Release|x86.ActiveCfg = Release|Any CPU - {158B05E8-FDBC-4D71-B871-C96E28D5ADF5}.Release|x86.Build.0 = Release|Any CPU + {158B05E8-FDBC-4D71-B871-C96E28D5ADF5}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {158B05E8-FDBC-4D71-B871-C96E28D5ADF5}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU {6AFE2E2D-6DB0-4430-A2EA-F5F5388D2F78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6AFE2E2D-6DB0-4430-A2EA-F5F5388D2F78}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6AFE2E2D-6DB0-4430-A2EA-F5F5388D2F78}.Debug|x86.ActiveCfg = Debug|Any CPU - {6AFE2E2D-6DB0-4430-A2EA-F5F5388D2F78}.Debug|x86.Build.0 = Debug|Any CPU - {6AFE2E2D-6DB0-4430-A2EA-F5F5388D2F78}.Publish|Any CPU.ActiveCfg = Release|Any CPU - {6AFE2E2D-6DB0-4430-A2EA-F5F5388D2F78}.Publish|x86.ActiveCfg = Release|Any CPU - {6AFE2E2D-6DB0-4430-A2EA-F5F5388D2F78}.Publish|x86.Build.0 = Release|Any CPU + {6AFE2E2D-6DB0-4430-A2EA-F5F5388D2F78}.DebugCodeAnalysis|Any CPU.ActiveCfg = DebugCodeAnalysis|Any CPU + {6AFE2E2D-6DB0-4430-A2EA-F5F5388D2F78}.DebugCodeAnalysis|Any CPU.Build.0 = DebugCodeAnalysis|Any CPU + {6AFE2E2D-6DB0-4430-A2EA-F5F5388D2F78}.DebugWithoutVsix|Any CPU.ActiveCfg = Debug|Any CPU + {6AFE2E2D-6DB0-4430-A2EA-F5F5388D2F78}.DebugWithoutVsix|Any CPU.Build.0 = Debug|Any CPU {6AFE2E2D-6DB0-4430-A2EA-F5F5388D2F78}.Release|Any CPU.ActiveCfg = Release|Any CPU {6AFE2E2D-6DB0-4430-A2EA-F5F5388D2F78}.Release|Any CPU.Build.0 = Release|Any CPU - {6AFE2E2D-6DB0-4430-A2EA-F5F5388D2F78}.Release|x86.ActiveCfg = Release|Any CPU - {6AFE2E2D-6DB0-4430-A2EA-F5F5388D2F78}.Release|x86.Build.0 = Release|Any CPU + {6AFE2E2D-6DB0-4430-A2EA-F5F5388D2F78}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {6AFE2E2D-6DB0-4430-A2EA-F5F5388D2F78}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU {6559E128-8B40-49A5-85A8-05565ED0C7E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6559E128-8B40-49A5-85A8-05565ED0C7E3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6559E128-8B40-49A5-85A8-05565ED0C7E3}.Debug|x86.ActiveCfg = Debug|Any CPU - {6559E128-8B40-49A5-85A8-05565ED0C7E3}.Debug|x86.Build.0 = Debug|Any CPU - {6559E128-8B40-49A5-85A8-05565ED0C7E3}.Publish|Any CPU.ActiveCfg = Release|Any CPU - {6559E128-8B40-49A5-85A8-05565ED0C7E3}.Publish|x86.ActiveCfg = Release|Any CPU - {6559E128-8B40-49A5-85A8-05565ED0C7E3}.Publish|x86.Build.0 = Release|Any CPU + {6559E128-8B40-49A5-85A8-05565ED0C7E3}.DebugCodeAnalysis|Any CPU.ActiveCfg = DebugCodeAnalysis|Any CPU + {6559E128-8B40-49A5-85A8-05565ED0C7E3}.DebugCodeAnalysis|Any CPU.Build.0 = DebugCodeAnalysis|Any CPU + {6559E128-8B40-49A5-85A8-05565ED0C7E3}.DebugWithoutVsix|Any CPU.ActiveCfg = Debug|Any CPU + {6559E128-8B40-49A5-85A8-05565ED0C7E3}.DebugWithoutVsix|Any CPU.Build.0 = Debug|Any CPU {6559E128-8B40-49A5-85A8-05565ED0C7E3}.Release|Any CPU.ActiveCfg = Release|Any CPU {6559E128-8B40-49A5-85A8-05565ED0C7E3}.Release|Any CPU.Build.0 = Release|Any CPU - {6559E128-8B40-49A5-85A8-05565ED0C7E3}.Release|x86.ActiveCfg = Release|Any CPU - {6559E128-8B40-49A5-85A8-05565ED0C7E3}.Release|x86.Build.0 = Release|Any CPU + {6559E128-8B40-49A5-85A8-05565ED0C7E3}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {6559E128-8B40-49A5-85A8-05565ED0C7E3}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU {1A1DA411-8D1F-4578-80A6-04576BEA2DC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1A1DA411-8D1F-4578-80A6-04576BEA2DC5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1A1DA411-8D1F-4578-80A6-04576BEA2DC5}.Debug|x86.ActiveCfg = Debug|Any CPU - {1A1DA411-8D1F-4578-80A6-04576BEA2DC5}.Debug|x86.Build.0 = Debug|Any CPU - {1A1DA411-8D1F-4578-80A6-04576BEA2DC5}.Publish|Any CPU.ActiveCfg = Release|Any CPU - {1A1DA411-8D1F-4578-80A6-04576BEA2DC5}.Publish|x86.ActiveCfg = Release|Any CPU - {1A1DA411-8D1F-4578-80A6-04576BEA2DC5}.Publish|x86.Build.0 = Release|Any CPU + {1A1DA411-8D1F-4578-80A6-04576BEA2DC5}.DebugCodeAnalysis|Any CPU.ActiveCfg = DebugCodeAnalysis|Any CPU + {1A1DA411-8D1F-4578-80A6-04576BEA2DC5}.DebugCodeAnalysis|Any CPU.Build.0 = DebugCodeAnalysis|Any CPU + {1A1DA411-8D1F-4578-80A6-04576BEA2DC5}.DebugWithoutVsix|Any CPU.ActiveCfg = Debug|Any CPU + {1A1DA411-8D1F-4578-80A6-04576BEA2DC5}.DebugWithoutVsix|Any CPU.Build.0 = Debug|Any CPU {1A1DA411-8D1F-4578-80A6-04576BEA2DC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {1A1DA411-8D1F-4578-80A6-04576BEA2DC5}.Release|Any CPU.Build.0 = Release|Any CPU - {1A1DA411-8D1F-4578-80A6-04576BEA2DC5}.Release|x86.ActiveCfg = Release|Any CPU - {1A1DA411-8D1F-4578-80A6-04576BEA2DC5}.Release|x86.Build.0 = Release|Any CPU + {1A1DA411-8D1F-4578-80A6-04576BEA2DC5}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {1A1DA411-8D1F-4578-80A6-04576BEA2DC5}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU {9AEA02DB-02B5-409C-B0CA-115D05331A6B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9AEA02DB-02B5-409C-B0CA-115D05331A6B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9AEA02DB-02B5-409C-B0CA-115D05331A6B}.Debug|x86.ActiveCfg = Debug|Any CPU - {9AEA02DB-02B5-409C-B0CA-115D05331A6B}.Debug|x86.Build.0 = Debug|Any CPU - {9AEA02DB-02B5-409C-B0CA-115D05331A6B}.Publish|Any CPU.ActiveCfg = Release|Any CPU - {9AEA02DB-02B5-409C-B0CA-115D05331A6B}.Publish|x86.ActiveCfg = Release|Any CPU - {9AEA02DB-02B5-409C-B0CA-115D05331A6B}.Publish|x86.Build.0 = Release|Any CPU + {9AEA02DB-02B5-409C-B0CA-115D05331A6B}.DebugCodeAnalysis|Any CPU.ActiveCfg = DebugCodeAnalysis|Any CPU + {9AEA02DB-02B5-409C-B0CA-115D05331A6B}.DebugCodeAnalysis|Any CPU.Build.0 = DebugCodeAnalysis|Any CPU + {9AEA02DB-02B5-409C-B0CA-115D05331A6B}.DebugWithoutVsix|Any CPU.ActiveCfg = Debug|Any CPU + {9AEA02DB-02B5-409C-B0CA-115D05331A6B}.DebugWithoutVsix|Any CPU.Build.0 = Debug|Any CPU {9AEA02DB-02B5-409C-B0CA-115D05331A6B}.Release|Any CPU.ActiveCfg = Release|Any CPU {9AEA02DB-02B5-409C-B0CA-115D05331A6B}.Release|Any CPU.Build.0 = Release|Any CPU - {9AEA02DB-02B5-409C-B0CA-115D05331A6B}.Release|x86.ActiveCfg = Release|Any CPU - {9AEA02DB-02B5-409C-B0CA-115D05331A6B}.Release|x86.Build.0 = Release|Any CPU + {9AEA02DB-02B5-409C-B0CA-115D05331A6B}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {9AEA02DB-02B5-409C-B0CA-115D05331A6B}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU {B389ADAF-62CC-486E-85B4-2D8B078DF763}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B389ADAF-62CC-486E-85B4-2D8B078DF763}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B389ADAF-62CC-486E-85B4-2D8B078DF763}.Debug|x86.ActiveCfg = Debug|Any CPU - {B389ADAF-62CC-486E-85B4-2D8B078DF763}.Debug|x86.Build.0 = Debug|Any CPU - {B389ADAF-62CC-486E-85B4-2D8B078DF763}.Publish|Any CPU.ActiveCfg = Release|Any CPU - {B389ADAF-62CC-486E-85B4-2D8B078DF763}.Publish|x86.ActiveCfg = Release|Any CPU - {B389ADAF-62CC-486E-85B4-2D8B078DF763}.Publish|x86.Build.0 = Release|Any CPU + {B389ADAF-62CC-486E-85B4-2D8B078DF763}.DebugCodeAnalysis|Any CPU.ActiveCfg = DebugCodeAnalysis|Any CPU + {B389ADAF-62CC-486E-85B4-2D8B078DF763}.DebugCodeAnalysis|Any CPU.Build.0 = DebugCodeAnalysis|Any CPU + {B389ADAF-62CC-486E-85B4-2D8B078DF763}.DebugWithoutVsix|Any CPU.ActiveCfg = Debug|Any CPU + {B389ADAF-62CC-486E-85B4-2D8B078DF763}.DebugWithoutVsix|Any CPU.Build.0 = Debug|Any CPU {B389ADAF-62CC-486E-85B4-2D8B078DF763}.Release|Any CPU.ActiveCfg = Release|Any CPU {B389ADAF-62CC-486E-85B4-2D8B078DF763}.Release|Any CPU.Build.0 = Release|Any CPU - {B389ADAF-62CC-486E-85B4-2D8B078DF763}.Release|x86.ActiveCfg = Release|Any CPU - {B389ADAF-62CC-486E-85B4-2D8B078DF763}.Release|x86.Build.0 = Release|Any CPU + {B389ADAF-62CC-486E-85B4-2D8B078DF763}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {B389ADAF-62CC-486E-85B4-2D8B078DF763}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU {E4ED0537-D1D9-44B6-9212-3096D7C3F7A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E4ED0537-D1D9-44B6-9212-3096D7C3F7A1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E4ED0537-D1D9-44B6-9212-3096D7C3F7A1}.Debug|x86.ActiveCfg = Debug|Any CPU - {E4ED0537-D1D9-44B6-9212-3096D7C3F7A1}.Debug|x86.Build.0 = Debug|Any CPU - {E4ED0537-D1D9-44B6-9212-3096D7C3F7A1}.Publish|Any CPU.ActiveCfg = Release|Any CPU - {E4ED0537-D1D9-44B6-9212-3096D7C3F7A1}.Publish|x86.ActiveCfg = Release|Any CPU - {E4ED0537-D1D9-44B6-9212-3096D7C3F7A1}.Publish|x86.Build.0 = Release|Any CPU + {E4ED0537-D1D9-44B6-9212-3096D7C3F7A1}.DebugCodeAnalysis|Any CPU.ActiveCfg = DebugCodeAnalysis|Any CPU + {E4ED0537-D1D9-44B6-9212-3096D7C3F7A1}.DebugCodeAnalysis|Any CPU.Build.0 = DebugCodeAnalysis|Any CPU + {E4ED0537-D1D9-44B6-9212-3096D7C3F7A1}.DebugWithoutVsix|Any CPU.ActiveCfg = Debug|Any CPU + {E4ED0537-D1D9-44B6-9212-3096D7C3F7A1}.DebugWithoutVsix|Any CPU.Build.0 = Debug|Any CPU {E4ED0537-D1D9-44B6-9212-3096D7C3F7A1}.Release|Any CPU.ActiveCfg = Release|Any CPU {E4ED0537-D1D9-44B6-9212-3096D7C3F7A1}.Release|Any CPU.Build.0 = Release|Any CPU - {E4ED0537-D1D9-44B6-9212-3096D7C3F7A1}.Release|x86.ActiveCfg = Release|Any CPU - {E4ED0537-D1D9-44B6-9212-3096D7C3F7A1}.Release|x86.Build.0 = Release|Any CPU + {E4ED0537-D1D9-44B6-9212-3096D7C3F7A1}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {E4ED0537-D1D9-44B6-9212-3096D7C3F7A1}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU {B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}.Debug|x86.ActiveCfg = Debug|Any CPU - {B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}.Debug|x86.Build.0 = Debug|Any CPU - {B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}.Publish|Any CPU.ActiveCfg = Release|Any CPU - {B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}.Publish|x86.ActiveCfg = Release|Any CPU - {B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}.Publish|x86.Build.0 = Release|Any CPU + {B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}.DebugCodeAnalysis|Any CPU.ActiveCfg = Debug|Any CPU + {B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}.DebugCodeAnalysis|Any CPU.Build.0 = Debug|Any CPU + {B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}.DebugWithoutVsix|Any CPU.ActiveCfg = Debug|Any CPU + {B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}.DebugWithoutVsix|Any CPU.Build.0 = Debug|Any CPU {B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}.Release|Any CPU.ActiveCfg = Release|Any CPU {B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}.Release|Any CPU.Build.0 = Release|Any CPU - {B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}.Release|x86.ActiveCfg = Release|Any CPU - {B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}.Release|x86.Build.0 = Release|Any CPU + {B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {B1F5C227-456F-437D-BD5F-4C11B7A8D1A0}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU {08DD4305-7787-4823-A53F-4D0F725A07F3}.Debug|Any CPU.ActiveCfg = Release|Any CPU {08DD4305-7787-4823-A53F-4D0F725A07F3}.Debug|Any CPU.Build.0 = Release|Any CPU - {08DD4305-7787-4823-A53F-4D0F725A07F3}.Debug|x86.ActiveCfg = Release|Any CPU - {08DD4305-7787-4823-A53F-4D0F725A07F3}.Debug|x86.Build.0 = Release|Any CPU - {08DD4305-7787-4823-A53F-4D0F725A07F3}.Publish|Any CPU.ActiveCfg = Release|Any CPU - {08DD4305-7787-4823-A53F-4D0F725A07F3}.Publish|x86.ActiveCfg = Release|Any CPU - {08DD4305-7787-4823-A53F-4D0F725A07F3}.Publish|x86.Build.0 = Release|Any CPU + {08DD4305-7787-4823-A53F-4D0F725A07F3}.DebugCodeAnalysis|Any CPU.ActiveCfg = Release|Any CPU + {08DD4305-7787-4823-A53F-4D0F725A07F3}.DebugCodeAnalysis|Any CPU.Build.0 = Release|Any CPU + {08DD4305-7787-4823-A53F-4D0F725A07F3}.DebugWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {08DD4305-7787-4823-A53F-4D0F725A07F3}.DebugWithoutVsix|Any CPU.Build.0 = Release|Any CPU {08DD4305-7787-4823-A53F-4D0F725A07F3}.Release|Any CPU.ActiveCfg = Release|Any CPU {08DD4305-7787-4823-A53F-4D0F725A07F3}.Release|Any CPU.Build.0 = Release|Any CPU - {08DD4305-7787-4823-A53F-4D0F725A07F3}.Release|x86.ActiveCfg = Release|Any CPU - {08DD4305-7787-4823-A53F-4D0F725A07F3}.Release|x86.Build.0 = Release|Any CPU + {08DD4305-7787-4823-A53F-4D0F725A07F3}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {08DD4305-7787-4823-A53F-4D0F725A07F3}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU {674B69B8-0780-4D54-AE2B-C15821FA51CB}.Debug|Any CPU.ActiveCfg = Release|Any CPU {674B69B8-0780-4D54-AE2B-C15821FA51CB}.Debug|Any CPU.Build.0 = Release|Any CPU - {674B69B8-0780-4D54-AE2B-C15821FA51CB}.Debug|x86.ActiveCfg = Release|Any CPU - {674B69B8-0780-4D54-AE2B-C15821FA51CB}.Debug|x86.Build.0 = Release|Any CPU - {674B69B8-0780-4D54-AE2B-C15821FA51CB}.Publish|Any CPU.ActiveCfg = Release|Any CPU - {674B69B8-0780-4D54-AE2B-C15821FA51CB}.Publish|x86.ActiveCfg = Release|Any CPU - {674B69B8-0780-4D54-AE2B-C15821FA51CB}.Publish|x86.Build.0 = Release|Any CPU + {674B69B8-0780-4D54-AE2B-C15821FA51CB}.DebugCodeAnalysis|Any CPU.ActiveCfg = Release|Any CPU + {674B69B8-0780-4D54-AE2B-C15821FA51CB}.DebugCodeAnalysis|Any CPU.Build.0 = Release|Any CPU + {674B69B8-0780-4D54-AE2B-C15821FA51CB}.DebugWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {674B69B8-0780-4D54-AE2B-C15821FA51CB}.DebugWithoutVsix|Any CPU.Build.0 = Release|Any CPU {674B69B8-0780-4D54-AE2B-C15821FA51CB}.Release|Any CPU.ActiveCfg = Release|Any CPU {674B69B8-0780-4D54-AE2B-C15821FA51CB}.Release|Any CPU.Build.0 = Release|Any CPU - {674B69B8-0780-4D54-AE2B-C15821FA51CB}.Release|x86.ActiveCfg = Release|Any CPU - {674B69B8-0780-4D54-AE2B-C15821FA51CB}.Release|x86.Build.0 = Release|Any CPU + {674B69B8-0780-4D54-AE2B-C15821FA51CB}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {674B69B8-0780-4D54-AE2B-C15821FA51CB}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU {1CE2D235-8072-4649-BA5A-CFB1AF8776E0}.Debug|Any CPU.ActiveCfg = Release|Any CPU {1CE2D235-8072-4649-BA5A-CFB1AF8776E0}.Debug|Any CPU.Build.0 = Release|Any CPU - {1CE2D235-8072-4649-BA5A-CFB1AF8776E0}.Debug|x86.ActiveCfg = Release|Any CPU - {1CE2D235-8072-4649-BA5A-CFB1AF8776E0}.Debug|x86.Build.0 = Release|Any CPU - {1CE2D235-8072-4649-BA5A-CFB1AF8776E0}.Publish|Any CPU.ActiveCfg = Release|Any CPU - {1CE2D235-8072-4649-BA5A-CFB1AF8776E0}.Publish|x86.ActiveCfg = Release|Any CPU - {1CE2D235-8072-4649-BA5A-CFB1AF8776E0}.Publish|x86.Build.0 = Release|Any CPU + {1CE2D235-8072-4649-BA5A-CFB1AF8776E0}.DebugCodeAnalysis|Any CPU.ActiveCfg = Release|Any CPU + {1CE2D235-8072-4649-BA5A-CFB1AF8776E0}.DebugCodeAnalysis|Any CPU.Build.0 = Release|Any CPU + {1CE2D235-8072-4649-BA5A-CFB1AF8776E0}.DebugWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {1CE2D235-8072-4649-BA5A-CFB1AF8776E0}.DebugWithoutVsix|Any CPU.Build.0 = Release|Any CPU {1CE2D235-8072-4649-BA5A-CFB1AF8776E0}.Release|Any CPU.ActiveCfg = Release|Any CPU {1CE2D235-8072-4649-BA5A-CFB1AF8776E0}.Release|Any CPU.Build.0 = Release|Any CPU - {1CE2D235-8072-4649-BA5A-CFB1AF8776E0}.Release|x86.ActiveCfg = Release|Any CPU - {1CE2D235-8072-4649-BA5A-CFB1AF8776E0}.Release|x86.Build.0 = Release|Any CPU + {1CE2D235-8072-4649-BA5A-CFB1AF8776E0}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {1CE2D235-8072-4649-BA5A-CFB1AF8776E0}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU {600998C4-54DD-4755-BFA8-6F44544D8E2E}.Debug|Any CPU.ActiveCfg = Release|Any CPU {600998C4-54DD-4755-BFA8-6F44544D8E2E}.Debug|Any CPU.Build.0 = Release|Any CPU - {600998C4-54DD-4755-BFA8-6F44544D8E2E}.Debug|x86.ActiveCfg = Release|Any CPU - {600998C4-54DD-4755-BFA8-6F44544D8E2E}.Debug|x86.Build.0 = Release|Any CPU - {600998C4-54DD-4755-BFA8-6F44544D8E2E}.Publish|Any CPU.ActiveCfg = Release|Any CPU - {600998C4-54DD-4755-BFA8-6F44544D8E2E}.Publish|x86.ActiveCfg = Release|Any CPU - {600998C4-54DD-4755-BFA8-6F44544D8E2E}.Publish|x86.Build.0 = Release|Any CPU + {600998C4-54DD-4755-BFA8-6F44544D8E2E}.DebugCodeAnalysis|Any CPU.ActiveCfg = Release|Any CPU + {600998C4-54DD-4755-BFA8-6F44544D8E2E}.DebugCodeAnalysis|Any CPU.Build.0 = Release|Any CPU + {600998C4-54DD-4755-BFA8-6F44544D8E2E}.DebugWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {600998C4-54DD-4755-BFA8-6F44544D8E2E}.DebugWithoutVsix|Any CPU.Build.0 = Release|Any CPU {600998C4-54DD-4755-BFA8-6F44544D8E2E}.Release|Any CPU.ActiveCfg = Release|Any CPU {600998C4-54DD-4755-BFA8-6F44544D8E2E}.Release|Any CPU.Build.0 = Release|Any CPU - {600998C4-54DD-4755-BFA8-6F44544D8E2E}.Release|x86.ActiveCfg = Release|Any CPU - {600998C4-54DD-4755-BFA8-6F44544D8E2E}.Release|x86.Build.0 = Release|Any CPU + {600998C4-54DD-4755-BFA8-6F44544D8E2E}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {600998C4-54DD-4755-BFA8-6F44544D8E2E}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU {B4E665E5-6CAF-4414-A6E2-8DE1C3BCF203}.Debug|Any CPU.ActiveCfg = Release|Any CPU {B4E665E5-6CAF-4414-A6E2-8DE1C3BCF203}.Debug|Any CPU.Build.0 = Release|Any CPU - {B4E665E5-6CAF-4414-A6E2-8DE1C3BCF203}.Debug|x86.ActiveCfg = Release|Any CPU - {B4E665E5-6CAF-4414-A6E2-8DE1C3BCF203}.Debug|x86.Build.0 = Release|Any CPU - {B4E665E5-6CAF-4414-A6E2-8DE1C3BCF203}.Publish|Any CPU.ActiveCfg = Release|Any CPU - {B4E665E5-6CAF-4414-A6E2-8DE1C3BCF203}.Publish|x86.ActiveCfg = Release|Any CPU - {B4E665E5-6CAF-4414-A6E2-8DE1C3BCF203}.Publish|x86.Build.0 = Release|Any CPU + {B4E665E5-6CAF-4414-A6E2-8DE1C3BCF203}.DebugCodeAnalysis|Any CPU.ActiveCfg = Release|Any CPU + {B4E665E5-6CAF-4414-A6E2-8DE1C3BCF203}.DebugCodeAnalysis|Any CPU.Build.0 = Release|Any CPU + {B4E665E5-6CAF-4414-A6E2-8DE1C3BCF203}.DebugWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {B4E665E5-6CAF-4414-A6E2-8DE1C3BCF203}.DebugWithoutVsix|Any CPU.Build.0 = Release|Any CPU {B4E665E5-6CAF-4414-A6E2-8DE1C3BCF203}.Release|Any CPU.ActiveCfg = Release|Any CPU {B4E665E5-6CAF-4414-A6E2-8DE1C3BCF203}.Release|Any CPU.Build.0 = Release|Any CPU - {B4E665E5-6CAF-4414-A6E2-8DE1C3BCF203}.Release|x86.ActiveCfg = Release|Any CPU - {B4E665E5-6CAF-4414-A6E2-8DE1C3BCF203}.Release|x86.Build.0 = Release|Any CPU + {B4E665E5-6CAF-4414-A6E2-8DE1C3BCF203}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {B4E665E5-6CAF-4414-A6E2-8DE1C3BCF203}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU {241C47DF-CA8E-4296-AA03-2C48BB646ABD}.Debug|Any CPU.ActiveCfg = Release|Any CPU {241C47DF-CA8E-4296-AA03-2C48BB646ABD}.Debug|Any CPU.Build.0 = Release|Any CPU - {241C47DF-CA8E-4296-AA03-2C48BB646ABD}.Debug|x86.ActiveCfg = Release|Any CPU - {241C47DF-CA8E-4296-AA03-2C48BB646ABD}.Debug|x86.Build.0 = Release|Any CPU - {241C47DF-CA8E-4296-AA03-2C48BB646ABD}.Publish|Any CPU.ActiveCfg = Release|Any CPU - {241C47DF-CA8E-4296-AA03-2C48BB646ABD}.Publish|x86.ActiveCfg = Release|Any CPU - {241C47DF-CA8E-4296-AA03-2C48BB646ABD}.Publish|x86.Build.0 = Release|Any CPU + {241C47DF-CA8E-4296-AA03-2C48BB646ABD}.DebugCodeAnalysis|Any CPU.ActiveCfg = Release|Any CPU + {241C47DF-CA8E-4296-AA03-2C48BB646ABD}.DebugCodeAnalysis|Any CPU.Build.0 = Release|Any CPU + {241C47DF-CA8E-4296-AA03-2C48BB646ABD}.DebugWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {241C47DF-CA8E-4296-AA03-2C48BB646ABD}.DebugWithoutVsix|Any CPU.Build.0 = Release|Any CPU {241C47DF-CA8E-4296-AA03-2C48BB646ABD}.Release|Any CPU.ActiveCfg = Release|Any CPU {241C47DF-CA8E-4296-AA03-2C48BB646ABD}.Release|Any CPU.Build.0 = Release|Any CPU - {241C47DF-CA8E-4296-AA03-2C48BB646ABD}.Release|x86.ActiveCfg = Release|Any CPU - {241C47DF-CA8E-4296-AA03-2C48BB646ABD}.Release|x86.Build.0 = Release|Any CPU + {241C47DF-CA8E-4296-AA03-2C48BB646ABD}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {241C47DF-CA8E-4296-AA03-2C48BB646ABD}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU {EB73ADDD-2FE9-44C0-A1AB-20709B979B64}.Debug|Any CPU.ActiveCfg = Release|Any CPU {EB73ADDD-2FE9-44C0-A1AB-20709B979B64}.Debug|Any CPU.Build.0 = Release|Any CPU - {EB73ADDD-2FE9-44C0-A1AB-20709B979B64}.Debug|x86.ActiveCfg = Release|Any CPU - {EB73ADDD-2FE9-44C0-A1AB-20709B979B64}.Debug|x86.Build.0 = Release|Any CPU - {EB73ADDD-2FE9-44C0-A1AB-20709B979B64}.Publish|Any CPU.ActiveCfg = Release|Any CPU - {EB73ADDD-2FE9-44C0-A1AB-20709B979B64}.Publish|Any CPU.Build.0 = Release|Any CPU - {EB73ADDD-2FE9-44C0-A1AB-20709B979B64}.Publish|x86.ActiveCfg = Release|Any CPU - {EB73ADDD-2FE9-44C0-A1AB-20709B979B64}.Publish|x86.Build.0 = Release|Any CPU + {EB73ADDD-2FE9-44C0-A1AB-20709B979B64}.DebugCodeAnalysis|Any CPU.ActiveCfg = Release|Any CPU + {EB73ADDD-2FE9-44C0-A1AB-20709B979B64}.DebugCodeAnalysis|Any CPU.Build.0 = Release|Any CPU + {EB73ADDD-2FE9-44C0-A1AB-20709B979B64}.DebugWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {EB73ADDD-2FE9-44C0-A1AB-20709B979B64}.DebugWithoutVsix|Any CPU.Build.0 = Release|Any CPU {EB73ADDD-2FE9-44C0-A1AB-20709B979B64}.Release|Any CPU.ActiveCfg = Release|Any CPU {EB73ADDD-2FE9-44C0-A1AB-20709B979B64}.Release|Any CPU.Build.0 = Release|Any CPU - {EB73ADDD-2FE9-44C0-A1AB-20709B979B64}.Release|x86.ActiveCfg = Release|Any CPU - {EB73ADDD-2FE9-44C0-A1AB-20709B979B64}.Release|x86.Build.0 = Release|Any CPU + {EB73ADDD-2FE9-44C0-A1AB-20709B979B64}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {EB73ADDD-2FE9-44C0-A1AB-20709B979B64}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU {252CE1C2-027A-4445-A3C2-E4D6C80A935A}.Debug|Any CPU.ActiveCfg = Release|Any CPU {252CE1C2-027A-4445-A3C2-E4D6C80A935A}.Debug|Any CPU.Build.0 = Release|Any CPU - {252CE1C2-027A-4445-A3C2-E4D6C80A935A}.Debug|x86.ActiveCfg = Release|Any CPU - {252CE1C2-027A-4445-A3C2-E4D6C80A935A}.Debug|x86.Build.0 = Release|Any CPU - {252CE1C2-027A-4445-A3C2-E4D6C80A935A}.Publish|Any CPU.ActiveCfg = Release|Any CPU - {252CE1C2-027A-4445-A3C2-E4D6C80A935A}.Publish|x86.ActiveCfg = Release|Any CPU - {252CE1C2-027A-4445-A3C2-E4D6C80A935A}.Publish|x86.Build.0 = Release|Any CPU + {252CE1C2-027A-4445-A3C2-E4D6C80A935A}.DebugCodeAnalysis|Any CPU.ActiveCfg = Release|Any CPU + {252CE1C2-027A-4445-A3C2-E4D6C80A935A}.DebugCodeAnalysis|Any CPU.Build.0 = Release|Any CPU + {252CE1C2-027A-4445-A3C2-E4D6C80A935A}.DebugWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {252CE1C2-027A-4445-A3C2-E4D6C80A935A}.DebugWithoutVsix|Any CPU.Build.0 = Release|Any CPU {252CE1C2-027A-4445-A3C2-E4D6C80A935A}.Release|Any CPU.ActiveCfg = Release|Any CPU {252CE1C2-027A-4445-A3C2-E4D6C80A935A}.Release|Any CPU.Build.0 = Release|Any CPU - {252CE1C2-027A-4445-A3C2-E4D6C80A935A}.Release|x86.ActiveCfg = Release|Any CPU - {252CE1C2-027A-4445-A3C2-E4D6C80A935A}.Release|x86.Build.0 = Release|Any CPU + {252CE1C2-027A-4445-A3C2-E4D6C80A935A}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {252CE1C2-027A-4445-A3C2-E4D6C80A935A}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU {0EC8DBA1-D745-4EE5-993A-6026440EC3BF}.Debug|Any CPU.ActiveCfg = Release|Any CPU {0EC8DBA1-D745-4EE5-993A-6026440EC3BF}.Debug|Any CPU.Build.0 = Release|Any CPU - {0EC8DBA1-D745-4EE5-993A-6026440EC3BF}.Debug|x86.ActiveCfg = Release|Any CPU - {0EC8DBA1-D745-4EE5-993A-6026440EC3BF}.Debug|x86.Build.0 = Release|Any CPU - {0EC8DBA1-D745-4EE5-993A-6026440EC3BF}.Publish|Any CPU.ActiveCfg = Release|Any CPU - {0EC8DBA1-D745-4EE5-993A-6026440EC3BF}.Publish|x86.ActiveCfg = Release|Any CPU - {0EC8DBA1-D745-4EE5-993A-6026440EC3BF}.Publish|x86.Build.0 = Release|Any CPU + {0EC8DBA1-D745-4EE5-993A-6026440EC3BF}.DebugCodeAnalysis|Any CPU.ActiveCfg = Release|Any CPU + {0EC8DBA1-D745-4EE5-993A-6026440EC3BF}.DebugCodeAnalysis|Any CPU.Build.0 = Release|Any CPU + {0EC8DBA1-D745-4EE5-993A-6026440EC3BF}.DebugWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {0EC8DBA1-D745-4EE5-993A-6026440EC3BF}.DebugWithoutVsix|Any CPU.Build.0 = Release|Any CPU {0EC8DBA1-D745-4EE5-993A-6026440EC3BF}.Release|Any CPU.ActiveCfg = Release|Any CPU {0EC8DBA1-D745-4EE5-993A-6026440EC3BF}.Release|Any CPU.Build.0 = Release|Any CPU - {0EC8DBA1-D745-4EE5-993A-6026440EC3BF}.Release|x86.ActiveCfg = Release|Any CPU - {0EC8DBA1-D745-4EE5-993A-6026440EC3BF}.Release|x86.Build.0 = Release|Any CPU + {0EC8DBA1-D745-4EE5-993A-6026440EC3BF}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {0EC8DBA1-D745-4EE5-993A-6026440EC3BF}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU {41A47C5B-C606-45B4-B83C-22B9239E4DA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {41A47C5B-C606-45B4-B83C-22B9239E4DA0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {41A47C5B-C606-45B4-B83C-22B9239E4DA0}.Debug|x86.ActiveCfg = Debug|Any CPU - {41A47C5B-C606-45B4-B83C-22B9239E4DA0}.Debug|x86.Build.0 = Debug|Any CPU - {41A47C5B-C606-45B4-B83C-22B9239E4DA0}.Publish|Any CPU.ActiveCfg = Release|Any CPU - {41A47C5B-C606-45B4-B83C-22B9239E4DA0}.Publish|Any CPU.Build.0 = Release|Any CPU - {41A47C5B-C606-45B4-B83C-22B9239E4DA0}.Publish|x86.ActiveCfg = Release|Any CPU - {41A47C5B-C606-45B4-B83C-22B9239E4DA0}.Publish|x86.Build.0 = Release|Any CPU + {41A47C5B-C606-45B4-B83C-22B9239E4DA0}.DebugCodeAnalysis|Any CPU.ActiveCfg = DebugCodeAnalysis|Any CPU + {41A47C5B-C606-45B4-B83C-22B9239E4DA0}.DebugCodeAnalysis|Any CPU.Build.0 = DebugCodeAnalysis|Any CPU + {41A47C5B-C606-45B4-B83C-22B9239E4DA0}.DebugWithoutVsix|Any CPU.ActiveCfg = Debug|Any CPU + {41A47C5B-C606-45B4-B83C-22B9239E4DA0}.DebugWithoutVsix|Any CPU.Build.0 = Debug|Any CPU {41A47C5B-C606-45B4-B83C-22B9239E4DA0}.Release|Any CPU.ActiveCfg = Release|Any CPU {41A47C5B-C606-45B4-B83C-22B9239E4DA0}.Release|Any CPU.Build.0 = Release|Any CPU - {41A47C5B-C606-45B4-B83C-22B9239E4DA0}.Release|x86.ActiveCfg = Release|Any CPU - {41A47C5B-C606-45B4-B83C-22B9239E4DA0}.Release|x86.Build.0 = Release|Any CPU - {DD99FD0F-82F6-4C30-930E-4A1D0DF01D65}.Debug|Any CPU.ActiveCfg = Release|Any CPU - {DD99FD0F-82F6-4C30-930E-4A1D0DF01D65}.Debug|Any CPU.Build.0 = Release|Any CPU - {DD99FD0F-82F6-4C30-930E-4A1D0DF01D65}.Debug|x86.ActiveCfg = Release|Any CPU - {DD99FD0F-82F6-4C30-930E-4A1D0DF01D65}.Debug|x86.Build.0 = Release|Any CPU - {DD99FD0F-82F6-4C30-930E-4A1D0DF01D65}.Publish|Any CPU.ActiveCfg = Release|Any CPU - {DD99FD0F-82F6-4C30-930E-4A1D0DF01D65}.Publish|Any CPU.Build.0 = Release|Any CPU - {DD99FD0F-82F6-4C30-930E-4A1D0DF01D65}.Publish|x86.ActiveCfg = Release|Any CPU - {DD99FD0F-82F6-4C30-930E-4A1D0DF01D65}.Publish|x86.Build.0 = Release|Any CPU - {DD99FD0F-82F6-4C30-930E-4A1D0DF01D65}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DD99FD0F-82F6-4C30-930E-4A1D0DF01D65}.Release|Any CPU.Build.0 = Release|Any CPU - {DD99FD0F-82F6-4C30-930E-4A1D0DF01D65}.Release|x86.ActiveCfg = Release|Any CPU - {DD99FD0F-82F6-4C30-930E-4A1D0DF01D65}.Release|x86.Build.0 = Release|Any CPU + {41A47C5B-C606-45B4-B83C-22B9239E4DA0}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {41A47C5B-C606-45B4-B83C-22B9239E4DA0}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU {7B835A7D-CF94-45E8-B191-96F5A4FE26A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7B835A7D-CF94-45E8-B191-96F5A4FE26A8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7B835A7D-CF94-45E8-B191-96F5A4FE26A8}.Debug|x86.ActiveCfg = Debug|Any CPU - {7B835A7D-CF94-45E8-B191-96F5A4FE26A8}.Debug|x86.Build.0 = Debug|Any CPU - {7B835A7D-CF94-45E8-B191-96F5A4FE26A8}.Publish|Any CPU.ActiveCfg = Release|Any CPU - {7B835A7D-CF94-45E8-B191-96F5A4FE26A8}.Publish|Any CPU.Build.0 = Release|Any CPU - {7B835A7D-CF94-45E8-B191-96F5A4FE26A8}.Publish|x86.ActiveCfg = Release|Any CPU - {7B835A7D-CF94-45E8-B191-96F5A4FE26A8}.Publish|x86.Build.0 = Release|Any CPU + {7B835A7D-CF94-45E8-B191-96F5A4FE26A8}.DebugCodeAnalysis|Any CPU.ActiveCfg = Debug|Any CPU + {7B835A7D-CF94-45E8-B191-96F5A4FE26A8}.DebugCodeAnalysis|Any CPU.Build.0 = Debug|Any CPU + {7B835A7D-CF94-45E8-B191-96F5A4FE26A8}.DebugWithoutVsix|Any CPU.ActiveCfg = Debug|Any CPU + {7B835A7D-CF94-45E8-B191-96F5A4FE26A8}.DebugWithoutVsix|Any CPU.Build.0 = Debug|Any CPU {7B835A7D-CF94-45E8-B191-96F5A4FE26A8}.Release|Any CPU.ActiveCfg = Release|Any CPU {7B835A7D-CF94-45E8-B191-96F5A4FE26A8}.Release|Any CPU.Build.0 = Release|Any CPU - {7B835A7D-CF94-45E8-B191-96F5A4FE26A8}.Release|x86.ActiveCfg = Release|Any CPU - {7B835A7D-CF94-45E8-B191-96F5A4FE26A8}.Release|x86.Build.0 = Release|Any CPU + {7B835A7D-CF94-45E8-B191-96F5A4FE26A8}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {7B835A7D-CF94-45E8-B191-96F5A4FE26A8}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU {161DBF01-1DBF-4B00-8551-C5C00F26720D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {161DBF01-1DBF-4B00-8551-C5C00F26720D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {161DBF01-1DBF-4B00-8551-C5C00F26720D}.Debug|x86.ActiveCfg = Debug|Any CPU - {161DBF01-1DBF-4B00-8551-C5C00F26720D}.Debug|x86.Build.0 = Debug|Any CPU - {161DBF01-1DBF-4B00-8551-C5C00F26720D}.Publish|Any CPU.ActiveCfg = Release|Any CPU - {161DBF01-1DBF-4B00-8551-C5C00F26720D}.Publish|Any CPU.Build.0 = Release|Any CPU - {161DBF01-1DBF-4B00-8551-C5C00F26720D}.Publish|x86.ActiveCfg = Release|Any CPU - {161DBF01-1DBF-4B00-8551-C5C00F26720D}.Publish|x86.Build.0 = Release|Any CPU + {161DBF01-1DBF-4B00-8551-C5C00F26720D}.DebugCodeAnalysis|Any CPU.ActiveCfg = DebugCodeAnalysis|Any CPU + {161DBF01-1DBF-4B00-8551-C5C00F26720D}.DebugCodeAnalysis|Any CPU.Build.0 = DebugCodeAnalysis|Any CPU + {161DBF01-1DBF-4B00-8551-C5C00F26720D}.DebugWithoutVsix|Any CPU.ActiveCfg = Debug|Any CPU + {161DBF01-1DBF-4B00-8551-C5C00F26720D}.DebugWithoutVsix|Any CPU.Build.0 = Debug|Any CPU {161DBF01-1DBF-4B00-8551-C5C00F26720D}.Release|Any CPU.ActiveCfg = Release|Any CPU {161DBF01-1DBF-4B00-8551-C5C00F26720D}.Release|Any CPU.Build.0 = Release|Any CPU - {161DBF01-1DBF-4B00-8551-C5C00F26720D}.Release|x86.ActiveCfg = Release|Any CPU - {161DBF01-1DBF-4B00-8551-C5C00F26720D}.Release|x86.Build.0 = Release|Any CPU + {161DBF01-1DBF-4B00-8551-C5C00F26720D}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {161DBF01-1DBF-4B00-8551-C5C00F26720D}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU {161DBF01-1DBF-4B00-8551-C5C00F26720E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {161DBF01-1DBF-4B00-8551-C5C00F26720E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {161DBF01-1DBF-4B00-8551-C5C00F26720E}.Debug|x86.ActiveCfg = Debug|Any CPU - {161DBF01-1DBF-4B00-8551-C5C00F26720E}.Debug|x86.Build.0 = Debug|Any CPU - {161DBF01-1DBF-4B00-8551-C5C00F26720E}.Publish|Any CPU.ActiveCfg = Release|Any CPU - {161DBF01-1DBF-4B00-8551-C5C00F26720E}.Publish|Any CPU.Build.0 = Release|Any CPU - {161DBF01-1DBF-4B00-8551-C5C00F26720E}.Publish|x86.ActiveCfg = Release|Any CPU - {161DBF01-1DBF-4B00-8551-C5C00F26720E}.Publish|x86.Build.0 = Release|Any CPU + {161DBF01-1DBF-4B00-8551-C5C00F26720E}.DebugCodeAnalysis|Any CPU.ActiveCfg = DebugCodeAnalysis|Any CPU + {161DBF01-1DBF-4B00-8551-C5C00F26720E}.DebugCodeAnalysis|Any CPU.Build.0 = DebugCodeAnalysis|Any CPU + {161DBF01-1DBF-4B00-8551-C5C00F26720E}.DebugWithoutVsix|Any CPU.ActiveCfg = Debug|Any CPU + {161DBF01-1DBF-4B00-8551-C5C00F26720E}.DebugWithoutVsix|Any CPU.Build.0 = Debug|Any CPU {161DBF01-1DBF-4B00-8551-C5C00F26720E}.Release|Any CPU.ActiveCfg = Release|Any CPU {161DBF01-1DBF-4B00-8551-C5C00F26720E}.Release|Any CPU.Build.0 = Release|Any CPU - {161DBF01-1DBF-4B00-8551-C5C00F26720E}.Release|x86.ActiveCfg = Release|Any CPU - {161DBF01-1DBF-4B00-8551-C5C00F26720E}.Release|x86.Build.0 = Release|Any CPU + {161DBF01-1DBF-4B00-8551-C5C00F26720E}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {161DBF01-1DBF-4B00-8551-C5C00F26720E}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU {D1DFBB0C-B570-4302-8F1E-2E3A19C41961}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D1DFBB0C-B570-4302-8F1E-2E3A19C41961}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D1DFBB0C-B570-4302-8F1E-2E3A19C41961}.Debug|x86.ActiveCfg = Debug|Any CPU - {D1DFBB0C-B570-4302-8F1E-2E3A19C41961}.Debug|x86.Build.0 = Debug|Any CPU - {D1DFBB0C-B570-4302-8F1E-2E3A19C41961}.Publish|Any CPU.ActiveCfg = Release|Any CPU - {D1DFBB0C-B570-4302-8F1E-2E3A19C41961}.Publish|Any CPU.Build.0 = Release|Any CPU - {D1DFBB0C-B570-4302-8F1E-2E3A19C41961}.Publish|x86.ActiveCfg = Release|Any CPU - {D1DFBB0C-B570-4302-8F1E-2E3A19C41961}.Publish|x86.Build.0 = Release|Any CPU + {D1DFBB0C-B570-4302-8F1E-2E3A19C41961}.DebugCodeAnalysis|Any CPU.ActiveCfg = DebugCodeAnalysis|Any CPU + {D1DFBB0C-B570-4302-8F1E-2E3A19C41961}.DebugCodeAnalysis|Any CPU.Build.0 = DebugCodeAnalysis|Any CPU + {D1DFBB0C-B570-4302-8F1E-2E3A19C41961}.DebugWithoutVsix|Any CPU.ActiveCfg = Debug|Any CPU + {D1DFBB0C-B570-4302-8F1E-2E3A19C41961}.DebugWithoutVsix|Any CPU.Build.0 = Debug|Any CPU {D1DFBB0C-B570-4302-8F1E-2E3A19C41961}.Release|Any CPU.ActiveCfg = Release|Any CPU {D1DFBB0C-B570-4302-8F1E-2E3A19C41961}.Release|Any CPU.Build.0 = Release|Any CPU - {D1DFBB0C-B570-4302-8F1E-2E3A19C41961}.Release|x86.ActiveCfg = Release|Any CPU - {D1DFBB0C-B570-4302-8F1E-2E3A19C41961}.Release|x86.Build.0 = Release|Any CPU + {D1DFBB0C-B570-4302-8F1E-2E3A19C41961}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {D1DFBB0C-B570-4302-8F1E-2E3A19C41961}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU {50E277B8-8580-487A-8F8E-5C3B9FBF0F77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {50E277B8-8580-487A-8F8E-5C3B9FBF0F77}.Debug|Any CPU.Build.0 = Debug|Any CPU - {50E277B8-8580-487A-8F8E-5C3B9FBF0F77}.Debug|x86.ActiveCfg = Debug|Any CPU - {50E277B8-8580-487A-8F8E-5C3B9FBF0F77}.Debug|x86.Build.0 = Debug|Any CPU - {50E277B8-8580-487A-8F8E-5C3B9FBF0F77}.Publish|Any CPU.ActiveCfg = Release|Any CPU - {50E277B8-8580-487A-8F8E-5C3B9FBF0F77}.Publish|Any CPU.Build.0 = Release|Any CPU - {50E277B8-8580-487A-8F8E-5C3B9FBF0F77}.Publish|x86.ActiveCfg = Release|Any CPU - {50E277B8-8580-487A-8F8E-5C3B9FBF0F77}.Publish|x86.Build.0 = Release|Any CPU + {50E277B8-8580-487A-8F8E-5C3B9FBF0F77}.DebugCodeAnalysis|Any CPU.ActiveCfg = DebugCodeAnalysis|Any CPU + {50E277B8-8580-487A-8F8E-5C3B9FBF0F77}.DebugCodeAnalysis|Any CPU.Build.0 = DebugCodeAnalysis|Any CPU + {50E277B8-8580-487A-8F8E-5C3B9FBF0F77}.DebugWithoutVsix|Any CPU.ActiveCfg = Debug|Any CPU + {50E277B8-8580-487A-8F8E-5C3B9FBF0F77}.DebugWithoutVsix|Any CPU.Build.0 = Debug|Any CPU {50E277B8-8580-487A-8F8E-5C3B9FBF0F77}.Release|Any CPU.ActiveCfg = Release|Any CPU {50E277B8-8580-487A-8F8E-5C3B9FBF0F77}.Release|Any CPU.Build.0 = Release|Any CPU - {50E277B8-8580-487A-8F8E-5C3B9FBF0F77}.Release|x86.ActiveCfg = Release|Any CPU - {50E277B8-8580-487A-8F8E-5C3B9FBF0F77}.Release|x86.Build.0 = Release|Any CPU + {50E277B8-8580-487A-8F8E-5C3B9FBF0F77}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {50E277B8-8580-487A-8F8E-5C3B9FBF0F77}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU {110B206F-8554-4B51-BF86-94DAA32F5E26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {110B206F-8554-4B51-BF86-94DAA32F5E26}.Debug|Any CPU.Build.0 = Debug|Any CPU - {110B206F-8554-4B51-BF86-94DAA32F5E26}.Debug|x86.ActiveCfg = Debug|Any CPU - {110B206F-8554-4B51-BF86-94DAA32F5E26}.Debug|x86.Build.0 = Debug|Any CPU - {110B206F-8554-4B51-BF86-94DAA32F5E26}.Publish|Any CPU.ActiveCfg = Release|Any CPU - {110B206F-8554-4B51-BF86-94DAA32F5E26}.Publish|Any CPU.Build.0 = Release|Any CPU - {110B206F-8554-4B51-BF86-94DAA32F5E26}.Publish|x86.ActiveCfg = Release|Any CPU - {110B206F-8554-4B51-BF86-94DAA32F5E26}.Publish|x86.Build.0 = Release|Any CPU + {110B206F-8554-4B51-BF86-94DAA32F5E26}.DebugCodeAnalysis|Any CPU.ActiveCfg = Debug|Any CPU + {110B206F-8554-4B51-BF86-94DAA32F5E26}.DebugCodeAnalysis|Any CPU.Build.0 = Debug|Any CPU + {110B206F-8554-4B51-BF86-94DAA32F5E26}.DebugWithoutVsix|Any CPU.ActiveCfg = Debug|Any CPU + {110B206F-8554-4B51-BF86-94DAA32F5E26}.DebugWithoutVsix|Any CPU.Build.0 = Debug|Any CPU {110B206F-8554-4B51-BF86-94DAA32F5E26}.Release|Any CPU.ActiveCfg = Release|Any CPU {110B206F-8554-4B51-BF86-94DAA32F5E26}.Release|Any CPU.Build.0 = Release|Any CPU - {110B206F-8554-4B51-BF86-94DAA32F5E26}.Release|x86.ActiveCfg = Release|Any CPU - {110B206F-8554-4B51-BF86-94DAA32F5E26}.Release|x86.Build.0 = Release|Any CPU + {110B206F-8554-4B51-BF86-94DAA32F5E26}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {110B206F-8554-4B51-BF86-94DAA32F5E26}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU {7F5ED78B-74A3-4406-A299-70CFB5885B8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7F5ED78B-74A3-4406-A299-70CFB5885B8B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7F5ED78B-74A3-4406-A299-70CFB5885B8B}.Debug|x86.ActiveCfg = Debug|Any CPU - {7F5ED78B-74A3-4406-A299-70CFB5885B8B}.Debug|x86.Build.0 = Debug|Any CPU - {7F5ED78B-74A3-4406-A299-70CFB5885B8B}.Publish|Any CPU.ActiveCfg = Release|Any CPU - {7F5ED78B-74A3-4406-A299-70CFB5885B8B}.Publish|Any CPU.Build.0 = Release|Any CPU - {7F5ED78B-74A3-4406-A299-70CFB5885B8B}.Publish|x86.ActiveCfg = Release|Any CPU - {7F5ED78B-74A3-4406-A299-70CFB5885B8B}.Publish|x86.Build.0 = Release|Any CPU + {7F5ED78B-74A3-4406-A299-70CFB5885B8B}.DebugCodeAnalysis|Any CPU.ActiveCfg = DebugCodeAnalysis|Any CPU + {7F5ED78B-74A3-4406-A299-70CFB5885B8B}.DebugCodeAnalysis|Any CPU.Build.0 = DebugCodeAnalysis|Any CPU + {7F5ED78B-74A3-4406-A299-70CFB5885B8B}.DebugWithoutVsix|Any CPU.ActiveCfg = Debug|Any CPU + {7F5ED78B-74A3-4406-A299-70CFB5885B8B}.DebugWithoutVsix|Any CPU.Build.0 = Debug|Any CPU {7F5ED78B-74A3-4406-A299-70CFB5885B8B}.Release|Any CPU.ActiveCfg = Release|Any CPU {7F5ED78B-74A3-4406-A299-70CFB5885B8B}.Release|Any CPU.Build.0 = Release|Any CPU - {7F5ED78B-74A3-4406-A299-70CFB5885B8B}.Release|x86.ActiveCfg = Release|Any CPU - {7F5ED78B-74A3-4406-A299-70CFB5885B8B}.Release|x86.Build.0 = Release|Any CPU + {7F5ED78B-74A3-4406-A299-70CFB5885B8B}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {7F5ED78B-74A3-4406-A299-70CFB5885B8B}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU {17EB676B-BB91-48B5-AA59-C67695C647C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {17EB676B-BB91-48B5-AA59-C67695C647C2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {17EB676B-BB91-48B5-AA59-C67695C647C2}.Debug|x86.ActiveCfg = Debug|Any CPU - {17EB676B-BB91-48B5-AA59-C67695C647C2}.Debug|x86.Build.0 = Debug|Any CPU - {17EB676B-BB91-48B5-AA59-C67695C647C2}.Publish|Any CPU.ActiveCfg = Release|Any CPU - {17EB676B-BB91-48B5-AA59-C67695C647C2}.Publish|Any CPU.Build.0 = Release|Any CPU - {17EB676B-BB91-48B5-AA59-C67695C647C2}.Publish|x86.ActiveCfg = Release|Any CPU - {17EB676B-BB91-48B5-AA59-C67695C647C2}.Publish|x86.Build.0 = Release|Any CPU + {17EB676B-BB91-48B5-AA59-C67695C647C2}.DebugCodeAnalysis|Any CPU.ActiveCfg = Debug|Any CPU + {17EB676B-BB91-48B5-AA59-C67695C647C2}.DebugCodeAnalysis|Any CPU.Build.0 = Debug|Any CPU + {17EB676B-BB91-48B5-AA59-C67695C647C2}.DebugWithoutVsix|Any CPU.ActiveCfg = Debug|Any CPU + {17EB676B-BB91-48B5-AA59-C67695C647C2}.DebugWithoutVsix|Any CPU.Build.0 = Debug|Any CPU {17EB676B-BB91-48B5-AA59-C67695C647C2}.Release|Any CPU.ActiveCfg = Release|Any CPU {17EB676B-BB91-48B5-AA59-C67695C647C2}.Release|Any CPU.Build.0 = Release|Any CPU - {17EB676B-BB91-48B5-AA59-C67695C647C2}.Release|x86.ActiveCfg = Release|Any CPU - {17EB676B-BB91-48B5-AA59-C67695C647C2}.Release|x86.Build.0 = Release|Any CPU + {17EB676B-BB91-48B5-AA59-C67695C647C2}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU + {17EB676B-BB91-48B5-AA59-C67695C647C2}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -482,7 +423,6 @@ Global {1E7F7253-A6AF-43C4-A955-37BEDDA01AF9} = {1E7F7253-A6AF-43C4-A955-37BEDDA01AB8} {252CE1C2-027A-4445-A3C2-E4D6C80A935A} = {1E7F7253-A6AF-43C4-A955-37BEDDA01AF9} {0EC8DBA1-D745-4EE5-993A-6026440EC3BF} = {1E7F7253-A6AF-43C4-A955-37BEDDA01AF9} - {DD99FD0F-82F6-4C30-930E-4A1D0DF01D65} = {1E7F7253-A6AF-43C4-A955-37BEDDA01AB9} {7B835A7D-CF94-45E8-B191-96F5A4FE26A8} = {8A7DA2E7-262B-4581-807A-1C45CE79CDFD} {110B206F-8554-4B51-BF86-94DAA32F5E26} = {8A7DA2E7-262B-4581-807A-1C45CE79CDFD} {17EB676B-BB91-48B5-AA59-C67695C647C2} = {8A7DA2E7-262B-4581-807A-1C45CE79CDFD} diff --git a/README.md b/README.md index abfed8b92f..167ac544d2 100644 --- a/README.md +++ b/README.md @@ -51,12 +51,6 @@ git submodule deinit script git submodule update ``` -Visual Studio extensions have to be signed, so you need to create a signing key with the name `publickey.snk` for your build in the root of the repository: - -```txt -sn -k `publickey.snk` -``` - Open the `GitHubVS.sln` solution with Visual Studio 2015+. To be able to use the GitHub API, you'll need to: @@ -79,32 +73,20 @@ Note, the script will only install in one instance of Visual Studio 2017 (Enterp ## Build Flavors -By default, building will create a VSIX with `Experimental="true"` and `AllUsers="false"` in its `extension.vsixmanifest`. These settings are necessary in order to easily install a standalone VSIX file. There is no need to uninstall the version previously installed via Visual Studio setup / Extensions and Updates. - The following can be executed via `cmd.exe`. To build and install a `Debug` configuration VSIX: ```txt -build.cmd -install.cmd +build.cmd Debug +install.cmd Debug ``` To build and install a `Release` configuration VSIX: ```txt -set Configuration=Release -build.cmd -install.cmd +build.cmd Release +install.cmd Release ``` -To build a VSIX that can be installed via a gallery feed on Extensions and Updates: -```txt -set Configuration=Release -set IsExperimental=false -build.cmd -``` - -Note, attempting to install `IsExperimental=false` builds of the VSIX is not recommended. - ## More information - Andreia Gaita's [presentation](https://www.youtube.com/watch?v=hz2hCO8e_8w) at Codemania 2016 about this extension. diff --git a/appveyor.yml b/appveyor.yml index db567afdef..3a9bcc11b5 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,10 +1,9 @@ -version: '{build}' +version: '2.3.5.{build}' +skip_tags: true install: -- ps: >- +- ps: | $full_build = Test-Path env:GHFVS_KEY - git submodule init - git submodule sync if ($full_build) { @@ -17,12 +16,13 @@ install: } git submodule update --recursive --force - nuget restore GitHubVS.sln build_script: -- cmd: msbuild "GitHubVS.sln" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /p:Configuration=Release /p:DeployExtension=false /verbosity:minimal /p:VisualStudioVersion=14.0 +- ps: scripts\build.ps1 -AppVeyor -BuildNumber:$env:APPVEYOR_BUILD_NUMBER test_script: -- ps: >- - scripts\Run-Nunit.ps1 TrackingCollectionTests 180 Release -AppVeyor - - scripts\Run-Xunit.ps1 UnitTests 180 Release -AppVeyor \ No newline at end of file +- ps: scripts\test.ps1 -AppVeyor +on_success: +- ps: | + if ($full_build) { + script\Sign-Package -AppVeyor + } diff --git a/build.cmd b/build.cmd index 029ac6b9a4..1a9c2d9951 100644 --- a/build.cmd +++ b/build.cmd @@ -1,8 +1 @@ -@if "%Configuration%" == "" set Configuration=Debug -@if "%IsExperimental%" == "" set IsExperimental=true -@if "%IsProductComponent%" == "" set IsProductComponent=false - -call "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat" - -msbuild GitHubVS.sln /t:GitHub_VisualStudio /p:Configuration=%Configuration% /p:IsExperimental=%IsExperimental% /p:IsProductComponent=%IsProductComponent% -@echo Built GitHub.VisualStudio with Configuration=%Configuration% IsExperimental=%IsExperimental% IsProductComponent=%IsProductComponent% +powershell -ExecutionPolicy Unrestricted scripts\build.ps1 %1 diff --git a/install.cmd b/install.cmd index 903730f3a0..4e4cc3f86b 100644 --- a/install.cmd +++ b/install.cmd @@ -1,6 +1,4 @@ -@if "%Configuration%" == "" set Configuration=Debug - +Configuration=%1 @set path=%cd%\tools\VsixUtil;%path% - -vsixutil /install "%cd%\build\%Configuration%\GitHub.VisualStudio.vsix" +tools\VsixUtil\vsixutil /install "build\%Configuration%\GitHub.VisualStudio.vsix" @echo Installed %Configuration% build of GitHub for Visual Studio diff --git a/lib/NUnit.Extension.AppVeyor.NUnit3ResultWriter.0.1.0.nupkg b/lib/NUnit.Extension.AppVeyor.NUnit3ResultWriter.0.1.0.nupkg new file mode 100644 index 0000000000..48ecd310ed Binary files /dev/null and b/lib/NUnit.Extension.AppVeyor.NUnit3ResultWriter.0.1.0.nupkg differ diff --git a/script b/script index ff9ea80d8d..02618c8047 160000 --- a/script +++ b/script @@ -1 +1 @@ -Subproject commit ff9ea80d8df7c33fa94966ce4c8dbbd7896b8a07 +Subproject commit 02618c8047b0dcfd2d83c9a7e5a9c89ce9c97c98 diff --git a/scripts/Bump-Version.ps1 b/scripts/Bump-Version.ps1 new file mode 100644 index 0000000000..33a89cac8c --- /dev/null +++ b/scripts/Bump-Version.ps1 @@ -0,0 +1,92 @@ +<# +.SYNOPSIS + Bumps the version number of GitHub for Visual Studio +.DESCRIPTION + By default, just bumps the last component of the version number by one. An + alternate version number can be specified on the command line. + + The new version number is committed to the local repository and pushed to + GitHub. +#> + +Param( + # It would be nice to use our Validate-Version function here, but we + # can't because this Param definition has to come before any other code in the + # file. + [ValidateScript({ ($_.Major -ge 0) -and ($_.Minor -ge 0) -and ($_.Build -ge 0) })] + [System.Version] + $NewVersion = $null + , + [switch] + $BumpMajor = $false + , + [switch] + $BumpMinor = $false + , + [switch] + $BumpPatch = $false + , + [switch] + $BumpBuild = $false + , + [int] + $BuildNumber = -1 + , + [switch] + $Commit = $false + , + [switch] + $Push = $false + , + [switch] + $Force = $false + , + [switch] + $Trace = $false +) + +Set-StrictMode -Version Latest +if ($Trace) { Set-PSDebug -Trace 1 } + +. $PSScriptRoot\modules.ps1 | out-null +. $scriptsDirectory\Modules\Versioning.ps1 | out-null +. $scriptsDirectory\Modules\Vsix.ps1 | out-null +. $scriptsDirectory\Modules\SolutionInfo.ps1 | out-null +. $scriptsDirectory\Modules\AppVeyor.ps1 | out-null + +if ($NewVersion -eq $null) { + if (!$BumpMajor -and !$BumpMinor -and !$BumpPatch -and !$BumpBuild){ + Die -1 "You need to indicate which part of the version to update via -BumpMajor/-BumpMinor/-BumpPatch/-BumpBuild flags or a custom version via -NewVersion" + } +} + +if ($Push -and !$Commit) { + Die 1 "Cannot push a version bump without -Commit" +} + +if ($Commit -and !$Force){ + Require-CleanWorkTree "bump version" +} + +if (!$?) { + exit 1 +} + +if ($NewVersion -eq $null) { + $currentVersion = Read-Version + $NewVersion = Generate-Version $currentVersion $BumpMajor $BumpMinor $BumpPatch $BumpBuild $BuildNumber +} + +Write-Output "Setting version to $NewVersion" +Write-Version $NewVersion + +if ($Commit) { + Write-Output "Committing version change" + Commit-Version $NewVersion + + if ($Push) { + Write-Output "Pushing version change" + $branch = & $git rev-parse --abbrev-ref HEAD + Push-Changes $branch + } +} diff --git a/scripts/Get-CheckedOutBranch.ps1 b/scripts/Get-CheckedOutBranch.ps1 new file mode 100644 index 0000000000..38a961c2e3 --- /dev/null +++ b/scripts/Get-CheckedOutBranch.ps1 @@ -0,0 +1,31 @@ +<# +.SYNOPSIS + Returns the name of the working directory's currently checked-out branch +#> + +Set-PSDebug -Strict + +$scriptsDirectory = Split-Path $MyInvocation.MyCommand.Path +$rootDirectory = Split-Path $scriptsDirectory + +. $scriptsDirectory\common.ps1 + +function Die([string]$message, [object[]]$output) { + if ($output) { + Write-Output $output + $message += ". See output above." + } + Write-Error $message + exit 1 +} + +$output = & $git symbolic-ref HEAD 2>&1 | %{ "$_" } +if (!$? -or ($LastExitCode -ne 0)) { + Die "Failed to determine current branch" $output +} + +if (!($output -match "^refs/heads/(\S+)$")) { + Die "Failed to determine current branch. HEAD is $output" $output +} + +$matches[1] diff --git a/scripts/Require-CleanWorkTree.ps1 b/scripts/Require-CleanWorkTree.ps1 new file mode 100644 index 0000000000..741a05ab26 --- /dev/null +++ b/scripts/Require-CleanWorkTree.ps1 @@ -0,0 +1,57 @@ +<# +.SYNOPSIS + Ensures the working tree has no uncommitted changes +.PARAMETER Action + The action that requires a clean work tree. This will appear in error messages. +.PARAMETER WarnOnly + When true, warns rather than dies when uncommitted changes are found. +#> + +[CmdletBinding()] +Param( + [ValidateNotNullOrEmpty()] + [string] + $Action + , + [switch] + $WarnOnly = $false +) + +Set-StrictMode -Version Latest +$ErrorActionPreference = "Stop" + +. $PSScriptRoot\modules.ps1 | out-null + +# Based on git-sh-setup.sh:require_clean_work_tree in git.git, but changed not +# to ignore submodules. + +Push-Location $rootDirectory + +Run-Command -Fatal { & $git rev-parse --verify HEAD | Out-Null } + +& $git update-index -q --refresh + +& $git diff-files --quiet +$error = "" +if ($LastExitCode -ne 0) { + $error = "You have unstaged changes." +} + +& $git diff-index --cached --quiet HEAD -- +if ($LastExitCode -ne 0) { + if ($error) { + $error += " Additionally, your index contains uncommitted changes." + } else { + $error = "Your index contains uncommitted changes." + } +} + +if ($error) { + if ($WarnOnly) { + Write-Warning "$error Continuing anyway." + } else { + Die 2 ("Cannot $Action" + ": $error") + } +} + +Pop-Location diff --git a/scripts/Run-NUnit.ps1 b/scripts/Run-NUnit.ps1 index 804696062d..90cc332340 100644 --- a/scripts/Run-NUnit.ps1 +++ b/scripts/Run-NUnit.ps1 @@ -8,55 +8,40 @@ Param( [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [string] - $Project, + $BasePathToProject + , + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string] + $Project + , [int] - $TimeoutDuration, + $TimeoutDuration + , [string] - $Configuration, + $Configuration + , [switch] $AppVeyor = $false ) -$rootDirectory = Split-Path (Split-Path $MyInvocation.MyCommand.Path) -Push-Location $rootDirectory -$dll = "src\$Project\bin\$Configuration\$Project.dll" - -if ($AppVeyor) { - $nunitDirectory = Join-Path $rootDirectory packages\NUnit.Runners.2.6.4\tools - $consoleRunner = Join-Path $nunitDirectory nunit-console-x86.exe - $args = "-noshadow", "-framework:net-4.5", "-exclude:Timings", $dll - [object[]] $output = "$consoleRunner " + ($args -join " ") - & $consoleRunner ($args | %{ "`"$_`"" }) - if($LastExitCode -ne 0) { - $host.SetShouldExit($LastExitCode) - } -} else { - $nunitDirectory = Join-Path $rootDirectory packages\NUnit.Runners.2.6.4\tools - $consoleRunner = Join-Path $nunitDirectory nunit-console-x86.exe - - $xml = Join-Path $rootDirectory "nunit-$Project.xml" - $outputPath = [System.IO.Path]::GetTempFileName() +$scriptsDirectory = $PSScriptRoot +$rootDirectory = Split-Path ($scriptsDirectory) +. $scriptsDirectory\modules.ps1 | out-null - $args = "-noshadow", "-xml:$xml", "-framework:net-4.5", "-exclude:Timings", $dll - [object[]] $output = "$consoleRunner " + ($args -join " ") +$dll = "$BasePathToProject\$Project\bin\$Configuration\$Project.dll" +$nunitDirectory = Join-Path $rootDirectory packages\NUnit.ConsoleRunner.3.7.0\tools +$consoleRunner = Join-Path $nunitDirectory nunit3-console.exe +$xml = Join-Path $rootDirectory "nunit-$Project.xml" - $process = Start-Process -PassThru -NoNewWindow -RedirectStandardOutput $outputPath $consoleRunner ($args | %{ "`"$_`"" }) - Wait-Process -InputObject $process -Timeout $TimeoutDuration -ErrorAction SilentlyContinue - if ($process.HasExited) { - $output += Get-Content $outputPath - $exitCode = $process.ExitCode - } else { - $output += "Tests timed out. Backtrace:" - $output += Get-DotNetStack $process.Id - $exitCode = 9999 +& { + Trap { + Write-Output "$Project tests failed" + exit -1 } - Stop-Process -InputObject $process - Remove-Item $outputPath - Pop-Location - - $result = New-Object System.Object - $result | Add-Member -Type NoteProperty -Name Output -Value $output - $result | Add-Member -Type NoteProperty -Name ExitCode -Value $exitCode - $result + Run-Process -Fatal $TimeoutDuration $consoleRunner $dll,"--where ""cat != Timings""","--result=$xml;format=AppVeyor" + if (!$?) { + Die 1 "$Project tests failed" + } } diff --git a/scripts/Run-XUnit.ps1 b/scripts/Run-XUnit.ps1 index 58170208be..b788c6ecc5 100644 --- a/scripts/Run-XUnit.ps1 +++ b/scripts/Run-XUnit.ps1 @@ -8,55 +8,48 @@ Param( [Parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [string] - $Project, + $BasePathToProject + , + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string] + $Project + , [int] - $TimeoutDuration, + $TimeoutDuration + , [string] - $Configuration, + $Configuration + , [switch] $AppVeyor = $false ) -$rootDirectory = Split-Path (Split-Path $MyInvocation.MyCommand.Path) -Push-Location $rootDirectory +$scriptsDirectory = $PSScriptRoot +$rootDirectory = Split-Path ($scriptsDirectory) +. $scriptsDirectory\modules.ps1 | out-null -$dll = "src\$Project\bin\$Configuration\$Project.dll" +$dll = "$BasePathToProject\$Project\bin\$Configuration\$Project.dll" -if ($AppVeyor) { - $xunitDirectory = Join-Path $rootDirectory packages\xunit.runner.console.2.1.0\tools - $consoleRunner = Join-Path $xunitDirectory xunit.console.x86.exe - $args = $dll, "-noshadow", "-parallel", "all", "-appveyor" - [object[]] $output = "$consoleRunner " + ($args -join " ") - & $consoleRunner ($args | %{ "`"$_`"" }) - if($LastExitCode -ne 0) { - $host.SetShouldExit($LastExitCode) - } -} else { - $xunitDirectory = Join-Path $rootDirectory packages\xunit.runner.console.2.1.0\tools - $consoleRunner = Join-Path $xunitDirectory xunit.console.x86.exe - $xml = Join-Path $rootDirectory "nunit-$Project.xml" - $outputPath = [System.IO.Path]::GetTempFileName() +$xunitDirectory = Join-Path $rootDirectory packages\xunit.runner.console.2.3.1\tools\net452 +$consoleRunner = Join-Path $xunitDirectory xunit.console.exe - $args = $dll, "-noshadow", "-xml", $xml, "-parallel", "all" - - [object[]] $output = "$consoleRunner " + ($args -join " ") +& { + Trap { + Write-Output "$Project tests failed" + exit -1 + } - $process = Start-Process -PassThru -NoNewWindow -RedirectStandardOutput $outputPath $consoleRunner ($args | %{ "`"$_`"" }) - Wait-Process -InputObject $process -Timeout $TimeoutDuration -ErrorAction SilentlyContinue - if ($process.HasExited) { - $output += Get-Content $outputPath - $exitCode = $process.ExitCode + $args = @() + if ($AppVeyor) { + $args = $dll, "-noshadow", "-parallel", "all", "-appveyor" } else { - $output += "Tests timed out. Backtrace:" - $output += Get-DotNetStack $process.Id - $exitCode = 9999 + $xml = Join-Path $rootDirectory "nunit-$Project.xml" + $args = $dll, "-noshadow", "-xml", $xml, "-parallel", "all" } - Stop-Process -InputObject $process - Remove-Item $outputPath - Pop-Location - $result = New-Object System.Object - $result | Add-Member -Type NoteProperty -Name Output -Value $output - $result | Add-Member -Type NoteProperty -Name ExitCode -Value $exitCode - $result + Run-Process -Fatal $TimeoutDuration $consoleRunner $args + if (!$?) { + Die 1 "$Project tests failed" + } } diff --git a/scripts/build.ps1 b/scripts/build.ps1 new file mode 100644 index 0000000000..aa44a88934 --- /dev/null +++ b/scripts/build.ps1 @@ -0,0 +1,84 @@ +<# +.SYNOPSIS + Builds and (optionally) runs tests for GitHub for Visual Studio +.DESCRIPTION + Build GHfVS +.PARAMETER Clean + When true, all untracked (and ignored) files will be removed from the work + tree and all submodules. Defaults to false. +.PARAMETER Config + Debug or Release +.PARAMETER RunTests + Runs the tests (defauls to false) +#> +[CmdletBinding()] + +Param( + [switch] + $UpdateSubmodules = $false + , + [switch] + $Clean = $false + , + [ValidateSet('Debug', 'Release')] + [string] + $Config = "Release" + , + [switch] + $Package = $false + , + [switch] + $AppVeyor = $false + , + [switch] + $BumpVersion = $false + , + [int] + $BuildNumber = -1 + , + [switch] + $Trace = $false +) + +Set-StrictMode -Version Latest +if ($Trace) { + Set-PSDebug -Trace 1 +} + +. $PSScriptRoot\modules.ps1 | out-null +$env:PATH = "$scriptsDirectory;$scriptsDirectory\Modules;$env:PATH" + +Import-Module $scriptsDirectory\Modules\Debugging.psm1 +Vsix | out-null + +Push-Location $rootDirectory + +if ($UpdateSubmodules) { + Update-Submodules +} + +if ($Clean) { + Clean-WorkingTree +} + +$fullBuild = Test-Path env:GHFVS_KEY +$publishable = $fullBuild -and $AppVeyor -and ($env:APPVEYOR_PULL_REQUEST_NUMBER -or $env:APPVEYOR_REPO_BRANCH -eq "master") +if ($publishable) { #forcing a deploy flag for CI + $Package = $true + $BumpVersion = $true +} + +if ($BumpVersion) { + Write-Output "Bumping the version" + Bump-Version -BumpBuild -BuildNumber:$BuildNumber +} + +if ($Package) { + Write-Output "Building and packaging GitHub for Visual Studio" +} else { + Write-Output "Building GitHub for Visual Studio" +} + +Build-Solution GitHubVs.sln "Build" $config -Deploy:$Package + +Pop-Location diff --git a/scripts/clearerror.cmd b/scripts/clearerror.cmd new file mode 100644 index 0000000000..9a18480a67 --- /dev/null +++ b/scripts/clearerror.cmd @@ -0,0 +1 @@ +@echo off \ No newline at end of file diff --git a/scripts/common.ps1 b/scripts/common.ps1 new file mode 100644 index 0000000000..3637124792 --- /dev/null +++ b/scripts/common.ps1 @@ -0,0 +1,69 @@ +$scriptsDirectory = Split-Path $MyInvocation.MyCommand.Path +$rootDirectory = Split-Path ($scriptsDirectory) + +function Die([string]$message, [object[]]$output) { + if ($output) { + Write-Output $output + $message += ". See output above." + } + Throw (New-Object -TypeName ScriptException -ArgumentList $message) +} + +if (Test-Path "C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe") { + $msbuild = "C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" +} +elseif (Test-Path "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe") { + $msbuild = "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe" +} +else { + Die("No suitable msbuild.exe found.") +} + +$git = (Get-Command 'git.exe').Path +if (!$git) { + $git = Join-Path $rootDirectory 'PortableGit\cmd\git.exe' +} +if (!$git) { + throw "Couldn't find installed an git.exe" +} + +$nuget = Join-Path $rootDirectory "tools\nuget\nuget.exe" + +function Create-TempDirectory { + $path = Join-Path ([System.IO.Path]::GetTempPath()) ([System.IO.Path]::GetRandomFileName()) + New-Item -Type Directory $path +} + +function Build-Solution([string]$solution,[string]$target,[string]$configuration, [bool]$ForVSInstaller) { + Run-Command -Fatal { & $nuget restore $solution -NonInteractive -Verbosity detailed } + $flag1 = "" + $flag2 = "" + if ($ForVSInstaller) { + $flag1 = "/p:IsProductComponent=true" + $flag2 = "/p:TargetVsixContainer=$rootDirectory\build\vsinstaller\GitHub.VisualStudio.vsix" + new-item -Path $rootDirectory\build\vsinstaller -ItemType Directory -Force | Out-Null + } + + Write-Output "$msbuild $solution /target:$target /property:Configuration=$configuration /p:DeployExtension=false /verbosity:minimal /p:VisualStudioVersion=14.0 $flag1 $flag2" + Run-Command -Fatal { & $msbuild $solution /target:$target /property:Configuration=$configuration /p:DeployExtension=false /verbosity:minimal /p:VisualStudioVersion=14.0 $flag1 $flag2 } +} + +function Push-Changes([string]$branch) { + Push-Location $rootDirectory + + Write-Output "Pushing $Branch to GitHub..." + + Run-Command -Fatal { & $git push origin $branch } + + Pop-Location +} + +Add-Type -AssemblyName "System.Core" +Add-Type -TypeDefinition @" +public class ScriptException : System.Exception +{ + public ScriptException(string message) : base(message) + { + } +} +"@ diff --git a/scripts/modules.ps1 b/scripts/modules.ps1 new file mode 100644 index 0000000000..0116e5fc89 --- /dev/null +++ b/scripts/modules.ps1 @@ -0,0 +1,199 @@ +Add-Type -AssemblyName "System.Core" +Add-Type -TypeDefinition @" +public class ScriptException : System.Exception +{ + public int ExitCode { get; private set; } + public ScriptException(string message, int exitCode) : base(message) + { + this.ExitCode = exitCode; + } +} +"@ + +New-Module -ScriptBlock { + $rootDirectory = Split-Path ($PSScriptRoot) + $scriptsDirectory = Join-Path $rootDirectory "scripts" + $nuget = Join-Path $rootDirectory "tools\nuget\nuget.exe" + Export-ModuleMember -Variable scriptsDirectory,rootDirectory,nuget +} + +New-Module -ScriptBlock { + function Die([int]$exitCode, [string]$message, [object[]]$output) { + #$host.SetShouldExit($exitCode) + if ($output) { + Write-Host $output + $message += ". See output above." + } + $hash = @{ + Message = $message + ExitCode = $exitCode + Output = $output + } + Throw (New-Object -TypeName ScriptException -ArgumentList $message,$exitCode) + #throw $message + } + + + function Run-Command([scriptblock]$Command, [switch]$Fatal, [switch]$Quiet) { + $output = "" + + $exitCode = 0 + + if ($Quiet) { + $output = & $command 2>&1 | %{ "$_" } + } else { + & $command + } + + if (!$? -and $LastExitCode -ne 0) { + $exitCode = $LastExitCode + } elseif ($? -and $LastExitCode -ne 0) { + $exitCode = $LastExitCode + } + + if ($exitCode -ne 0) { + if (!$Fatal) { + Write-Host "``$Command`` failed" $output + } else { + Die $exitCode "``$Command`` failed" $output + } + } + $output + } + + function Run-Process([int]$Timeout, [string]$Command, [string[]]$Arguments, [switch]$Fatal = $false) + { + $args = ($Arguments | %{ "`"$_`"" }) + [object[]] $output = "$Command " + $args + $exitCode = 0 + $outputPath = [System.IO.Path]::GetTempFileName() + $process = Start-Process -PassThru -NoNewWindow -RedirectStandardOutput $outputPath $Command ($args | %{ "`"$_`"" }) + Wait-Process -InputObject $process -Timeout $Timeout -ErrorAction SilentlyContinue + if ($process.HasExited) { + $output += Get-Content $outputPath + $exitCode = $process.ExitCode + } else { + $output += "Tests timed out. Backtrace:" + $output += Get-DotNetStack $process.Id + $exitCode = 9999 + } + Stop-Process -InputObject $process + Remove-Item $outputPath + if ($exitCode -ne 0) { + if (!$Fatal) { + Write-Host "``$Command`` failed" $output + } else { + Die $exitCode "``$Command`` failed" $output + } + } + $output + } + + function Create-TempDirectory { + $path = Join-Path ([System.IO.Path]::GetTempPath()) ([System.IO.Path]::GetRandomFileName()) + New-Item -Type Directory $path + } + + Export-ModuleMember -Function Die,Run-Command,Run-Process,Create-TempDirectory +} + +New-Module -ScriptBlock { + function Find-MSBuild() { + if (Test-Path "C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe") { + $msbuild = "C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" + } + elseif (Test-Path "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe") { + $msbuild = "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe" + } + else { + Die("No suitable msbuild.exe found.") + } + $msbuild + } + + function Build-Solution([string]$solution, [string]$target, [string]$configuration, [switch]$ForVSInstaller, [bool]$Deploy = $false) { + Run-Command -Fatal { & $nuget restore $solution -NonInteractive -Verbosity detailed } + $flag1 = "" + $flag2 = "" + if ($ForVSInstaller) { + $flag1 = "/p:IsProductComponent=true" + $flag2 = "/p:TargetVsixContainer=$rootDirectory\build\vsinstaller\GitHub.VisualStudio.vsix" + new-item -Path $rootDirectory\build\vsinstaller -ItemType Directory -Force | Out-Null + } elseif (!$Deploy) { + $configuration += "WithoutVsix" + $flag1 = "/p:Package=Skip" + } + + $msbuild = Find-MSBuild + + Write-Host "$msbuild $solution /target:$target /property:Configuration=$configuration /p:DeployExtension=false /verbosity:minimal /p:VisualStudioVersion=14.0 $flag1 $flag2" + Run-Command -Fatal { & $msbuild $solution /target:$target /property:Configuration=$configuration /p:DeployExtension=false /verbosity:minimal /p:VisualStudioVersion=14.0 $flag1 $flag2 } + } + + Export-ModuleMember -Function Find-MSBuild,Build-Solution +} + +New-Module -ScriptBlock { + function Find-Git() { + $git = (Get-Command 'git.exe').Path + if (!$git) { + $git = Join-Path $rootDirectory 'PortableGit\cmd\git.exe' + } + if (!$git) { + Die("Couldn't find installed an git.exe") + } + $git + } + + function Push-Changes([string]$branch) { + Push-Location $rootDirectory + + Write-Host "Pushing $Branch to GitHub..." + + Run-Command -Fatal { & $git push origin $branch } + + Pop-Location + } + + function Update-Submodules { + Write-Host "Updating submodules..." + Write-Host "" + + Run-Command -Fatal { git submodule init } + Run-Command -Fatal { git submodule sync } + Run-Command -Fatal { git submodule update --recursive --force } + } + + function Clean-WorkingTree { + Write-Host "Cleaning work tree..." + Write-Host "" + + Run-Command -Fatal { git clean -xdf } + Run-Command -Fatal { git submodule foreach git clean -xdf } + } + + function Get-HeadSha { + Run-Command -Quiet { & $git rev-parse HEAD } + } + + $git = Find-Git + Export-ModuleMember -Function Find-Git,Push-Changes,Update-Submodules,Clean-WorkingTree,Get-HeadSha +} + +New-Module -ScriptBlock { + function Write-Manifest([string]$directory) { + Add-Type -Path (Join-Path $rootDirectory packages\Newtonsoft.Json.6.0.8\lib\net35\Newtonsoft.Json.dll) + + $manifest = @{ + NewestExtension = @{ + Version = [string](Read-CurrentVersionVsix) + Commit = [string](Get-HeadSha) + } + } + + $manifestPath = Join-Path $directory manifest + [Newtonsoft.Json.JsonConvert]::SerializeObject($manifest) | Out-File $manifestPath -Encoding UTF8 + } + + Export-ModuleMember -Function Write-Manifest +} \ No newline at end of file diff --git a/scripts/modules/AppVeyor.ps1 b/scripts/modules/AppVeyor.ps1 new file mode 100644 index 0000000000..49470283d0 --- /dev/null +++ b/scripts/modules/AppVeyor.ps1 @@ -0,0 +1,41 @@ +Set-StrictMode -Version Latest + +New-Module -ScriptBlock { + + function Get-AppVeyorPath { + Join-Path $rootDirectory appveyor.yml + } + + function Read-VersionAppVeyor { + $file = Get-AppVeyorPath + $currentVersion = Get-Content $file | %{ + $regex = "`^version: '(\d+\.\d+\.\d+)\.`{build`}'`$" + if ($_ -match $regex) { + $matches[1] + } + } + [System.Version] $currentVersion + } + + function Write-VersionAppVeyor([System.Version]$version) { + $file = Get-AppVeyorPath + $numberOfReplacements = 0 + $newContent = Get-Content $file | %{ + $newString = $_ + $regex = "version: '(\d+\.\d+\.\d+)" + if ($newString -match $regex) { + $numberOfReplacements++ + $newString = $newString -replace $regex, "version: '$($version.Major).$($version.Minor).$($version.Build)" + } + $newString + } + + if ($numberOfReplacements -ne 1) { + Die 1 "Expected to replace the version number in 1 place in appveyor.yml (version) but actually replaced it in $numberOfReplacements" + } + + $newContent | Set-Content $file + } + + Export-ModuleMember -Function Get-AppVeyorPath,Read-VersionAppVeyor,Write-VersionAppVeyor +} \ No newline at end of file diff --git a/scripts/modules/BuildUtils.psm1 b/scripts/modules/BuildUtils.psm1 new file mode 100644 index 0000000000..f93d6eecb2 --- /dev/null +++ b/scripts/modules/BuildUtils.psm1 @@ -0,0 +1,18 @@ +Set-StrictMode -Version Latest + +function Update-Submodules { + Write-Output "Updating submodules..." + Write-Output "" + + Run-Command -Fatal { git submodule init } + Run-Command -Fatal { git submodule sync } + Run-Command -Fatal { git submodule update --recursive --force } +} + +function Clean-WorkingTree { + Write-Output "Cleaning work tree..." + Write-Output "" + + Run-Command -Fatal { git clean -xdf } + Run-Command -Fatal { git submodule foreach git clean -xdf } +} \ No newline at end of file diff --git a/scripts/modules/Debugging.psm1 b/scripts/modules/Debugging.psm1 new file mode 100644 index 0000000000..2ca851ec0a --- /dev/null +++ b/scripts/modules/Debugging.psm1 @@ -0,0 +1,26 @@ +Set-StrictMode -Version Latest +$ErrorActionPreference = "Stop" + +$rootDirectory = Split-Path (Split-Path (Split-Path $MyInvocation.MyCommand.Path)) +$cdb = Join-Path $rootDirectory "tools\Debugging Tools for Windows\cdb.exe" + +function Get-DotNetStack([int]$ProcessId) { + $commands = @( + ".cordll -ve -u -l", + ".loadby sos clr", + "!eestack -ee", + ".detach", + "q" + ) + + $Env:_NT_SYMBOL_PATH = "cache*${Env:PROGRAMDATA}\dbg\sym;SRV*http://msdl.microsoft.com/download/symbols;srv*http://windows-symbols.githubapp.com/symbols" + $output = & $cdb -lines -p $ProcessId -c ($commands -join "; ") + if ($LastExitCode -ne 0) { + $output + throw "Error running cdb" + } + + $start = ($output | Select-String -List -Pattern "^Thread 0").LineNumber - 1 + $end = ($output | Select-String -List -Pattern "^Detached").LineNumber - 2 + $output[$start..$end] +} diff --git a/scripts/modules/SolutionInfo.ps1 b/scripts/modules/SolutionInfo.ps1 new file mode 100644 index 0000000000..4e1d6e1d0f --- /dev/null +++ b/scripts/modules/SolutionInfo.ps1 @@ -0,0 +1,41 @@ +Set-StrictMode -Version Latest + +New-Module -ScriptBlock { + + function Get-SolutionInfoPath { + Join-Path $rootDirectory src\common\SolutionInfo.cs + } + + function Read-VersionSolutionInfo { + $file = Get-SolutionInfoPath + $currentVersion = Get-Content $file | %{ + $regex = "const string Version = `"(\d+\.\d+\.\d+\.\d+)`";" + if ($_ -match $regex) { + $matches[1] + } + } + [System.Version] $currentVersion + } + + function Write-VersionSolutionInfo([System.Version]$version) { + $file = Get-SolutionInfoPath + $numberOfReplacements = 0 + $newContent = Get-Content $file | %{ + $newString = $_ + $regex = "(string Version = `")\d+\.\d+\.\d+\.\d+" + if ($_ -match $regex) { + $numberOfReplacements++ + $newString = $newString -replace $regex, "string Version = `"$version" + } + $newString + } + + if ($numberOfReplacements -ne 1) { + Die 1 "Expected to replace the version number in 1 place in SolutionInfo.cs (Version) but actually replaced it in $numberOfReplacements" + } + + $newContent | Set-Content $file + } + + Export-ModuleMember -Function Get-SolutionInfoPath,Read-VersionSolutionInfo,Write-VersionSolutionInfo +} \ No newline at end of file diff --git a/scripts/modules/Versioning.ps1 b/scripts/modules/Versioning.ps1 new file mode 100644 index 0000000000..22f94a8656 --- /dev/null +++ b/scripts/modules/Versioning.ps1 @@ -0,0 +1,68 @@ +Set-StrictMode -Version Latest + +New-Module -ScriptBlock { + + function Validate-Version([System.Version]$version) { + ($version.Major -ge 0) -and ($version.Minor -ge 0) -and ($version.Build -ge 0) + } + + function Generate-Version([System.Version]$currentVersion, + [bool]$BumpMajor, [bool] $BumpMinor, + [bool]$BumpPatch, [bool] $BumpBuild, + [int]$BuildNumber = -1) { + + if (!(Validate-Version $currentVersion)) { + Die 1 "Invalid current version $currentVersion" + } + + if ($BumpMajor) { + New-Object -TypeName System.Version -ArgumentList ($currentVersion.Major + 1), $currentVersion.Minor, $currentVersion.Build, 0 + } elseif ($BumpMinor) { + New-Object -TypeName System.Version -ArgumentList $currentVersion.Major, ($currentVersion.Minor + 1), $currentVersion.Build, 0 + } elseif ($BumpPatch) { + New-Object -TypeName System.Version -ArgumentList $currentVersion.Major, $currentVersion.Minor, ($currentVersion.Build + 1), 0 + } elseif ($BumpBuild) { + if ($BuildNumber -ge 0) { + [System.Version] "$($currentVersion.Major).$($currentVersion.Minor).$($currentVersion.Build).$BuildNumber" + } else { + $timestamp = [System.DateTimeOffset]::UtcNow.ToUnixTimeSeconds() + [System.Version] "$($currentVersion.Major).$($currentVersion.Minor).$($currentVersion.Build).$timestamp" + } + } + else { + $currentVersion + } + } + + function Read-Version { + Read-VersionAppVeyor + } + + function Write-Version([System.Version]$version) { + Write-VersionVsixManifest $version + Write-VersionSolutionInfo $version + Write-VersionAppVeyor $version + Push-Location $rootDirectory + New-Item -Type Directory -ErrorAction SilentlyContinue build | out-null + Set-Content build\version $version + Pop-Location + } + + function Commit-Version([System.Version]$version) { + + Write-Host "Committing version bump..." + + Push-Location $rootDirectory + + Run-Command -Fatal { & $git commit --message "Bump version to $version" -- } + + $output = Start-Process $git "commit --all --message ""Bump version to $version""" -wait -NoNewWindow -ErrorAction Continue -PassThru + if ($output.ExitCode -ne 0) { + Die 1 "Error committing version bump" + } + + Pop-Location + } + + Export-ModuleMember -Function Validate-Version,Write-Version,Commit-Version,Generate-Version,Read-Version +} diff --git a/scripts/modules/Vsix.ps1 b/scripts/modules/Vsix.ps1 new file mode 100644 index 0000000000..63563d3f00 --- /dev/null +++ b/scripts/modules/Vsix.ps1 @@ -0,0 +1,35 @@ +Set-StrictMode -Version Latest + +New-Module -ScriptBlock { + $gitHubDirectory = Join-Path $rootDirectory src\GitHub.VisualStudio + + function Get-VsixManifestPath { + Join-Path $gitHubDirectory source.extension.vsixmanifest + } + + function Get-VsixManifestXml { + $xmlLines = Get-Content (Get-VsixManifestPath) + # If we don't explicitly join the lines with CRLF, comments in the XML will + # end up with LF line-endings, which will make Git spew a warning when we + # try to commit the version bump. + $xmlText = $xmlLines -join [System.Environment]::NewLine + + [xml] $xmlText + } + + function Read-CurrentVersionVsix { + [System.Version] (Get-VsixManifestXml).PackageManifest.Metadata.Identity.Version + } + + function Write-VersionVsixManifest([System.Version]$version) { + + $document = Get-VsixManifestXml + + $numberOfReplacements = 0 + $document.PackageManifest.Metadata.Identity.Version = $version.ToString() + + $document.Save((Get-VsixManifestPath)) + } + + Export-ModuleMember -Function Read-CurrentVersionVsix,Write-VersionVsixManifest +} \ No newline at end of file diff --git a/scripts/test.ps1 b/scripts/test.ps1 new file mode 100644 index 0000000000..5f4d4561e9 --- /dev/null +++ b/scripts/test.ps1 @@ -0,0 +1,64 @@ +<# +.SYNOPSIS + Runs tests for GitHub for Visual Studio +.DESCRIPTION + Build GHfVS +.PARAMETER Clean + When true, all untracked (and ignored) files will be removed from the work + tree and all submodules. Defaults to false. +#> +[CmdletBinding()] + +Param( + [ValidateSet('Debug', 'Release')] + [string] + $Config = "Release" + , + [int] + $TimeoutDuration = 180 + , + [switch] + $AppVeyor = $false + , + [switch] + $Trace = $false + +) + +Set-StrictMode -Version Latest +if ($Trace) { + Set-PSDebug -Trace 1 +} + +$env:PATH = "$$PSScriptRoot;$env:PATH" + +$exitcode = 0 + +Write-Output "Running Tracking Collection Tests..." +Run-NUnit src TrackingCollectionTests $TimeoutDuration $config -AppVeyor:$AppVeyor +if (!$?) { + $exitcode = 1 +} + +Write-Output "Running GitHub.UI.UnitTests..." +Run-NUnit test GitHub.UI.UnitTests $TimeoutDuration $config -AppVeyor:$AppVeyor +if (!$?) { + $exitcode = 2 +} + +Write-Output "Running UnitTests..." +Run-XUnit src UnitTests $TimeoutDuration $config -AppVeyor:$AppVeyor +if (!$?) { + $exitcode = 3 +} + +Write-Output "Running GitHub.InlineReviews.UnitTests..." +Run-XUnit test GitHub.InlineReviews.UnitTests $TimeoutDuration $config -AppVeyor:$AppVeyor +if (!$?) { + $exitcode = 4 +} + +if ($exitcode -ne 0 -and $AppVeyor) { + $host.SetShouldExit($exitcode) +} +exit $exitcode \ No newline at end of file diff --git a/signingkey.snk b/signingkey.snk new file mode 100644 index 0000000000..371008d5a6 Binary files /dev/null and b/signingkey.snk differ diff --git a/src/CredentialManagement/CredentialManagement.csproj b/src/CredentialManagement/CredentialManagement.csproj index bfa3f7e2d4..f1f0d4d672 100644 --- a/src/CredentialManagement/CredentialManagement.csproj +++ b/src/CredentialManagement/CredentialManagement.csproj @@ -11,10 +11,9 @@ GitHub.CredentialManagement v4.6.1 512 - - - - bin\$(Configuration)\ + ..\common\GitHubVS.ruleset + true + true true @@ -23,6 +22,18 @@ DEBUG;TRACE prompt 4 + false + bin\Debug\ + + + true + full + false + CODE_ANALYSIS;DEBUG;TRACE + prompt + 4 + true + bin\Debug\ pdbonly @@ -30,6 +41,8 @@ TRACE prompt 4 + true + bin\Release\ diff --git a/src/DesignTimeStyleHelper/DesignTimeStyleHelper.csproj b/src/DesignTimeStyleHelper/DesignTimeStyleHelper.csproj index 240fd74259..a026d1c635 100644 --- a/src/DesignTimeStyleHelper/DesignTimeStyleHelper.csproj +++ b/src/DesignTimeStyleHelper/DesignTimeStyleHelper.csproj @@ -14,7 +14,6 @@ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 4 true - bin\$(Configuration)\ @@ -25,6 +24,7 @@ DEBUG;TRACE prompt 4 + bin\Debug\ AnyCPU @@ -34,11 +34,12 @@ prompt 4 true + bin\Release\ - - ..\..\packages\VSSDK.ComponentModelHost.12.0.4\lib\net45\Microsoft.VisualStudio.ComponentModelHost.dll - False + + ..\..\packages\Microsoft.VisualStudio.ComponentModelHost.14.0.25424\lib\net45\Microsoft.VisualStudio.ComponentModelHost.dll + True ..\..\packages\Microsoft.VisualStudio.Shell.Immutable.10.0.10.0.30319\lib\net40\Microsoft.VisualStudio.Shell.Immutable.10.0.dll @@ -141,7 +142,9 @@ ResXFileCodeGenerator Resources.Designer.cs - + + Designer + SettingsSingleFileGenerator Settings.Designer.cs @@ -149,7 +152,9 @@ - + + Designer + diff --git a/src/DesignTimeStyleHelper/packages.config b/src/DesignTimeStyleHelper/packages.config index ec31dd8183..8b807cc9fc 100644 --- a/src/DesignTimeStyleHelper/packages.config +++ b/src/DesignTimeStyleHelper/packages.config @@ -1,5 +1,6 @@  + @@ -9,5 +10,4 @@ - \ No newline at end of file diff --git a/src/GitHub.Api/GitHub.Api.csproj b/src/GitHub.Api/GitHub.Api.csproj index dc719d5460..752d52b193 100644 --- a/src/GitHub.Api/GitHub.Api.csproj +++ b/src/GitHub.Api/GitHub.Api.csproj @@ -11,8 +11,9 @@ GitHub.Api v4.6.1 512 - bin\$(Configuration)\ - + ..\common\GitHubVS.ruleset + true + true true @@ -21,10 +22,18 @@ DEBUG;TRACE prompt 4 + false + bin\Debug\ + + + true + full + false + CODE_ANALYSIS;DEBUG;TRACE + prompt + 4 true - ..\common\GitHubVS.ruleset - true - true + bin\Debug\ pdbonly @@ -33,9 +42,7 @@ prompt 4 true - true - true - ..\common\GitHubVS.ruleset + bin\Release\ @@ -50,11 +57,11 @@ - + ApiClientConfiguration_User.cs - + diff --git a/src/GitHub.App/GitHub.App.csproj b/src/GitHub.App/GitHub.App.csproj index 82207aacb2..41e1746c5c 100644 --- a/src/GitHub.App/GitHub.App.csproj +++ b/src/GitHub.App/GitHub.App.csproj @@ -7,20 +7,15 @@ AnyCPU {1A1DA411-8D1F-4578-80A6-04576BEA2DC5} Library + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} Properties GitHub.App GitHub.App v4.6.1 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - 4 - true ..\common\GitHubVS.ruleset true - bin\$(Configuration)\ - + true true @@ -29,10 +24,18 @@ DEBUG;TRACE prompt 4 + false + bin\Debug\ + + + true + full + false + CODE_ANALYSIS;DEBUG;TRACE + prompt + 4 true - ..\common\GitHubVS.ruleset - true - true + bin\Debug\ pdbonly @@ -41,9 +44,7 @@ prompt 4 true - true - true - ..\common\GitHubVS.ruleset + bin\Release\ @@ -51,9 +52,9 @@ ..\..\packages\LibGit2Sharp.0.24.0\lib\net40\LibGit2Sharp.dll True - - ..\..\packages\VSSDK.ComponentModelHost.12.0.4\lib\net45\Microsoft.VisualStudio.ComponentModelHost.dll - False + + ..\..\packages\Microsoft.VisualStudio.ComponentModelHost.14.0.25424\lib\net45\Microsoft.VisualStudio.ComponentModelHost.dll + True ..\..\packages\Microsoft.VisualStudio.Shell.14.0.14.3.25407\lib\Microsoft.VisualStudio.Shell.14.0.dll @@ -237,7 +238,9 @@ - + + Designer + Designer diff --git a/src/GitHub.App/packages.config b/src/GitHub.App/packages.config index c81ebe1f10..abf5ca5dbb 100644 --- a/src/GitHub.App/packages.config +++ b/src/GitHub.App/packages.config @@ -2,6 +2,7 @@ + @@ -16,5 +17,4 @@ - \ No newline at end of file diff --git a/src/GitHub.Exports.Reactive/GitHub.Exports.Reactive.csproj b/src/GitHub.Exports.Reactive/GitHub.Exports.Reactive.csproj index bf07f4129b..62b1cf21ed 100644 --- a/src/GitHub.Exports.Reactive/GitHub.Exports.Reactive.csproj +++ b/src/GitHub.Exports.Reactive/GitHub.Exports.Reactive.csproj @@ -12,10 +12,9 @@ GitHub.Exports.Reactive v4.6.1 512 - - - bin\$(Configuration)\ - + ..\common\GitHubVS.ruleset + true + true true @@ -24,10 +23,18 @@ DEBUG;TRACE prompt 4 + false + bin\Debug\ + + + true + full + false + CODE_ANALYSIS;DEBUG;TRACE + prompt + 4 true - ..\common\GitHubVS.ruleset - true - true + bin\Debug\ pdbonly @@ -36,9 +43,7 @@ prompt 4 true - true - true - ..\common\GitHubVS.ruleset + bin\Release\ diff --git a/src/GitHub.Exports/GitHub.Exports.csproj b/src/GitHub.Exports/GitHub.Exports.csproj index 525fd7a02d..f8e219f30b 100644 --- a/src/GitHub.Exports/GitHub.Exports.csproj +++ b/src/GitHub.Exports/GitHub.Exports.csproj @@ -12,10 +12,9 @@ GitHub.Exports v4.6.1 512 - - - bin\$(Configuration)\ - + ..\common\GitHubVS.ruleset + true + true true @@ -24,10 +23,18 @@ DEBUG;TRACE prompt 4 + false + bin\Debug\ + + + true + full + false + CODE_ANALYSIS;DEBUG;TRACE + prompt + 4 true - ..\common\GitHubVS.ruleset - true - true + bin\Debug\ pdbonly @@ -36,9 +43,7 @@ prompt 4 true - true - true - ..\common\GitHubVS.ruleset + bin\Release\ @@ -52,9 +57,9 @@ ..\..\packages\LibGit2Sharp.0.24.0\lib\net40\LibGit2Sharp.dll True - - ..\..\packages\VSSDK.ComponentModelHost.12.0.4\lib\net45\Microsoft.VisualStudio.ComponentModelHost.dll - False + + ..\..\packages\Microsoft.VisualStudio.ComponentModelHost.14.0.25424\lib\net45\Microsoft.VisualStudio.ComponentModelHost.dll + True ..\..\packages\Microsoft.VisualStudio.Shell.14.0.14.3.25407\lib\Microsoft.VisualStudio.Shell.14.0.dll @@ -145,9 +150,7 @@ Properties\settings.json - - Services\MetricsService.cs - + diff --git a/src/GitHub.Exports/Services/MetricsService.cs b/src/GitHub.Exports/Services/MetricsService.cs new file mode 100644 index 0000000000..3d5af8fc88 --- /dev/null +++ b/src/GitHub.Exports/Services/MetricsService.cs @@ -0,0 +1,152 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.Composition; +using System.Diagnostics.CodeAnalysis; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; +using GitHub.Models; +using GitHub.Services; +using Octokit; +using Octokit.Internal; + +namespace GitHub.App +{ + [Export(typeof(IMetricsService))] + [PartCreationPolicy(CreationPolicy.NonShared)] + public class MetricsService : IMetricsService + { +#if DEBUG + [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields", Justification = "We have conditional compilation")] + static readonly Uri centralUri = new Uri("http://localhost:4000/", UriKind.Absolute); +#else + static readonly Uri centralUri = new Uri("https://central.github.com/", UriKind.Absolute); +#endif + + [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields", Justification = "We have conditional compilation")] + readonly Lazy httpClient; + + [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields", Justification = "We have conditional compilation")] + readonly ProductHeaderValue productHeader; + + [ImportingConstructor] + public MetricsService(Lazy httpClient, IProgram program) + { + this.httpClient = httpClient; + this.productHeader = program.ProductHeader; + } + +#if DEBUG && !SEND_DEBUG_METRICS + public Task PostUsage(UsageModel model) + { + return Task.CompletedTask; + } +#else + public async Task PostUsage(UsageModel model) + { + var request = new Request + { + Method = HttpMethod.Post, + BaseAddress = centralUri, + Endpoint = new Uri("api/usage/visualstudio", UriKind.Relative), + }; + + request.Headers.Add("User-Agent", productHeader.ToString()); + + request.Body = SerializeRequest(model); + request.ContentType = "application/json"; + + await httpClient.Value.Send(request); + } +#endif + + public Task SendOptOut() + { + // Temporarily disabled until https://github.com/github/central/issues/213 gets resolved + return Task.FromResult(0); + + /* + var request = new Request + { + Method = HttpMethod.Post, + AllowAutoRedirect = true, + Endpoint = new Uri(centralUri, new Uri("api/usage/visualstudio?optout=1", UriKind.Relative)), + }; + request.Headers.Add("User-Agent", productHeader.ToString()); + request.Body = new StringContent(""); + request.ContentType = "application/json"; + await httpClient.Value.Send((IRequest)request, cancellationToken); + */ + } + + public Task SendOptIn() + { + // Temporarily disabled until https://github.com/github/central/issues/213 gets resolved + return Task.FromResult(0); + + /* + var request = new Request + { + Method = HttpMethod.Post, + AllowAutoRedirect = true, + Endpoint = new Uri(centralUri, new Uri("api/usage/visualstudio?optin=1", UriKind.Relative)), + }; + request.Headers.Add("User-Agent", productHeader.ToString()); + request.Body = new StringContent(""); + request.ContentType = "application/json"; + return Observable.FromAsync(cancellationToken => httpClient.Value.Send((IRequest)request, cancellationToken)) + .AsCompletion(); + */ + } + + static StringContent SerializeRequest(UsageModel model) + { + var serializer = new SimpleJsonSerializer(); + var dictionary = ToModelDictionary(model); + return new StringContent(serializer.Serialize(dictionary), Encoding.UTF8, "application/json"); + } + + static Dictionary ToModelDictionary(object model) + { + var dict = new Dictionary(); + var type = model.GetType(); + + foreach (var prop in type.GetProperties()) + { + if (prop.PropertyType.IsValueType || prop.PropertyType == typeof(string)) + { + dict.Add(ToJsonPropertyName(prop.Name), prop.GetValue(model)); + } + else + { + var value = prop.GetValue(model); + + if (value == null) + { + dict.Add(ToJsonPropertyName(prop.Name), value); + } + else + { + dict.Add(ToJsonPropertyName(prop.Name), ToModelDictionary(value)); + } + } + } + + return dict; + } + + /// + /// Convert from PascalCase to camelCase. + /// + [SuppressMessage("Microsoft.Globalization", "CA1308:NormalizeStringsToUppercase")] + static string ToJsonPropertyName(string propertyName) + { + if (propertyName.Length < 2) + { + return propertyName.ToLowerInvariant(); + } + + return propertyName.Substring(0, 1).ToLowerInvariant() + propertyName.Substring(1); + } + } +} diff --git a/src/GitHub.Exports/packages.config b/src/GitHub.Exports/packages.config index 3c47d3ef89..769dc7c3e5 100644 --- a/src/GitHub.Exports/packages.config +++ b/src/GitHub.Exports/packages.config @@ -2,6 +2,7 @@ + @@ -16,6 +17,5 @@ - \ No newline at end of file diff --git a/src/GitHub.Extensions.Reactive/GitHub.Extensions.Reactive.csproj b/src/GitHub.Extensions.Reactive/GitHub.Extensions.Reactive.csproj index 93d2177a96..4705673aa1 100644 --- a/src/GitHub.Extensions.Reactive/GitHub.Extensions.Reactive.csproj +++ b/src/GitHub.Extensions.Reactive/GitHub.Extensions.Reactive.csproj @@ -11,14 +11,9 @@ GitHub.Extensions.Reactive v4.6.1 512 - - - 4 - true ..\common\GitHubVS.ruleset true - bin\$(Configuration)\ - + true true @@ -27,10 +22,18 @@ DEBUG;TRACE prompt 4 + false + bin\Debug\ + + + true + full + false + CODE_ANALYSIS;DEBUG;TRACE + prompt + 4 true - ..\common\GitHubVS.ruleset - true - true + bin\Debug\ pdbonly @@ -39,11 +42,9 @@ prompt 4 true - true - true - ..\common\GitHubVS.ruleset + bin\Release\ - + diff --git a/src/GitHub.Extensions/GitHub.Extensions.csproj b/src/GitHub.Extensions/GitHub.Extensions.csproj index 266f935cb0..1bb1d0f08b 100644 --- a/src/GitHub.Extensions/GitHub.Extensions.csproj +++ b/src/GitHub.Extensions/GitHub.Extensions.csproj @@ -11,14 +11,9 @@ GitHub.Extensions v4.6.1 512 - - - 4 - true ..\common\GitHubVS.ruleset true - bin\$(Configuration)\ - + true true @@ -27,10 +22,18 @@ DEBUG;TRACE prompt 4 + false + bin\Debug\ + + + true + full + false + CODE_ANALYSIS;DEBUG;TRACE + prompt + 4 true - ..\common\GitHubVS.ruleset - true - true + bin\Debug\ pdbonly @@ -39,11 +42,9 @@ prompt 4 true - true - true - ..\common\GitHubVS.ruleset + bin\Release\ - + ..\..\packages\Microsoft.VisualStudio.Shell.Immutable.10.0.10.0.30319\lib\net40\Microsoft.VisualStudio.Shell.Immutable.10.0.dll diff --git a/src/GitHub.InlineReviews/Commands/ExportCommandAttribute.cs b/src/GitHub.InlineReviews/Commands/ExportCommandAttribute.cs index 802a95d8a6..d01dd0fd35 100644 --- a/src/GitHub.InlineReviews/Commands/ExportCommandAttribute.cs +++ b/src/GitHub.InlineReviews/Commands/ExportCommandAttribute.cs @@ -13,7 +13,7 @@ namespace GitHub.InlineReviews.Commands /// [MetadataAttribute] [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] - class ExportCommandAttribute : ExportAttribute + sealed class ExportCommandAttribute : ExportAttribute { public ExportCommandAttribute(Type packageType) : base(typeof(IPackageResource)) diff --git a/src/GitHub.InlineReviews/Commands/ShowPullRequestCommentsCommand.cs b/src/GitHub.InlineReviews/Commands/ShowPullRequestCommentsCommand.cs index e596eb248d..a9d3f74d01 100644 --- a/src/GitHub.InlineReviews/Commands/ShowPullRequestCommentsCommand.cs +++ b/src/GitHub.InlineReviews/Commands/ShowPullRequestCommentsCommand.cs @@ -15,7 +15,7 @@ namespace GitHub.InlineReviews.Commands /// Shows the pull request comments view for a specified pull request. /// [ExportCommand(typeof(InlineReviewsPackage))] - class ShowPullRequestCommentsCommand : VsCommand + public class ShowPullRequestCommentsCommand : VsCommand { public static readonly Guid CommandSet = Guids.CommandSetGuid; public const int CommandId = PkgCmdIDList.ShowPullRequestCommentsId; diff --git a/src/GitHub.InlineReviews/Commands/VsCommand.cs b/src/GitHub.InlineReviews/Commands/VsCommand.cs index ec0c49384b..67f7f51a4a 100644 --- a/src/GitHub.InlineReviews/Commands/VsCommand.cs +++ b/src/GitHub.InlineReviews/Commands/VsCommand.cs @@ -75,7 +75,7 @@ protected override void ExecuteUntyped(object parameter) /// . /// /// - abstract class VsCommand : VsCommandBase, IVsCommand, ICommand + public abstract class VsCommand : VsCommandBase, IVsCommand, ICommand { /// /// Initializes a new instance of the class. diff --git a/src/GitHub.InlineReviews/Commands/VsCommandBase.cs b/src/GitHub.InlineReviews/Commands/VsCommandBase.cs index 690e113c05..ec5f6e89c5 100644 --- a/src/GitHub.InlineReviews/Commands/VsCommandBase.cs +++ b/src/GitHub.InlineReviews/Commands/VsCommandBase.cs @@ -8,7 +8,7 @@ namespace GitHub.InlineReviews.Commands /// /// Base class for and . /// - abstract class VsCommandBase : IVsCommandBase + public abstract class VsCommandBase : IVsCommandBase { EventHandler canExecuteChanged; @@ -68,7 +68,7 @@ void ICommand.Execute(object parameter) /// Implements the event handler for . /// /// The event parameter. - protected void BeforeQueryStatus(OleMenuCommand command) + protected void BeforeQueryStatus(MenuCommand command) { command.Enabled = IsEnabled; command.Visible = IsVisible; @@ -86,7 +86,7 @@ protected void BeforeQueryStatus(OleMenuCommand command) /// /// The package. /// The command. - protected void Register(IServiceProvider package, OleMenuCommand command) + protected void Register(IServiceProvider package, MenuCommand command) { Package = package; var serviceProvider = (IServiceProvider)package; diff --git a/src/GitHub.InlineReviews/GitHub.InlineReviews.csproj b/src/GitHub.InlineReviews/GitHub.InlineReviews.csproj index d084deb0ff..716b6f77cf 100644 --- a/src/GitHub.InlineReviews/GitHub.InlineReviews.csproj +++ b/src/GitHub.InlineReviews/GitHub.InlineReviews.csproj @@ -29,25 +29,68 @@ true true true + ..\common\GitHubVS.ruleset + true + true true full false + TRACE;DEBUG + prompt + 4 + false + True + True + true bin\Debug\ - DEBUG;TRACE + + + true + full + false + TRACE;DEBUG;CODE_ANALYSIS prompt 4 + true + True + True + bin\Debug\ + + + true + full + false + TRACE;DEBUG;CODE_ANALYSIS + prompt + 4 + false False False + bin\Debug\ pdbonly true + TRACE + prompt + 4 + true + True + True bin\Release\ + + + pdbonly + true TRACE prompt 4 + true + False + False + bin\Release\ @@ -149,8 +192,12 @@ - - + + Designer + + + Designer + Designer @@ -227,9 +274,9 @@ False - - ..\..\packages\VSSDK.ComponentModelHost.12.0.4\lib\net45\Microsoft.VisualStudio.ComponentModelHost.dll - False + + ..\..\packages\Microsoft.VisualStudio.ComponentModelHost.14.0.25424\lib\net45\Microsoft.VisualStudio.ComponentModelHost.dll + True ..\..\packages\Microsoft.VisualStudio.CoreUtility.14.3.25407\lib\net45\Microsoft.VisualStudio.CoreUtility.dll diff --git a/src/GitHub.InlineReviews/Glyph/GlyphMargin.cs b/src/GitHub.InlineReviews/Glyph/GlyphMargin.cs index 37518083fe..030918aaea 100644 --- a/src/GitHub.InlineReviews/Glyph/GlyphMargin.cs +++ b/src/GitHub.InlineReviews/Glyph/GlyphMargin.cs @@ -16,12 +16,11 @@ namespace GitHub.InlineReviews.Glyph /// Responsibe for updating the margin when tags change. /// /// The type of glyph tag we're managing. - public sealed class GlyphMargin : IWpfTextViewMargin, ITextViewMargin, IDisposable where TGlyphTag: ITag + public sealed class GlyphMargin : IWpfTextViewMargin, ITextViewMargin, IDisposable where TGlyphTag : ITag { bool handleZoom; bool isDisposed; Grid marginVisual; - double marginWidth; bool refreshAllGlyphs; ITagAggregator tagAggregator; IWpfTextView textView; @@ -43,13 +42,12 @@ public GlyphMargin( this.isMarginVisible = isMarginVisible; this.marginName = marginName; this.handleZoom = handleZoom; - this.marginWidth = marginWidth; marginVisual = gridFactory(); marginVisual.Width = marginWidth; visualManager = new GlyphMarginVisualManager(textView, glyphFactory, marginVisual, - this, editorFormatMap, marginPropertiesName); + editorFormatMap, marginPropertiesName); // Do on Loaded to give diff view a chance to initialize. marginVisual.Loaded += OnLoaded; @@ -65,9 +63,9 @@ public void Dispose() } } - public ITextViewMargin GetTextViewMargin(string marginName) + public ITextViewMargin GetTextViewMargin(string name) { - return (marginName == this.marginName) ? this : null; + return (name == marginName) ? this : null; } public bool Enabled diff --git a/src/GitHub.InlineReviews/Glyph/GlyphMarginVisualManager.cs b/src/GitHub.InlineReviews/Glyph/GlyphMarginVisualManager.cs index 3efd300663..bc5444919b 100644 --- a/src/GitHub.InlineReviews/Glyph/GlyphMarginVisualManager.cs +++ b/src/GitHub.InlineReviews/Glyph/GlyphMarginVisualManager.cs @@ -16,12 +16,11 @@ namespace GitHub.InlineReviews.Glyph.Implementation /// Manage the MarginVisual element. /// /// The type of tag we're managing. - internal class GlyphMarginVisualManager where TGlyphTag: ITag + internal class GlyphMarginVisualManager where TGlyphTag : ITag { readonly IEditorFormatMap editorFormatMap; readonly IGlyphFactory glyphFactory; readonly Grid glyphMarginGrid; - readonly IWpfTextViewMargin margin; readonly string marginPropertiesName; readonly IWpfTextView textView; readonly Dictionary visuals; @@ -29,10 +28,9 @@ internal class GlyphMarginVisualManager where TGlyphTag: ITag Dictionary> glyphs; public GlyphMarginVisualManager(IWpfTextView textView, IGlyphFactory glyphFactory, Grid glyphMarginGrid, - IWpfTextViewMargin margin, IEditorFormatMap editorFormatMap, string marginPropertiesName) + IEditorFormatMap editorFormatMap, string marginPropertiesName) { this.textView = textView; - this.margin = margin; this.marginPropertiesName = marginPropertiesName; this.editorFormatMap = editorFormatMap; this.editorFormatMap.FormatMappingChanged += OnFormatMappingChanged; diff --git a/src/GitHub.InlineReviews/InlineCommentMarginProvider.cs b/src/GitHub.InlineReviews/InlineCommentMarginProvider.cs index 3dc3d7eabe..0aaa798090 100644 --- a/src/GitHub.InlineReviews/InlineCommentMarginProvider.cs +++ b/src/GitHub.InlineReviews/InlineCommentMarginProvider.cs @@ -61,17 +61,17 @@ public IWpfTextViewMargin CreateMargin(IWpfTextViewHost wpfTextViewHost, IWpfTex Func gridFactory = () => new GlyphMarginGrid(); var editorFormatMap = editorFormatMapService.GetEditorFormatMap(textView); - return CreateMargin(glyphFactory, gridFactory, wpfTextViewHost, parent, editorFormatMap); + return CreateMargin(glyphFactory, gridFactory, wpfTextViewHost, editorFormatMap); } IWpfTextViewMargin CreateMargin(IGlyphFactory glyphFactory, Func gridFactory, - IWpfTextViewHost wpfTextViewHost, IWpfTextViewMargin parent, IEditorFormatMap editorFormatMap) where TGlyphTag : ITag + IWpfTextViewHost wpfTextViewHost, IEditorFormatMap editorFormatMap) where TGlyphTag : ITag { var tagAggregator = tagAggregatorFactory.CreateTagAggregator(wpfTextViewHost.TextView); var margin = new GlyphMargin(wpfTextViewHost, glyphFactory, gridFactory, tagAggregator, editorFormatMap, IsMarginVisible, MarginPropertiesName, MarginName, true, 17.0); - if(IsDiffView(wpfTextViewHost)) + if (IsDiffView(wpfTextViewHost)) { TrackCommentGlyph(wpfTextViewHost, margin.VisualElement); } diff --git a/src/GitHub.InlineReviews/Models/PullRequestSessionFile.cs b/src/GitHub.InlineReviews/Models/PullRequestSessionFile.cs index 69c95d9a80..d625d931f6 100644 --- a/src/GitHub.InlineReviews/Models/PullRequestSessionFile.cs +++ b/src/GitHub.InlineReviews/Models/PullRequestSessionFile.cs @@ -17,6 +17,8 @@ namespace GitHub.InlineReviews.Models /// /// /// + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable", + Justification = "linesChanged is sharred and shouldn't be disposed")] public class PullRequestSessionFile : ReactiveObject, IPullRequestSessionFile { readonly Subject>> linesChanged = new Subject>>(); diff --git a/src/GitHub.InlineReviews/Models/PullRequestSessionLiveFile.cs b/src/GitHub.InlineReviews/Models/PullRequestSessionLiveFile.cs index d1de2052bf..f9df506ae7 100644 --- a/src/GitHub.InlineReviews/Models/PullRequestSessionLiveFile.cs +++ b/src/GitHub.InlineReviews/Models/PullRequestSessionLiveFile.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Linq; using System.Reactive.Subjects; using GitHub.Models; using Microsoft.VisualStudio.Text; @@ -17,6 +16,8 @@ namespace GitHub.InlineReviews.Models /// public sealed class PullRequestSessionLiveFile : PullRequestSessionFile, IDisposable { + bool disposed = false; + public PullRequestSessionLiveFile( string relativePath, ITextBuffer textBuffer, @@ -47,13 +48,25 @@ public PullRequestSessionLiveFile( /// public ISubject Rebuild { get; } + public void Dispose() + { + Dispose(true); + } + /// /// Disposes of the resources in . /// - public void Dispose() + void Dispose(bool disposing) { - ToDispose?.Dispose(); - ToDispose = null; + if (!disposed) + { + disposed = true; + + if (disposing) + { + ToDispose?.Dispose(); + } + } } } } diff --git a/src/GitHub.InlineReviews/Peek/InlineCommentPeekResult.cs b/src/GitHub.InlineReviews/Peek/InlineCommentPeekResult.cs index 62cf26f3a9..ac9394b78b 100644 --- a/src/GitHub.InlineReviews/Peek/InlineCommentPeekResult.cs +++ b/src/GitHub.InlineReviews/Peek/InlineCommentPeekResult.cs @@ -26,6 +26,7 @@ public InlineCommentPeekResult(InlineCommentPeekViewModel viewModel) public void Dispose() { + Disposed?.Invoke(this, EventArgs.Empty); } public void NavigateTo(object data) diff --git a/src/GitHub.InlineReviews/Peek/InlineCommentPeekResultPresentation.cs b/src/GitHub.InlineReviews/Peek/InlineCommentPeekResultPresentation.cs index 0460e68336..3aefe50256 100644 --- a/src/GitHub.InlineReviews/Peek/InlineCommentPeekResultPresentation.cs +++ b/src/GitHub.InlineReviews/Peek/InlineCommentPeekResultPresentation.cs @@ -40,9 +40,19 @@ private set } } - public event EventHandler IsDirtyChanged; - public event EventHandler IsReadOnlyChanged; - public event EventHandler RecreateContent; + public event EventHandler IsDirtyChanged + { + add { } + remove { } + } + + public event EventHandler IsReadOnlyChanged + { + add { } + remove { } + } + + public event EventHandler RecreateContent = delegate { }; public event EventHandler DesiredHeightChanged; public bool CanSave(out string defaultPath) diff --git a/src/GitHub.InlineReviews/Peek/InlineCommentPeekableItemSource.cs b/src/GitHub.InlineReviews/Peek/InlineCommentPeekableItemSource.cs index 454d99c251..6b1215af93 100644 --- a/src/GitHub.InlineReviews/Peek/InlineCommentPeekableItemSource.cs +++ b/src/GitHub.InlineReviews/Peek/InlineCommentPeekableItemSource.cs @@ -11,20 +11,17 @@ namespace GitHub.InlineReviews.Peek { class InlineCommentPeekableItemSource : IPeekableItemSource { - readonly IApiClientFactory apiClientFactory; readonly IInlineCommentPeekService peekService; readonly IPullRequestSessionManager sessionManager; readonly INextInlineCommentCommand nextCommentCommand; readonly IPreviousInlineCommentCommand previousCommentCommand; public InlineCommentPeekableItemSource( - IApiClientFactory apiClientFactory, IInlineCommentPeekService peekService, IPullRequestSessionManager sessionManager, INextInlineCommentCommand nextCommentCommand, IPreviousInlineCommentCommand previousCommentCommand) { - this.apiClientFactory = apiClientFactory; this.peekService = peekService; this.sessionManager = sessionManager; this.nextCommentCommand = nextCommentCommand; @@ -36,7 +33,6 @@ public void AugmentPeekSession(IPeekSession session, IList peekab if (session.RelationshipName == InlineCommentPeekRelationship.Instance.Name) { var viewModel = new InlineCommentPeekViewModel( - apiClientFactory, peekService, session, sessionManager, diff --git a/src/GitHub.InlineReviews/Peek/InlineCommentPeekableItemSourceProvider.cs b/src/GitHub.InlineReviews/Peek/InlineCommentPeekableItemSourceProvider.cs index 0b16b69c55..2f6af44bbe 100644 --- a/src/GitHub.InlineReviews/Peek/InlineCommentPeekableItemSourceProvider.cs +++ b/src/GitHub.InlineReviews/Peek/InlineCommentPeekableItemSourceProvider.cs @@ -15,7 +15,6 @@ namespace GitHub.InlineReviews.Peek [Name("GitHub Inline Comments Peekable Item Source")] class InlineCommentPeekableItemSourceProvider : IPeekableItemSourceProvider { - readonly IApiClientFactory apiClientFactory; readonly IInlineCommentPeekService peekService; readonly IPullRequestSessionManager sessionManager; readonly INextInlineCommentCommand nextCommentCommand; @@ -23,13 +22,11 @@ class InlineCommentPeekableItemSourceProvider : IPeekableItemSourceProvider [ImportingConstructor] public InlineCommentPeekableItemSourceProvider( - IApiClientFactory apiClientFactory, IInlineCommentPeekService peekService, IPullRequestSessionManager sessionManager, INextInlineCommentCommand nextCommentCommand, IPreviousInlineCommentCommand previousCommentCommand) { - this.apiClientFactory = apiClientFactory; this.peekService = peekService; this.sessionManager = sessionManager; this.nextCommentCommand = nextCommentCommand; @@ -39,7 +36,6 @@ public InlineCommentPeekableItemSourceProvider( public IPeekableItemSource TryCreatePeekableItemSource(ITextBuffer textBuffer) { return new InlineCommentPeekableItemSource( - apiClientFactory, peekService, sessionManager, nextCommentCommand, diff --git a/src/GitHub.InlineReviews/SampleData/CommentThreadViewModelDesigner.cs b/src/GitHub.InlineReviews/SampleData/CommentThreadViewModelDesigner.cs index d6df4160d3..088d2c8279 100644 --- a/src/GitHub.InlineReviews/SampleData/CommentThreadViewModelDesigner.cs +++ b/src/GitHub.InlineReviews/SampleData/CommentThreadViewModelDesigner.cs @@ -1,5 +1,6 @@ using System; using System.Collections.ObjectModel; +using System.Diagnostics.CodeAnalysis; using GitHub.InlineReviews.ViewModels; using GitHub.Models; using GitHub.SampleData; @@ -7,11 +8,12 @@ namespace GitHub.InlineReviews.SampleData { + [SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses")] class CommentThreadViewModelDesigner : ICommentThreadViewModel { public ObservableCollection Comments { get; } = new ObservableCollection(); - + public IAccount CurrentUser { get; set; } = new AccountDesigner { Login = "shana", IsUser = true }; diff --git a/src/GitHub.InlineReviews/SampleData/CommentViewModelDesigner.cs b/src/GitHub.InlineReviews/SampleData/CommentViewModelDesigner.cs index cd767a5052..3c7ee3891f 100644 --- a/src/GitHub.InlineReviews/SampleData/CommentViewModelDesigner.cs +++ b/src/GitHub.InlineReviews/SampleData/CommentViewModelDesigner.cs @@ -1,5 +1,6 @@ using System; using System.Reactive; +using System.Diagnostics.CodeAnalysis; using GitHub.InlineReviews.ViewModels; using GitHub.Models; using GitHub.SampleData; @@ -8,6 +9,7 @@ namespace GitHub.InlineReviews.SampleData { + [SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses")] class CommentViewModelDesigner : ReactiveObject, ICommentViewModel { public CommentViewModelDesigner() diff --git a/src/GitHub.InlineReviews/SampleData/DiffCommentThreadViewModelDesigner.cs b/src/GitHub.InlineReviews/SampleData/DiffCommentThreadViewModelDesigner.cs index 46e5b69906..ebf8dc18df 100644 --- a/src/GitHub.InlineReviews/SampleData/DiffCommentThreadViewModelDesigner.cs +++ b/src/GitHub.InlineReviews/SampleData/DiffCommentThreadViewModelDesigner.cs @@ -1,8 +1,10 @@ using System; +using System.Diagnostics.CodeAnalysis; using GitHub.InlineReviews.ViewModels; namespace GitHub.InlineReviews.SampleData { + [SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses")] class DiffCommentThreadViewModelDesigner : IDiffCommentThreadViewModel { public string DiffHunk { get; set; } diff --git a/src/GitHub.InlineReviews/SampleData/PullRequestCommentsViewModelDesigner.cs b/src/GitHub.InlineReviews/SampleData/PullRequestCommentsViewModelDesigner.cs index 6853812600..bf1799d22e 100644 --- a/src/GitHub.InlineReviews/SampleData/PullRequestCommentsViewModelDesigner.cs +++ b/src/GitHub.InlineReviews/SampleData/PullRequestCommentsViewModelDesigner.cs @@ -1,18 +1,19 @@ using System; -using System.Collections.ObjectModel; +using System.Diagnostics.CodeAnalysis; using GitHub.InlineReviews.ViewModels; using GitHub.Models; using ReactiveUI; namespace GitHub.InlineReviews.SampleData { + [SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses")] class PullRequestCommentsViewModelDesigner : IPullRequestCommentsViewModel { public IRepositoryModel Repository { get; set; } public int Number { get; set; } public string Title { get; set; } public ICommentThreadViewModel Conversation { get; set; } - public IReactiveList FileComments { get; } + public IReactiveList FileComments { get; } = new ReactiveList(); } } diff --git a/src/GitHub.InlineReviews/Services/InlineCommentPeekService.cs b/src/GitHub.InlineReviews/Services/InlineCommentPeekService.cs index 294b72a4b7..cd4db5503e 100644 --- a/src/GitHub.InlineReviews/Services/InlineCommentPeekService.cs +++ b/src/GitHub.InlineReviews/Services/InlineCommentPeekService.cs @@ -26,19 +26,16 @@ namespace GitHub.InlineReviews.Services [Export(typeof(IInlineCommentPeekService))] class InlineCommentPeekService : IInlineCommentPeekService { - readonly IApiClientFactory apiClientFactory; readonly IOutliningManagerService outliningService; readonly IPeekBroker peekBroker; readonly IUsageTracker usageTracker; [ImportingConstructor] public InlineCommentPeekService( - IApiClientFactory apiClientFactory, IOutliningManagerService outliningManager, IPeekBroker peekBroker, IUsageTracker usageTracker) { - this.apiClientFactory = apiClientFactory; this.outliningService = outliningManager; this.peekBroker = peekBroker; this.usageTracker = usageTracker; diff --git a/src/GitHub.InlineReviews/Services/PullRequestSession.cs b/src/GitHub.InlineReviews/Services/PullRequestSession.cs index c3a22322b2..29680ffe15 100644 --- a/src/GitHub.InlineReviews/Services/PullRequestSession.cs +++ b/src/GitHub.InlineReviews/Services/PullRequestSession.cs @@ -21,9 +21,10 @@ namespace GitHub.InlineReviews.Services /// It takes the pull request model and updates according to the current state of the /// repository on disk and in the editor. /// + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable", + Justification = "PullRequestSession is shared and shouldn't be disposed")] public class PullRequestSession : ReactiveObject, IPullRequestSession { - static readonly List Empty = new List(); readonly IPullRequestSessionService service; readonly Dictionary fileIndex = new Dictionary(); readonly SemaphoreSlim getFilesLock = new SemaphoreSlim(1); @@ -109,7 +110,7 @@ public string GetRelativePath(string path) { var basePath = LocalRepository.LocalPath; - if (path.StartsWith(basePath) && path.Length > basePath.Length + 1) + if (path.StartsWith(basePath, StringComparison.OrdinalIgnoreCase) && path.Length > basePath.Length + 1) { return path.Substring(basePath.Length + 1); } @@ -148,9 +149,9 @@ public async Task PostReviewComment(string body, return model; } - public async Task Update(IPullRequestModel pullRequest) + public async Task Update(IPullRequestModel pullRequestModel) { - PullRequest = pullRequest; + PullRequest = pullRequestModel; mergeBase = null; foreach (var file in this.fileIndex.Values.ToList()) @@ -158,7 +159,7 @@ public async Task Update(IPullRequestModel pullRequest) await UpdateFile(file); } - pullRequestChanged.OnNext(pullRequest); + pullRequestChanged.OnNext(pullRequestModel); } async Task AddComment(IPullRequestReviewCommentModel comment) @@ -201,7 +202,7 @@ async Task CalculateContentCommitSha(IPullRequestSessionFile file, byte[ else { return PullRequest.Head.Sha; - } + } } string GetFullPath(string relativePath) diff --git a/src/GitHub.InlineReviews/Services/PullRequestSessionManager.cs b/src/GitHub.InlineReviews/Services/PullRequestSessionManager.cs index 63ce55063b..21019b9b8c 100644 --- a/src/GitHub.InlineReviews/Services/PullRequestSessionManager.cs +++ b/src/GitHub.InlineReviews/Services/PullRequestSessionManager.cs @@ -30,7 +30,6 @@ public class PullRequestSessionManager : ReactiveObject, IPullRequestSessionMana readonly IPullRequestService service; readonly IPullRequestSessionService sessionService; readonly IRepositoryHosts hosts; - readonly ITeamExplorerServiceHolder teamExplorerService; readonly Dictionary, WeakReference> sessions = new Dictionary, WeakReference>(); IPullRequestSession currentSession; @@ -55,12 +54,10 @@ public PullRequestSessionManager( Guard.ArgumentNotNull(service, nameof(service)); Guard.ArgumentNotNull(sessionService, nameof(sessionService)); Guard.ArgumentNotNull(hosts, nameof(hosts)); - Guard.ArgumentNotNull(teamExplorerService, nameof(teamExplorerService)); this.service = service; this.sessionService = sessionService; this.hosts = hosts; - this.teamExplorerService = teamExplorerService; teamExplorerService.Subscribe(this, x => RepoChanged(x).Forget()); } @@ -128,7 +125,7 @@ public string GetRelativePath(ITextBuffer buffer) { var basePath = repository.LocalPath; - if (path.StartsWith(basePath) && path.Length > basePath.Length + 1) + if (path.StartsWith(basePath, StringComparison.OrdinalIgnoreCase) && path.Length > basePath.Length + 1) { return path.Substring(basePath.Length + 1); } @@ -174,33 +171,33 @@ public PullRequestTextBufferInfo GetTextBufferInfo(ITextBuffer buffer) return null; } - async Task RepoChanged(ILocalRepositoryModel repository) + async Task RepoChanged(ILocalRepositoryModel localRepositoryModel) { try { await ThreadingHelper.SwitchToMainThreadAsync(); - await EnsureLoggedIn(repository); + await EnsureLoggedIn(localRepositoryModel); - if (repository != this.repository) + if (localRepositoryModel != repository) { - this.repository = repository; + repository = localRepositoryModel; CurrentSession = null; sessions.Clear(); } - if (string.IsNullOrWhiteSpace(repository?.CloneUrl)) return; + if (string.IsNullOrWhiteSpace(localRepositoryModel?.CloneUrl)) return; - var modelService = hosts.LookupHost(HostAddress.Create(repository.CloneUrl))?.ModelService; + var modelService = hosts.LookupHost(HostAddress.Create(localRepositoryModel.CloneUrl))?.ModelService; var session = CurrentSession; if (modelService != null) { - var pr = await service.GetPullRequestForCurrentBranch(repository).FirstOrDefaultAsync(); + var pr = await service.GetPullRequestForCurrentBranch(localRepositoryModel).FirstOrDefaultAsync(); if (pr?.Item1 != (CurrentSession?.PullRequest.Base.RepositoryCloneUrl.Owner) && pr?.Item2 != (CurrentSession?.PullRequest.Number)) { - var pullRequest = await GetPullRequestForTip(modelService, repository); + var pullRequest = await GetPullRequestForTip(modelService, localRepositoryModel); if (pullRequest != null) { @@ -223,12 +220,12 @@ async Task RepoChanged(ILocalRepositoryModel repository) } } - async Task GetPullRequestForTip(IModelService modelService, ILocalRepositoryModel repository) + async Task GetPullRequestForTip(IModelService modelService, ILocalRepositoryModel localRepositoryModel) { if (modelService != null) { - var pr = await service.GetPullRequestForCurrentBranch(repository); - if (pr != null) return await modelService.GetPullRequest(pr.Item1, repository.Name, pr.Item2).ToTask(); + var pr = await service.GetPullRequestForCurrentBranch(localRepositoryModel); + if (pr != null) return await modelService.GetPullRequest(pr.Item1, localRepositoryModel.Name, pr.Item2).ToTask(); } return null; @@ -269,11 +266,11 @@ await modelService.GetCurrentUser(), return session; } - async Task EnsureLoggedIn(ILocalRepositoryModel repository) + async Task EnsureLoggedIn(ILocalRepositoryModel localRepositoryModel) { - if (!hosts.IsLoggedInToAnyHost && !string.IsNullOrWhiteSpace(repository?.CloneUrl)) + if (!hosts.IsLoggedInToAnyHost && !string.IsNullOrWhiteSpace(localRepositoryModel?.CloneUrl)) { - var hostAddress = HostAddress.Create(repository.CloneUrl); + var hostAddress = HostAddress.Create(localRepositoryModel.CloneUrl); await hosts.LogInFromCache(hostAddress); } } diff --git a/src/GitHub.InlineReviews/Services/PullRequestSessionService.cs b/src/GitHub.InlineReviews/Services/PullRequestSessionService.cs index a3ce59adb8..78bec17c5a 100644 --- a/src/GitHub.InlineReviews/Services/PullRequestSessionService.cs +++ b/src/GitHub.InlineReviews/Services/PullRequestSessionService.cs @@ -107,10 +107,6 @@ public IReadOnlyList> UpdateCommentThreads( foreach (var thread in threads) { - var hunk = thread.Comments.First().DiffHunk; - var chunks = DiffUtilities.ParseFragment(hunk); - var chunk = chunks.Last(); - var diffLines = chunk.Lines.Reverse().Take(5).ToList(); var oldLineNumber = thread.LineNumber; var newLineNumber = GetUpdatedLineNumber(thread, diff); var changed = false; @@ -368,6 +364,6 @@ int GetUpdatedLineNumber(IInlineCommentThreadModel thread, IEnumerable GetRepository(ILocalRepositoryModel repository) { return Task.Factory.StartNew(() => gitService.GetRepository(repository.LocalPath)); - } + } } } diff --git a/src/GitHub.InlineReviews/Tags/InlineCommentGlyphFactory.cs b/src/GitHub.InlineReviews/Tags/InlineCommentGlyphFactory.cs index d66be1b0b5..38b62be7d3 100644 --- a/src/GitHub.InlineReviews/Tags/InlineCommentGlyphFactory.cs +++ b/src/GitHub.InlineReviews/Tags/InlineCommentGlyphFactory.cs @@ -1,14 +1,12 @@ using System; using System.Windows; -using System.Windows.Media; using System.Windows.Controls; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using GitHub.InlineReviews.Glyph; using Microsoft.VisualStudio.Text.Editor; using Microsoft.VisualStudio.Text.Formatting; -using Microsoft.VisualStudio.Text.Classification; using GitHub.InlineReviews.Services; -using GitHub.Models; namespace GitHub.InlineReviews.Tags { @@ -46,6 +44,7 @@ public IEnumerable GetTagTypes() }; } + [SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object)")] static UserControl CreateGlyph(InlineCommentTag tag) { var addTag = tag as AddInlineCommentTag; diff --git a/src/GitHub.InlineReviews/Tags/InlineCommentTag.cs b/src/GitHub.InlineReviews/Tags/InlineCommentTag.cs index 1e612cd5c3..bdf46a062e 100644 --- a/src/GitHub.InlineReviews/Tags/InlineCommentTag.cs +++ b/src/GitHub.InlineReviews/Tags/InlineCommentTag.cs @@ -12,7 +12,7 @@ namespace GitHub.InlineReviews.Tags /// public abstract class InlineCommentTag : ITag { - public InlineCommentTag( + protected InlineCommentTag( IPullRequestSession session, int lineNumber, DiffChangeType diffChangeType) diff --git a/src/GitHub.InlineReviews/Tags/InlineCommentTagger.cs b/src/GitHub.InlineReviews/Tags/InlineCommentTagger.cs index 294e3f8ec2..dd8ac77663 100644 --- a/src/GitHub.InlineReviews/Tags/InlineCommentTagger.cs +++ b/src/GitHub.InlineReviews/Tags/InlineCommentTagger.cs @@ -23,9 +23,6 @@ namespace GitHub.InlineReviews.Tags public sealed class InlineCommentTagger : ITagger, IDisposable { static readonly IReadOnlyList> EmptyTags = new ITagSpan[0]; - readonly IGitService gitService; - readonly IGitClient gitClient; - readonly IDiffService diffService; readonly ITextBuffer buffer; readonly ITextView view; readonly IPullRequestSessionManager sessionManager; @@ -38,22 +35,13 @@ public sealed class InlineCommentTagger : ITagger, IDisposable IDisposable sessionManagerSubscription; public InlineCommentTagger( - IGitService gitService, - IGitClient gitClient, - IDiffService diffService, ITextView view, ITextBuffer buffer, IPullRequestSessionManager sessionManager) { - Guard.ArgumentNotNull(gitService, nameof(gitService)); - Guard.ArgumentNotNull(gitClient, nameof(gitClient)); - Guard.ArgumentNotNull(diffService, nameof(diffService)); Guard.ArgumentNotNull(buffer, nameof(buffer)); Guard.ArgumentNotNull(sessionManager, nameof(sessionManager)); - this.gitService = gitService; - this.gitClient = gitClient; - this.diffService = diffService; this.buffer = buffer; this.view = view; this.sessionManager = sessionManager; diff --git a/src/GitHub.InlineReviews/Tags/InlineCommentTaggerProvider.cs b/src/GitHub.InlineReviews/Tags/InlineCommentTaggerProvider.cs index b86fd5ac4c..fbdb02ab7d 100644 --- a/src/GitHub.InlineReviews/Tags/InlineCommentTaggerProvider.cs +++ b/src/GitHub.InlineReviews/Tags/InlineCommentTaggerProvider.cs @@ -18,35 +18,21 @@ namespace GitHub.InlineReviews.Tags [TagType(typeof(ShowInlineCommentTag))] class InlineCommentTaggerProvider : IViewTaggerProvider { - readonly IGitService gitService; - readonly IGitClient gitClient; - readonly IDiffService diffService; readonly IPullRequestSessionManager sessionManager; [ImportingConstructor] public InlineCommentTaggerProvider( - IGitService gitService, - IGitClient gitClient, - IDiffService diffService, IPullRequestSessionManager sessionManager) { - Guard.ArgumentNotNull(gitService, nameof(gitService)); - Guard.ArgumentNotNull(gitClient, nameof(gitClient)); Guard.ArgumentNotNull(sessionManager, nameof(sessionManager)); - this.gitService = gitService; - this.gitClient = gitClient; - this.diffService = diffService; this.sessionManager = sessionManager; } public ITagger CreateTagger(ITextView view, ITextBuffer buffer) where T : ITag { - return buffer.Properties.GetOrCreateSingletonProperty(()=> + return buffer.Properties.GetOrCreateSingletonProperty(() => new InlineCommentTagger( - gitService, - gitClient, - diffService, view, buffer, sessionManager)) as ITagger; diff --git a/src/GitHub.InlineReviews/ViewModels/CommentThreadViewModel.cs b/src/GitHub.InlineReviews/ViewModels/CommentThreadViewModel.cs index e8b5c38ede..0a678303f5 100644 --- a/src/GitHub.InlineReviews/ViewModels/CommentThreadViewModel.cs +++ b/src/GitHub.InlineReviews/ViewModels/CommentThreadViewModel.cs @@ -19,7 +19,7 @@ public abstract class CommentThreadViewModel : ReactiveObject, ICommentThreadVie /// /// The current user. /// The thread comments. - public CommentThreadViewModel(IAccount currentUser) + protected CommentThreadViewModel(IAccount currentUser) { Guard.ArgumentNotNull(currentUser, nameof(currentUser)); diff --git a/src/GitHub.InlineReviews/ViewModels/InlineCommentPeekViewModel.cs b/src/GitHub.InlineReviews/ViewModels/InlineCommentPeekViewModel.cs index de4c8401ff..40c23d9ed6 100644 --- a/src/GitHub.InlineReviews/ViewModels/InlineCommentPeekViewModel.cs +++ b/src/GitHub.InlineReviews/ViewModels/InlineCommentPeekViewModel.cs @@ -25,7 +25,6 @@ namespace GitHub.InlineReviews.ViewModels public sealed class InlineCommentPeekViewModel : ReactiveObject, IDisposable { static readonly Logger log = LogManager.GetCurrentClassLogger(); - readonly IApiClientFactory apiClientFactory; readonly IInlineCommentPeekService peekService; readonly IPeekSession peekSession; readonly IPullRequestSessionManager sessionManager; @@ -43,21 +42,18 @@ public sealed class InlineCommentPeekViewModel : ReactiveObject, IDisposable /// Initializes a new instance of the class. /// public InlineCommentPeekViewModel( - IApiClientFactory apiClientFactory, IInlineCommentPeekService peekService, IPeekSession peekSession, IPullRequestSessionManager sessionManager, INextInlineCommentCommand nextCommentCommand, IPreviousInlineCommentCommand previousCommentCommand) { - Guard.ArgumentNotNull(apiClientFactory, nameof(apiClientFactory)); Guard.ArgumentNotNull(peekService, nameof(peekService)); Guard.ArgumentNotNull(peekSession, nameof(peekSession)); Guard.ArgumentNotNull(sessionManager, nameof(sessionManager)); Guard.ArgumentNotNull(nextCommentCommand, nameof(nextCommentCommand)); Guard.ArgumentNotNull(previousCommentCommand, nameof(previousCommentCommand)); - this.apiClientFactory = apiClientFactory; this.peekService = peekService; this.peekSession = peekSession; this.sessionManager = sessionManager; @@ -192,11 +188,11 @@ async Task UpdateThread() } } - async Task SessionChanged(IPullRequestSession session) + async Task SessionChanged(IPullRequestSession pullRequestSession) { - this.session = session; + this.session = pullRequestSession; - if (session == null) + if (pullRequestSession == null) { Thread = null; threadSubscription?.Dispose(); diff --git a/src/GitHub.InlineReviews/ViewModels/PullRequestCommentsViewModel.cs b/src/GitHub.InlineReviews/ViewModels/PullRequestCommentsViewModel.cs index 440ff60467..9babec2f20 100644 --- a/src/GitHub.InlineReviews/ViewModels/PullRequestCommentsViewModel.cs +++ b/src/GitHub.InlineReviews/ViewModels/PullRequestCommentsViewModel.cs @@ -11,16 +11,13 @@ namespace GitHub.InlineReviews.ViewModels { - class PullRequestCommentsViewModel : ReactiveObject, IPullRequestCommentsViewModel + class PullRequestCommentsViewModel : ReactiveObject, IPullRequestCommentsViewModel, IDisposable { - readonly IApiClient apiClient; readonly IPullRequestSession session; public PullRequestCommentsViewModel( - IApiClient apiClient, IPullRequestSession session) { - this.apiClient = apiClient; this.session = session; Repository = session.LocalRepository; @@ -38,6 +35,27 @@ public PullRequestCommentsViewModel( } } + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + bool disposed = false; + + protected virtual void Dispose(bool disposing) + { + if (!disposed) + { + disposed = true; + + if (disposing) + { + (Conversation as IDisposable)?.Dispose(); + } + } + } + public IRepositoryModel Repository { get; } public int Number { get; } public string Title { get; } diff --git a/src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml.cs b/src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml.cs index c330137acc..77e1511a6d 100644 --- a/src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml.cs +++ b/src/GitHub.InlineReviews/Views/InlineCommentPeekView.xaml.cs @@ -5,6 +5,7 @@ namespace GitHub.InlineReviews.Views { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable")] public partial class InlineCommentPeekView : UserControl { readonly Subject desiredHeight; diff --git a/src/GitHub.InlineReviews/Views/PullRequestCommentsPane.cs b/src/GitHub.InlineReviews/Views/PullRequestCommentsPane.cs index 17a59c047c..3bc70a5a5f 100644 --- a/src/GitHub.InlineReviews/Views/PullRequestCommentsPane.cs +++ b/src/GitHub.InlineReviews/Views/PullRequestCommentsPane.cs @@ -30,18 +30,18 @@ public PullRequestCommentsPane() : base(null) } public async Task Initialize( - IPullRequestSession session, + IPullRequestSession pullRequestSession, IApiClient apiClient) { - Guard.ArgumentNotNull(session, nameof(session)); + Guard.ArgumentNotNull(pullRequestSession, nameof(pullRequestSession)); Guard.ArgumentNotNull(apiClient, nameof(apiClient)); if (this.session != null) return; - this.session = session; + this.session = pullRequestSession; - var viewModel = new PullRequestCommentsViewModel(apiClient, session); + var viewModel = new PullRequestCommentsViewModel(pullRequestSession); await viewModel.Initialize(); view.DataContext = viewModel; } diff --git a/src/GitHub.InlineReviews/packages.config b/src/GitHub.InlineReviews/packages.config index d1f5d61397..d588506fc7 100644 --- a/src/GitHub.InlineReviews/packages.config +++ b/src/GitHub.InlineReviews/packages.config @@ -4,6 +4,7 @@ + @@ -37,6 +38,5 @@ - \ No newline at end of file diff --git a/src/GitHub.StartPage/GitHub.StartPage.csproj b/src/GitHub.StartPage/GitHub.StartPage.csproj index 360f6955b2..c8da3e0df3 100644 --- a/src/GitHub.StartPage/GitHub.StartPage.csproj +++ b/src/GitHub.StartPage/GitHub.StartPage.csproj @@ -7,9 +7,6 @@ $(VisualStudioVersion) $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) true - - - @@ -30,31 +27,68 @@ true true true + ..\common\GitHubVS.ruleset + true + true true full false + TRACE;DEBUG + prompt + 4 + false + True + True + true bin\Debug\ - DEBUG;TRACE + + + true + full + false + TRACE;DEBUG;CODE_ANALYSIS prompt 4 + true True + True + bin\Debug\ + + + true + full + false + TRACE;DEBUG;CODE_ANALYSIS + prompt + 4 + false + False False - True - build + bin\Debug\ pdbonly true - bin\Release\ TRACE prompt 4 + true True + True + bin\Release\ + + + pdbonly + true + TRACE + prompt + 4 + true + False False - True - build + bin\Release\ diff --git a/src/GitHub.StartPage/StartPagePackage.cs b/src/GitHub.StartPage/StartPagePackage.cs index 52a18249a0..2b9e5b4dc1 100644 --- a/src/GitHub.StartPage/StartPagePackage.cs +++ b/src/GitHub.StartPage/StartPagePackage.cs @@ -50,6 +50,7 @@ public async Task AcquireCodeContainerAsync(RemoteCodeContainer o return await RunAcquisition(downloadProgress, cancellationToken, repository); } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "cancellationToken")] async Task RunAcquisition(IProgress downloadProgress, CancellationToken cancellationToken, IRepositoryModel repository) { CloneDialogResult request = null; diff --git a/src/GitHub.TeamFoundation.14/Connect/GitHubConnectSection.cs b/src/GitHub.TeamFoundation.14/Connect/GitHubConnectSection.cs index 078fdb9bf2..0cbf0c5668 100644 --- a/src/GitHub.TeamFoundation.14/Connect/GitHubConnectSection.cs +++ b/src/GitHub.TeamFoundation.14/Connect/GitHubConnectSection.cs @@ -52,7 +52,8 @@ protected GitHubConnectContent View bool LoggedIn { get { return loggedIn; } - set { + set + { loggedIn = ShowLogout = value; ShowLogin = !value; } @@ -308,8 +309,8 @@ void HandleCreatedRepo(ILocalRepositoryModel newrepo) { Guard.ArgumentNotNull(newrepo, nameof(newrepo)); - var msg = string.Format(CultureInfo.CurrentUICulture, Constants.Notification_RepoCreated, newrepo.Name, newrepo.CloneUrl); - msg += " " + string.Format(CultureInfo.CurrentUICulture, Constants.Notification_CreateNewProject, newrepo.LocalPath); + var msg = string.Format(CultureInfo.CurrentCulture, Constants.Notification_RepoCreated, newrepo.Name, newrepo.CloneUrl); + msg += " " + string.Format(CultureInfo.CurrentCulture, Constants.Notification_CreateNewProject, newrepo.LocalPath); ShowNotification(newrepo, msg); } @@ -317,11 +318,11 @@ void HandleClonedRepo(ILocalRepositoryModel newrepo) { Guard.ArgumentNotNull(newrepo, nameof(newrepo)); - var msg = string.Format(CultureInfo.CurrentUICulture, Constants.Notification_RepoCloned, newrepo.Name, newrepo.CloneUrl); + var msg = string.Format(CultureInfo.CurrentCulture, Constants.Notification_RepoCloned, newrepo.Name, newrepo.CloneUrl); if (newrepo.HasCommits() && newrepo.MightContainSolution()) - msg += " " + string.Format(CultureInfo.CurrentUICulture, Constants.Notification_OpenProject, newrepo.LocalPath); + msg += " " + string.Format(CultureInfo.CurrentCulture, Constants.Notification_OpenProject, newrepo.LocalPath); else - msg += " " + string.Format(CultureInfo.CurrentUICulture, Constants.Notification_CreateNewProject, newrepo.LocalPath); + msg += " " + string.Format(CultureInfo.CurrentCulture, Constants.Notification_CreateNewProject, newrepo.LocalPath); ShowNotification(newrepo, msg); } @@ -330,7 +331,7 @@ void ShowNotification(ILocalRepositoryModel newrepo, string msg) Guard.ArgumentNotNull(newrepo, nameof(newrepo)); var teServices = ServiceProvider.TryGetService(); - + teServices.ClearNotifications(); teServices.ShowMessage( msg, diff --git a/src/GitHub.TeamFoundation.14/GitHub.TeamFoundation.14.csproj b/src/GitHub.TeamFoundation.14/GitHub.TeamFoundation.14.csproj index 157d8f3eca..169006ce77 100644 --- a/src/GitHub.TeamFoundation.14/GitHub.TeamFoundation.14.csproj +++ b/src/GitHub.TeamFoundation.14/GitHub.TeamFoundation.14.csproj @@ -14,18 +14,29 @@ GitHub.TeamFoundation.14 v4.6.1 512 - ..\..\build\$(Configuration)\ - - - + ..\common\GitHubVS.ruleset + true + true true full false - TRACE;DEBUG;TEAMEXPLORER14 + DEBUG;TRACE;TEAMEXPLORER14 prompt 4 + false + bin\Debug\ + + + true + full + false + CODE_ANALYSIS;DEBUG;TRACE;TEAMEXPLORER14 + prompt + 4 + true + bin\Debug\ pdbonly @@ -33,6 +44,8 @@ TRACE;TEAMEXPLORER14 prompt 4 + true + bin\Release\ @@ -60,9 +73,9 @@ ..\..\lib\14.0\Microsoft.TeamFoundation.Git.Provider.dll False - - ..\..\packages\VSSDK.ComponentModelHost.12.0.4\lib\net45\Microsoft.VisualStudio.ComponentModelHost.dll - False + + ..\..\packages\Microsoft.VisualStudio.ComponentModelHost.14.0.25424\lib\net45\Microsoft.VisualStudio.ComponentModelHost.dll + True ..\..\packages\Microsoft.VisualStudio.Shell.14.0.14.3.25407\lib\Microsoft.VisualStudio.Shell.14.0.dll @@ -137,7 +150,9 @@ Properties\SolutionInfo.cs - + + Designer + diff --git a/src/GitHub.TeamFoundation.14/Services/VSGitServices.cs b/src/GitHub.TeamFoundation.14/Services/VSGitServices.cs index 034b055a1c..4036f6c055 100644 --- a/src/GitHub.TeamFoundation.14/Services/VSGitServices.cs +++ b/src/GitHub.TeamFoundation.14/Services/VSGitServices.cs @@ -4,16 +4,19 @@ using System.Globalization; using System.Linq; using System.Reactive.Linq; -using System.Threading; using System.Threading.Tasks; using GitHub.Extensions; using GitHub.Models; using GitHub.TeamFoundation; using GitHub.VisualStudio; +#if TEAMEXPLORER14 using Microsoft.TeamFoundation.Git.Controls.Extensibility; +using ReactiveUI; +#else using Microsoft.VisualStudio.Shell.Interop; +using System.Threading; +#endif using Microsoft.VisualStudio.TeamFoundation.Git.Extensibility; -using ReactiveUI; namespace GitHub.Services { @@ -22,7 +25,9 @@ namespace GitHub.Services public class VSGitServices : IVSGitServices { readonly IGitHubServiceProvider serviceProvider; +#if TEAMEXPLORER15 readonly IVsStatusbar statusBar; +#endif /// /// This MEF export requires specific versions of TeamFoundation. IGitExt is declared here so @@ -36,11 +41,11 @@ public class VSGitServices : IVSGitServices public VSGitServices(IGitHubServiceProvider serviceProvider) { this.serviceProvider = serviceProvider; +#if TEAMEXPLORER15 this.statusBar = serviceProvider.GetService(); +#endif } - public event EventHandler ActiveRepoChanged; - // The Default Repository Path that VS uses is hidden in an internal // service 'ISccSettingsService' registered in an internal service // 'ISccServiceHost' in an assembly with no public types that's diff --git a/src/GitHub.TeamFoundation.14/Sync/GitHubPublishSection.cs b/src/GitHub.TeamFoundation.14/Sync/GitHubPublishSection.cs index c234b2c11e..699fc55c4b 100644 --- a/src/GitHub.TeamFoundation.14/Sync/GitHubPublishSection.cs +++ b/src/GitHub.TeamFoundation.14/Sync/GitHubPublishSection.cs @@ -132,8 +132,8 @@ public void ShowPublish() void HandleCreatedRepo(ILocalRepositoryModel newrepo) { - var msg = string.Format(CultureInfo.CurrentUICulture, Constants.Notification_RepoCreated, newrepo.Name, newrepo.CloneUrl); - msg += " " + string.Format(CultureInfo.CurrentUICulture, Constants.Notification_CreateNewProject, newrepo.LocalPath); + var msg = String.Format(CultureInfo.CurrentCulture, Constants.Notification_RepoCreated, newrepo.Name, newrepo.CloneUrl); + msg += " " + String.Format(CultureInfo.CurrentCulture, Constants.Notification_CreateNewProject, newrepo.LocalPath); ShowNotification(newrepo, msg); } diff --git a/src/GitHub.TeamFoundation.14/packages.config b/src/GitHub.TeamFoundation.14/packages.config index dcab67e959..796fad9e1e 100644 --- a/src/GitHub.TeamFoundation.14/packages.config +++ b/src/GitHub.TeamFoundation.14/packages.config @@ -2,6 +2,7 @@ + @@ -9,5 +10,4 @@ - \ No newline at end of file diff --git a/src/GitHub.TeamFoundation.15/GitHub.TeamFoundation.15.csproj b/src/GitHub.TeamFoundation.15/GitHub.TeamFoundation.15.csproj index dc4878c4c4..f48b3f191d 100644 --- a/src/GitHub.TeamFoundation.15/GitHub.TeamFoundation.15.csproj +++ b/src/GitHub.TeamFoundation.15/GitHub.TeamFoundation.15.csproj @@ -14,25 +14,38 @@ GitHub.TeamFoundation.15 v4.6.1 512 - ..\..\build\$(Configuration)\ - - - + ..\common\GitHubVS.ruleset + true + true true full false - DEBUG;TRACE + DEBUG;TRACE;TEAMEXPLORER15 prompt 4 + false + bin\Debug\ + + + true + full + false + CODE_ANALYSIS;DEBUG;TRACE;TEAMEXPLORER15 + prompt + 4 + true + bin\Debug\ pdbonly true - TRACE + TRACE;TEAMEXPLORER15 prompt 4 + true + bin\Release\ @@ -60,48 +73,60 @@ ..\..\lib\15.0\Microsoft.TeamFoundation.Git.Provider.dll False - - ..\..\packages\VSSDK.ComponentModelHost.12.0.4\lib\net45\Microsoft.VisualStudio.ComponentModelHost.dll - False - - ..\..\packages\Microsoft.VisualStudio.CoreUtility.15.0.26201\lib\net45\Microsoft.VisualStudio.CoreUtility.dll + ..\..\packages\Microsoft.VisualStudio.CoreUtility.15.4.27004\lib\net45\Microsoft.VisualStudio.CoreUtility.dll + True + + + ..\..\packages\Microsoft.VisualStudio.Imaging.15.4.27004\lib\net45\Microsoft.VisualStudio.Imaging.dll True ..\..\packages\Microsoft.VisualStudio.OLE.Interop.7.10.6070\lib\Microsoft.VisualStudio.OLE.Interop.dll True - - ..\..\packages\Microsoft.VisualStudio.Shell.14.0.14.3.25407\lib\Microsoft.VisualStudio.Shell.14.0.dll + + ..\..\packages\Microsoft.VisualStudio.Shell.15.0.15.4.27004\lib\Microsoft.VisualStudio.Shell.15.0.dll True - ..\..\packages\Microsoft.VisualStudio.Shell.Framework.15.0.26201\lib\net45\Microsoft.VisualStudio.Shell.Framework.dll - True - - - ..\..\packages\Microsoft.VisualStudio.Shell.Immutable.10.0.10.0.30319\lib\net40\Microsoft.VisualStudio.Shell.Immutable.10.0.dll + ..\..\packages\Microsoft.VisualStudio.Shell.Framework.15.4.27004\lib\net45\Microsoft.VisualStudio.Shell.Framework.dll True ..\..\packages\Microsoft.VisualStudio.Shell.Interop.7.10.6071\lib\Microsoft.VisualStudio.Shell.Interop.dll True + + ..\..\packages\Microsoft.VisualStudio.Shell.Interop.15.3.DesignTime.15.0.26606\lib\net20\Microsoft.VisualStudio.Shell.Interop.15.3.DesignTime.dll + True + ..\..\packages\Microsoft.VisualStudio.Shell.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.Shell.Interop.8.0.dll True - - ..\..\packages\Microsoft.VisualStudio.Threading.15.0.240\lib\net45\Microsoft.VisualStudio.Threading.dll + + ..\..\packages\Microsoft.VisualStudio.Shell.Interop.9.0.9.0.30729\lib\Microsoft.VisualStudio.Shell.Interop.9.0.dll + True + + + ..\..\packages\Microsoft.VisualStudio.TextManager.Interop.7.10.6070\lib\Microsoft.VisualStudio.TextManager.Interop.dll + True + + + ..\..\packages\Microsoft.VisualStudio.TextManager.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.TextManager.Interop.8.0.dll + True + + + ..\..\packages\Microsoft.VisualStudio.Threading.15.4.4\lib\net45\Microsoft.VisualStudio.Threading.dll True - ..\..\packages\Microsoft.VisualStudio.Utilities.15.0.26201\lib\net45\Microsoft.VisualStudio.Utilities.dll + ..\..\packages\Microsoft.VisualStudio.Utilities.15.4.27004\lib\net46\Microsoft.VisualStudio.Utilities.dll True - - ..\..\packages\Microsoft.VisualStudio.Validation.15.0.82\lib\net45\Microsoft.VisualStudio.Validation.dll + + ..\..\packages\Microsoft.VisualStudio.Validation.15.3.15\lib\net45\Microsoft.VisualStudio.Validation.dll True @@ -201,8 +226,12 @@ Properties\SolutionInfo.cs - - + + Designer + + + Designer + @@ -248,7 +277,9 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + - false - + ..\..\packages\EditorUtils2013.1.4.1.1\lib\net40\EditorUtils2013.dll @@ -111,6 +127,10 @@ ..\..\packages\Expression.Blend.Sdk.WPF.1.0.1\lib\net45\Microsoft.Expression.Interactions.dll True + + ..\..\packages\Microsoft.VisualStudio.ComponentModelHost.14.0.25424\lib\net45\Microsoft.VisualStudio.ComponentModelHost.dll + True + ..\..\packages\Microsoft.VisualStudio.CoreUtility.14.3.25407\lib\net45\Microsoft.VisualStudio.CoreUtility.dll True @@ -128,10 +148,6 @@ ..\..\packages\Microsoft.VisualStudio.OLE.Interop.7.10.6070\lib\Microsoft.VisualStudio.OLE.Interop.dll True - - ..\..\packages\VSSDK.ComponentModelHost.12.0.4\lib\net45\Microsoft.VisualStudio.ComponentModelHost.dll - False - ..\..\packages\Microsoft.VisualStudio.Shell.14.0.14.3.25407\lib\Microsoft.VisualStudio.Shell.14.0.dll True @@ -404,7 +420,9 @@ GitHub.VisualStudio.Settings PackageSettingsGen.cs - + + Designer + Designer @@ -414,6 +432,7 @@ Designer + @@ -543,49 +562,49 @@ {241c47df-ca8e-4296-aa03-2c48bb646abd} Akavache.Sqlite3 - False + True BuiltProjectOutputGroup;GetCopyToOutputDirectoryItems;DebugSymbolsProjectOutputGroup; DebugSymbolsProjectOutputGroup; {b4e665e5-6caf-4414-a6e2-8de1c3bcf203} Akavache_Net45 - False + True BuiltProjectOutputGroup;GetCopyToOutputDirectoryItems;DebugSymbolsProjectOutputGroup; DebugSymbolsProjectOutputGroup; {674b69b8-0780-4d54-ae2b-c15821fa51cb} Octokit.Reactive - False + True BuiltProjectOutputGroup;GetCopyToOutputDirectoryItems;DebugSymbolsProjectOutputGroup; DebugSymbolsProjectOutputGroup; {08dd4305-7787-4823-a53f-4d0f725a07f3} Octokit - False + True BuiltProjectOutputGroup;GetCopyToOutputDirectoryItems;DebugSymbolsProjectOutputGroup; DebugSymbolsProjectOutputGroup; {600998c4-54dd-4755-bfa8-6f44544d8e2e} ReactiveUI.Events_Net45 - False + True BuiltProjectOutputGroup;GetCopyToOutputDirectoryItems;DebugSymbolsProjectOutputGroup; DebugSymbolsProjectOutputGroup; {1ce2d235-8072-4649-ba5a-cfb1af8776e0} ReactiveUI_Net45 - False + True BuiltProjectOutputGroup;GetCopyToOutputDirectoryItems;DebugSymbolsProjectOutputGroup; DebugSymbolsProjectOutputGroup; {252ce1c2-027a-4445-a3c2-e4d6c80a935a} Splat-Net45 - False + True BuiltProjectOutputGroup;GetCopyToOutputDirectoryItems;DebugSymbolsProjectOutputGroup; DebugSymbolsProjectOutputGroup; @@ -597,89 +616,91 @@ {b389adaf-62cc-486e-85b4-2d8b078df763} GitHub.Api - False + True BuiltProjectOutputGroup;GetCopyToOutputDirectoryItems;DebugSymbolsProjectOutputGroup; DebugSymbolsProjectOutputGroup; {1a1da411-8d1f-4578-80a6-04576bea2dc5} GitHub.App - False + True BuiltProjectOutputGroup;GetCopyToOutputDirectoryItems;DebugSymbolsProjectOutputGroup; DebugSymbolsProjectOutputGroup; {e4ed0537-d1d9-44b6-9212-3096d7c3f7a1} GitHub.Exports.Reactive - False + True BuiltProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bDebugSymbolsProjectOutputGroup%3bBuiltProjectOutputGroup%3bBuiltProjectOutputGroupDependencies%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3b DebugSymbolsProjectOutputGroup%3b {9aea02db-02b5-409c-b0ca-115d05331a6b} GitHub.Exports - False + True BuiltProjectOutputGroup;GetCopyToOutputDirectoryItems;DebugSymbolsProjectOutputGroup; DebugSymbolsProjectOutputGroup; {6559e128-8b40-49a5-85a8-05565ed0c7e3} GitHub.Extensions.Reactive - False + True BuiltProjectOutputGroup;GetCopyToOutputDirectoryItems;DebugSymbolsProjectOutputGroup; DebugSymbolsProjectOutputGroup; {6afe2e2d-6db0-4430-a2ea-f5f5388d2f78} GitHub.Extensions - False + True BuiltProjectOutputGroup;GetCopyToOutputDirectoryItems;DebugSymbolsProjectOutputGroup; DebugSymbolsProjectOutputGroup; {7f5ed78b-74a3-4406-a299-70cfb5885b8b} GitHub.InlineReviews - BuiltProjectOutputGroup%3bBuiltProjectOutputGroupDependencies%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3bPkgdefProjectOutputGroup%3bDebugSymbolsProjectOutputGroup%3b - DebugSymbolsProjectOutputGroup%3b + True + BuiltProjectOutputGroup;GetCopyToOutputDirectoryItems;DebugSymbolsProjectOutputGroup; + DebugSymbolsProjectOutputGroup; {50e277b8-8580-487a-8f8e-5c3b9fbf0f77} GitHub.StartPage - BuiltProjectOutputGroup%3bBuiltProjectOutputGroupDependencies%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3bPkgdefProjectOutputGroup%3b - DebugSymbolsProjectOutputGroup%3b + True + BuiltProjectOutputGroup;GetCopyToOutputDirectoryItems;DebugSymbolsProjectOutputGroup; + DebugSymbolsProjectOutputGroup; {161dbf01-1dbf-4b00-8551-c5c00f26720d} GitHub.TeamFoundation.14 - False + True BuiltProjectOutputGroup;GetCopyToOutputDirectoryItems;DebugSymbolsProjectOutputGroup; - DebugSymbolsProjectOutputGroup%3b + DebugSymbolsProjectOutputGroup; {161dbf01-1dbf-4b00-8551-c5c00f26720e} GitHub.TeamFoundation.15 - False + True BuiltProjectOutputGroup;GetCopyToOutputDirectoryItems;DebugSymbolsProjectOutputGroup; - DebugSymbolsProjectOutputGroup%3b + DebugSymbolsProjectOutputGroup; {158b05e8-fdbc-4d71-b871-c96e28d5adf5} GitHub.UI.Reactive - False + True BuiltProjectOutputGroup;GetCopyToOutputDirectoryItems;DebugSymbolsProjectOutputGroup; DebugSymbolsProjectOutputGroup; {346384dd-2445-4a28-af22-b45f3957bd89} GitHub.UI - False + True BuiltProjectOutputGroup;GetCopyToOutputDirectoryItems;DebugSymbolsProjectOutputGroup; DebugSymbolsProjectOutputGroup; {d1dfbb0c-b570-4302-8f1e-2e3a19c41961} GitHub.VisualStudio.UI - False + True BuiltProjectOutputGroup;GetCopyToOutputDirectoryItems;DebugSymbolsProjectOutputGroup; DebugSymbolsProjectOutputGroup; @@ -694,7 +715,8 @@ - + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. @@ -709,4 +731,4 @@ - + \ No newline at end of file diff --git a/src/GitHub.VisualStudio/packages.config b/src/GitHub.VisualStudio/packages.config index 18daed1c57..69c31cf7cf 100644 --- a/src/GitHub.VisualStudio/packages.config +++ b/src/GitHub.VisualStudio/packages.config @@ -6,6 +6,7 @@ + diff --git a/src/GitHub.VisualStudio/packaging.targets b/src/GitHub.VisualStudio/packaging.targets index 52871237f0..d9755fceef 100644 --- a/src/GitHub.VisualStudio/packaging.targets +++ b/src/GitHub.VisualStudio/packaging.targets @@ -8,18 +8,25 @@ $([System.String]::Copy('%(Filename)').Contains('Microsoft.')) or $([System.String]::Copy('%(Extension)').Contains('.dylib')) or $([System.String]::Copy('%(Extension)').Contains('.so')) or - $([System.Text.RegularExpressions.Regex]::IsMatch('%(FullPath)', '.*\\libgit2\\.*\.pdb')) + $([System.Text.RegularExpressions.Regex]::IsMatch('%(FullPath)', '.*\\LibGit2Sharp.NativeBinaries.*\\.*\.pdb')) "/> + + + + - - - - - + + + + + \ No newline at end of file diff --git a/src/GitHub.VisualStudio/source.extension.vsixmanifest b/src/GitHub.VisualStudio/source.extension.vsixmanifest index 32bfe9ec68..0e14f7c35d 100644 --- a/src/GitHub.VisualStudio/source.extension.vsixmanifest +++ b/src/GitHub.VisualStudio/source.extension.vsixmanifest @@ -1,7 +1,7 @@  - + GitHub Extension for Visual Studio A Visual Studio Extension that brings the GitHub Flow into Visual Studio. GitHub.VisualStudio @@ -11,7 +11,7 @@ Resources\preview_200x200.png GitHub;git;open source;source control;branch;pull request;team explorer;commit;publish - + @@ -35,4 +35,4 @@ - + \ No newline at end of file diff --git a/src/GitHub.VisualStudio/versioning.targets b/src/GitHub.VisualStudio/versioning.targets new file mode 100644 index 0000000000..0d5eb330ee --- /dev/null +++ b/src/GitHub.VisualStudio/versioning.targets @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/MsiInstaller/MsiInstaller.wixproj b/src/MsiInstaller/MsiInstaller.wixproj deleted file mode 100644 index 93bf7dc1b4..0000000000 --- a/src/MsiInstaller/MsiInstaller.wixproj +++ /dev/null @@ -1,79 +0,0 @@ - - - - Debug - x86 - 3.9 - 1ed83084-2a57-4f89-915c-8a2167c0d6bc - 2.0 - ghfvs - Package - $(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets - $(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets - False - ICE80 - - - bin\$(Configuration)\ - obj\$(Configuration)\ - Debug - - - bin\$(Configuration)\ - obj\$(Configuration)\ - - - ..\..\build\Release\ - obj\$(Configuration)\ - False - True - - - ..\..\build\Release\ - obj\$(Configuration)\ - False - True - - - ..\..\build\Release\ - obj\$(Configuration)\ - False - True - - - - - - - $(WixExtDir)\WixUtilExtension.dll - WixUtilExtension - - - $(WixExtDir)\WixVSExtension.dll - WixVSExtension - - - - - - - - - - $(SolutionDir)packages\WiX.Toolset.2015.3.10.0.1503\tools\wix\ - $(WixToolPath)wix.targets - $(WixToolPath)WixTasks.dll - - - - - - - \ No newline at end of file diff --git a/src/MsiInstaller/Product.wxs b/src/MsiInstaller/Product.wxs deleted file mode 100644 index 801735ab9b..0000000000 --- a/src/MsiInstaller/Product.wxs +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (NEWERFOUND OR SELFFOUND) AND VersionNT > 400 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/MsiInstaller/ProductInfo.wxi b/src/MsiInstaller/ProductInfo.wxi deleted file mode 100644 index 6899073da2..0000000000 --- a/src/MsiInstaller/ProductInfo.wxi +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/MsiInstaller/Version.wxi b/src/MsiInstaller/Version.wxi deleted file mode 100644 index 1c63077264..0000000000 --- a/src/MsiInstaller/Version.wxi +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/MsiInstaller/Vsix.wxi b/src/MsiInstaller/Vsix.wxi deleted file mode 100644 index 8b6fd17aa5..0000000000 --- a/src/MsiInstaller/Vsix.wxi +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/src/MsiInstaller/logo.ico b/src/MsiInstaller/logo.ico deleted file mode 100644 index a6a956cf31..0000000000 Binary files a/src/MsiInstaller/logo.ico and /dev/null differ diff --git a/src/MsiInstaller/packages.config b/src/MsiInstaller/packages.config deleted file mode 100644 index d1c0c4a345..0000000000 --- a/src/MsiInstaller/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/TrackingCollectionTests/packages.config b/src/TrackingCollectionTests/packages.config index 54b07dd61f..1e6d99a41f 100644 --- a/src/TrackingCollectionTests/packages.config +++ b/src/TrackingCollectionTests/packages.config @@ -1,6 +1,9 @@  + + + diff --git a/src/UnitTests/GitHub.App/Models/ModelServiceTests.cs b/src/UnitTests/GitHub.App/Models/ModelServiceTests.cs index cd66c40066..13feb19137 100644 --- a/src/UnitTests/GitHub.App/Models/ModelServiceTests.cs +++ b/src/UnitTests/GitHub.App/Models/ModelServiceTests.cs @@ -347,11 +347,11 @@ public async Task InvalidatesTheCache() var cache = new InMemoryBlobCache(); var modelService = new ModelService(apiClient, cache, Substitute.For()); var user = await modelService.InsertUser(new AccountCacheItem(CreateOctokitUser("octocat"))); - Assert.Equal(1, (await cache.GetAllObjects()).Count()); + Assert.Single((await cache.GetAllObjects())); await modelService.InvalidateAll(); - Assert.Equal(0, (await cache.GetAllObjects()).Count()); + Assert.Empty((await cache.GetAllObjects())); } [Fact] @@ -423,7 +423,7 @@ public async Task NonExpiredIndexReturnsCache() await col.OriginalCompleted; Assert.Equal(expected, col.Count); - Assert.Collection(col, col.Select(x => new Action(t => Assert.True(x.Title.StartsWith("Cache")))).ToArray()); + Assert.Collection(col, col.Select(x => new Action(t => Assert.StartsWith("Cache", x.Title))).ToArray()); } [Fact] @@ -491,7 +491,7 @@ public async Task ExpiredIndexReturnsLive() await done; - Assert.Collection(col, col.Select(x => new Action(t => Assert.True(x.Title.StartsWith("Live")))).ToArray()); + Assert.Collection(col, col.Select(x => new Action(t => Assert.StartsWith("Live", x.Title))).ToArray()); } [Fact] @@ -563,12 +563,12 @@ public async Task ExpiredIndexClearsItems() await done; Assert.Equal(5, col.Count); - Assert.Collection(col, - t => { Assert.True(t.Title.StartsWith("Live")); Assert.Equal(5, t.Number); }, - t => { Assert.True(t.Title.StartsWith("Live")); Assert.Equal(6, t.Number); }, - t => { Assert.True(t.Title.StartsWith("Live")); Assert.Equal(7, t.Number); }, - t => { Assert.True(t.Title.StartsWith("Live")); Assert.Equal(8, t.Number); }, - t => { Assert.True(t.Title.StartsWith("Live")); Assert.Equal(9, t.Number); } + Assert.Collection(col, + t => { Assert.StartsWith("Live", t.Title); Assert.Equal(5, t.Number); }, + t => { Assert.StartsWith("Live", t.Title); Assert.Equal(6, t.Number); }, + t => { Assert.StartsWith("Live", t.Title); Assert.Equal(7, t.Number); }, + t => { Assert.StartsWith("Live", t.Title); Assert.Equal(8, t.Number); }, + t => { Assert.StartsWith("Live", t.Title); Assert.Equal(9, t.Number); } ); } } diff --git a/src/UnitTests/GitHub.App/Services/GitClientTests.cs b/src/UnitTests/GitHub.App/Services/GitClientTests.cs index 2d617ffa1b..efd416c092 100644 --- a/src/UnitTests/GitHub.App/Services/GitClientTests.cs +++ b/src/UnitTests/GitHub.App/Services/GitClientTests.cs @@ -260,11 +260,11 @@ public async Task LocalBaseHeadAndMergeBase_DontFetch() } [Theory] - [InlineData("https://github.com/owner/repo", "baseSha", "headSha", "mergeBaseSha", 0)] - [InlineData("https://github.com/owner/repo", null, "headSha", "mergeBaseSha", 1)] - [InlineData("https://github.com/owner/repo", "baseSha", null, "mergeBaseSha", 1)] - [InlineData("https://github.com/owner/repo", "baseSha", "headSha", null, 0)] - public async Task WhenToFetch(string targetCloneUrl, string baseSha, string headSha, string mergeBaseSha, int receivedFetch) + [InlineData("baseSha", "headSha", "mergeBaseSha", 0)] + [InlineData(null, "headSha", "mergeBaseSha", 1)] + [InlineData("baseSha", null, "mergeBaseSha", 1)] + [InlineData("baseSha", "headSha", null, 0)] + public async Task WhenToFetch(string baseSha, string headSha, string mergeBaseSha, int receivedFetch) { var targetCloneUri = new UriString("https://github.com/owner/repo"); var baseRef = "master"; diff --git a/src/UnitTests/GitHub.App/ViewModels/PullRequestCreationViewModelTests.cs b/src/UnitTests/GitHub.App/ViewModels/PullRequestCreationViewModelTests.cs index 7786be5914..40197450d4 100644 --- a/src/UnitTests/GitHub.App/ViewModels/PullRequestCreationViewModelTests.cs +++ b/src/UnitTests/GitHub.App/ViewModels/PullRequestCreationViewModelTests.cs @@ -122,17 +122,17 @@ public void TargetBranchDisplayNameIncludesRepoOwnerWhenFork() } [Theory] - [InlineData(1, "repo-name", "source-repo-owner", "source-branch", true, true, "target-repo-owner", "target-branch", "title", null)] - [InlineData(2, "repo-name", "source-repo-owner", "source-branch", true, true, "target-repo-owner", "master", "title", "description")] - [InlineData(3, "repo-name", "source-repo-owner", "master", true, true, "target-repo-owner", "master", "title", "description")] - [InlineData(4, "repo-name", "source-repo-owner", "source-branch", false, true, "source-repo-owner", "target-branch", "title", null)] - [InlineData(5, "repo-name", "source-repo-owner", "source-branch", false, true, "source-repo-owner", "master", "title", "description")] - [InlineData(6, "repo-name", "source-repo-owner", "source-branch", true, false, "target-repo-owner", "target-branch", "title", null)] - [InlineData(7, "repo-name", "source-repo-owner", "source-branch", true, false, "target-repo-owner", "master", "title", "description")] - [InlineData(8, "repo-name", "source-repo-owner", "master", true, false, "target-repo-owner", "master", "title", "description")] - [InlineData(9, "repo-name", "source-repo-owner", "source-branch", false, false, "source-repo-owner", "target-branch", "title", null)] - [InlineData(10, "repo-name", "source-repo-owner", "source-branch", false, false, "source-repo-owner", "master", "title", "description")] - public async Task CreatingPRs(int testId, + [InlineData("repo-name-1", "source-repo-owner", "source-branch", true, true, "target-repo-owner", "target-branch", "title", null)] + [InlineData("repo-name-2", "source-repo-owner", "source-branch", true, true, "target-repo-owner", "master", "title", "description")] + [InlineData("repo-name-3", "source-repo-owner", "master", true, true, "target-repo-owner", "master", "title", "description")] + [InlineData("repo-name-4", "source-repo-owner", "source-branch", false, true, "source-repo-owner", "target-branch", "title", null)] + [InlineData("repo-name-5", "source-repo-owner", "source-branch", false, true, "source-repo-owner", "master", "title", "description")] + [InlineData("repo-name-6", "source-repo-owner", "source-branch", true, false, "target-repo-owner", "target-branch", "title", null)] + [InlineData("repo-name-7", "source-repo-owner", "source-branch", true, false, "target-repo-owner", "master", "title", "description")] + [InlineData("repo-name-8", "source-repo-owner", "master", true, false, "target-repo-owner", "master", "title", "description")] + [InlineData("repo-name-9", "source-repo-owner", "source-branch", false, false, "source-repo-owner", "target-branch", "title", null)] + [InlineData("repo-name-10", "source-repo-owner", "source-branch", false, false, "source-repo-owner", "master", "title", "description")] + public async Task CreatingPRs( string repoName, string sourceRepoOwner, string sourceBranchName, bool repoIsFork, bool sourceBranchIsTracking, string targetRepoOwner, string targetBranchName, diff --git a/src/UnitTests/GitHub.App/ViewModels/RepositoryCloneViewModelTests.cs b/src/UnitTests/GitHub.App/ViewModels/RepositoryCloneViewModelTests.cs index c7ce31e8f5..8f66a89b3b 100644 --- a/src/UnitTests/GitHub.App/ViewModels/RepositoryCloneViewModelTests.cs +++ b/src/UnitTests/GitHub.App/ViewModels/RepositoryCloneViewModelTests.cs @@ -177,7 +177,7 @@ public async Task IsFalseWhenLoadingAndCompletedWithRepository() var col = (ITrackingCollection)vm.Repositories; await col.OriginalCompleted; await Task.Delay(100); - Assert.Equal(1, vm.Repositories.Count); + Assert.Single(vm.Repositories); Assert.False(vm.NoRepositoriesFound); } diff --git a/src/UnitTests/GitHub.Exports/LocalRepositoryModelTests.cs b/src/UnitTests/GitHub.Exports/LocalRepositoryModelTests.cs index 59c8e1c033..19ad1ea306 100644 --- a/src/UnitTests/GitHub.Exports/LocalRepositoryModelTests.cs +++ b/src/UnitTests/GitHub.Exports/LocalRepositoryModelTests.cs @@ -51,7 +51,7 @@ static void SetupRepository(string sha) [InlineData(8, LinkType.Blob, false, "https://github.com/foo/bar", "", @"src\dir\file1.cs", -1, 2, "https://github.com/foo/bar")] [InlineData(9, LinkType.Blob, false, "https://github.com/foo/bar", null, null, -1, -1, "https://github.com/foo/bar")] [InlineData(10, LinkType.Blob, false, null, "123123", @"src\dir\file1.cs", 1, 2, null)] - [InlineData(11, LinkType.Blob, true, "https://github.com/foo/bar", "123123", @"src\dir\file1.cs", -1, -1, "https://github.com/foo/bar/blob/123123/src/dir/file1.cs")] + [InlineData(11, LinkType.Blob, true, "https://github.com/foo/bar", "123123", @"src\dir\file1.cs", -1, -1, "https://github.com/foo/bar/blob/123123/src/dir/file1.cs")] [InlineData(12, LinkType.Blob, true, "https://github.com/foo/bar", "123123", @"src\dir\file1.cs", 1, -1, "https://github.com/foo/bar/blob/123123/src/dir/file1.cs#L1")] [InlineData(13, LinkType.Blob, true, "https://github.com/foo/bar", "123123", @"src\dir\file1.cs", 1, 1, "https://github.com/foo/bar/blob/123123/src/dir/file1.cs#L1")] [InlineData(14, LinkType.Blob, true, "https://github.com/foo/bar", "123123", @"src\dir\file1.cs", 1, 2, "https://github.com/foo/bar/blob/123123/src/dir/file1.cs#L1-L2")] @@ -69,8 +69,6 @@ static void SetupRepository(string sha) [InlineData(22, LinkType.Blame, true, "git@github.com/foo/bar", "123123", @"src\dir\ThisIsFile1.cs", -1, -1, "https://github.com/foo/bar/blame/123123/src/dir/ThisIsFile1.cs")] [InlineData(23, LinkType.Blame, true, "https://github.com/foo/bar", "123123", @"src\dir\file1.cs", -1, -1, "https://github.com/foo/bar/blame/123123/src/dir/file1.cs")] [InlineData(24, LinkType.Blame, false, "https://github.com/foo/bar", "123123", "", 1, 2, "https://github.com/foo/bar/commit/123123")] - [InlineData(25, null, false, "git@github.com/foo/bar", "123123", @"src\dir\ThisIsFile1.cs", -1, -1, "https://github.com/foo/bar/blob/123123/src/dir/ThisIsFile1.cs")] - public async void GenerateUrl(int testid, LinkType linkType, bool createRootedPath, string baseUrl, string sha, string path, int startLine, int endLine, string expected) { using (var temp = new TempDirectory()) diff --git a/src/UnitTests/GitHub.Primitives/UriStringTests.cs b/src/UnitTests/GitHub.Primitives/UriStringTests.cs index 70ac9a927d..232bc08ce4 100644 --- a/src/UnitTests/GitHub.Primitives/UriStringTests.cs +++ b/src/UnitTests/GitHub.Primitives/UriStringTests.cs @@ -51,7 +51,6 @@ public void ParsesWellFormedUrlComponents(string url, string expectedHost, strin [InlineData(@"c:\dev\bar\..\exp\foo")] [InlineData("c:/dev/exp/foo")] [InlineData(@"c:\dev\exp\foo.git")] - [InlineData(@"c:\dev\exp\foo.git")] [InlineData("c:/dev/exp/foo.git")] [InlineData("c:/dev/exp/bar/../foo.git")] [InlineData("file:///C:/dev/exp/foo")] @@ -61,9 +60,9 @@ public void ParsesLocalFileUris(string path) { var cloneUrl = new UriString(path); - Assert.Equal(cloneUrl.Host, ""); - Assert.Equal(cloneUrl.Owner, ""); - Assert.Equal(cloneUrl.RepositoryName, "foo"); + Assert.Equal("", cloneUrl.Host); + Assert.Equal("", cloneUrl.Owner); + Assert.Equal("foo", cloneUrl.RepositoryName); Assert.Equal(cloneUrl.ToString(), path.Replace('\\', '/')); Assert.True(cloneUrl.IsFileUri); } @@ -81,7 +80,6 @@ public void ParsesLocalFileUris(string path) [InlineData("blah@bar.com:/Windows.git", "bar.com", null, "Windows")] [InlineData("blah@baz.com/Windows.git", "baz.com", null, "Windows")] [InlineData("ssh://git@github.com:github/Windows.git", "github.com", "github", "Windows")] - [InlineData("ssh://git@example.com/Windows.git", "example.com", null, "Windows")] public void ParsesWeirdUrlsAsWellAsPossible(string url, string expectedHost, string owner, string repositoryName) { var cloneUrl = new UriString(url); @@ -230,7 +228,7 @@ public void ConvertsBackToString() { var uri = new UriString("http://github.com/foo/bar/"); string cloneUri = uri; - Assert.Equal(cloneUri, "http://github.com/foo/bar/"); + Assert.Equal("http://github.com/foo/bar/", cloneUri); } [Fact] @@ -249,7 +247,7 @@ public class ImplicitConversionFromString : TestBaseClass public void ConvertsToCloneUri() { UriString cloneUri = "http://github.com/foo/bar/"; - Assert.Equal(cloneUri.Host, "github.com"); + Assert.Equal("github.com", cloneUri.Host); } [Fact] diff --git a/src/UnitTests/GitHub.VisualStudio/Services/ConnectionManagerTests.cs b/src/UnitTests/GitHub.VisualStudio/Services/ConnectionManagerTests.cs index 04dcc4770e..b8daf63175 100644 --- a/src/UnitTests/GitHub.VisualStudio/Services/ConnectionManagerTests.cs +++ b/src/UnitTests/GitHub.VisualStudio/Services/ConnectionManagerTests.cs @@ -34,7 +34,7 @@ public void IsSavedToDiskWhenConnectionAdded() manager.Connections.Add(new Connection(manager, HostAddress.GitHubDotComHostAddress, "coolio")); - Assert.Equal(1, manager.Connections.Count); + Assert.Single(manager.Connections); cache.Received(1).Save(Arg.Is>(x => x.SequenceEqual(new[] { new ConnectionDetails(HostAddress.GitHubDotComHostAddress, "coolio") }))); } diff --git a/src/UnitTests/GitHub.VisualStudio/Services/JsonConnectionCacheTests.cs b/src/UnitTests/GitHub.VisualStudio/Services/JsonConnectionCacheTests.cs index 964046dda6..020bd27bcc 100644 --- a/src/UnitTests/GitHub.VisualStudio/Services/JsonConnectionCacheTests.cs +++ b/src/UnitTests/GitHub.VisualStudio/Services/JsonConnectionCacheTests.cs @@ -52,7 +52,7 @@ public async Task IsEmptyWhenCacheCorrupt(string cacheJson) var connections = (await cache.Load()).ToList(); - Assert.Equal(0, connections.Count); + Assert.Empty(connections); operatingSystem.File.Received().Delete(@"c:\fake\GHfVS\ghfvs.connections"); } diff --git a/src/UnitTests/UnitTests.csproj b/src/UnitTests/UnitTests.csproj index 5b55c52dcd..2463d5dd0e 100644 --- a/src/UnitTests/UnitTests.csproj +++ b/src/UnitTests/UnitTests.csproj @@ -1,7 +1,9 @@  + + + - Debug @@ -74,8 +76,8 @@ ..\..\packages\Rx-Testing.2.2.5-custom\lib\net45\Microsoft.Reactive.Testing.dll True - - ..\..\packages\VSSDK.ComponentModelHost.12.0.4\lib\net45\Microsoft.VisualStudio.ComponentModelHost.dll + + ..\..\packages\Microsoft.VisualStudio.ComponentModelHost.14.0.25424\lib\net45\Microsoft.VisualStudio.ComponentModelHost.dll True @@ -158,8 +160,8 @@ ..\..\packages\Microsoft.VisualStudio.TextManager.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.TextManager.Interop.8.0.dll True - - ..\..\packages\NSubstitute.1.10.0.0\lib\net45\NSubstitute.dll + + ..\..\packages\NSubstitute.2.0.3\lib\net45\NSubstitute.dll True @@ -200,19 +202,19 @@ - False - ..\..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll + ..\..\packages\xunit.abstractions.2.0.1\lib\net35\xunit.abstractions.dll + True - - ..\..\packages\xunit.assert.2.1.0\lib\dotnet\xunit.assert.dll + + ..\..\packages\xunit.assert.2.3.1\lib\netstandard1.1\xunit.assert.dll True - - ..\..\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll + + ..\..\packages\xunit.extensibility.core.2.3.1\lib\netstandard1.1\xunit.core.dll True - - ..\..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll + + ..\..\packages\xunit.extensibility.execution.2.3.1\lib\net452\xunit.execution.desktop.dll True @@ -301,10 +303,6 @@ {08dd4305-7787-4823-a53f-4d0f725a07f3} Octokit - - {dd99fd0f-82f6-4c30-930e-4a1d0df01d65} - ReactiveUI.Testing_Net45 - {1ce2d235-8072-4649-ba5a-cfb1af8776e0} ReactiveUI_Net45 @@ -367,8 +365,12 @@ - - + + Designer + + + Designer + @@ -382,16 +384,23 @@ Resources.Designer.cs + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + + + + +