diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index afcaf54e2c..06463be1a0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,6 +22,10 @@ jobs: - name: Setup devenv uses: seanmiddleditch/gha-setup-vsdevenv@master + - name: Install VSIX + shell: powershell + run: .\setup-vsix.ps1 + - name: Setup NuGet uses: NuGet/setup-nuget@v1.0.5 diff --git a/OneMore.sln b/OneMore.sln index 15e07b7604..1ce3199395 100644 --- a/OneMore.sln +++ b/OneMore.sln @@ -18,6 +18,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution README.md = README.md register-onemore.reg = register-onemore.reg setdevreg.ps1 = setdevreg.ps1 + setup-vsix.ps1 = setup-vsix.ps1 setversion.ps1 = setversion.ps1 EndProjectSection EndProject @@ -48,6 +49,13 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OneMoreSetupActions", "OneM EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OneMoreCalendar", "OneMoreCalendar\OneMoreCalendar.csproj", "{1F87159C-B663-4464-B272-E0C57BE22306}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{AD3F5496-C83B-4C86-B78D-EE7C6CCABB8A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{5771E974-F302-4CB6-86B8-B57C74C07709}" + ProjectSection(SolutionItems) = preProject + .github\workflows\build.yml = .github\workflows\build.yml + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -121,6 +129,10 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {AD3F5496-C83B-4C86-B78D-EE7C6CCABB8A} = {2679BE09-8144-4B5B-957E-D463F00FA66E} + {5771E974-F302-4CB6-86B8-B57C74C07709} = {AD3F5496-C83B-4C86-B78D-EE7C6CCABB8A} + EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {19E5943B-AB7E-4164-98B6-0C88B01BFABE} EndGlobalSection diff --git a/setup-vsix.ps1 b/setup-vsix.ps1 new file mode 100644 index 0000000000..27a49cbd47 --- /dev/null +++ b/setup-vsix.ps1 @@ -0,0 +1,46 @@ +<# +.SYNOPSIS +Install the InstallerProjects VS Extension to support vdproj Deployment Project builds +#> + +param () + +Begin +{ + + function InstallVSExtensions + { + $root = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath + $installer = "$root\Common7\IDE\vsixinstaller.exe" + + # TODO: update these versions every now and then... + + InstallVsix $installer 'InstallerProjects' 'VisualStudioClient/vsextensions/MicrosoftVisualStudio2017InstallerProjects/1.0.0/vspackage' + + Write-Host + Write-Host '... Waiting a minute for the VSIXInstaller processes to complete' -ForegroundColor Yellow + Start-Sleep 60 + } + + + function InstallVsix + { + param($installer, $name, $uri) + Write-Host "... installing $name extension in the background" -ForegroundColor Yellow + + $url = "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/$uri" + $vsix = "$($env:TEMP)\$name`.vsix" + + # download package directly from VS Marketplace and install + [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Ssl3,Tls,Tls11,Tls12' + $progressPreference = 'silentlyContinue' + Invoke-WebRequest $url -OutFile $vsix + $progressPreference = 'Continue' + + & $installer /quiet /norepair $vsix + } +} +Process +{ + InstallVSExtensions +}