boxstarter
boxstarter copied to clipboard
Boxstarter shell does not recognise / load Chocolatey cmdlets
- I've updated my environment via
cup chocolatey
andcup boxstarter
. - I've run this via the Boxstarter shell and via a regular PS admin terminal, both with the same results as below
- Windows 10 latest preview
Am I doing it wrong?
Install-ChocolateyVsixPackage WebEssentials https://visualstudiogallery.msdn.microsoft.com/56633663-6799-41d7-9df7-0f2a504ca361/file/105627/43/WebEssentials2013.vsix
@philoushka The cmdlet that you are trying to run, Install-ChocolateyVsixPackage
is a cmdlet that ships with Chocolatey, not Boxstarter. When you are installing a Boxstarter Package, Boxstarter actively loads the Chocolatey PowerShell Module, so that these cmdlets are available within your Boxstarter Scripts. However, the Boxstarter Shell, which you are using above, does not have that module loaded.
In order to get this to work, you would need to do
Import-Module C:\Chocolatey\chocolateyinstall\helpers\chocolateyInstaller.psm1
NOTE: The above path might be different for you, depending on what version of Chocolatey you are using, and whether it was a fresh install. If you don't have the above folder, look in C:\ProgramData\Chocolatey.
which would then give you access to the Chocolatey Helper Functions:
There error that I received above was due to the fact that I didn't pass valid parameters. In fact, I didn't pass any :smile_cat:
Hope that helps!
Install-ChocolateyVsixPackage is a cmdlet that ships with Chocolatey, not Boxstarter.
My bad. I was mistaken on this. Thanks very much for your help!
Not a problem at all! :+1:
Hmm. I think this may have come up before. I'm reopening because I think it might be good to load that module in the shell and not just in the context of a boxstarter run. I'm about to dive into the new choco version which could change quite a lot of things here but I'll leave open until i know if this is a keeper or not.
I'm about to dive into the new choco version which could change quite a lot of things here but I'll leave open until i know if this is a keeper or not.
You and me both. Just getting ducks in a row for ChocolateyGUI, and then going to take the plunge with the new version :smile_cat:
I see that this is still open and am currently running into this issue. I have the latest Chocolatey installed (v0.9.10.3). I also have the following inserted at the bottom of my PowerShell profile, but I am still unable to run Install-ChocolateyVsixPackage
from a normal posh prompt. It seems to work fine in the context of BoxStarter, which I understand includes a copy of Chocolatey.
# Chocolatey profile
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
if (Test-Path($ChocolateyProfile)) {
Import-Module $ChocolateyProfile
}
Import-Module "$env:ChocolateyInstall\helpers\functions\Install-ChocolateyVsixPackage.ps1" -Force
Would be good to have this enhancement