I’ve blogged before about using BoxStarter to efficiently provision a new development machine.
This is working very well for our developers. Maintaining the installation script takes a bit of effort but the benefits are worth it.
Recently, the chocolatey developers have been making things more secure and recent versions now require a checksum with any downloaded package. For now, there seems to be some difficulty using Install-ChocolateyVsixPackage within BoxStarter scripts.
WARNING:Missingpackagechecksumsarenotallowed(bydefaultforHTTP/FTP,HTTPSwhenfeature'allowEmptyChecksumsSecure'isdisabled)forsafetyandsecurityreasons.Althoughwestronglyadviseagainstit,ifyouneedthisfunctionality,pleasesetthefeature'allowEmptyChecksums'('choco feature enable -n allowEmptyChecksums')Therewereerrorsattemptingtoretrievethevsixfromhttps://visualstudiogallery.msdn.microsoft.com/91aaa139-5d3c-43aorpassintheoption'--allow-empty-checksums'.7-b39f-369196a84fa5/file/44205/7/StopOnFirstBuildError.vsix.Theerrormessagewas'Empty checksums are no longer allowed by default for non-secure sources. Please ask the maintainer to add checksums to this package. In the meantime if you need this package to work correctly, please enable the feature allowEmptyChecksums or provide the runtime switch '--allowEmptyChecksums'. We strongly advise against allowing empty checksums for HTTP/FTP sources.'.AtC:\ProgramData\chocolatey\helpers\functions\Install-ChocolateyVsixPackage.ps1:173char:13etc...
I tried the suggested allowEmptyChecksums but it was still raising an error. After some experimentation it seems that the combination of (temporarily) disabling the checksumFiles feature and enabling allowEmptyChecksums works. Here is the relevant section of my boxstarter script.
1234567891011121314151617181920
# temporarily enable/disable features to bypass checksumschocofeaturedisable-n=checksumFileschocofeatureenable-n=allowEmptyChecksumstry{# VS extensions for all versions of Visual StudioInstall-ChocolateyVsixPackageStopOnFirstBuildErrorhttps://visualstudiogallery.msdn.microsoft.com/91aaa139-5d3c-43a7-b39f-369196a84fa5/file/44205/7/StopOnFirstBuildError.vsixInstall-ChocolateyVsixPackageVisualHGhttps://visualhg.codeplex.com/downloads/get/1475782# VS extensions for VS2015Install-ChocolateyVsixPackageWebEssentials2015https://visualstudiogallery.msdn.microsoft.com/ee6e6d8c-c837-41fb-886a-6b50ae2d06a2/file/146119/19/WebEssentials2015.vsixInstall-ChocolateyVsixPackageWebExtensionPackhttps://visualstudiogallery.msdn.microsoft.com/f3b504c6-0095-42f1-a989-51d5fc2a8459/file/186606/23/Web%20Extension%20Pack%20v1.5.50.vsixInstall-ChocolateyVsixPackageT4Toolbox2015https://visualstudiogallery.msdn.microsoft.com/34b6d489-afbc-4d7b-82c3-dded2b726dbc/file/165481/2/T4Toolbox.14.0.0.71.vsix# CodeRush for Roslyn PreviewInstall-ChocolateyVsixPackageCodeRushForRoslynhttps://visualstudiogallery.msdn.microsoft.com/8a8390ae-1f71-4659-9d8d-5dd56fd8a72e/file/163212/15/DevExpress.CodeRush.Roslyn-16.1.6.vsix}finally{chocofeatureenable-n=checksumFileschocofeaturedisable-n=allowEmptyChecksums}