olegsych / posh-vs

Makes Visual Studio command line tools available in PowerShell
MIT License
31 stars 3 forks source link

Import-BatchEnvironment: 'The input line is too long' #8

Open klimkjar opened 5 years ago

klimkjar commented 5 years ago

I am importing the VS2019 x64 environment from my PowerShell profile like this:

Import-BatchEnvironment 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat'

After updating to VS2019 v16.2, the following warning appears on startup:

The input line is too long.
The syntax of the command is incorrect.

Not sure what changed between 16.1 and 16.2 to cause this.

JamesBloomScheff2 commented 3 months ago

I'm having the same problem. The line that generates the error is set "__VSCMD_PREINIT_PATH=%PATH%". Evidently, Microsoft can't handle long paths