We're moving to Discord! Join us at https://ch0.co/community and https://ch0.co/community-support
$PROFILE
properties are all empty? They are not empty outside of Boxstarter.Profile: C:\Users\Dan\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
Profile: C:\Users\Dan\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
Profile.CurrentUserAllHosts:
Profile.CurrentUserAllHosts:
Profile.CurrentUserCurrentHost:
Profile.CurrentUserCurrentHost:
Profile.AllUsersAllHosts:
Profile.AllUsersAllHosts:
Profile.AllUsersCurrentHost:
Profile.AllUsersCurrentHost:
refreshenv
runs successfully, but doesn't update $env:path
. But if I then run Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1; refreshenv
, then it does. Is it expected that refreshenv
doesn't do a complete refresh? Also, is there a reason why Boxstarter doesn't automatically import chocolateyProfile.psm1
?
Invoke-Reboot
in the script without any tests around about it, you will get a reboot every time Boxstarter gets to that line in your script. Have a look at the function help.
Install-ChocolateyVsixPackage
in my Boxstarter package, but it always fails with "ERROR: Visual Studio is not installed or the specified version is not present". Debugging through the code, I believe it is looking for a registry entry with a property named "InstallDir", but it doesn't exist.
choco upgrade visualstudio2019enterprise
Install-ChocolateyVsixPackage
helper unfortunately only works for older version of Visual Studio (I think it was for VS2015 and below). You need to use a helper function in the package chocolatey-visualstudio.extension instead
function Install-VisualStudioVsixExtensionFromVSMarketplace($itemName) {
$packageUrl = Get-VisualStudioMarketplaceDownloadUrl($itemName)
Install-VisualStudioVsixExtension -Name $itemName -Url $packageUrl
}
function Get-VisualStudioMarketplaceDownloadUrl($itemName) {
$marketplaceUrl = "https://marketplace.visualstudio.com/"
$itemUrl = "$($marketplaceUrl)items?itemName=$itemName"
$response = Invoke-WebRequest $itemUrl -UseBasicParsing
$href = ($response.Links | Where-Object { $_.class -eq "install-button-container" }).href
return "$marketplaceUrl$href"
}
Install-VisualStudioVsixExtensionFromVSMarketplace MadsKristensen.Tweaks
Hello All, I am trying to use the Chocolatey test runner's powershell cmdlet: Set-BoxstarterDeployOptions. As arguments to this cmdlet, i am providing the url to our internal Artifactory server using the DefaultNugetFeed parameter. I am trying to use the API key using the parameter : DefaultFeedAPIKey. However, i am running into the following issue
```Cannot process argument transformation on parameter 'DefaultFeedAPIKey'. Cannot convert
value "<my API key>" to type "System.Guid". Error: "Guid
should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)."
At line:1 char:295
The API key is more than 32 characters in length. So is this a limitation of the Chooclatey test runner that the API key needs to be 32 characters in length?
Any help would be very much appreciated.