Wintellect / WintellectPowerShell

PowerShell scripts for better debugging and life
http://www.wintellect.com
Other
178 stars 41 forks source link

Support VS2019 in Import-VisualStudioEnvironment #12

Open tats-u opened 5 years ago

tats-u commented 5 years ago

Could you support VS2019 in Import-VisualStudioEnvironment? I can't touch the already-signed code.

PS tatsu@TATSU-NB-3RD:~$ Import-VisualStudioEnvironment
The system cannot find the path specified.
ERROR: Error executing CMD.EXE: 1
PS tatsu@TATSU-NB-3RD:~$ Import-VisualStudioEnvironment 2019
Import-VisualStudioEnvironment : Cannot validate argument on parameter 'VSVersion'. The argume
nt "2019" does not belong to the set "Latest,2013,2015,2017" specified by the ValidateSet attr
ibute. Supply an argument that is in the set and then try the command again.
At line:1 char:32
+ Import-VisualStudioEnvironment 2019
+                                ~~~~
    + CategoryInfo          : InvalidData: (:) [Import-VisualStudioEnvironment], ParameterBin 
   dingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Import-VisualStudioEnvironment 

PS tatsu@TATSU-NB-3RD:~$ Import-VisualStudioEnvironment Latest
The system cannot find the path specified.
ERROR: Error executing CMD.EXE: 1
JohnWintellect commented 5 years ago

Unfortunately, I'm not doing active development much anymore these days. If you pull down the code for this repo you can make the fix in there, push me the patch, and I can do the signing.

tats-u commented 5 years ago

I got it. I suppose these changes are needed:

  1. Add "2019" in https://github.com/Wintellect/WintellectPowerShell/blob/43cdadad1fa23ab1ac53b5517ce5b98e569d6ccd/Code/Import-VisualStudioEnvironment.ps1#L69
  2. Add "2019" { "16.0" } in https://github.com/Wintellect/WintellectPowerShell/blob/43cdadad1fa23ab1ac53b5517ce5b98e569d6ccd/Code/Import-VisualStudioEnvironment.ps1#L109-L111

Similar changes may be required in, e.g.,

tats-u commented 5 years ago

Should I create a PR or formal diff file?