Split-Path error

Topics: User Forum
Jan 16, 2009 at 1:15 PM
Ok, I am a comlete novice at this.  I am trying to pick up PowerShell and installed PSCE 1.1.1.  I am getting the following errors on starting PS.:


Split-Path : Cannot bind argument to parameter 'Path' because it is null.
At C:\Program Files\PowerShell Community Extensions\Profile\Environment.VisualStudio2005.ps1:39 char:21
+ $VSPath = split-path  <<<< $VisualStudioKey.InstallDir -Parent | split-path -Parent
Join-Path : Cannot bind argument to parameter 'Path' because it is null.
At C:\Program Files\PowerShell Community Extensions\Profile\Environment.VisualStudio2005.ps1:40 char:20
+ $VCPath = join-path  <<<< $VSPath 'VC'
Test-Path : Cannot bind argument to parameter 'Path' because it is null.
At C:\Program Files\PowerShell Community Extensions\Profile\Environment.VisualStudio2005.ps1:42 char:14
+ if (test-path  <<<< $VSPath) {

Can anyone tell me what could be the problem?  I see that the object $VisualStudioKey.InstallDir -Parent seems to be null.  I do not have a full version of Visual Studio installed.

Any help would be appreciated.
Developer
Jan 19, 2009 at 1:39 AM
Robinr11: if you don't need Visual Studio support, just ignore all that, or rather, just delete the Environment.VisualStudio2005.ps1 script ... it's really not that great anyway, and shouldn't be run by default ;-)
Coordinator
Jan 20, 2009 at 4:56 AM
Yeah we probably shouldn't run that script by default.  And if you do want it, I would also like to change it to just use the vsvars32.bat file that comes with the version of Visual Studio you have installed.  Not sure if we'll get the last part for 1.2 though.