ΠΠ°ΠΊ ΠΎΡΠΊΡΡΡΡ ΡΠ΅ΡΠΌΠΈΠ½Π°Π» vs code
ΠΠΎΠΌΠ°Π½Π΄Π½Π°Ρ ΡΡΡΠΎΠΊΠ° ΡΠ°Π·ΡΠ°Π±ΠΎΡΡΠΈΠΊΠ° ΠΈ PowerShell Π΄Π»Ρ ΡΠ°Π·ΡΠ°Π±ΠΎΡΡΠΈΠΊΠΎΠ² Π² Visual Studio
Π Visual Studio 2019 Π΅ΡΡΡ Π΄Π²Π΅ ΠΎΠ±ΠΎΠ»ΠΎΡΠΊΠΈ ΠΊΠΎΠΌΠ°Π½Π΄Π½ΠΎΠΉ ΡΡΡΠΎΠΊΠΈ Π΄Π»Ρ ΡΠ°Π·ΡΠ°Π±ΠΎΡΡΠΈΠΊΠΎΠ²:
ΠΠΎΠΌΠ°Π½Π΄Π½Π°Ρ ΡΡΡΠΎΠΊΠ° ΡΠ°Π·ΡΠ°Π±ΠΎΡΡΠΈΠΊΠ° Π΄Π»Ρ Visual Studio β ΡΡΠ°Π½Π΄Π°ΡΡΠ½Π°Ρ ΠΊΠΎΠΌΠ°Π½Π΄Π½Π°Ρ ΡΡΡΠΎΠΊΠ° Ρ ΠΎΠΏΡΠ΅Π΄Π΅Π»Π΅Π½Π½ΡΠΌΠΈ ΠΏΠ΅ΡΠ΅ΠΌΠ΅Π½Π½ΡΠΌΠΈ ΡΡΠ΅Π΄Ρ, ΡΠΏΡΠΎΡΠ°ΡΡΠ°Ρ ΡΠ°Π±ΠΎΡΡ Ρ ΠΈΠ½ΡΡΡΡΠΌΠ΅Π½ΡΠ°ΠΌΠΈ ΡΠ°Π·ΡΠ°Π±ΠΎΡΠΊΠΈ. ΠΠΎΡΡΡΠΏΠ½ΠΎ Ρ Π²Π΅ΡΡΠΈΠΈ Visual Studio 2015.
PowerShell Π΄Π»Ρ ΡΠ°Π·ΡΠ°Π±ΠΎΡΡΠΈΠΊΠΎΠ² Visual Studio β Π±ΠΎΠ»Π΅Π΅ ΡΡΠ½ΠΊΡΠΈΠΎΠ½Π°Π»ΡΠ½ΠΎΠ΅ ΡΡΠ΅Π΄ΡΡΠ²ΠΎ, ΡΠ΅ΠΌ ΠΊΠΎΠΌΠ°Π½Π΄Π½Π°Ρ ΡΡΡΠΎΠΊΠ°. ΠΠ°ΠΏΡΠΈΠΌΠ΅Ρ, Π² Π½Π΅ΠΌ ΠΌΠΎΠΆΠ½ΠΎ ΠΏΠ΅ΡΠ΅Π΄Π°ΡΡ ΡΠ΅Π·ΡΠ»ΡΡΠ°Ρ ΠΎΠ΄Π½ΠΎΠΉ ΠΊΠΎΠΌΠ°Π½Π΄Ρ (Π½Π°Π·ΡΠ²Π°Π΅ΠΌΠΎΠΉ cmdlet ) Π² Π΄ΡΡΠ³ΠΎΠΉ cmdlet. Π ΡΡΠΎΠΉ ΠΎΠ±ΠΎΠ»ΠΎΡΠΊΠ΅ Π΄ΠΎΡΡΡΠΏΠ½Ρ ΡΠ΅ ΠΆΠ΅ ΠΏΠ΅ΡΠ΅ΠΌΠ΅Π½Π½ΡΠ΅ ΡΡΠ΅Π΄Ρ, ΡΡΠΎ ΠΈ Π² ΠΠΎΠΌΠ°Π½Π΄Π½ΠΎΠΉ ΡΡΡΠΎΠΊΠ΅ ΡΠ°Π·ΡΠ°Π±ΠΎΡΡΠΈΠΊΠ°. ΠΠΎΡΡΡΠΏΠ½ΠΎ Ρ Π²Π΅ΡΡΠΈΠΈ Visual Studio 2019.
ΠΠ°ΡΠΈΠ½Π°Ρ Ρ Π²Π΅ΡΡΠΈΠΈ 16.5, Π² Visual Studio 2019 Π΄ΠΎΡΡΡΠΏΠ΅Π½ Π²ΡΡΡΠΎΠ΅Π½Π½ΡΠΉ ΡΠ΅ΡΠΌΠΈΠ½Π°Π», Π³Π΄Π΅ ΠΌΠΎΠΆΠ½ΠΎ ΡΠ°Π±ΠΎΡΠ°ΡΡ ΠΊΠ°ΠΊ Ρ ΠΠΎΠΌΠ°Π½Π΄Π½ΠΎΠΉ ΡΡΡΠΎΠΊΠΎΠΉ ΡΠ°Π·ΡΠ°Π±ΠΎΡΡΠΈΠΊΠ°, ΡΠ°ΠΊ ΠΈ Ρ PowerShell Π΄Π»Ρ ΡΠ°Π·ΡΠ°Π±ΠΎΡΡΠΈΠΊΠΎΠ². ΠΠΎΠΆΠ½ΠΎ ΠΎΡΠΊΡΡΡΡ Π½Π΅ΡΠΊΠΎΠ»ΡΠΊΠΎ Π²ΠΊΠ»Π°Π΄ΠΎΠΊ Π΄Π»Ρ ΠΊΠ°ΠΆΠ΄ΠΎΠΉ ΠΎΠ±ΠΎΠ»ΠΎΡΠΊΠΈ. Π’Π΅ΡΠΌΠΈΠ½Π°Π» Visual Studio ΠΏΠΎΡΡΡΠΎΠ΅Π½ Π½Π° ΠΎΡΠ½ΠΎΠ²Π΅ Π’Π΅ΡΠΌΠΈΠ½Π°Π»Π° Windows. Π§ΡΠΎΠ±Ρ ΠΎΡΠΊΡΡΡΡ ΡΠ΅ΡΠΌΠΈΠ½Π°Π» Π² Visual Studio, Π²ΡΠ±Π΅ΡΠΈΡΠ΅ ΡΠ»Π΅ΠΌΠ΅Π½ΡΡ ΠΠΈΠ΄ > Π’Π΅ΡΠΌΠΈΠ½Π°Π».
ΠΡΠΈ Π·Π°ΠΏΡΡΠΊΠ΅ Π² Visual Studio ΠΎΠ΄Π½ΠΎΠΉ ΠΈΠ· ΠΎΠ±ΠΎΠ»ΠΎΡΠ΅ΠΊ ΠΊΠ°ΠΊ ΠΎΡΠ΄Π΅Π»ΡΠ½ΠΎΠ³ΠΎ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ ΠΈΠ»ΠΈ Π² ΠΎΠΊΠ½Π΅ ΡΠ΅ΡΠΌΠΈΠ½Π°Π»Π° ΠΎΡΠΊΡΡΠ²Π°Π΅ΡΡΡ ΠΊΠ°ΡΠ°Π»ΠΎΠ³ ΡΠ΅ΠΊΡΡΠ΅Π³ΠΎ ΡΠ΅ΡΠ΅Π½ΠΈΡ (Π΅ΡΠ»ΠΈ ΠΎΠ½ΠΎ Π·Π°Π³ΡΡΠΆΠ΅Π½ΠΎ). ΠΡΠΎ ΡΠΏΡΠΎΡΠ°Π΅Ρ Π²ΡΠΏΠΎΠ»Π½Π΅Π½ΠΈΠ΅ ΠΊΠΎΠΌΠ°Π½Π΄ Π΄Π»Ρ ΡΠ΅ΡΠ΅Π½ΠΈΡ ΠΈΠ»ΠΈ Π΅Π³ΠΎ ΠΏΡΠΎΠ΅ΠΊΡΠΎΠ².
Π ΠΎΠ±Π΅ΠΈΡ ΠΎΠ±ΠΎΠ»ΠΎΡΠΊΠ°Ρ Π·Π°Π΄Π°Π½Ρ ΠΎΠΏΡΠ΅Π΄Π΅Π»Π΅Π½Π½ΡΠ΅ ΠΏΠ΅ΡΠ΅ΠΌΠ΅Π½Π½ΡΠ΅ ΡΡΠ΅Π΄Ρ. ΠΡΠΎ ΡΠΏΡΠΎΡΠ°Π΅Ρ ΡΠ°Π±ΠΎΡΡ Ρ ΠΈΠ½ΡΡΡΡΠΌΠ΅Π½ΡΠ°ΠΌΠΈ ΠΊΠΎΠΌΠ°Π½Π΄Π½ΠΎΠΉ ΡΡΡΠΎΠΊΠΈ. ΠΡΠΊΡΡΠ² ΡΡΠΈ ΠΎΠ±ΠΎΠ»ΠΎΡΠΊΠΈ, ΠΌΠΎΠΆΠ½ΠΎ Π²ΡΠΏΠΎΠ»Π½ΡΡΡ ΠΊΠΎΠΌΠ°Π½Π΄Ρ Π΄Π»Ρ ΡΠ°Π·Π»ΠΈΡΠ½ΡΡ ΡΠ»ΡΠΆΠ΅Π±Π½ΡΡ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌ, Π½Π΅ ΡΠΊΠ°Π·ΡΠ²Π°Ρ ΠΈΡ ΡΠ°ΡΠΏΠΎΠ»ΠΎΠΆΠ΅Π½ΠΈΡ.
ΠΠ°ΠΏΡΡΠΊ Π² Visual Studio
ΠΡΠΏΠΎΠ»Π½ΠΈΡΠ΅ ΡΠ»Π΅Π΄ΡΡΡΠΈΠ΅ Π΄Π΅ΠΉΡΡΠ²ΠΈΡ, ΡΡΠΎΠ±Ρ ΠΎΡΠΊΡΡΡΡ Π² Visual Studio ΠΠΎΠΌΠ°Π½Π΄Π½ΡΡ ΡΡΡΠΎΠΊΡ ΡΠ°Π·ΡΠ°Π±ΠΎΡΡΠΈΠΊΠ° ΠΈΠ»ΠΈ PowerShell Π΄Π»Ρ ΡΠ°Π·ΡΠ°Π±ΠΎΡΡΠΈΠΊΠΎΠ²:
ΠΠ°ΠΏΡΡΡΠΈΡΠ΅ Visual Studio.
Π ΡΡΡΠΎΠΊΠ΅ ΠΌΠ΅Π½Ρ Π²ΡΠ±Π΅ΡΠΈΡΠ΅ ΡΠ»Π΅ΠΌΠ΅Π½ΡΡ ΠΠ½ΡΡΡΡΠΌΠ΅Π½ΡΡ > ΠΠΎΠΌΠ°Π½Π΄Π½Π°Ρ ΡΡΡΠΎΠΊΠ° > ΠΠΎΠΌΠ°Π½Π΄Π½Π°Ρ ΡΡΡΠΎΠΊΠ° ΡΠ°Π·ΡΠ°Π±ΠΎΡΡΠΈΠΊΠ° ΠΈΠ»ΠΈ PowerShell Π΄Π»Ρ ΡΠ°Π·ΡΠ°Π±ΠΎΡΡΠΈΠΊΠΎΠ².
ΠΠ°ΠΏΡΡΠΊ ΠΈΠ· ΠΌΠ΅Π½Ρ Windows
ΠΡΡΠ³ΠΎΠΉ ΡΠΏΠΎΡΠΎΠ± Π·Π°ΠΏΡΡΠΊΠ° ΠΎΠ±ΠΎΠ»ΠΎΡΠ΅ΠΊ β ΠΈΠ· ΠΌΠ΅Π½Ρ «ΠΡΡΠΊ». Π Π·Π°Π²ΠΈΡΠΈΠΌΠΎΡΡΠΈ ΠΎΡ Π²Π΅ΡΡΠΈΠΈ Visual Studio, Π΄ΠΎΠΏΠΎΠ»Π½ΠΈΡΠ΅Π»ΡΠ½ΠΎ ΡΡΡΠ°Π½ΠΎΠ²Π»Π΅Π½Π½ΡΡ ΠΏΠ°ΠΊΠ΅ΡΠΎΠ² SDK ΠΈ ΡΠ°Π±ΠΎΡΠΈΡ Π½Π°Π³ΡΡΠ·ΠΎΠΊ ΠΌΠΎΠΆΠ΅Ρ ΠΈΠΌΠ΅ΡΡΡΡ Π½Π΅ΡΠΊΠΎΠ»ΡΠΊΠΎ Π²Π°ΡΠΈΠ°Π½ΡΠΎΠ² ΠΊΠΎΠΌΠ°Π½Π΄Π½ΡΡ ΡΡΡΠΎΠΊ.
Windows 10
Π Π°Π·Π²Π΅ΡΠ½ΠΈΡΠ΅ ΠΏΠ°ΠΏΠΊΡ Visual Studio 2019.
ΠΡΠ±Π΅ΡΠΈΡΠ΅ Π²Π°ΡΠΈΠ°Π½Ρ Developer Command Prompt for VS 2019 (ΠΠΎΠΌΠ°Π½Π΄Π½Π°Ρ ΡΡΡΠΎΠΊΠ° ΡΠ°Π·ΡΠ°Π±ΠΎΡΡΠΈΠΊΠ° Π΄Π»Ρ VS 2019) ΠΈΠ»ΠΈ Developer PowerShell for VS 2019 (PowerShell Π΄Π»Ρ ΡΠ°Π·ΡΠ°Π±ΠΎΡΡΠΈΠΊΠΎΠ² Π΄Π»Ρ VS 2019).
ΠΡΠΎΠΌΠ΅ ΡΠΎΠ³ΠΎ, Π²Ρ ΠΌΠΎΠΆΠ΅ΡΠ΅ Π½Π°ΡΠ°ΡΡ Π²Π²ΠΎΠ΄ΠΈΡΡ ΠΈΠΌΡ ΠΎΠ±ΠΎΠ»ΠΎΡΠΊΠΈ Π² ΠΏΠΎΠ»Π΅ ΠΏΠΎΠΈΡΠΊΠ° Π½Π° ΠΏΠ°Π½Π΅Π»ΠΈ Π·Π°Π΄Π°Ρ ΠΈ Π²ΡΠ±ΡΠ°ΡΡ Π½ΡΠΆΠ½ΡΠΉ ΡΠ΅Π·ΡΠ»ΡΡΠ°Ρ, ΡΠ°ΠΊ ΠΊΠ°ΠΊ Π² ΡΠΏΠΈΡΠΊΠ΅ ΡΠ΅Π·ΡΠ»ΡΡΠ°ΡΠΎΠ² Π½Π°ΡΠ½ΡΡ ΠΎΡΠΎΠ±ΡΠ°ΠΆΠ°ΡΡΡΡ Π½Π°ΠΉΠ΄Π΅Π½Π½ΡΠ΅ ΡΠΎΠ²ΠΏΠ°Π΄Π΅Π½ΠΈΡ.
Windows 8.1
ΠΠ° Π½Π°ΡΠ°Π»ΡΠ½ΠΎΠΌ ΡΠΊΡΠ°Π½Π΅ Π½Π°ΠΆΠΌΠΈΡΠ΅ Ctrl+Tab, ΡΡΠΎΠ±Ρ ΠΎΡΠΊΡΡΡΡ ΡΠΏΠΈΡΠΎΠΊ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠΉ, Π° Π·Π°ΡΠ΅ΠΌ Π½Π°ΠΆΠΌΠΈΡΠ΅ V. ΠΠΎΡΠ²ΠΈΡΡΡ ΡΠΏΠΈΡΠΎΠΊ, Π²ΠΊΠ»ΡΡΠ°ΡΡΠΈΠΉ Π²ΡΠ΅ ΡΡΡΠ°Π½ΠΎΠ²Π»Π΅Π½Π½ΡΠ΅ ΠΊΠΎΠΌΠ°Π½Π΄Π½ΡΠ΅ ΡΡΡΠΎΠΊΠΈ Visual Studio.
ΠΡΠ±Π΅ΡΠΈΡΠ΅ Π²Π°ΡΠΈΠ°Π½Ρ Developer Command Prompt for VS 2019 (ΠΠΎΠΌΠ°Π½Π΄Π½Π°Ρ ΡΡΡΠΎΠΊΠ° ΡΠ°Π·ΡΠ°Π±ΠΎΡΡΠΈΠΊΠ° Π΄Π»Ρ VS 2019) ΠΈΠ»ΠΈ Developer PowerShell for VS 2019 (PowerShell Π΄Π»Ρ ΡΠ°Π·ΡΠ°Π±ΠΎΡΡΠΈΠΊΠΎΠ² Π΄Π»Ρ VS 2019).
Windows 7
ΠΡΠ±Π΅ΡΠΈΡΠ΅ ΠΡΡΠΊ Π° Π·Π°ΡΠ΅ΠΌ ΡΠ°Π·Π²Π΅ΡΠ½ΠΈΡΠ΅ ΠΡΠ΅ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΡ.
ΠΡΠ»ΠΈ ΡΡΡΠ°Π½ΠΎΠ²Π»Π΅Π½Ρ Π΄ΡΡΠ³ΠΈΠ΅ ΠΏΠ°ΠΊΠ΅ΡΡ SDK, Π½Π°ΠΏΡΠΈΠΌΠ΅Ρ, ΠΏΠ°ΠΊΠ΅Ρ SDK Π΄Π»Ρ Windows 10 ΠΈΠ»ΠΈ ΠΏΡΠ΅Π΄ΡΠ΄ΡΡΠΈΡ Π²Π΅ΡΡΠΈΠΉ, ΠΌΠΎΠ³ΡΡ ΠΏΠΎΡΠ²ΠΈΡΡΡΡ Π΄ΠΎΠΏΠΎΠ»Π½ΠΈΡΠ΅Π»ΡΠ½ΡΠ΅ ΠΊΠΎΠΌΠ°Π½Π΄Π½ΡΠ΅ ΡΡΡΠΎΠΊΠΈ. Π’ΡΠ΅Π±ΡΠ΅ΠΌΠ°Ρ Π²Π΅ΡΡΠΈΡ ΠΊΠΎΠΌΠ°Π½Π΄Π½ΠΎΠΉ ΡΡΡΠΎΠΊΠΈ ΡΠΊΠ°Π·Π°Π½Π° Π² Π΄ΠΎΠΊΡΠΌΠ΅Π½ΡΠ°ΡΠΈΠΈ ΠΏΠΎ ΡΠΎΠΎΡΠ²Π΅ΡΡΡΠ²ΡΡΡΠΈΠΌ ΠΈΠ½ΡΡΡΡΠΌΠ΅Π½ΡΠ°ΠΌ.
ΠΠ°ΠΏΡΡΠΊ ΠΈΠ· ΠΎΠ±ΠΎΠ·ΡΠ΅Π²Π°ΡΠ΅Π»Ρ ΡΠ°ΠΉΠ»ΠΎΠ²
ΠΠ±ΡΡΠ½ΠΎ ΡΡΠ»ΡΠΊΠΈ Π΄Π»Ρ ΡΡΡΠ°Π½ΠΎΠ²Π»Π΅Π½Π½ΡΡ ΠΎΠ±ΠΎΠ»ΠΎΡΠ΅ΠΊ ΠΏΠΎΠΌΠ΅ΡΠ°ΡΡΡΡ Π² ΠΏΠ°ΠΏΠΊΡ ΠΌΠ΅Π½Ρ «ΠΡΡΠΊ» Π΄Π»Ρ Visual Studio, Π½Π°ΠΏΡΠΈΠΌΠ΅Ρ Π² %ProgramData%\Microsoft\Windows\Start Menu\Programs\Visual Studio 2019\Visual Studio Tools. ΠΠΎ Π΅ΡΠ»ΠΈ ΠΏΠΎΠΈΡΠΊ ΠΊΠΎΠΌΠ°Π½Π΄Π½ΠΎΠΉ ΡΡΡΠΎΠΊΠΈ Π½Π΅ Π΄Π°Π΅Ρ ΠΎΠΆΠΈΠ΄Π°Π΅ΠΌΡΡ ΡΠ΅Π·ΡΠ»ΡΡΠ°ΡΠΎΠ², ΠΏΠΎΠΏΡΠΎΠ±ΡΠΉΡΠ΅ Π²ΡΡΡΠ½ΡΡ Π½Π°ΠΉΡΠΈ Π½ΡΠΆΠ½ΡΠ΅ ΡΠ°ΠΉΠ»Ρ Π½Π° ΠΊΠΎΠΌΠΏΡΡΡΠ΅ΡΠ΅.
ΠΠΎΠΌΠ°Π½Π΄Π½Π°Ρ ΡΡΡΠΎΠΊΠ° ΡΠ°Π·ΡΠ°Π±ΠΎΡΡΠΈΠΊΠ°
ΠΡΠΏΠΎΠ»Π½ΠΈΡΠ΅ ΠΏΠΎΠΈΡΠΊ ΡΠ°ΠΉΠ»Π° ΠΊΠΎΠΌΠ°Π½Π΄Π½ΠΎΠΉ ΡΡΡΠΎΠΊΠΈ (VsDevCmd.bat) ΠΈΠ»ΠΈ ΠΏΠ΅ΡΠ΅ΠΉΠ΄ΠΈΡΠ΅ Π² ΠΏΠ°ΠΏΠΊΡ «ΠΠ½ΡΡΡΡΠΌΠ΅Π½ΡΡ» Visual Studio ( %ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\Common7\Tools β ΠΏΡΡΡ Π·Π°Π²ΠΈΡΠΈΡ ΠΎΡ Π²Π΅ΡΡΠΈΠΈ Visual Studio, Π²ΡΠΏΡΡΠΊΠ° ΠΈ ΡΠ°ΡΠΏΠΎΠ»ΠΎΠΆΠ΅Π½ΠΈΡ ΡΡΡΠ°Π½ΠΎΠ²ΠΊΠΈ).
ΠΠΎΠ³Π΄Π° Π²Ρ Π½Π°ΠΉΠ΄Π΅ΡΠ΅ ΡΠ°ΠΉΠ» ΠΊΠΎΠΌΠ°Π½Π΄Π½ΠΎΠΉ ΡΡΡΠΎΠΊΠΈ, ΠΎΡΠΊΡΠΎΠΉΡΠ΅ Π΅Π³ΠΎ. ΠΠ»Ρ ΡΡΠΎΠ³ΠΎ Π²Π²Π΅Π΄ΠΈΡΠ΅ ΡΠ»Π΅Π΄ΡΡΡΡΡ ΠΊΠΎΠΌΠ°Π½Π΄Ρ Π² ΡΡΠ°Π½Π΄Π°ΡΡΠ½ΠΎΠΌ ΠΎΠΊΠ½Π΅ ΠΊΠΎΠΌΠ°Π½Π΄Π½ΠΎΠΉ ΡΡΡΠΎΠΊΠΈ:
ΠΡΠΎΠΌΠ΅ ΡΠΎΠ³ΠΎ, Π²Ρ ΠΌΠΎΠΆΠ΅ΡΠ΅ Π²Π²Π΅ΡΡΠΈ ΡΠ»Π΅Π΄ΡΡΡΡΡ ΠΊΠΎΠΌΠ°Π½Π΄Ρ Π² Π΄ΠΈΠ°Π»ΠΎΠ³ΠΎΠ²ΠΎΠΌ ΠΎΠΊΠ½Π΅ Windows ΠΡΠΏΠΎΠ»Π½ΠΈΡΡ:
ΠΠ°ΠΌ Π½Π΅ΠΎΠ±Ρ ΠΎΠ΄ΠΈΠΌΠΎ ΠΈΠ·ΠΌΠ΅Π½ΠΈΡΡ ΠΏΡΡΡ Π² ΡΠΎΠΎΡΠ²Π΅ΡΡΡΠ²ΠΈΠΈ Ρ ΡΠ°ΡΠΏΠΎΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ΠΌ ΡΡΡΠ°Π½ΠΎΠ²ΠΊΠΈ Visual Studio.
PowerShell Π΄Π»Ρ ΡΠ°Π·ΡΠ°Π±ΠΎΡΡΠΈΠΊΠΎΠ²
ΠΠ°ΠΉΠ΄ΠΈΡΠ΅ ΡΠ°ΠΉΠ» ΡΠΊΡΠΈΠΏΡΠ° PowerShell Ρ ΠΈΠΌΠ΅Π½Π΅ΠΌ Launch-VsDevShell.ps1 ΠΈΠ»ΠΈ ΠΏΠ΅ΡΠ΅ΠΉΠ΄ΠΈΡΠ΅ Π² ΠΏΠ°ΠΏΠΊΡ «ΠΠ½ΡΡΡΡΠΌΠ΅Π½ΡΡ» Visual Studio ( %ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\Common7\Tools). ΠΡΡΡ Π·Π°Π²ΠΈΡΠΈΡ ΠΎΡ Π²Π΅ΡΡΠΈΠΈ, Π²ΡΠΏΡΡΠΊΠ° ΠΈ ΡΠ°ΡΠΏΠΎΠ»ΠΎΠΆΠ΅Π½ΠΈΡ ΡΡΡΠ°Π½ΠΎΠ²ΠΊΠΈ Visual Studio. ΠΠΎΡΠ»Π΅ ΡΡΠΎΠ³ΠΎ Π²ΡΠΏΠΎΠ»Π½ΠΈΡΠ΅ ΡΠ»Π΅Π΄ΡΡΡΡΡ ΠΊΠΎΠΌΠ°Π½Π΄Ρ Π² ΠΊΠΎΠΌΠ°Π½Π΄Π½ΠΎΠΉ ΡΡΡΠΎΠΊΠ΅ Windows PowerShell ΠΈΠ»ΠΈ PowerShell 6:
ΠΠΎ ΡΠΌΠΎΠ»ΡΠ°Π½ΠΈΡ PowerShell Π΄Π»Ρ ΡΠ°Π·ΡΠ°Π±ΠΎΡΡΠΈΠΊΠΎΠ² Π·Π°ΠΏΡΡΠΊΠ°Π΅ΡΡΡ Ρ ΠΊΠΎΠ½ΡΠΈΠ³ΡΡΠ°ΡΠΈΠ΅ΠΉ Π΄Π»Ρ ΡΠΎΠΉ Π²Π΅ΡΡΠΈΠΈ Visual Studio, ΠΏΡΡΡ ΡΡΡΠ°Π½ΠΎΠ²ΠΊΠΈ ΠΊ ΠΊΠΎΡΠΎΡΠΎΠΉ ΡΠΊΠ°Π·Π°Π½ Π² ΡΠ°ΠΉΠ»Π΅ Launch-VsDevShell.ps1.
Π§ΡΠΎΠ±Ρ Π²ΡΠΏΠΎΠ»Π½ΠΈΡΡ cmdlet, Π½ΡΠΆΠ½ΠΎ Π·Π°Π΄Π°ΡΡ ΠΏΠΎΠ»ΠΈΡΠΈΠΊΡ Π²ΡΠΏΠΎΠ»Π½Π΅Π½ΠΈΡ.
Integrated Terminal
Visual Studio Code includes a fully-featured integrated terminal that conveniently starts at the root of your workspace. It provides integration with the editor to support features like links and error detection.
To open the terminal:
Note: Open an external terminal with the β§βC (Windows, Linux Ctrl+Shift+C ) keyboard shortcut if you prefer to work outside VS Code.
Terminal shells
The integrated terminal can use various shells installed on your machine, with the defaults being:
You can select other available shells to use in terminal instances or as the default such as Command Prompt on Windows, and zsh on macOS and Linux.
You can learn more about configuring terminal shells in the terminal profiles section below.
Note: If you’re having trouble launching your preferred shell in the integrated terminal, it may be due to your shell’s configuration or a VS Code terminal setting. There’s a dedicated troubleshooting guide to help you with these sorts of problems.
Managing terminals
The terminal tabs UI is on the right side of the terminal view. Each terminal has an entry with its name, icon, color, and group decoration (if any).
Tip: Change the tabs location using the terminal.integrated.tabs.location setting.
Terminal instances can be added by selecting the + icon on the top-right of the TERMINAL panel, selecting a profile from the terminal dropdown, or by triggering the ββ§` (Windows, Linux Ctrl+Shift+` ) command. This action creates another entry in the tab list associated with that terminal.
Icons may appear to the right of the terminal title on the tab label when a terminal’s status changes. Some examples are a bell (macOS) and for tasks, displaying a check mark when there are no errors and an X otherwise. Hover the icon to read status information, which may contain actions.
Grouping
Split the terminal by:
Tabs support drag and drop to allow rearranging. Dragging an entry in a terminal group into the empty will remove it from the group (for example, unsplit). Dragging a tab into the main terminal area allows joining a group.
Unsplit a split terminal by triggering the Terminal: Unsplit Terminal command.
Customizing Tabs
Change the terminal’s name, icon, and tab color via the right-click context menu or by triggering the following commands:
| Command | Command ID |
|---|---|
| Terminal: Rename | workbench.action.terminal.rename |
| Terminal: Change Icon | workbench.action.terminal.changeIcon |
| Terminal: Change Color | workbench.action.terminal.changeColor |
Tip: Go back to the old version by setting terminal.integrated.tabs.enabled:false
Terminal profiles
Terminal profiles are platform-specific shell configurations comprised of an executable path, arguments, and other customizations.
You can use variables in terminal profiles as shown in the example above with the APPDATA environment variable. You can find a list of available variables in the Variables Reference topic.
Configure your default integrated terminal by running the Terminal: Select Default Profile command, which is also accessible via the terminal dropdown.
Configuring profiles
To create a new profile, run the Terminal: Select Default Profile command and activate the configure button on the right side of the shell to base it on. This will add a new entry to your settings that can be tweaked manually in your settings.json file.
Other arguments supported in profiles include:
The default profile can be defined manually with the terminal.integrated.defaultProfile.* settings. This should be set to the name of an existing profile:
Tip: The integrated terminal shell is running with the permissions of VS Code. If you need to run a shell command with elevated (administrator) or different permissions, use platform utilities such as runas.exe within a terminal.
Removing built-in profiles
Configuring the task/debug profile
By default, the task/debug features will use the default profile. To override that, use the terminal.integrated.automationShell.
Working directory
By default, the terminal will open at the folder that is opened in the Explorer. The terminal.integrated.cwd setting allows specifying a custom path to open instead:
Split terminals on Windows will start in the directory that the parent terminal started with. On macOS and Linux, split terminals will inherit the current working directory of the parent terminal. This behavior can be changed using the terminal.integrated.splitCwd setting:
There are also extensions available that give more options such as Terminal Here.
Terminal process reconnection
Local and remote terminal processes are restored on window reload, such as when an extension install requires a reload. The terminal will be reconnected and the UI state of the terminals will be restored, including the active tab and split terminal relative dimensions.
Links
The terminal features link detection, showing an underline when files or URLs are hovered with the mouse that will go to the target when Ctrl / Cmd is held. If a file or URL cannot be detected, they are still surfaced as «low confidence» links, which only show an underline when hovered. These low confidence links will search the workspace for the term, opening the match if one is found.
Clicking a file link will either open that document in an editor or produce a Quick Pick with all matches.
Extensions make use of links in the terminal, such as GitLens, to identify branches.
Local echo
On some remote connections, there’s a delay between typing and seeing the characters on the terminal as a result of the round trip the data has to make from VS code to the process. Local echo attempts to predict modifications and cursor movements made locally in the terminal to decrease this lag.
Terminal appearance
Customize the terminal’s appearance using the following settings:
Copy & Paste
The keybindings for copy and paste follow platform standards:
Using the mouse
Right-click behavior
The right-click behavior differs based on the platform:
This can be configured using the terminal.integrated.rightClickBehavior setting.
Alt click
Alt left click will reposition the cursor to underneath the mouse. This works by simulating arrow keystrokes, which may fail for some shells or programs. This feature can be disabled.
Keybindings and the shell
Look at the setting details to see the complete list of default commands.
Chord keybindings in the terminal
By default, when a chord keybinding is the highest priority keybinding, it will always skip the terminal shell (bypassing terminal.integrated.commandsToSkipShell ) and be evaluated by VS Code instead of the terminal. This is typically the desired behavior unless you’re on Windows/Linux and want your shell to use ctrl+k (for bash, this cuts the line after the cursor). This can be disabled with the following setting:
Send text via a keybinding
The workbench.action.terminal.sendSequence command can be used to send a specific sequence of text to the terminal, including escape sequences. This enables things like sending arrow keys, enter, cursor moves, etc. For example, the below sequence jumps over the word to the left of the cursor ( Ctrl+Left ) and presses backspace:
Note that the command only works with the \u0000 format for using characters via their character code (not \x00 ). Read more about these hex codes and the sequences terminals work with on the following resources:
Run selected text
To use the runSelectedText command, select text in an editor and run the command Terminal: Run Selected Text in Active Terminal via the Command Palette ( β§βP (Windows, Linux Ctrl+Shift+P ) ):
The terminal will attempt to run the selected text.
If no text is selected in the active editor, the line that the cursor is on is run in the terminal.
Automating launching of terminals
This file could be committed to the repository to share with other developers or created as a user task via the workbench.action.tasks.openUserTasks command.
Next steps
The basics of the terminal have been covered in this document. Read on to find out more about:
Common questions
I’m having problems launching the terminal
There’s a dedicated troubleshooting guide for these sorts of problems.
Can I use the integrated terminal with the Windows Subsystem for Linux?
Why is VS Code shortcut X not working when the terminal has focus?
Currently, the terminal consumes many key bindings, preventing Visual Studio Code from reacting to them. An example of this is Ctrl+B to open the Side Bar on Linux and Windows. This is necessary as various terminal programs and/or shells may respond to these key bindings themselves. Use the terminal.integrated.commandsToSkipShell setting to prevent specific key bindings from being handled by the terminal.
Can I use Cmder’s shell with the terminal on Windows?
Yes, to use the Cmder shell in VS Code, you need to add the following settings to your settings.json file:
You may refer to Cmder’s wiki for more information.
Why is Cmd+k/Ctrl+k not clearing the terminal?
Normally Cmd+k / Ctrl+k clears the terminal on macOS/Windows, but this can stop working when chord keybindings are added either by the user or extensions. The Cmd+k / Ctrl+k keybindings rely on the VS Code keybinding priority system that defines which keybinding is active at any given time (user > extension > default). To fix this, you need to redefine your user keybinding that will have priority, preferably at the bottom of your user keybindings.json file:
Why is nvm complaining about a prefix option when the integrated terminal is launched?
nvm (Node Version Manager) users often see this error for the first time inside VS Code’s integrated terminal:
This is mostly a macOS problem and does not happen in external terminals. The typical reasons for this are the following:
To resolve this issue, you need to track down where the old npm is installed and remove both it and its out-of-date node_modules. Find the nvm initialization script and run which npm before it runs, which should print the path when you launch a new terminal.
Once you have the path to npm, find the old node_modules by resolving the symlink by running a command something like this:
This will give you the resolved path at the end:
From there, removing the files and relaunching VS Code should fix the issue:
Can I use Powerline fonts in the integrated terminal?
Yes. Specify Powerline fonts with the terminal.integrated.fontFamily setting.
Note that you want to specify the font family, not an individual font like Meslo LG M DZ Regular for Powerline where Regular is the specific font name.
How do I configure zsh on macOS to jump words with Ctrl+Left/Right arrow?
By default, Ctrl+Left/Right arrow will jump words in bash. Configure the same for zsh by adding these keybindings:
Why does macOS make a ding sound when I resize terminal split panes?
The keybindings βββ and βββ are the defaults for resizing individual split panes in the terminal. While they work, they also cause a system «invalid key» sound to play due to an issue in Chromium. The recommended workaround is to tell macOS to no-op for these keybindings by running this in your terminal:
Why is my terminal showing a multi-colored triangle or a completely black rectangle?
This can happen on macOS because of how the terminal launches using VS Code’s environment. When VS Code launches for the first time, to source your «development environment,» it launches your configured shell as a login shell, which runs your
/.zprofile scripts. Now when the terminal launches, it also runs as a login shell, which will put the standard paths to the front (for example, /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin ) and reinitialize your shell environment.
To get a better understanding, you can simulate what is happening by launching an inner login shell within your operating system’s built-in terminal:
Unfortunately, unlike in Linux, standalone macOS terminals all run as login shells by default, since macOS does not run a login shell when the user logs into the system. This encourages «bad behavior,» like initializing aliases in your profile script when they should live in your rc script as that runs on non-login shells.
/.zshrc file since aliases only apply to the shell they’re set in.
I’m having problems with the terminal rendering. What can I do?
By default, the integrated terminal will render using GPU acceleration on most machines. It does this using multiple elements, which are better tuned than the DOM for rendering interactive text that changes often. The terminal features 3 renderers that fallback if they are detected to perform poorly in this order:
ΠΡΠ΅Π΄Π²Π°ΡΠΈΡΠ΅Π»ΡΠ½ΡΠ΅ ΡΡΠ΅Π±ΠΎΠ²Π°Π½ΠΈΡ
Π‘ΠΎΠ·Π΄Π°Π½ΠΈΠ΅ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ
ΠΠ°ΠΏΡΡΡΠΈΡΠ΅ Visual Studio Code.
Π Π³Π»Π°Π²Π½ΠΎΠΌ ΠΌΠ΅Π½Ρ Π²ΡΠ±Π΅ΡΠΈΡΠ΅ Π€Π°ΠΉΠ» > ΠΡΠΊΡΡΡΡ ΠΏΠ°ΠΏΠΊΡ (Π² macOS Π²ΡΠ±Π΅ΡΠΈΡΠ΅ File > Open. (Π€Π°ΠΉΠ» > ΠΡΠΊΡΡΡΡ)).
Π Π΄ΠΈΠ°Π»ΠΎΠ³ΠΎΠ²ΠΎΠΌ ΠΎΠΊΠ½Π΅ ΠΡΠΊΡΡΡΡ ΠΏΠ°ΠΏΠΊΡ ΡΠΎΠ·Π΄Π°ΠΉΡΠ΅ ΠΏΠ°ΠΏΠΊΡ HelloWorld ΠΈ Π²ΡΠ±Π΅ΡΠΈΡΠ΅ Π΅Π΅. ΠΠ°ΡΠ΅ΠΌ ΡΠ΅Π»ΠΊΠ½ΠΈΡΠ΅ ΠΡΠ±ΡΠ°ΡΡ ΠΏΠ°ΠΏΠΊΡ (ΠΈΠ»ΠΈ ΠΡΠΊΡΡΡΡ Π² macOS).
Π Π΄ΠΈΠ°Π»ΠΎΠ³ΠΎΠ²ΠΎΠΌ ΠΎΠΊΠ½Π΅ ΠΎ Π΄ΠΎΠ²Π΅ΡΠΈΠΈ Π°Π²ΡΠΎΡΠ°ΠΌ ΡΠ°ΠΉΠ»ΠΎΠ² Π² ΡΡΠΎΠΉ ΠΏΠ°ΠΏΠΊΠ΅ Π²ΡΠ±Π΅ΡΠΈΡΠ΅ ΠΠ°, Ρ Π΄ΠΎΠ²Π΅ΡΡΡ Π°Π²ΡΠΎΡΠ°ΠΌ.
ΠΡΠΊΡΠΎΠΉΡΠ΅ ΡΠ΅ΡΠΌΠΈΠ½Π°Π» Π² Visual Studio Code, Π²ΡΠ±ΡΠ°Π² Π² ΠΎΡΠ½ΠΎΠ²Π½ΠΎΠΌ ΠΌΠ΅Π½Ρ ΠΏΡΠ½ΠΊΡ ΠΠΈΠ΄ > Π’Π΅ΡΠΌΠΈΠ½Π°Π».
ΠΡΠΊΡΠΎΠ΅ΡΡΡ ΠΎΠΊΠ½ΠΎ Π’Π΅ΡΠΌΠΈΠ½Π°Π» Ρ ΠΊΠΎΠΌΠ°Π½Π΄Π½ΠΎΠΉ ΡΡΡΠΎΠΊΠΎΠΉ Π² ΠΏΠ°ΠΏΠΊΠ΅ HelloWorld.
Π ΠΎΠΊΠ½Π΅ ΡΠ΅ΡΠΌΠΈΠ½Π°Π»Π° Π²Π²Π΅Π΄ΠΈΡΠ΅ ΡΠ»Π΅Π΄ΡΡΡΡΡ ΠΊΠΎΠΌΠ°Π½Π΄Ρ:
Π¨Π°Π±Π»ΠΎΠ½ ΠΏΡΠΎΠ΅ΠΊΡΠ° ΡΠΎΠ·Π΄Π°Π΅Ρ ΠΏΡΠΎΡΡΠΎΠ΅ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅, ΠΊΠΎΡΠΎΡΠΎΠ΅ ΠΎΡΠΎΠ±ΡΠ°ΠΆΠ°Π΅Ρ «Hello World» Π² ΠΎΠΊΠ½Π΅ ΠΊΠΎΠ½ΡΠΎΠ»ΠΈ, Π²ΡΠ·ΡΠ²Π°Ρ ΠΌΠ΅ΡΠΎΠ΄ Console.WriteLine(String) ΠΈΠ· ΡΠ°ΠΉΠ»Π° Program.cs.
ΠΠ°ΠΌΠ΅Π½ΠΈΡΠ΅ ΡΠΎΠ΄Π΅ΡΠΆΠΈΠΌΠΎΠ΅ Program.cs ΠΊΠΎΠ΄ΠΎΠΌ ΠΈΠ· ΡΡΠΎΠ³ΠΎ ΠΏΡΠΈΠΌΠ΅ΡΠ°.
ΠΡΠΈ ΠΏΠ΅ΡΠ²ΠΎΠΌ ΡΠ΅Π΄Π°ΠΊΡΠΈΡΠΎΠ²Π°Π½ΠΈΠΈ ΡΠ°ΠΉΠ»Π° .cs Π² Visual Studio Code Π±ΡΠ΄Π΅Ρ ΠΏΡΠ΅Π΄Π»ΠΎΠΆΠ΅Π½ΠΎ Π΄ΠΎΠ±Π°Π²ΠΈΡΡ Π½Π΅Π΄ΠΎΡΡΠ°ΡΡΠΈΠ΅ ΡΠ΅ΡΡΡΡΡ Π΄Π»Ρ ΡΠ±ΠΎΡΠΊΠΈ ΠΈ ΠΎΡΠ»Π°Π΄ΠΊΠΈ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ. ΠΡΠ±Π΅ΡΠΈΡΠ΅ ΠΠ° ΠΈ Visual Studio Code ΡΠΎΠ·Π΄Π°ΡΡ ΠΏΠ°ΠΏΠΊΡ .vscode Ρ ΡΠ°ΠΉΠ»Π°ΠΌΠΈ launch.json ΠΈ tasks.json.
ΠΠ°ΠΏΡΡΠΊ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ
ΠΡΠΏΠΎΠ»Π½ΠΈΡΠ΅ ΡΠ»Π΅Π΄ΡΡΡΠΈΠ΅ ΠΊΠΎΠΌΠ°Π½Π΄Ρ Π² ΠΎΠΊΠ½Π΅ ΡΠ΅ΡΠΌΠΈΠ½Π°Π»Π°:
Π ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠ΅ ΠΎΡΠΎΠ±ΡΠ°Π·ΠΈΡΡΡ ΡΠΎΠΎΠ±ΡΠ΅Π½ΠΈΠ΅ «Hello World!», ΠΏΠΎΡΠ»Π΅ ΡΠ΅Π³ΠΎ ΠΎΠ½Π° Π·Π°Π²Π΅ΡΡΠΈΡΡΡ.
Π£Π»ΡΡΡΠ΅Π½ΠΈΠ΅ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ
ΠΠ°Π²Π°ΠΉΡΠ΅ ΡΠ°ΡΡΠΈΡΠΈΠΌ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅. Π’Π΅ΠΏΠ΅ΡΡ Ρ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Ρ Π±ΡΠ΄Π΅Ρ Π·Π°ΠΏΡΠ°ΡΠΈΠ²Π°ΡΡΡΡ ΠΈΠΌΡ, ΠΊΠΎΡΠΎΡΠΎΠ΅ Π·Π°ΡΠ΅ΠΌ Π±ΡΠ΄Π΅Ρ ΠΎΡΠΎΠ±ΡΠ°ΠΆΠ°ΡΡΡΡ Ρ Π΄Π°ΡΠΎΠΉ ΠΈ Π²ΡΠ΅ΠΌΠ΅Π½Π΅ΠΌ.
ΠΡΠΊΡΠΎΠΉΡΠ΅ ΡΠ°ΠΉΠ» Program.cs.
Π Program.cs Π·Π°ΠΌΠ΅Π½ΠΈΡΠ΅ ΡΠΎΠ΄Π΅ΡΠΆΠΈΠΌΠΎΠ΅ ΠΌΠ΅ΡΠΎΠ΄Π° Main (ΡΡΡΠΎΠΊΠ°, Π²ΡΠ·ΡΠ²Π°ΡΡΠ°Ρ Console.WriteLine ) ΡΠ»Π΅Π΄ΡΡΡΠΈΠΌ ΠΊΠΎΠ΄ΠΎΠΌ:
NewLine β ΡΡΠΎ Π½Π΅Π·Π°Π²ΠΈΡΠΈΠΌΡΠΉ ΠΎΡ ΠΏΠ»Π°ΡΡΠΎΡΠΌΡ ΠΈ ΡΠ·ΡΠΊΠ° ΡΠΏΠΎΡΠΎΠ± Π΄Π»Ρ ΠΏΡΠ΅Π΄ΡΡΠ°Π²Π»Π΅Π½ΠΈΡ ΡΠ°Π·ΡΡΠ²Π° ΡΡΡΠΎΠΊΠΈ. ΠΠ³ΠΎ Π°Π»ΡΡΠ΅ΡΠ½Π°ΡΠΈΠ²Π°ΠΌΠΈ ΡΠ²Π»ΡΡΡΡΡ \n Π² C# ΠΈ vbCrLf Π² Visual Basic.
Π Visual Studio Code Π½Π΅ΠΎΠ±Ρ ΠΎΠ΄ΠΈΠΌΠΎ ΡΠ²Π½ΠΎ ΡΠΎΡ ΡΠ°Π½ΠΈΡΡ ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΡ. Π ΠΎΡΠ»ΠΈΡΠΈΠ΅ ΠΎΡ Visual Studio, ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΡ ΡΠ°ΠΉΠ»ΠΎΠ² Π½Π΅ ΡΠΎΡ ΡΠ°Π½ΡΡΡΡΡ Π°Π²ΡΠΎΠΌΠ°ΡΠΈΡΠ΅ΡΠΊΠΈ ΠΏΡΠΈ ΡΠ±ΠΎΡΠΊΠ΅ ΠΈ Π·Π°ΠΏΡΡΠΊΠ΅ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ.
ΠΠ°ΠΏΡΡΡΠΈΡΠ΅ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΡ Π΅ΡΠ΅ ΡΠ°Π·:
ΠΠ°ΠΆΠΌΠΈΡΠ΅ Π»ΡΠ±ΡΡ ΠΊΠ»Π°Π²ΠΈΡΡ Π΄Π»Ρ Π²ΡΡ ΠΎΠ΄Π° ΠΈΠ· ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΡ.
ΠΠΎΠΏΠΎΠ»Π½ΠΈΡΠ΅Π»ΡΠ½ΡΠ΅ ΡΠ΅ΡΡΡΡΡ
Π‘Π»Π΅Π΄ΡΡΡΠΈΠ΅ ΡΠ°Π³ΠΈ
ΠΡΠ΅Π΄Π²Π°ΡΠΈΡΠ΅Π»ΡΠ½ΡΠ΅ ΡΡΠ΅Π±ΠΎΠ²Π°Π½ΠΈΡ
Π‘ΠΎΠ·Π΄Π°Π½ΠΈΠ΅ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ
ΠΠ°ΠΏΡΡΡΠΈΡΠ΅ Visual Studio Code.
Π Π³Π»Π°Π²Π½ΠΎΠΌ ΠΌΠ΅Π½Ρ Π²ΡΠ±Π΅ΡΠΈΡΠ΅ Π€Π°ΠΉΠ» > ΠΡΠΊΡΡΡΡ ΠΏΠ°ΠΏΠΊΡ (Π² macOS Π²ΡΠ±Π΅ΡΠΈΡΠ΅ File > Open. (Π€Π°ΠΉΠ» > ΠΡΠΊΡΡΡΡ)).
Π Π΄ΠΈΠ°Π»ΠΎΠ³ΠΎΠ²ΠΎΠΌ ΠΎΠΊΠ½Π΅ ΠΡΠΊΡΡΡΠΈΠ΅ ΠΏΠ°ΠΏΠΊΠΈ ΡΠΎΠ·Π΄Π°ΠΉΡΠ΅ ΠΏΠ°ΠΏΠΊΡ HelloWorld ΠΈ ΡΠ΅Π»ΠΊΠ½ΠΈΡΠ΅ ΠΡΠ±ΡΠ°ΡΡ ΠΏΠ°ΠΏΠΊΡ (Π² macOS ΡΠ΅Π»ΠΊΠ½ΠΈΡΠ΅ Open (ΠΡΠΊΡΡΡΡ)).
ΠΡΠΊΡΠΎΠΉΡΠ΅ ΡΠ΅ΡΠΌΠΈΠ½Π°Π» Π² Visual Studio Code, Π²ΡΠ±ΡΠ°Π² Π² ΠΎΡΠ½ΠΎΠ²Π½ΠΎΠΌ ΠΌΠ΅Π½Ρ ΠΏΡΠ½ΠΊΡ ΠΠΈΠ΄ > Π’Π΅ΡΠΌΠΈΠ½Π°Π».
ΠΡΠΊΡΠΎΠ΅ΡΡΡ ΠΎΠΊΠ½ΠΎ Π’Π΅ΡΠΌΠΈΠ½Π°Π» Ρ ΠΊΠΎΠΌΠ°Π½Π΄Π½ΠΎΠΉ ΡΡΡΠΎΠΊΠΎΠΉ Π² ΠΏΠ°ΠΏΠΊΠ΅ HelloWorld.
Π ΠΎΠΊΠ½Π΅ ΡΠ΅ΡΠΌΠΈΠ½Π°Π»Π° Π²Π²Π΅Π΄ΠΈΡΠ΅ ΡΠ»Π΅Π΄ΡΡΡΡΡ ΠΊΠΎΠΌΠ°Π½Π΄Ρ:
ΠΡΠΎΡ ΡΠ°Π±Π»ΠΎΠ½ ΡΠΎΠ·Π΄Π°Π΅Ρ ΠΏΡΠΎΡΡΠΎΠ΅ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ Hello World. ΠΠ½ Π²ΡΠ·ΡΠ²Π°Π΅Ρ ΠΌΠ΅ΡΠΎΠ΄ Console.WriteLine(String) Π΄Π»Ρ Π²ΡΠ²ΠΎΠ΄Π° » Hello World! » Π² ΠΎΠΊΠ½Π΅ ΠΊΠΎΠ½ΡΠΎΠ»ΠΈ.
Main β ΡΠΎΡΠΊΠ° Π²Ρ ΠΎΠ΄Π° Π² ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅. ΠΡΠΎ ΠΌΠ΅ΡΠΎΠ΄, ΠΊΠΎΡΠΎΡΡΠΉ Π°Π²ΡΠΎΠΌΠ°ΡΠΈΡΠ΅ΡΠΊΠΈ Π²ΡΠ·ΡΠ²Π°Π΅ΡΡΡ ΡΡΠ΅Π΄ΠΎΠΉ Π²ΡΠΏΠΎΠ»Π½Π΅Π½ΠΈΡ ΠΏΡΠΈ Π·Π°ΠΏΡΡΠΊΠ΅ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ. ΠΡΠ΅ Π°ΡΠ³ΡΠΌΠ΅Π½ΡΡ, ΠΏΡΠ΅Π΄ΠΎΡΡΠ°Π²Π»Π΅Π½Π½ΡΠ΅ Π² ΠΊΠΎΠΌΠ°Π½Π΄Π½ΠΎΠΉ ΡΡΡΠΎΠΊΠ΅ ΠΏΡΠΈ Π·Π°ΠΏΡΡΠΊΠ΅ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ, Π΄ΠΎΡΡΡΠΏΠ½Ρ ΡΠ΅ΡΠ΅Π· ΠΌΠ°ΡΡΠΈΠ² args.
ΠΠ°ΠΏΡΡΠΊ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ
ΠΡΠΏΠΎΠ»Π½ΠΈΡΠ΅ ΡΠ»Π΅Π΄ΡΡΡΠΈΠ΅ ΠΊΠΎΠΌΠ°Π½Π΄Ρ Π² ΠΎΠΊΠ½Π΅ ΡΠ΅ΡΠΌΠΈΠ½Π°Π»Π°:
Π ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠ΅ ΠΎΡΠΎΠ±ΡΠ°Π·ΠΈΡΡΡ ΡΠΎΠΎΠ±ΡΠ΅Π½ΠΈΠ΅ «Hello World!», ΠΏΠΎΡΠ»Π΅ ΡΠ΅Π³ΠΎ ΠΎΠ½Π° Π·Π°Π²Π΅ΡΡΠΈΡΡΡ.
Π£Π»ΡΡΡΠ΅Π½ΠΈΠ΅ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ
ΠΠ°Π²Π°ΠΉΡΠ΅ ΡΠ°ΡΡΠΈΡΠΈΠΌ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅. Π’Π΅ΠΏΠ΅ΡΡ Ρ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Ρ Π±ΡΠ΄Π΅Ρ Π·Π°ΠΏΡΠ°ΡΠΈΠ²Π°ΡΡΡΡ ΠΈΠΌΡ, ΠΊΠΎΡΠΎΡΠΎΠ΅ Π·Π°ΡΠ΅ΠΌ Π±ΡΠ΄Π΅Ρ ΠΎΡΠΎΠ±ΡΠ°ΠΆΠ°ΡΡΡΡ Ρ Π΄Π°ΡΠΎΠΉ ΠΈ Π²ΡΠ΅ΠΌΠ΅Π½Π΅ΠΌ.
ΠΡΠΊΡΠΎΠΉΡΠ΅ ΡΠ°ΠΉΠ» Program.cs, ΡΠ΅Π»ΠΊΠ½ΡΠ² Π΅Π³ΠΎ.
ΠΠΎΠ³Π΄Π° Π²Ρ Π² ΠΏΠ΅ΡΠ²ΡΠΉ ΡΠ°Π· ΠΎΡΠΊΡΡΠ²Π°Π΅ΡΠ΅ ΡΠ°ΠΉΠ» C# Π² Visual Studio Code, Π² ΡΠ΅Π΄Π°ΠΊΡΠΎΡΠ΅ Π·Π°Π³ΡΡΠΆΠ°Π΅ΡΡΡ OmniSharp.
ΠΠΎΠ³Π΄Π° Π² Visual Studio Code Π±ΡΠ΄Π΅Ρ ΠΏΡΠ΅Π΄Π»ΠΎΠΆΠ΅Π½ΠΎ Π΄ΠΎΠ±Π°Π²ΠΈΡΡ Π½Π΅Π΄ΠΎΡΡΠ°ΡΡΠΈΠ΅ ΡΠ΅ΡΡΡΡΡ Π΄Π»Ρ ΡΠ±ΠΎΡΠΊΠΈ ΠΈ ΠΎΡΠ»Π°Π΄ΠΊΠΈ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ, Π²ΡΠ±Π΅ΡΠΈΡΠ΅ ΠΠ°.
Π Program.cs Π·Π°ΠΌΠ΅Π½ΠΈΡΠ΅ ΡΠΎΠ΄Π΅ΡΠΆΠΈΠΌΠΎΠ΅ ΠΌΠ΅ΡΠΎΠ΄Π° Main (ΡΡΡΠΎΠΊΠ°, Π²ΡΠ·ΡΠ²Π°ΡΡΠ°Ρ Console.WriteLine ) ΡΠ»Π΅Π΄ΡΡΡΠΈΠΌ ΠΊΠΎΠ΄ΠΎΠΌ:
NewLine β ΡΡΠΎ Π½Π΅Π·Π°Π²ΠΈΡΠΈΠΌΡΠΉ ΠΎΡ ΠΏΠ»Π°ΡΡΠΎΡΠΌΡ ΠΈ ΡΠ·ΡΠΊΠ° ΡΠΏΠΎΡΠΎΠ± Π΄Π»Ρ ΠΏΡΠ΅Π΄ΡΡΠ°Π²Π»Π΅Π½ΠΈΡ ΡΠ°Π·ΡΡΠ²Π° ΡΡΡΠΎΠΊΠΈ. ΠΠ³ΠΎ Π°Π»ΡΡΠ΅ΡΠ½Π°ΡΠΈΠ²Π°ΠΌΠΈ ΡΠ²Π»ΡΡΡΡΡ \n Π² C# ΠΈ vbCrLf Π² Visual Basic.
Π Visual Studio Code Π½Π΅ΠΎΠ±Ρ ΠΎΠ΄ΠΈΠΌΠΎ ΡΠ²Π½ΠΎ ΡΠΎΡ ΡΠ°Π½ΠΈΡΡ ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΡ. Π ΠΎΡΠ»ΠΈΡΠΈΠ΅ ΠΎΡ Visual Studio, ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΡ ΡΠ°ΠΉΠ»ΠΎΠ² Π½Π΅ ΡΠΎΡ ΡΠ°Π½ΡΡΡΡΡ Π°Π²ΡΠΎΠΌΠ°ΡΠΈΡΠ΅ΡΠΊΠΈ ΠΏΡΠΈ ΡΠ±ΠΎΡΠΊΠ΅ ΠΈ Π·Π°ΠΏΡΡΠΊΠ΅ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ.
ΠΠ°ΠΏΡΡΡΠΈΡΠ΅ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΡ Π΅ΡΠ΅ ΡΠ°Π·:
ΠΠ°ΠΆΠΌΠΈΡΠ΅ Π»ΡΠ±ΡΡ ΠΊΠ»Π°Π²ΠΈΡΡ Π΄Π»Ρ Π²ΡΡ ΠΎΠ΄Π° ΠΈΠ· ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΡ.
















