I. Introduction
Benpian development environment
1, the operating system: the Windows 10 X64
2, the SDK: .NET 2.0 Core the Preview
. 3, VS Code: 1.14
Second, the installation & configuration
1, VS Code Download & install
(1) Download: https://code.visualstudio.com/
(2) Installation Steps: The next step has been to, nothing special emphasis
2, the installation-dependent extension
Spread | Explanation |
---|---|
C# | Including syntax highlighting, intellisense, definition, find all references and so on. Debugging support. Network core (CoreCLR). |
Chinese (Simplified) | Simplified Chinese patch |
Shortcut key (Ctrl + Shift + X) into the Extensions Manager page, search for the name of the installation can be extended directly, or click the left side of the toolbar icon to enter the Extension Manager page
macOS version shortcut is Shift + Commnad + X
Third, the project creation & development
1. Create a project
#使用命令提示符(cmd)
或者
Windows PowerShell
#1、打开项目文件夹
d: && cd d:\projects #2、创建项目 dotnet new console -n helloworld
2, plug-in installation
- Open the project folder
- You must be plug-in installation
Open Windows Explorer (Ctrl + Shift + E), and then open the file Progrom.cs
VS Code detected missing two plug-ins
OmniSharp, .NET Core Debugger will automatically download and install
Install the full output after completion:
Updating C# dependencies...
Platform: win32, x86_64
Downloading package 'OmniSharp (.NET 4.6 / x64)' (15622 KB) .................... Done! Downloading package '.NET Core Debugger (Windows / x64)' (43510 KB) .................... Done! Installing package 'OmniSharp (.NET 4.6 / x64)' Installing package '.NET Core Debugger (Windows / x64)' Finished
3, compile and debug the project
After the plug-in installed, VS Code will be prompted to lack the necessary compiler & debugger configuration, whether to add, select Yes to
- Start Debugging
Shortcuts F5 debugging can be started directly
Through the debug panel (Ctrl + Shift + D) patterning operation may also
Debug output:
-------------------------------------------------------------------
You may only use the Microsoft .NET Core Debugger (vsdbg) with
Visual Studio Code, Visual Studio or Visual Studio for Mac software to help you develop and test your applications. ------------------------------------------------------------------- Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.0-preview2-25407-01\System.Private.CoreLib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. Loaded 'd:\Projects\helloworld\bin\Debug\netcoreapp2.0\helloworld.dll'. Symbols loaded. Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.0-preview2-25407-01\System.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.0-preview2-25407-01\System.Console.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.0-preview2-25407-01\System.Threading.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.0-preview2-25407-01\System.Runtime.Extensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. Hello World! The program '[4180]
helloworld
.dll' has exited with code 0 (0x0).