Powershell: VS 15.6을 μ„€μΉ˜ν•˜λ©΄ Powershell JSON μ²˜λ¦¬κ°€ μ€‘λ‹¨λ©λ‹ˆλ‹€.

에 λ§Œλ“  2018λ…„ 03μ›” 08일  Β·  3μ½”λ©˜νŠΈ  Β·  좜처: PowerShell/PowerShell

졜근 μΆœμ‹œλœ Visual Studio 15.6 (https://blogs.msdn.microsoft.com/visualstudio/2018/03/06/visual-studio-2017-version-15-6-visual-studio-for-mac-version- 7-4-released) 쀑단 / Powershell JSON 처리

문제 1:

μž¬ν˜„ 단계

"[{x:'b'},{x:'a'}]" | ConvertFrom-Json | ConvertTo-Json

μ˜ˆμƒλ˜λŠ” 행동

VS 15.6이 λ°˜ν™˜λ˜κΈ° 전에

[
  {
      "x":  "b"
  },
  {
      "x":  "a"
  }
]

μ‹€μ œ 행동

VS 15.6이 μ„€μΉ˜λœ 경우 λ°˜ν™˜

{
    "value":  [
                  {
                      "x":  "b"
                  },
                  {
                      "x":  "a"
                  }
              ],
    "Count":  2
}

ν™˜κ²½ 데이터

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      5.1.16299.248
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.16299.248
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

문제 2:

μž¬ν˜„ 단계

"[{x:'b'},{x:'a'}]" | ConvertFrom-Json | Sort-Object -Property x

μ˜ˆμƒλ˜λŠ” 행동

VS 15.6이 λ°˜ν™˜λ˜κΈ° 전에

x
-
a
b

μ‹€μ œ 행동

VS 15.6이 μ„€μΉ˜λœ 경우 λ°˜ν™˜

x
-
b
a

ν™˜κ²½ 데이터

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      5.1.16299.248
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.16299.248
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
Issue-Question OS-Windows Resolution-Answered Resolution-External

λͺ¨λ“  3 λŒ“κΈ€

VS 15.5.6이 μ„€μΉ˜λœ VM이 있으며 VS 15.6.1이 μ„€μΉ˜λœ 개발자 λž©ν†± 간에 차이가 μ—†λ‹€κ³  말할 수 μžˆμŠ΅λ‹ˆλ‹€.
μ˜ˆμƒλŒ€λ‘œ μ„€λͺ…ν•˜λŠ” 것은 PowerShell 6(두 컴퓨터 λͺ¨λ‘)μ—μ„œ 얻은 것이고, μ‹€μ œλ‘œ μ„€λͺ…ν•˜λŠ” 것은 두 μ»΄ν“¨ν„°μ—μ„œ Windows PowerShell 5.1μ—μ„œ 얻은 κ²ƒμž…λ‹ˆλ‹€. 이 λ¦¬ν¬μ§€ν† λ¦¬λŠ” PowerShell 6 문제 μ „μš©μž…λ‹ˆλ‹€.

@bergmeister 의 μ˜κ²¬μ— μΆ”κ°€ν•˜λ €λ©΄: κ·€ν•˜κ°€ μ„€λͺ…ν•˜λŠ” λ¬Έμ œλŠ” _Core_μ—μ„œ μ–Όλ§ˆ 전에 μˆ˜μ •λ˜μ—ˆμŠ΅λ‹ˆλ‹€(κ·ΈλŸ¬λ‚˜ _Windows PowerShell_ v5.1μ—λŠ” μ—¬μ „νžˆ μ‘΄μž¬ν•¨): #3153

버그 ν…œν”Œλ¦Ώμ— λͺ…μ‹œλœ λŒ€λ‘œ:

Windows PowerShell 5.1 문제, μ œμ•ˆ λ˜λŠ” κΈ°λŠ₯ μš”μ²­μ˜ 경우 λ‹€μŒ 링크λ₯Ό λŒ€μ‹  μ‚¬μš©ν•˜μ‹­μ‹œμ˜€.

이 νŽ˜μ΄μ§€κ°€ 도움이 λ˜μ—ˆλ‚˜μš”?
0 / 5 - 0 λ“±κΈ‰