diff --git a/Build/Common.Build.settings b/Build/Common.Build.settings index e37f8b2..dcbffe7 100644 --- a/Build/Common.Build.settings +++ b/Build/Common.Build.settings @@ -66,9 +66,6 @@ $(BuildRoot)\ $(BuildRoot)Build - $(BuildRoot)..\PTVS-pr\ - $(BuildRoot)Python\Samples\ - + true + true + + $(FileVersion) + + + + + VSTarget=$(VSTarget);Configuration=$(Configuration);Platform=$(Platform) + + + + + + diff --git a/Installer/Microsoft.VisualStudioTools.VSTestHost_Sideload.vsmanproj b/Installer/Microsoft.VisualStudioTools.VSTestHost_Sideload.vsmanproj new file mode 100644 index 0000000..4195a2f --- /dev/null +++ b/Installer/Microsoft.VisualStudioTools.VSTestHost_Sideload.vsmanproj @@ -0,0 +1,28 @@ + + + + setup + + + + + + true + true + + $(FileVersion) + + + + + + + + + + + + + + + diff --git a/Installer/install.ps1 b/Installer/install.ps1 new file mode 100644 index 0000000..d07ac13 --- /dev/null +++ b/Installer/install.ps1 @@ -0,0 +1,31 @@ +param($vs, $vsdrop, [switch] $uninstall) + +$install_dirs = @( + "Common7\IDE\PublicAssemblies\Microsoft.VisualStudioTools.VSTestHost.15.0.dll", + "Common7\IDE\CommonExtensions\Platform\Microsoft.VisualStudioTools.VSTestHost.15.0.pkgdef" +) + +$to_delete = $install_dirs | ?{ Test-Path "$vs\$_" } | %{ gi "$vs\$_" } +if ($to_delete) { + "Cleaning old install..." + $to_delete | ?{ 'Directory' -in $_.Attributes } | rmdir -Recurse -Force + $to_delete | ?{ -not ('Directory' -in $_.Attributes) } | del -Force + if ($uninstall) { + # Only uninstalling, so run devenv /setup now + Start-Process -Wait "$vs\Common7\IDE\devenv.exe" "/setup" + } +} + +if (-not $uninstall) { + $source = $MyInvocation.MyCommand.Definition | Split-Path -Parent + + copy -Recurse -Force $vsdrop\engine ${env:Temp}\engine + + Set-ItemProperty "HKLM:\Software\WOW6432Node\Microsoft\VisualStudio\15.0\EnterpriseTools\QualityTools\HostAdapters\VSTestHost" -Name "EditorType" -Value "Microsoft.VisualStudioTools.VSTestHost.TesterTestControl, Microsoft.VisualStudioTools.VSTestHost.15.0, Version=15.0.4.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" + Set-ItemProperty "HKLM:\Software\WOW6432Node\Microsoft\VisualStudio\15.0\EnterpriseTools\QualityTools\HostAdapters\VSTestHost" -Name "Type" -Value "Microsoft.VisualStudioTools.VSTestHost.TesterTestAdapter, Microsoft.VisualStudioTools.VSTestHost.15.0, Version=15.0.4.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" + Set-ItemProperty "HKLM:\Software\WOW6432Node\Microsoft\VisualStudio\15.0\EnterpriseTools\QualityTools\HostAdapters\VSTestHost\SupportedTestTypes" -Name "{13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b}" -Value "Unit Test" + Set-ItemProperty "HKLM:\Software\WOW6432Node\Microsoft\VisualStudio\15.0\EnterpriseTools\QualityTools\TestTypes\{13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b}\SupportedHostAdapters" -Name "VSTestHost" -Value "VS Test Host Adapter" + + & "${env:Temp}\engine\setup.exe" install --catalog "$source\Microsoft.VisualStudioTools.VSTestHost_Sideload.vsman" --installdir "$vs" --layoutdir "$source" + # devenv /setup is run by setup.exe +} diff --git a/Installer/packages.config b/Installer/packages.config index ff1106d..3946590 100644 --- a/Installer/packages.config +++ b/Installer/packages.config @@ -1,4 +1,5 @@  + \ No newline at end of file diff --git a/Installer/sideload.json b/Installer/sideload.json new file mode 100644 index 0000000..4ed3920 --- /dev/null +++ b/Installer/sideload.json @@ -0,0 +1,38 @@ +{ + "manifestVersion": "1.0", + "info": { + "id": "Microsoft.VisualStudioTools.VSTestHost_Sideload,version=1.0.0.0" + }, + "packages": [ + { + "installParams": { + "fileName": "[InstallDir]\\Common7\\IDE\\devenv.exe", + "parameters": "/setup" + }, + "repairParams": { + "fileName": "[InstallDir]\\Common7\\IDE\\devenv.exe", + "parameters": "/setup" + }, + "uninstallParams": { + "fileName": "[InstallDir]\\Common7\\IDE\\devenv.exe", + "parameters": "/setup" + }, + "language": "en-us", + "dependencies": { + "microsoft.VisualStudioTools.VSTestHost": { + "version": "[1.0.0.0)" + } + }, + "localizedResources": [ + { + "language": "en-us", + "title": "VSTestHost", + "description": "Run UI tests within VS." + } + ], + "id": "Microsoft.VisualStudioTools.VSTestHost_Sideload", + "version": "1.0.0.0", + "type": "Product" + } + ] +} \ No newline at end of file diff --git a/Installer/vstesthost.swr b/Installer/vstesthost.swr new file mode 100644 index 0000000..e485787 --- /dev/null +++ b/Installer/vstesthost.swr @@ -0,0 +1,8 @@ +use vs +package name=Microsoft.VSTestHost version=$(FileVersion) + +folder "InstallDir:\Common7\IDE\PublicAssemblies" + file source="$(BuildSource)Microsoft.VisualStudioTools.VSTestHost.$(VSTarget).dll" + +folder "InstallDir:\Common7\IDE\CommonExtensions\Platform" + file source="$(BuildSource)Microsoft.VisualStudioTools.VSTestHost.$(VSTarget).pkgdef" diff --git a/VSTestHost/VSTestHost.csproj b/VSTestHost/VSTestHost.csproj index db7d2e8..88261db 100644 --- a/VSTestHost/VSTestHost.csproj +++ b/VSTestHost/VSTestHost.csproj @@ -23,6 +23,7 @@ false false true + binaries @@ -139,12 +140,12 @@ --> + Condition="'$(Configuration)' == 'Debug' and '$(VSTarget)' == '$(VisualStudioVersion)' and $(DeployExtension)"> + Condition="'$(Configuration)' == 'Debug' and '$(VSTarget)' == '$(VisualStudioVersion)' and $(DeployExtension)"> \ No newline at end of file