Join-Path : Cannot bind argument to parameter 'Path' because it is null

Viewed 35

I want to build this open source project from source for contributing. I am following this docs for windows. I cloned the repo and install chocolatey as mention. Then I am executing the commands in "prepare the enviorment section" . I was able to run 1st command correctly

PS A:\wasmedgebuild\WasmEdge> choco install cmake ninja vswhere

But when I run second one .

PS A:\wasmedgebuild\WasmEdge> $vsPath = (vswhere -latest -property installationPath) Import-Module (Join-Path $vsPath "Common7\Tools\Microsoft.VisualStudio.DevShell.dll") Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64 -winsdk=10.0.19041.0"

I am getting this error:

Join-Path : Cannot bind argument to parameter 'Path' because it is null.
At line:2 char:26
+ Import-Module (Join-Path $vsPath "Common7\Tools\Microsoft.VisualStudi ...
+                          ~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Join-Path], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCommand
 
Enter-VsDevShell : The term 'Enter-VsDevShell' is not recognized as the name of a cmdlet, function, script file, or operable program. 
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:3 char:1
+ Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation -DevCm ...
+ ~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Enter-VsDevShell:String) [], CommandNotFoundException     
    + FullyQualifiedErrorId : CommandNotFoundException

Screenshotenter image description here

I don't know what is the problem. Am I doing it in wrong way?

0 Answers
Related