AirSim
AirSim copied to clipboard
Error using build.cmd in Windows 7 (with a solution)
While following the instructions given here to build AirSim in Windows 7, I am getting an error as follows.
Exception setting "SecurityProtocol": "Cannot convert null to type "System.Net.
SecurityProtocolType" due to invalid enumeration values. Specify one of the fol
lowing enumeration values and try again. The possible enumeration values are "S
sl3, Tls"."
At line:1 char:32
+ & { [Net.ServicePointManager]:: <<<< SecurityProtocol = [Net.SecurityProtocol
Type]::Tls12; iwr https://github.com/rpclib/rpclib/archive/v2.2.1.zip -OutFile
external\rpclib.zip }
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyAssignmentException
The term 'iwr' 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 include
d, verify that the path is correct and try again.
At line:1 char:89
+ & { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]:
:Tls12; iwr <<<< https://github.com/rpclib/rpclib/archive/v2.2.1.zip -OutFile
external\rpclib.zip }
+ CategoryInfo : ObjectNotFound: (iwr:String) [], CommandNotFound
Exception
+ FullyQualifiedErrorId : CommandNotFoundException
The term 'Expand-Archive' 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:1 char:19
+ & { Expand-Archive <<<< -Path external\rpclib.zip -DestinationPath external\
rpclib }
+ CategoryInfo : ObjectNotFound: (Expand-Archive:String) [], Comm
andNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
This issue is because of the PowerShell version used in Windows 7. 'iwr' was introduced with PowerShell 3.0 whereas Windows 7 has Powershell 2.0.
Possible Solutions
-
Recommended PowerShell version is latest (PowerShell 5.1 which comes as default in Windows 10). Instructions for the same can be found here.
-
Use git features like git submodules which is independent of PowerShell version.
You definitely need PowerShell 5.1 on Windows 7. We are not planning to support older versions of powershell.